PDF output using `cite-method: biblatex` may generate nested optional argument when citing in a theorem title
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- latex
- Domain
- tooling
Research direction
Start with the minimal Quarto .qmd example and index.bib, render it with PDF and cite-method: biblatex, and inspect the generated .tex around the theorem title. Trace how the citation becomes the theorem's optional argument; done means the resulting PDF compiles without nested optional arguments.
Written by the indexing model from the issue text.
Description
Bug description
Take this minimal example:
---
title: "Test"
format:
pdf:
cite-method: biblatex
bibliography: index.bib
---
:::{#thm-test}
## Test [@something, sec. 1]
Test.
:::
When using cite-method: biblatex in a PDF output, such citation in the title of a theorem results in the following .tex code:
\begin{theorem}[Test
\autocite[sec.~1]{something}]\protect\hypertarget{thm-test}{}\label{thm-test}
Test.
\end{theorem}
Which contains nested optional arguments. It is known that TeX does not handle nested square brackets well (e.g. see this LaTeX Stack Exchange post), thus above causes an error when compiling.
Perhaps such nested optional arguments should be handled more carefully? e.g. adding a pair of braces around the optional argument?
Your environment
- IDE: VSCode
- OS: Windows 11
Quarto check output
Quarto 1.7.26
[>] Checking environment information...
Quarto cache location: C:\Users\sun123zxy\AppData\Local\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.26
Path: C:\Program Files\Quarto\bin
CodePage: 936
[>] Checking tools....................OK
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\sun123zxy\AppData\Roaming\TinyTeX\bin\windows\
Version: 2025
[>] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: C:\Program Files\Google\Chrome\Application\chrome.exe
Source: Windows Registry
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.12.4 (Conda)
Path: C:/Users/sun123zxy/.conda/envs/main/python.exe
Jupyter: 5.7.2
Kernels: python3
[>] Checking Jupyter engine render....OK
[>] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
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.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
ecosystem wording
Difficulty 1/5 Under an hour Newbie friendliness 90/100
matrix-org/matrix.org#3649 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·