How could I output multiple language bibliography style with CSL?

edited 13 days ago
I created a CSL named "general.csl", which is fit with some Chinese journals' requirements. Here is the code:

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl"; class="note" version="1.0" et-al-min="4" et-al-use-first="1" sort-separator=";" page-range-format="expanded" demote-non-dropping-particle="sort-only" default-locale="zh-CN">
...
</macro>
<macro name="en-layout">
<names variable="author" suffix=", ">
<name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
</names>
<choose>
<if type="book" match="any">
...
</macro>
<citation>
<layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
<text macro="en-layout"/>
</layout>
...


When using Markdown to Word transition with Pandoc, both English and Chinese bibliographies share the common style. Here is the pandoc MWE, but no use.

pandoc -s --bibliography "my.bib" --filter pandoc-citeproc --csl "general.csl" -V default-locale="zh-CN" my.md -o out.docx

The output example:
蔡拓, “对中国与世界关系的审视与反思,” 国际政治研究, Vol. 40, No. 6, 2019年, pp. 9–30.

What I want is to illustrate the bibliography with two styles in my CSL based on language.
Right example in Chinese (My CSL defined the Chinese style like this): 蔡拓:《对中国与世界关系的审视与反思》,《国际政治研究》2019年第6期,第9–30页。
  • Different locales are not an official CSL feature. They're unofficially supported in CSL processed by Zotero (because it uses a CSL processor that also handles an alternative, multilingual CSL fomrat), but you should not expect any other CSL processor to handle them correctly
  • @adamsmith OK, thank you. If this issue was solved, it will be more convenient for Chinese user, especially in art and social science scholars to write their papers.
  • @ewardsaidzhou You might try mentioning this on the pandoc support website. I'm not a frequent user of pandoc and have only used it once or twice for conversions, but I think the csl implementation would be via https://hackage.haskell.org/package/pandoc-citeproc
  • edited 11 days ago
    @hughp3 He already did, and I've answered him that this does not work since pandoc-citeproc can't handle CSLm extensions.
Sign In or Register to comment.