Skip to content

Commit

Permalink
Text.Pandoc.PDF: read .toc and .log files from output directory.
Browse files Browse the repository at this point in the history
When this is different from the input directory, this is
where .toc and .log files are written.

Closes #10186.
  • Loading branch information
jgm committed Sep 15, 2024
1 parent 1cdf267 commit 04825ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/Pandoc/PDF.hs
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,14 @@ runTeXProgram program args tmpDir outDir = do
(handlePDFProgramNotFound program)
report $ MakePDFInfo "LaTeX output" (UTF8.toText $ BL.toStrict out)
-- parse log to see if we need to rerun LaTeX
let logFile = replaceExtension file ".log"
let logFile = replaceExtension outfile ".log"
logExists <- fileExists logFile
logContents <- if logExists
then BL.fromStrict <$> readFileStrict logFile
else return mempty
let rerunWarnings = checkForRerun logContents
tocHash <- do
let tocFile = replaceExtension file ".toc"
let tocFile = replaceExtension outfile ".toc"
tocFileExists <- fileExists tocFile
if tocFileExists
then do
Expand Down

0 comments on commit 04825ce

Please sign in to comment.