Current code formatting options for pdf documents non compliant with using the `minted` package

Open
#13,137 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
latex, lua
Domain
documentation

Research direction

Start in src/resources/filters/crossref/meta.lua at the linked lines and inspect the existing ifelse options around package setup. Render a PDF document using minted and confirm that the generated LaTeX no longer reports that \listoflistings is already defined.

Written by the indexing model from the issue text.

Description

enhancement latex
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

In code https://github.com/quarto-dev/quarto-cli/blob/8e9761e0450bb0d77e484bae16c03d963063eaa4/src/resources/filters/crossref/meta.lua#L25-L43, add the following ifelse option:

usePackage("minted").

Indeed, the minted latex package already defines command \listoflistings, rendering the following index.log error:

! LaTeX Error: Command \listoflistings already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.254 ...command*\listoflistings\lstlistoflistings
                                                  
Your command was ignored.

I also tried bypassing this behaviour, providing option code-block-render: minted, but I guess that key is a pure LLM hallucination.

Steps to reproduce

No response

Actual behavior

No response

Expected behavior

No response

Your environment

No response

Quarto check output

Quarto 1.7.31
[>] Checking environment information...
Quarto cache location: C:\Users\basti\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.31
Path: C:\Users\basti\AppData\Local\Programs\Quarto\bin
CodePage: 1252

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

[>] Checking LaTeX....................OK
Tex: (not detected)

[>] 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.13.2
Path: C:/Users/basti/AppData/Local/Programs/Python/Python313/python.exe
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with py -m pip install jupyter

[>] Checking R installation...........OK
Version: 4.2.1
Path: C:/PROGRA~1/R/R-4.2.1
LibPaths:
- C:/Users/basti/AppData/Local/R/win-library/4.2
- C:/Program Files/R/R-4.2.1/library
knitr: 1.49
rmarkdown: 2.29

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

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

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.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.