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

Honor #+language: #18

Open
EmmanuelCharpentier opened this issue May 25, 2021 · 3 comments
Open

Honor #+language: #18

EmmanuelCharpentier opened this issue May 25, 2021 · 3 comments

Comments

@EmmanuelCharpentier
Copy link

First and foremost : thank you for this : the ability of cite and reference is vital to scientific writing (not limited to academic...) and org-mode lacking it was slowly pushing me to reverting to LaTeX w. cut-and-paste + awkward conversion to .doc for my Latex-shy colleagues. Your processor is a life saver...

Now, I notice that the language: fr option is without effect on org-citeproc output : the "References" section, which should be something like "Bibliographie", or maybe "Références", remains "Bibliography". Sore eye...

What could be done to enhance the situation ?

@andras-simonyi
Copy link
Owner

andras-simonyi commented May 28, 2021

Hello, thanks, it is nice to hear that you find the package helpful. In one respect citeproc-org already honors the language setting, which might be useful for you: it uses the corresponding CSL locale if the locale file is available. This means that if the French CSL locale file is available, then rendering language: fr documents will automatically use French locator names etc. As for the heading of the bibliography section, it can be changed by setting the citeproc-org-org-bib-header, citeproc-org-html-bib-header and citeproc-org-latex-bib-header (depending on the target export format), so one way of providing more flexibility could be setting these variables to "" and adding the desired heading manually. Another option would be to allow these variables to contain mappings from language codes to strings -- would you find this a better solution?

@EmmanuelCharpentier
Copy link
Author

Dear Andras,

Thank you for your prompt answer. I could test it (successfully) with the org-ref syntax (with a snag I'll report in a new issue). A couple remarks :

it uses the corresponding CSL locale if the locale file is available

What is this beast ? More precisely :

  • Where can it be found ?
  • How could I install it ?

Such a beast deserves mention in the documentation (including your README.org...).

it can be changed by setting the citeproc-org-org-bib-header, citeproc-org-html-bib-header and citeproc-org-latex-bib-header

Thanks : I could indeed set header to my preferences (an unnumbered french header).

By the way : the doc might also suggest to use the citeproc processor for all exports, in order to get consistent reference list when exporting to various formats (e. g. PDF, ODT, HTML), which is a god use case of Org...

Another option would be to allow these variables to contain mappings from language codes to strings -- would you find this a better solution?

Indeed. But this would entail a lot of maintenance work, problematic if you are not a polyglot. The "CSL locale" you mentioned earlier seems more applicable.

Thanks again !

@andras-simonyi
Copy link
Owner

Dear Emmanuel,

it uses the corresponding CSL locale if the locale file is available

What is this beast ? More precisely :

* Where can it be found ?

* How could I install it ?

(at least for our purposes here..) CSL locales are files containing language-specific details about how bibliographic references should be formatted: translations of terms, punctuation etc. They can be downloaded from here: https://github.com/citation-style-language/locales

Once you downloaded the locales for the languages you intend to use, put them in a directory somewhere on your system and set the citeproc-org-locales-dir accordingly:

(setq citeproc-org-locales-dir [directory containing the locales])

the directory should contain at least the fallback en-US locale.

Such a beast deserves mention in the documentation (including your README.org...).

maybe it could be more extensive but there is a section about locales in the README.

By the way : the doc might also suggest to use the citeproc processor for all exports, in order to get consistent reference list when exporting to various formats (e. g. PDF, ODT, HTML), which is a god use case of Org...

thanks, there are some hints but could be more explicit, I agree.

best wishes,
András

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

No branches or pull requests

2 participants