Open periodicpoint opened 4 days ago
There is no --csquotes
option; you control this by setting a variable or metadata (as documented). That is why it doesn't work to put csquotes: true
directly in the defaults file. All of this is as documented.
This might be a misunderstanding. Actually I did put csquotes: true
in my defaults file but this is not working. If I put csquotes: true
in the metadata file and link it in the defaults file it is working. What am I overlooking?
Regarding the documentation: I know that this is documented. Is this documented well? I do not think so TBH. All I can find in the manual is the following:
“If the mathspec variable is set, xelatex will use mathspec instead of unicode-math. The upquote and microtype packages are used if available, and csquotes will be used for typography if the csquotes variable or metadata field is set to a true value.”
Which is not that clear IMHO. I would suggest putting it explicitly in the defaults file in the docs. This is another topic though.
In any case. Thank you four you quick response. :)
It can go in your defaults file but it must be under the variables
or metadata
section, to set a variable.
csquotes will be used for typography if the csquotes variable or metadata field is set to a true value.
seems clear enough: it is saying that you need to set the csquotes
variable or metadata field to cause csquotes to be used. It does not say that you can use csquotes
as a top-level field in defaults files, nor does the documentation for defaults files suggest that...
Thank you for the clarification! :) Yet, I am afraid, for me it is still not working as expected.
Case A: Working File: defaults.yaml
metadata:
csquotes: true
Case B: Not working File: defaults.yaml
variables:
csquotes: true
It should work in case B too (which would be the more logical case), in my opinion .
I see why it isn't working.
https://github.com/jgm/pandoc/blob/main/src/Text/Pandoc/Writers/LaTeX.hs#L160-L164
Returns Nothing when the variable has a Boolean value, as it would get from a defaults file like this.
I'll reopen this issue to fix this.
The goal I wanted to have German quotes:
„…“
instead of English quotes:“…”
when transpiling from markdown to PDF.The problem When transpiling with pandoc and a defaults file from markdown to pdf,
csquotes: true
in the defaults has no effect. However if put it in the metadata file it works. The language settinglang: de-De
in the metadata file seems to have no effect. Thefrom: markdown+smart
extension has no effect.Expected behavior Localized quotes and in this case German quotes should be controlled via the
lang:
variable in the metadata file (solely in the best case) and/or via thecsquotes:
or an alternative variable in the defaults file (if necessary). The variablecsquotes:
loads the corresponding LaTeX package and defines a specific property of the typography of the LaTeX file and resulting PDF and hence should not be managed as metadata.Pandoc version pandoc 3.1.11.1 Features: +server +lua Scripting engine: Lua 5.4
OS Arch Linux TeXLive: texlive-full Version: 1:2024.20240331-1