`date` keywords and formatting does not work in PDF
cderv opened this issue · comments
---
date: today
date-format: long #"MMMM DD, YYYY" # "`r format(Sys.Date(), '%B %d, %Y')`"
---
Does not seem to work for format: pdf
. How does dynamic date work in pdf output?
quarto version: quarto-0.9.228-macos.pkg (Pkg)
Originally posted by @eyayaw in #452 (reply in thread)
@dragonstyle is this supposed to be supported in other format than HTML yet ?
It does not seem so as the magic happens in
quarto-cli/src/format/html/format-html-title.ts
Lines 279 to 294 in 6fbd9e5
so only for HTML
For other formats it seems were are only doing
quarto-cli/src/command/render/render.ts
Lines 907 to 914 in 6fbd9e5
which does not take into accound
date-format
but this does not explain why today
is shown in the PDF output instead of the resolved date 🤔
Thank you for taking the initiative, Christophe (@cderv).
This is definitely not working as it should - I will take a look! Thanks for reporting it and digging in!
I also just stumbled across this. Not sure if helpful, but I've noted that date keywords (kind of) work for PDF output inside a quarto project. Only kind of, because the date-format
has no effect. Have created a minimum working example here.
Thanks @pat-alt, it means the project structure is directly related. This is not the first case where something works differently on Project vs single file.
@dragonstyle If you want me to have a deeper look, I can do it.
I should have a fix in for this tomorrow AM! I'll post here when its ready...
Jus building a release that should have the changes the make this work seamlessly across any format...