Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Collision for lang-Variable when using specific language for pandoc-citeproc and Babel (Latex) #297

Closed
esthet1cs opened this issue Jul 29, 2017 · 3 comments

Comments

@esthet1cs
Copy link

esthet1cs commented Jul 29, 2017

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)

pandoc -o test.pdf --csl my.csl --bibliography mybib.bib test.md test.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.

@jgm
Copy link
Owner

jgm commented Jul 30, 2017 via email

@esthet1cs
Copy link
Author

esthet1cs commented Jul 31, 2017

Hi John, that's good news, thank you.
Sorry I didn't include this in my first post:

pandoc --version
pandoc 1.19.1
Compiled with pandoc-types 1.17.0.5, texmath 0.9.4.1, highlighting-kate 0.6.4

I'm using Debian Linux (Sid), pandoc 1.19.1 is the current up-to-date version in the Debian unstable repositories.

@esthet1cs
Copy link
Author

Since this issue has already been resolved in recent versions of pandoc, I have moved it to the Debian bug tracking system: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870248
Closing the issue here now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants