Skip to content

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

Open

Description

@rpchastain

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

Activity

  1. added
    bug
    on Feb 6, 2024
  2. cderv commented on Feb 6, 2024

    @cderv
    Member

    Can you try latest released version which is 1.4.549 ?

    I can't reproduce this issue on my side with latest 1.4 or current dev 1.5 version.

  3. added
    needs-repro
    on Feb 6, 2024
  4. rpchastain commented on Feb 6, 2024

    @rpchastain
    Author

    I've updated to 1.4.549 and the error is still occurring.

  5. cderv commented on Feb 6, 2024

    @cderv
    Member

    I copy pasted the above document in index.qmd

    ---
    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.
    

    Run quarto render index.qmd without error

    pandoc
      to: html
      output-file: index.html
      standalone: true
      section-divs: true
      html-math-method: mathjax
      wrap: none
      default-image-extension: png
    
    metadata
      document-css: false
      link-citations: true
      date-format: long
      lang: en
      title: Theorems don't work here
    
    Output created: index.html
    
    

    image

    So I can't reproduce really. 🤔

  6. mcanouil commented on Feb 7, 2024

    @mcanouil
    Collaborator

    FWIW, no issues either on MacOS.

  7. cscheid commented on Feb 7, 2024

    @cscheid
    Member

    Is it possible that you are working inside a bigger website project? In that case, it's possible that you have a stale crossref index file. Does your project have a .quarto subdirectory? If so, that subdirectory should be safe to delete and then a new render should remove the problem.

    (If this is the underlying cause of the issue, then that's a bug on our side, but sadly one for which we don't currently have a good workaround for.)

  8. rpchastain commented on Feb 7, 2024

    @rpchastain
    Author

    Is it possible that you are working inside a bigger website project? In that case, it's possible that you have a stale crossref index file. Does your project have a .quarto subdirectory? If so, that subdirectory should be safe to delete and then a new render should remove the problem.

    (If this is the underlying cause of the issue, then that's a bug on our side, but sadly one for which we don't currently have a good workaround for.)

    @cscheid I was working in a larger project. Deleting the .quarto directory fixed the issue for me and I'm now able to render the document as expected. Thank you!

  9. added
    support
    and removed
    bug
    needs-repro
    on Feb 7, 2024
  10. cderv commented on Feb 7, 2024

    @cderv
    Member

    (If this is the underlying cause of the issue, then that's a bug on our side, but sadly one for which we don't currently have a good workaround for.)

    It seems this was indeed the problem.

    @cscheid do we want to keep this open to track this issue ?

  11. cscheid commented on Feb 7, 2024

    @cscheid
    Member

    @cderv yes - something like ".quarto directory should have quarto's version information in it"

  12. changed the title [-]Error rendering Quarto file with a thm cross reference[/-] [+].quarto directory should have quarto's version information in it to remove stale crossref index and prevent unexplicit errors[/+] on Feb 7, 2024
  13. reopened this on Feb 7, 2024
  14. added
    bug
    and removed
    support
    on Feb 7, 2024
  15. added this to the v1.5 milestone on Feb 7, 2024
  16. modified the milestones: v1.5, Future on Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugprojects

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions