Replies: 1 comment 7 replies
-
You should upgrade your version of Quarto CLI before going further in your trials. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Repex
https://github.com/SereDef/Quarto_repex [Note: this is a quarto book because that is my use case]
The problem
I would like to specify some URLs in the yml header of my quarto documents so I can then use the links multiple times inside the document. These links should be rendered correctly in both HTML (which is fine) and PDF (which is giving me problems).
What I have tried
I first tried to use variables, as described in the documentation. So for example:
which did not work very well and was only recognised correctly in the HTML output.
So then I tried to write an ad-hoc lua filter to replace the variable names in the document with the associated value form meta.
I would specify the header as before and use the following kind of arbitrary syntax in the document
[repex](__repo_url__)
. I register the filter at the top level of the_quarto.yml
(because I am writing a book and I want this applied to all chapters) and I checked that the filter does run during rendering of both outputs. This is what the filter looks like:Now this again works for HTML output but (for the love of me) not in the PDF. When I check the intermediate tex file I see
\href{__repo_url__}{repex}
, so__repo_url__
is not being replaced (despite the filter running). I think it has something to do with the order with which Pandoc applies Lua filters (that is different for the HTML and the PDF output...?). I needMeta
to run beforeLink
but I cannot make it happen for latex. Help?My
quarto check
outputBeta Was this translation helpful? Give feedback.
All reactions