Closed Minh-AnhHuynh closed 1 year ago
Just to confirm: did I understand correctly that this works without the short-captions filter, but fails if the filter is invoked? Also, could you post a minimal qmd file? That'd make it easier for us to investigate the issue.
Yes that is right, when the filter is used, the crossref attached to the filter fails. Here is a minimal reproductible example, using RStudio to render the quarto file to a pdf format.
Thank you for the excellent example. It seems that Quarto and this filter are just incompatible. As far as I can see this cannot be fixed here.
I suggest to raise this with the Quarto team at https://github.com/quarto-dev/quarto-cli. It will be much easier to support this when Quarto switches from pandoc 2.19 to pandoc 3.x.
For other quarto folks looking at this. In quarto, you don't need to use short-captions.lua
. Instead, you use the fig-scap
attribute directly in the figure:
![This is the long R logo caption.](R_logo.png){#fig-R-short-cap fig-scap="R logo"}
Hello,
Using quarto, I am unable to crossref using regular citation syntax, with short-captions.lua pandoc filter. Figures without the short caption filter can be crossreferenced but not with that filter. I am forced to use the latex alternative which is less practical for another reason.
I am not sure if the problem comes from quarto or this filter.
This returns
?@fig-cap
Anything that is not
@fig-
breaks as quarto expects a bibliography citation instead.See (fig:test<empty citation>).
\ref{fig-cap}
works.