You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.
It seems that both Babel and pandoc-citeproc use lang as a variable to set the language, but they don't use the same language codes, e.g. for german: ngerman (Babel) and de-DE (pandoc-citeproc), so when using Babel and pandoc-citeproc, setting another language throws an error either from Babel or from pandoc-citeproc.
What I'm trying to do: Generate a PDF from Markdown using two separate files (markdown + yaml)
The lang is defined in test.yaml. If I set lang: ngerman, pandoc-citeproc throws an error because it is looking for locales-ng.xml, which doesn't exist.
If I set lang: de-DE, Babel throws an error because it doesn't know that language.
Temporary Workaround
It seems, that pandoc-citeproc takes the first two letters of the lang variable and then looks for a file named locales-xx.xml, where xx are the first two letters of the lang variable, e.g. when defining lang: ngerman, pandoc-citeproc looks for locales-ng.xml.
Making a symbolic link from locales-ng.xml to locales-de-DE.xml did the trick. I haven't tried other languages, though.
The text was updated successfully, but these errors were encountered:
Sorry, what pandoc version? In recent versions of pandoc,
`lang` has been regularized, so de-DE should work, and
pandoc will convert to 'ngerman' as needed for Babel output.
It seems that both Babel and pandoc-citeproc use
lang
as a variable to set the language, but they don't use the same language codes, e.g. for german:ngerman
(Babel) andde-DE
(pandoc-citeproc), so when using Babel and pandoc-citeproc, setting another language throws an error either from Babel or from pandoc-citeproc.What I'm trying to do: Generate a PDF from Markdown using two separate files (markdown + yaml)
pandoc -o test.pdf --csl my.csl --bibliography mybib.bib test.md test.yaml
The
lang
is defined in test.yaml. If I setlang: ngerman
, pandoc-citeproc throws an error because it is looking for locales-ng.xml, which doesn't exist.If I set
lang: de-DE
, Babel throws an error because it doesn't know that language.Temporary Workaround
It seems, that pandoc-citeproc takes the first two letters of the
lang
variable and then looks for a file namedlocales-xx.xml
, where xx are the first two letters of thelang
variable, e.g. when defininglang: ngerman
, pandoc-citeproc looks forlocales-ng.xml
.Making a symbolic link from
locales-ng.xml
tolocales-de-DE.xml
did the trick. I haven't tried other languages, though.The text was updated successfully, but these errors were encountered: