Skip to content

Is there a way to get the citation generated in Quarto (like the Quarto Subcaption) and pass it to a ggplot2 plot, without manually creating the reference string? #11784

Answered by lphmn
lphmn asked this question in Q&A
Discussion options

You must be logged in to vote

Sounds good thank you.

As a side note, if you pass a reference from a code block to the document, underscores in the reference name can break the reference. You might already know this, but underscores _ prevent the reference from being passed from a code block. However, if there are no underscores _, cross-referencing currently works in Quarto from a code block. Please see images below (they are from my other Quarto document not the example that @mcanouil provided).

Image one with underscore

Image two with no underscore

Edit 1 based on @mcanouil next response: Thank you for the advice. I will do better in the future. While it won't look as nice as my screenshots above, the overall synt…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lphmn
Comment options

@mcanouil
Comment options

mcanouil Jan 3, 2025
Collaborator

@lphmn
Comment options

Answer selected by lphmn
@mcanouil
Comment options

mcanouil Jan 6, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants