You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Quarto project with a document and an associated variables file (_variables.yml). When I try to use one of these shortcodes in the fig-scap option, it is not replaced by its associated value. Additionally, and depending on the quotes used for the content of the fig-scap option, the results are different:
If single quotes are used, the shortcode is expressed in its original form (e.g. {{< var vars.ttx >}}).
If double quotes are used, the reference to the figure and its caption is completely broken and so it is not appearing in the list of figures.
Steps to reproduce
I created a github repository with the minimal reproducible example:
The text displayed in the list of figures should appear as: Short text TLex
Actual behavior
Unwanted behavior is highlighted in red in the figure.
Your environment
IDE:RStudio 2024.09.1+394
OS: Windows 10 Pro 22H2
Quarto check output
quarto check
Quarto 1.6.39
[>] 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.39
Path: C:\Users\User\AppData\Local\Programs\Quarto\bin
CodePage: 1252
This is a known issue, and you currently have to use single quotes if you want to use shortcodes in attributes. It's an ugly quirk but one we really cannot easily fix at the moment.
cscheid
changed the title
Issues with variable shortcodes inside fig-scap
Shortcode expansion inside attributes requires single quotes
Dec 10, 2024
Thank you @cscheid! But when I use the single quotes, the result is the unprocessed shortcode (as the figure 2 in my screen capture).
Maybe I am loosing something of your explanation?
Bug description
Hello,
I have a Quarto project with a document and an associated variables file (_variables.yml). When I try to use one of these shortcodes in the fig-scap option, it is not replaced by its associated value. Additionally, and depending on the quotes used for the content of the fig-scap option, the results are different:
If single quotes are used, the shortcode is expressed in its original form (e.g. {{< var vars.ttx >}}).
If double quotes are used, the reference to the figure and its caption is completely broken and so it is not appearing in the list of figures.
Steps to reproduce
I created a github repository with the minimal reproducible example:
https://github.com/marianoibaldi/figscap.git
Expected behavior
The text displayed in the list of figures should appear as: Short text TLex
Actual behavior
Unwanted behavior is highlighted in red in the figure.
Your environment
Quarto check output
quarto check
Quarto 1.6.39
[>] 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.39
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\windows
Version: 2024
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....(None)
[>] Checking R installation...........OK
Version: 4.4.2
Path: C:/PROGRA
1/R/R-441.2LibPaths:
- C:/Users/User/AppData/Local/R/win-library/4.4
- C:/Program Files/R/R-4.4.2/library
knitr: 1.49
rmarkdown: 2.29
[>] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered: