Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.6k
Description
The section ofLanguage variables states that the variable oflang
key in the YAML section is based on BCP47. However, some correct tags do not work when producing a PDF file from a md file via pandoc with pandoc'sdefault.latex template.
Let's consider the tag of Japanese language as an example. Since its correct BCP47 tag isja
, I setlang: ja
in the YAML section. However, this caused the following error hindering the document generation:
Error producing PDF.! Argument of\str_uppercase:n has an extra }.<inserted text>\parl.64\setotherlanguage[]{}
However, I replaceja
withjp
(Regional Code for Japan, so it's incorrect tag for the Japanese language, in a strict sense), I can get the PDF I want.
Would you have any idea about why this is happening, or would you mind adding some notes that some tags of BCP47 might not work and that regional tags might work forlang
key to the MANUAL?
MWE
test-lang.md
---#lang: ja ## Correct BCP47 tag for Japanese language, NOT WORKABLE for pandoclang: jp ## INCORRECT BCP47 tag for Japanese language, workable for pandoc## Japanese font settingheader-includes: | \usepackage{zxjatype} \setCJKmainfont{SourceHanSansJP-Medium.otf}---こんにちは世界!::: {lang=jp}> こんにちは世界!:::
Bash command
pandoc test-lang.md --pdf-engine=xelatex -o test-lang.pdf --template=my/path/to/template.tex