diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2023-11-03 10:40:38 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2023-11-03 10:40:38 -0700 |
| commit | bb36f127e2487144110973b450f57a67a66e5db4 (patch) | |
| tree | 6d5fa4f1367c8cf46718b0d78dd3dd4879fa7e60 /src | |
| parent | 5132f1ef330d3eb2a0bf87037035beaeaf19d3f3 (diff) | |
LaTeX template: include bookmark package unconditionally.
This package produces better PDF bookmarks than hyperref
and does it on the first pass.
As a consequence, we now default to running LaTeX only
once in producing a PDF (instead of twice). If a table
of contents is present, we still have to run three times
to get the page numbers.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/PDF.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index bd6b928c7..def3697f6 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -267,7 +267,7 @@ tex2pdf :: (PandocMonad m, MonadIO m) tex2pdf program args tmpDir source = do let numruns | takeBaseName program == "latexmk" = 1 | "\\tableofcontents" `T.isInfixOf` source = 3 -- to get page numbers - | otherwise = 2 -- 1 run won't give you PDF bookmarks + | otherwise = 1 (exit, log', mbPdf) <- runTeXProgram program args numruns tmpDir source case (exit, mbPdf) of (ExitFailure _, _) -> do |
