Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure reference not processed in manuscript notebook using fenced div #11443

Open
andjar opened this issue Nov 14, 2024 · 7 comments
Open

Figure reference not processed in manuscript notebook using fenced div #11443

andjar opened this issue Nov 14, 2024 · 7 comments
Assignees
Labels
bug Something isn't working manuscript Issues related to manuscript output
Milestone

Comments

@andjar
Copy link

andjar commented Nov 14, 2024

Bug description

I was trying to make subfigures in a notebook to be embedded in my main article, preferably as supplemental figures. However, I was unable to get the figure references in the notebook to render properly when rendering the project from the command line.

Possibly related to #8956?

Steps to reproduce

Create an empty main document/article and a notebook containing:

---
title: Test notebook
---

## Section

::: {#fig-example}

```{r}
plot(1)
```

Caption
:::

@fig-example is an example.

Then run quarto render from the command line to generate an html file.

Expected behavior

I expect the figure reference to render as: Figure 1 is an example.

Actual behavior

The figure reference is rendered as: @fig-example is an example.

Your environment

  • IDE: Rstudio 2023.06.2 Build 561
  • OS: Windows 10

Quarto check output

Quarto 1.6.32
[>] Checking environment information...
      Quarto cache location: C:\Users\user\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.6.32
      Path: C:\Users\user\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

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

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\user\AppData\Roaming\TinyTeX\bin\win32\
      Version: 2022

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

[>] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: C:/Users/user/AppData/Local/Programs/Python/Python312/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.3.1
      Path: C:/PROGRA~1/R/R-43~1.1
      LibPaths:
        - C:/Users/user/AppData/Local/R/win-library/4.3
        - C:/Program Files/R/R-4.3.1/library
      knitr: 1.48
      rmarkdown: 2.28

[>] Checking Knitr engine render......OK
@andjar andjar added the bug Something isn't working label Nov 14, 2024
@cscheid
Copy link
Collaborator

cscheid commented Nov 14, 2024

I can't repro:

Image

@cscheid cscheid added the needs-repro Issues that are blocked until reporter provides an adequate reproduction label Nov 14, 2024
@andjar
Copy link
Author

andjar commented Nov 15, 2024

I have uploaded the raw and rendered files to a github repo for reproduction: https://github.com/andjar/quarto-bug-figure-ref

To preview the rendered html notebook page: https://html-preview.github.io/?url=https://github.com/andjar/quarto-bug-figure-ref/blob/main/_manuscript/test-preview.html

@cscheid
Copy link
Collaborator

cscheid commented Nov 15, 2024

Sorry, that's still not enough. What about quarto render index.qmd is failing? That's what I ran and that's the result I got. Can you provide more details?

@andjar
Copy link
Author

andjar commented Nov 15, 2024

So, the error is only present in the extra notebooks, not the main manuscript. If the code in the original post is put into the main manuscript file index.qmd, it renders correctly to Figure 1 is an example.

For the notebook test.qmd, the reference is rendered as @fig-example is an example. This happens with both quarto render and quarto render test.qmd. The commands run fine without warnings or error messages:

> quarto render test.qmd

processing file: test.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: test.knit.md

Rendering qmd embeds [test.qmd]
Rendering output notebook [test.qmd]
Rendering HTML preview [test.qmd]
Output created: _manuscript\test-preview.html

@cscheid
Copy link
Collaborator

cscheid commented Nov 15, 2024

Ok, that clarifies things. Thanks!

@cscheid cscheid removed the needs-repro Issues that are blocked until reporter provides an adequate reproduction label Nov 15, 2024
@cscheid cscheid self-assigned this Nov 15, 2024
@cscheid cscheid added the manuscript Issues related to manuscript output label Nov 15, 2024
@cscheid cscheid added this to the v1.7 milestone Nov 15, 2024
@andjar
Copy link
Author

andjar commented Nov 15, 2024

Thanks for your patience and for looking into this!

@cscheid
Copy link
Collaborator

cscheid commented Nov 15, 2024

Just to set expectations: we won't have time to look into this in the near future, but we have a backlog of manuscript issues that we will take on all at once, hopefully in 1.7 or 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working manuscript Issues related to manuscript output
Projects
None yet
Development

No branches or pull requests

2 participants