quarto-dev / quarto-dev/quarto-cli

.quarto directory should have quarto's version information in it to remove stale crossref index and prevent unexplicit errors

Open
#8,626 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

Quarto produces an error when attempting to render or preview a document with a thm- cross reference.
Other cross references suggest as rem- and .proof cross references do not cause this error.

Steps to reproduce

Render or preview this Quarto file:

---
title: Theorems don't work here
format:
  html:
    code-fold: true
---

::: {#thm-line}

## Line

The equation of any straight line, called a linear equation, can be written as:

$$
y = mx + b
$$
:::

See @thm-line.
Expected behavior

No error and document renders.

Actual behavior

Quarto produces the indicated error and the document does not render.

Error running filter /opt/quarto/share/filters/main.lua:
/opt/quarto/share/filters/main.lua:12347: attempt to index a nil value (local 'order')
stack traceback:
/opt/quarto/share/filters/main.lua:11793: in function 'captionPrefix'
/opt/quarto/share/filters/main.lua:20686: in field 'render'
/opt/quarto/share/filters/main.lua:835: in local 'filter_fn'
/opt/quarto/share/filters/main.lua:302: in function </opt/quarto/share/filters/main.lua:292>
(...tail calls...)
[C]: in ?
[C]: in method 'walk'
/opt/quarto/share/filters/main.lua:224: in function </opt/quarto/share/filters/main.lua:214>
(...tail calls...)
/opt/quarto/share/filters/main.lua:936: in local 'callback'
/opt/quarto/share/filters/main.lua:951: in upvalue 'run_emulated_filter_chain'
/opt/quarto/share/filters/main.lua:987: in function </opt/quarto/share/filters/main.lua:984>
stack traceback:
/opt/quarto/share/filters/main.lua:224: in function </opt/quarto/share/filters/main.lua:214>
(...tail calls...)
/opt/quarto/share/filters/main.lua:936: in local 'callback'
/opt/quarto/share/filters/main.lua:951: in upvalue 'run_emulated_filter_chain'
/opt/quarto/share/filters/main.lua:987: in function </opt/quarto/share/filters/main.lua:984>

Your environment
  • IDE: VS Code V
    Version: 1.86.0
    Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
    Date: 2024-01-31T10:27:46.147Z
    Electron: 27.2.3
    ElectronBuildId: 26495564
    Chromium: 118.0.5993.159
    Node.js: 18.17.1
    V8: 11.8.172.18-electron.0
    OS: Linux x64 6.6.10-76060610-generic
  • Quarto Version: 1.4.529
  • OS: Pop!_OS 22.04 LTS
    GNOME Version 42.9
    Windowing System X11
Quarto check output
Quarto 1.4.529
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.529
      Path: /opt/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/robert/.TinyTeX/bin/x86_64-linux
      Version: 2023

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/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.3.2
      Path: /usr/lib/R
      LibPaths:
        - /home/robert/R/x86_64-pc-linux-gnu-library/4.3
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.44
      rmarkdown: 2.23

[✓] 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

Reproduce the failure with the Quarto document in the issue, then inspect the project’s .quarto directory and the filter path reported in /opt/quarto/share/filters/main.lua. Determine how stale cross-reference index data is identified and how Quarto version information should be recorded. Done means the example renders without the nil-value error and existing cross-reference behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.