-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF metadata with formatted titles #4
Comments
Can you point me at the LaTeX that isn't correct in this case? I'm having trouble finding it when |
I'm not completely sure how the incorrect parts looked like exactly, so I tried to reproduce it with b4dd1ab and ---
title: "An [R]{.proglang} Package"
title-plain: "An R Package"
format:
pdf: default
jss-pdf:
keep-tex: true
pdf-engine: pdflatex
--- (I am sure I used pdflatex since the JSS style guide mentions that the document should be compiled with pdflatex.) The resulting TeX file then contains \hypersetup{
pdftitle={An Package},
colorlinks=true,
linkcolor={blue},
filecolor={Maroon},
citecolor={Blue},
urlcolor={Blue},
pdfcreator={LaTeX via pandoc}} which is included by the default Pandoc template that is based only on the However, in contrast to the OP in my experiment actually the incorrect Pandoc metadata was overwritten by the default metadata of the JSS class file, and not the other way around (https://github.com/quarto-journals/jss/blob/main/_extensions/jss/jss.cls#L453 and Line 461 in a5b928a
I also saw your recent commit (a5b928a) that adds a jss/_extensions/jss/partials/title.tex Lines 8 to 10 in a5b928a
Line 151 in a5b928a
Line 159 in a5b928a
|
Good call I didn't think to look in the class file itself. I'll revert that change! |
I am having this issue with pandoc |
We're happy to help - you'll need to provide some additional information in order for us to do so. Currently if I: mkdir test
cd test
quarto use template quarto-journals/jss --no-prompt
quarto render test.qmd It successfully renders. |
Yes. Sorry, I realised I should provide more information but my issue is exactly as described in the earlier posts so I didn't think of anything to add. The problem is with markups in the title. If I use
where the extra line is to replace "R" in the title with
You can see how "R" with the markup is ignored at the end of I am using quarto |
Ok I can reproduce this using the above - the document titles are correct in this case, but the Currently, to fix this, the JSS format would need to entirely replace the core pdf template, since that is where the Question - how does the incorrect title manifest itself in the rendered document? Just trying to weight how much to invest in trying to patch / fix this... |
It doesn't... as far as I can tell. Even the title in the pdf metadata comes from |
I noticed that currently the PDF metadata is incorrect if
title:
contains formatted parts such as[...]{.pkg}
or[...]{.proglang}
, even iftitle-plain
is specified. The problem seems to be that the default Pandoc template (re-)sets the metadata and overrides the metadata generated by the JSS class file (which uses the plain title).I think there are two main options:
title
for the plain title and a new optionaltitle-formatted
for the formatted title (similar to the keywords); then the Pandoc template would automatically use the plain title whenever it falls back to thetitle
information and resetting the metadata would not mess up the title metadatalmodern
) but rather use a custom reduced template and include only desired Pandoc partials for e.g. tables but not the hypersetup blockI guess the second alternative would be cleaner since it would not reset and redefine things already handled by the JSS class file.
The text was updated successfully, but these errors were encountered: