aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-07-20 12:14:43 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-07-20 12:14:43 -0700
commit7102254e244b37c91d6b35b4940511a8656edc49 (patch)
treea9e59ee7ecb9b74f824d8cd98a5d050d72cf020d /pandoc.hs
parent93877e5a2290ea9e67e2047d3876fc0b7699b4ff (diff)
downloadpandoc-7102254e244b37c91d6b35b4940511a8656edc49.tar.gz
PDF generation improvements.
* `Text.Pandoc.PDF` exports `makePDF` instead of `tex2pdf`. (API change.) * `makePDF` walks the pandoc AST and checks for the existence of images in the local directory. If they are not found, it attempts to find them, either in the directory containing the first source file, or at an absolute URL, or at a URL relative to the base URL of the first command line argument. * Closes #917.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 18124da3a..79bade221 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -31,7 +31,7 @@ writers.
-}
module Main where
import Text.Pandoc
-import Text.Pandoc.PDF (tex2pdf)
+import Text.Pandoc.PDF (makePDF)
import Text.Pandoc.Readers.LaTeX (handleIncludes)
import Text.Pandoc.Shared ( tabFilter, readDataFileUTF8, safeRead,
headerShift, normalize, err, warn )
@@ -1113,7 +1113,7 @@ main = do
Right (IOByteStringWriter f) -> f writerOptions doc0 >>= writeBinary
Right (PureStringWriter f)
| pdfOutput -> do
- res <- tex2pdf latexEngine $ f writerOptions doc0
+ res <- makePDF latexEngine f writerOptions doc0
case res of
Right pdf -> writeBinary pdf
Left err' -> err 43 $ UTF8.toStringLazy err'