git.iko.soy/typeable/pandoc
on master help sign in
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).

commit29c8f1554b412a46bee83e224b72e5931f172cb9 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 19 Mar 2012, 09:25 (15 years ago) parent2894df7
1 file changed+2−2
src/Text/Pandoc/PDF.hs+2−2
src/Text/Pandoc/PDF.hs+2−2
@@ -57,8 +57,8 @@ tex2pdf' :: FilePath -- ^ temp directory for output
5757 -> IO (Either ByteString ByteString)
5858tex2pdf' tmpDir program source = do
5959 let numruns = if "\\tableofcontents" `isInfixOf` source
60− then 3
61− else 1
60+ then 3 -- to get page numbers
61+ else 2 -- 1 run won't give you PDF bookmarks
6262 (exit, log', mbPdf) <- runTeXProgram program numruns tmpDir source
6363 let msg = "Error producing PDF from TeX source."
6464 case (exit, mbPdf) of