quarto-dev / quarto-dev/quarto-cli
Support short caption in formats other than `latex`
@cscheid is already working on this.
Since Mar 23, 2023.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Hello,
Per this issue, I am reporting a bug when trying to crossreference a figure:
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.
![**Bold caption** [@Armas.2004]](figure.jpeg){#fig-cap short-caption="**short-cap**"}
@fig-cap returns ?@fig-cap
Anything that is not @fig- breaks as quarto expects a bibliography citation instead.
@fig:test returns (fig:test).
\ref{fig-cap} works.
Here is a minimal reproductible example.
Instead, I have to use \ref{fig-cap} to reference my figure. The issue is that going to visual mode would remove the bold modifications I make, which is why I would have liked to use the quarto syntax.
For example, (**Figure \ref{fig-cap}**) is returned as (**Figure** \ref{fig-cap}) in visual mode which is not what I want.
I am using the latest version of quarto (1.2.335) and RStudio (4.2.2) on Windows 11, 22H2 lastest version.
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.