Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown to PDF: the output-directory option of pdf-engine breaks the pandoc re-run it #10186

Closed
bp0qd opened this issue Sep 14, 2024 · 1 comment
Labels

Comments

@bp0qd
Copy link

bp0qd commented Sep 14, 2024

Explain the problem.
For some reasons, I use pdf-engine with the "output-directory" option to convert markdown to pdf. When I upgraded the pandoc to 3.3, it do not generate pdf with correct cross-references. I see that it output "LaTeX Warning: ..... Rerun to get ..." but it do not re-run the pdf-engine.

In PDF.sh file, I found the pandoc save the input.tex file into tmpDir and try to read the input.log and input.toc files from same directory after the pdf-engine return results. However, these files have been saved into the outDir directory, which is set by the output-directory option. so the pandoc do not read its output file and do not re-run the pdf-engine.

I think there are two soluation:

  1. the tmpDir and outDir should be same when the pdf-engine is "xelatex"
  2. pandoc should find these file from outDir.

Pandoc Command
pandoc --pdf-engine=xelatex --pdf-engine-opt=-output-directory=output-document-name --from=markdown --filter=pandoc-crossref --lua-filter=path/to/minted.lua --output=document-name md-file-list

Pandoc version
Pandoc 3.3 (Linux Ubuntu 20.04 x86_64)

texlive version
texlive 2024

@bp0qd bp0qd added the bug label Sep 14, 2024
@bp0qd bp0qd changed the title Markdown to PDF: output directory option breaks the pandoc re-run pdf-engine Markdown to PDF: output-directory option of pdf-engine breaks the pandoc re-run it Sep 14, 2024
@bp0qd bp0qd changed the title Markdown to PDF: output-directory option of pdf-engine breaks the pandoc re-run it Markdown to PDF: the output-directory option of pdf-engine breaks the pandoc re-run it Sep 14, 2024
@jgm jgm closed this as completed in 04825ce Sep 15, 2024
@jgm
Copy link
Owner

jgm commented Sep 15, 2024

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants