Commit graph

14 commits

Author SHA1 Message Date
John MacFarlane
7102254e24 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.
2013-07-20 12:14:43 -07:00
John MacFarlane
fd0f8c1a8a Text.Pandoc.PDF: put temporary output directory in TEXINPUTS.
This will help later when we try to download external resources.
We can put them in the temp directory.  See #917.
2013-07-18 21:53:34 -07:00
John MacFarlane
26fefa040a PDF: On Windows, create temdir in working directory.
Reason:  the path to the system temp directory may contain tildes,
which causes problems in LaTeX when the username is more than
eight characters.

Closes #777.
2013-04-26 20:36:06 -07:00
John MacFarlane
29c8f1554b PDF: Run latex at least two times.
This ensures that the PDFs will have hyperlinked bookmarks
(PDF table of contents that can be displayed in the sidebar).
2012-03-19 09:25:33 -07:00
John MacFarlane
1ab21530b4 PDF: run latex 3 times if --toc specified.
Closes #424.
2012-02-19 19:11:40 -08:00
John MacFarlane
12aa83f70e PDF: Only run latex twice if \tableofcontents is present.
Note:  This will pick up on \tableofcontents even if it's
in a verbatim environment.  But the worst that can happen is
that the document takes a bit longer to build.
2012-02-07 22:00:22 -08:00
John MacFarlane
acdbdd7da5 Text.Pandoc.PDF: Simplified tex2pdf.
We no longer try to parse the log file to determine whether latex
needs to be rerun. Instead, we run latex twice -- which should be
enough for table of contents and hyperrefs.

Closes #402.
2012-02-06 12:12:23 -08:00
John MacFarlane
e6e4311ddd pandoc: Better error checking. 2012-01-21 14:18:36 -08:00
John MacFarlane
d7b67f48cd PDF: Use string instead of special TeXProgram type. 2012-01-20 21:36:04 -08:00
John MacFarlane
b4a6c02343 PDF: Better error message. 2012-01-20 19:52:56 -08:00
John MacFarlane
f519f0a1ad PDF: Export TeXProgram type. 2012-01-20 19:13:47 -08:00
John MacFarlane
c9c78344b1 PDF: Removed TeXError type, just return a bytestring. 2012-01-20 19:11:35 -08:00
John MacFarlane
50e16e6855 Fixed -Wall errors in PDF module. 2012-01-20 19:04:08 -08:00
John MacFarlane
9d1118ac1f Added Text.Pandoc.PDF - converts latex to PDF. 2012-01-20 18:57:16 -08:00