Using the note field for rendering mutilingual text with CSL

edited December 11, 2023
Hello everyone

I'm trying to use pandoc's citeproc to render multilingual citations, saved in zotero, and automatically exported to JSON. I think I almost have it as I need them, but there's a few issues still:

Right now, my html output renders like this:

Inline citation: (Ōtani 2016)

Bibliography:
Ōtani, Yūka 大谷由香. 2016. “(Ronbun) Nissōsō Shunjō wo hattan toshita nissōkan ‘Enshū kaitai’ ronsō[論文]入宋僧俊芿を発端とした日宋間「円宗戒体」論争.” Nihon Bukkyō sōgō kenkyū 日本仏教綜合研究 14: 105–132.

There are two changes I would like to make to this.

First, I would like to be able to keep the inline citation as is, while removing the comma after the name "Ōtani." I know this is possible if I were to use Juris-m but the Juris-m renderer doesn't work with Pandoc citeproc. My goal is to output to Tex, rather than word, and also maintain links between inline citations and the bibliography.

Second, I would like to keep the English language transliteration of the journal title in italics (i.e. Nihon Bukkyō sōgō kenkyū), while making the Japanese text for the journal title (i.e. 日本仏教綜合研究) to be regular non-italicized text. I thought this would be possible by including the Japanese text for the title of the journal as a "note" field, but I couldn't get the "note" field to print at all (see following example).


Here is the CSL JSON for this entry (exported by Better Bibtex):

```json
{
"id": "otani-2016",
"author": [{ "family": "Ōtani", "given": "Yūka 大谷由香" }],
"citation-key": "otani-2016",
"container-title": "Nihon Bukkyō sōgō kenkyū 日本仏教綜合研究",
"DOI": "10.20588/nbs.14.0_105",
"ISSN": "1348-4850",
"issued": { "date-parts": [["2016"]] },
"language": "jpn",
"note": "cjk-title: 日本仏教綜合研究",
"page": "105–132",
"publisher": "日本仏教綜合研究学会",
"source": "search.library.ucla.edu",
"title": "(Ronbun) Nissōsō Shunjō wo hattan toshita nissōkan 'Enshū kaitai' ronsō[論文]入宋僧俊芿を発端とした日宋間「円宗戒体」論争",
"type": "article-journal",
"volume": "14"
}
```

And here is the part of the CSL file that I think is relevant: This is based on the Chicago 17e author-date style.

``````
< /macro>























``````


I hope all that makes sense. Please let me know if this is even possible or if I'm asking too much of CSL....

(sorry, I didn't realize the above wouldn't render properly, here is : a gist of the above

Thanks in advance,
  • This is more of a pandoc question, but I'm pretty sure this just can't be done using standard CSL. That's one of the reasons Juris-m was created.
  • Ok thanks so much for the quick response. I'll try asking the pandoc folks.
  • Hi, just wanted to follow up on this, since this might be an issue that others face. Basically, here is a workaround for rendering multilingual (well, specifically Chinese and Japanese citations into English) using pandoc citeproc and a modified Chicago 17e Author-date CSL style sheet.

    I explain this below, but here is a gist that may better illustrate the solution:
    (https://gist.github.com/tom-newhall/88557892c6646b8cfda9e8963c2b733d)

    Basically, to solve my second question above (i.e. how to format the Chinese of a publication title without using italics, while keeping the italics for the English transliteration or translation), you can include Chinese/Japanese name of the publication in the "extra" field of the Zotero with some sort of variable tag like `cjk-title: 日本仏教綜合研究`, and access this in CSL (see the gist here https://gist.github.com/tom-newhall/88557892c6646b8cfda9e8963c2b733d#how-to-print-out-the-title-of-books-without-italics)


    For the first issue: how to get rid of the comma between family and given names for publications that are in Japanese or Chinese, you can workaround this by setting the "language" tag in Zotero.

    Now, standard CSL can't do much with language tags; you can't easily say "for language A do this, and for language B" do that, as far as I can tell. There is something there using `locale` variable in the `` tag, but I could not get this particular feature to work.

    However, you can use CSL to check whether or not a language tag is present.

    For example, if the variable `language` has information in it, you can have CSL do one thing, and have it do something different if it is empty.

    So, you can have a default as a standard format for English language publications with a comma between the family and given name, and a different format for Chinese/Japanese publications without a comma between the names.

    To implement this, you can make the modifications to the Chicago 17e Author-date style (and probably other styles) illustrated in the same gist here: https://gist.github.com/tom-newhall/88557892c6646b8cfda9e8963c2b733d#hack-for-rendering-chinesejapanese-names-without-a-comma-between-the-family-and-given-name-using-standard-csl-and-not-juris-m


    Hope that is helpful for anyone in Asian studies who is crazy enough to want to write in pandoc!
  • After a suggestion from someone on the pandoc group, I altered my solution to use an arbitrary variable in the `extra` field (e.g. `no-comma: true`) rather than the `language` tag, since the `language` tag may be needed for other things, and would require much hand-editing of Zotero entries. Please see the updated gist:
    https://gist.github.com/tom-newhall/88557892c6646b8cfda9e8963c2b733d
Sign In or Register to comment.