quarto-dev / quarto-dev/quarto-cli
Code listings and "filename" cause error for PDF files
Open
@cscheid is already working on this.
Since Apr 1, 2024.
bug
crossref
latex
listings
lua
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When setting "listings: true" for format PDF, the div parameter "filename" causes an error:
Package keyval Error: filename undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
...
l.151 \begin{lstlisting}[filename=Terminal]
Using "title" instead of "filename" does not throw the error. However, "title" does not produce the code listings heading in html.
Steps to reproduce
---
title: "Test Listings"
format:
pdf:
listings: true
---
## Test with listings
```{.zsh filename="Terminal"}
echo "Hello World"
```
more text
Expected behavior
- "filename" should be used as title for the code
Actual behavior
- The PDF compilation stops with an error
Your environment
- IDE: Version 2023.12.1+402 (2023.12.1+402)
- Quarto: version 1.4.552
- macOS: Sonoma 14.4.1
Quarto check output
No response
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.
Assessment
This issue has not been assessed yet.