Skip to content
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

German quotes: csquotes: true in defaults file has no effect #10403

Open
periodicpoint opened this issue Nov 22, 2024 · 5 comments
Open

German quotes: csquotes: true in defaults file has no effect #10403

periodicpoint opened this issue Nov 22, 2024 · 5 comments
Labels

Comments

@periodicpoint
Copy link

periodicpoint commented Nov 22, 2024

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 setting lang: de-De in the metadata file seems to have no effect. The from: 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 the csquotes: or an alternative variable in the defaults file (if necessary). The variable csquotes: 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

@jgm
Copy link
Owner

jgm commented Nov 22, 2024

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.

@jgm jgm closed this as completed Nov 22, 2024
@periodicpoint
Copy link
Author

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. :)

@jgm
Copy link
Owner

jgm commented Nov 22, 2024

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...

@periodicpoint
Copy link
Author

periodicpoint commented Nov 22, 2024

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 .

@jgm
Copy link
Owner

jgm commented Nov 23, 2024

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.

@jgm jgm reopened this Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants