Skip to content

Using markup in crossref labels? #7386

Answered by cscheid
iandol asked this question in Q&A
Oct 28, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Unfortunately that's not trivial to do, because it involves changing the code that renders a Figure (and Table, Listing, etc). In 1.4 prereleases, what you can do is write an empty Lua filter which installs a custom FloatRefTarget renderer for the docx format, taking over the rendering process entirely.

We don't have great documentation for that yet, but the skeleton to get started is here: https://quarto.org/docs/prerelease/1.4/lua_changes.html#custom-formats-and-custom-renderers

The docx renderer for FloatRefTarget nodes is here: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/filters/customnodes/floatreftarget.lua#L370-L437 You'll want to start there.

If you want to ch…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@iandol
Comment options

@cscheid
Comment options

Answer selected by iandol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants