quarto-dev / quarto-dev/quarto-cli

Quarto LaTeX engine needlessly runs two passes

Open
#10,453 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement latex
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Even for the simplest of the documents, without TOC, references, citations, etc. the engine runs two passes. And even after the first rendering it keeps running LaTeX twice.

Vanilla latexmk is smarter here, or perhaps careless, but at least it detects when the file hasn't changed at all, and after the first run, if you keep the ancillary files, it tends to run just one pass. In any case, I can't use vanilla latexml because of https://github.com/quarto-dev/quarto-cli/issues/9016.

Steps to reproduce

Create a document like:

---
latex-min-runs: 1
latex-clean: false
---

# Section

Content

And run quarto render <doc> --to pdf on it.

Expected behavior

LaTeX is run once, or at least after the first rendering it's run once.

Actual behavior

Latex is always run at least twice.

Your environment
  • Command line
  • macOS Sonoma 14.4.1
Quarto check output
Quarto 1.5.56
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.56
      Path: /Users/carlos/.venvs/base/lib/python3.12/site-packages/quarto_cli/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /opt/homebrew/bin
      Version: undefined

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.4
      Path: /Users/carlos/.venvs/base/bin/python3
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /opt/homebrew/Cellar/r/4.4.1/lib/R
      LibPaths:
        - /Users/carlos/.rlibs/base
        - /Users/carlos/Documents/Util
        - /opt/homebrew/lib/R/4.4/site-library
        - /opt/homebrew/Cellar/r/4.4.1/lib/R/library
      knitr: 1.45
      rmarkdown: 2.26

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the shown markdown document and quarto render <doc> --to pdf, using latex-min-runs: 1 and latex-clean: false; search the render path for handling of these options and LaTeX pass decisions. Done means a simple document runs LaTeX once, including on subsequent renders when ancillary files are retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.