Enable raw strings in fig.cap field with hash pipe syntax #2926
Replies: 4 comments 14 replies
-
I'm not too familiar with Quarto's internal toolchain, but considering its language-agnostic philosophy compared to Rmd, I imagine it'd be preferable to have a language-agnostic solution here, i.e. the same raw string syntax valid for any engine, and also for non-computational tables or images. Perhaps this means introducing a standard notation for raw strings, that allows Quarto to parse such Yaml entries (that are valid Pandoc markdown) without chocking. The same problem happens in the document's Yaml header (LaTeX in title field, etc.), but it's a more obvious problem here, because captions have potentially a lot more content to escape manually). Pandoc itself doesn't seem to mind unescaped maths in Yaml fields. |
Beta Was this translation helpful? Give feedback.
-
Thankfully, as a R user, I can use the following workaround:
which evaluates the caption as an R expression, returning a raw string, which is passed as is to pandoc (no need to escape invalid yaml). From the docs I suspect this is a R-only strategy; I believe it'd be beneficial to have a language-agnostic syntax/convention for passing raw strings. |
Beta Was this translation helpful? Give feedback.
-
It would be nice to have something like Bookdown's Text references for this kind of situation.
|
Beta Was this translation helpful? Give feedback.
-
Closing in favour of #4944 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With standard chunk options, I can bypass the need to escape all those pesky latex backslashes,
unfortunately, the same does not work so well with the hash pipe:
and if I don't use raw strings:
Beta Was this translation helpful? Give feedback.
All reactions