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
#fig:reference doesn't work if caption isn't provided #39
Comments
Can you share the command you're testing with? |
Sorry for the delay. It's been awhile, so I will try to reproduce tonight or within the next couple days and get back to you. |
I generated using the following command:
This results in a document with the following text:
When given this test document:
|
I'm running into the same issue but am unable to use the workaround. Using the markdown above, it generates pandoc -F mermaid-filter -F pandoc-crossref -M link-citations=true --citeproc use-cases.md --pdf-engine=pdflatex -o use-cases.pdf Note the caption does not render, either. |
@dtbuchholz I'm also running into the same issue, and it seems to be an issue with pandoc. I'm not sure if @raghur can fix this, but if mermaid-filter is used with pandoc-crossref, mermaid-filter seems to work partially (i.e., theme parameter works, but caption and #fig:id does not, no matter they are combined or not). The workaround is that, when I execute
This outputs the desired result. I read some pandoc document, I guess it could be possible that when pandoc filter mermaid-filter have done some modification to pandoc AST, pandoc-crossref no longer recognize them as markdown syntax. But I'm only pulling this out of my ass. (Windows 10, pandoc 3.1.6.2) |
@ErrorTzy thanks for the heads up. i actually just tried running my original command, and now it works! fwiw, i'm on Mac M1 (OS 13.4.1) and am using pandoc 3.1.2 |
Took me a while to figure out why pandoc-crossref wasn't working with mermaid-filter. Suggest updating the documentation.
It doesn't work with
{.mermaid caption="reference-name"}
It doesn't work with
{.mermaid #fig:reference-name}
It does work when they're combined:
{.mermaid caption="Caption" #fig:reference-name}
The text was updated successfully, but these errors were encountered: