quarto-dev / quarto-dev/quarto-cli
Using unchanged default TeX template or partials changes output
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
Using any TeX partial, even when using the exact same file as Quarto uses by default, changes the .tex file from which the PDF is rendered.
Steps to reproduce
-
Create a new book project
quarto create project book book-test book-title --no-open cd book-testEdit the
_quarto.ymlfile by addingkeep-tex: trueproject: type: book book: title: "book-title" author: "Norah Jones" date: "7/10/2025" chapters: - index.qmd - intro.qmd - summary.qmd - references.qmd bibliography: references.bib format: html: theme: - cosmo - brand pdf: documentclass: scrreprt keep-tex: true -
Render project using
quarto render. This will result inbook.texin the home directory. Rename this file, otherwise it will be overwritten by the next rendering:mv book.tex book_default.tex -
In the home directory, create an empty file which will act as a TeX template partial. For this example I've chosen the
before-title.texpartial, which is empty by default.touch before-title.texSet the project to use the partial by setting
template-partials. The_quarto.ymlfile now looks like this:project: type: book book: title: "book-title" author: "Norah Jones" date: "7/10/2025" chapters: - index.qmd - intro.qmd - summary.qmd - references.qmd bibliography: references.bib format: html: theme: - cosmo - brand pdf: documentclass: scrreprt keep-tex: true template-partials: - before-title.tex
Actual behavior
Compare the book_default.tex and book.tex files to reveal three changed lines:
% diff book.tex book_partial.tex
9,10c9
< DIV=11,
< numbers=noendperiod]{scrreprt}
---
> ]{scrreprt}
138a138
>
141,142d140
<
< \KOMAoption{captions}{tableheading}
- The
DIV=11andnumbers=noendperiodoptions are gone from the\documentclass[...]{scrreprt}call when using any partial - The following line is missing completely when using any partial:
\KOMAoption{captions}{tableheading}
I was able to reproduce this behaviour when using the default template file template: template.tex or other partials like template-partial: title.tex.
In particular the DVI=11 option changes the text area of the PDF, which results in noticeably different text width and thus (when enough text is present in the book) document length.
Expected behavior
The two files should be identical when using default partials, particularly when both the default and user-supplied partial files are empty.
Nota bene, this behaviour does not occur when using quarto render --to latex instead of quarto render with the keep-tex: true option.
Your environment
Positron Version: 2025.07.0 build 204
Code - OSS Version: 1.100.3
Commit: 03ae7a5393c776bb24c23d2aa6a6bfbba90cbc5e
Date: 2025-06-30T16:29:03.492Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Quarto check output
% quarto check
Quarto 1.7.32
[✓] Checking environment information...
Quarto cache location: /Users/gleb/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.85.1: OK
Deno version 1.46.3: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.32
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/gleb/Library/TinyTeX/bin/universal-darwin
Version: 2025
[✓] Checking Chrome Headless....................OK
Chrome: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.2
Path: /Users/gleb/.pyenv/versions/3.13.2/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.4.3
Path: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources
LibPaths:
- /Users/gleb/Library/R/arm64/4.4/library
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.48
rmarkdown: 2.28
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the book project with keep-tex enabled, then compare book_default.tex and the partial-based book.tex. Read the _quarto.yml template-partials configuration and the mentioned before-title.tex, template.tex, and title.tex files. Done means unchanged or empty default partials produce identical generated TeX, including the scrreprt options and KOMAoption line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100