Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-newhall/88557892c6646b8cfda9e8963c2b733d to your computer and use it in GitHub Desktop.
Save tom-newhall/88557892c6646b8cfda9e8963c2b733d to your computer and use it in GitHub Desktop.
How to make Japanese and Chinese print correctly for Chicago 17ed Author Date style CSL

Hack for rendering Chinese/japanese names without a comma between the family and given name using standard CSL (and not Juris-m)

(based on this thread from the Zotero forums: https://forums.zotero.org/discussion/110097/using-the-note-field-for-rendering-mutilingual-text-with-csl#latest )

Add the following to the "contributors" section of the Chicago 17e Author-date format. Something similar should work for other styles. You may need to add something similar to deal with multi-author works. This assumes that your Authors are listed like this in Zotero:

Last/family name: Ōtani
Given/first name: Yūka 大谷由香 

N.B. The next bit is my original solution, but I have updated it with a slightly better one below

For this you need to set the language variable to be anything (does not have to actually specify the language, it's just a placeholder), while assuring that other (non-CJK) entries are blank and do not have anything in the language variable

<group delimiter=". "> <!-- here is the period after the last names-->
            <choose> <!-- sets up a conditional style-->
                <if variable="language"> <!-- that is, if the "language" variable has anything in it-->
                    <names variable="author"> <!-- then for the "author"-->
                        <name and="text" name-as-sort-order="first" sort-separator=" " delimiter=", " delimiter-precedes-last="always"/> <!-- the "sort separator" (between the authors family and given name) is simply a space-->
                        <label form="short" prefix=", "/>
                        <substitute>
                            <names variable="editor"/> <!-- should apply to other categories of author too-->
                            <names variable="translator"/>
                            <names variable="director"/>
                            <text macro="substitute-title"/>
                            <text macro="title"/>
                        </substitute>
                    </names>
                </if> <!-- ends the condition if there is a language variable set-->
                <else> <!-- if there is not a language variable set (i.e. the "default")-->
                    <names variable="author">  <!-- for the author fariable-->
                        <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/> <!-- use a comma as the sort separater betwen the first and last names-->
                        <label form="short" prefix=", "/>
                        <substitute>
                            <names variable="editor"/>
                            <names variable="translator"/>
                            <names variable="director"/>
                            <text macro="substitute-title"/>
                            <text macro="title"/>
                        </substitute>
                    </names>
                </else>
            </choose>
            <text macro="recipient"/>
        </group>

This should print out something like Ōtani Yūka 大谷由香 in the bibliography, while allowing the inline citations to remain as (Ōtani 2016) etc.

N.b. this may not work well for "edge cases" i.e. multi author works where some authors have Japanese or Chinese names and some have English names.

Updated solution

Rather than use the language tag to determine whether or not to print a comma between the family and given names of an author, instead using an arbritrary tag in the extra field (output as the note field in the JSON), such as no-comma: true. This way, you can keep the language tag as-is (which are added automatically to many metadata entries), and only have to edit those entries for which this style does apply, rather than every entry where the style doesn't apply. The variable can be anything you like, of course, if you alter the above CSL as such:

             <choose> <!-- sets up a conditional style-->
                <if variable="no-comma"> <!-- that is, if the variable "no-comma" has anything in it. In practice, this means that in the `extra` field in Zotero (or `note` field in the json, you need to write something like `no-comma: true`. Since this merely checks if there is anything in the variable, not what is in the variable, `no-comma: false` or `no-comma: foo` or `no-comma: maybe` etc would all have the identical effect. -->
                    <names variable="author"> <!-- then for the "author"-->
                        <name and="text" name-as-sort-order="first" sort-separator=" " delimiter=", " delimiter-precedes-last="always"/> <!-- the "sort separator" (between the authors family and given name) is simply a space-->
                        <label form="short" prefix=", "/>
                        <substitute>
                            <names variable="editor"/> <!-- should apply to other categories of author too-->
                            <names variable="translator"/>
                            <names variable="director"/>
                            <text macro="substitute-title"/>
                            <text macro="title"/>
                        </substitute>
                    </names>
                </if> <!-- ends the condition if there is a language variable set-->

How to print out the title of books without italics

Add something like the following to the extra variable of your item in zotero: cjk-title: 日本仏教綜合研究 <i>[Interdisciplinary studies in Japanese Buddhism]</i>

of course the translation of the title is optional, as are the surrounding italics; but these should be rendered

and add/replace the following to the macros section that deals with titles (<macro name="container-title"> in the Chicago 17e Author Date style to enable adding an extra bit of the title, not in italics.

            <else-if type="legal_case" match="none">
                <group delimiter=" ">
                    <text variable="container-title" text-case="title" font-style="italic"/>
                    <choose>
                        <if variable="cjk-title">
                            <text variable="cjk-title"/>
                        </if>
                    </choose>
                </group>
            </else-if>

Together, these should print something like the following for Japanese/Chinese Citations:

Ōtani Yūka 大谷由香. 2016. “(Ronbun) Nissōsō Shunjō wo hattan toshita nissōkan ‘Enshū kaitai’ ronsō [論文]入宋僧俊芿を発端とした日宋間「円宗戒体」論争 [The Controversy between Japan and China over the Precepts (sila) : Concerning the Role of the Japanese Monk Shunjo (俊芿)].” Nihon Bukkyō sōgō kenkyū 日本仏教綜合研究 [Interdisciplinary studies in Japanese Buddhism] 14: 105–132.

While retaining the following format for english citations:

Newhall, Thomas. 2014. “A Study of the Concept of Jieti ‘The Essence of the Precepts’ in Daoxuan’s (596-667) Vinaya Commentaries.” Journal of Chinese Buddhist Studies, no. 27: 181–208.

Note the absence of the comma, and the regular (non-italic) script of the Japanese journal title in the first example.

For reference, this is generated based on the (better) CSL-JSON produced by Better Bibtex:

[{
    "id": "newhall-2014",
    "author": [
      {
        "family": "Newhall",
        "given": "Thomas"
      }
    ],
    "citation-key": "newhall-2014",
    "container-title": "Journal of Chinese Buddhist Studies",
    "issue": "27",
    "issued": {
      "date-parts": [
        [
          "2014"
        ]
      ]
    },
    "page": "181-208",
    "title": "A Study of the Concept of Jieti “The Essence of the Precepts” in Daoxuan's (596-667) Vinaya Commentaries",
    "type": "article-journal"
  },
{
    "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: 日本仏教綜合研究 <i>[Interdisciplinary studies in Japanese Buddhism]</i>",
    "page": "105–132",
    "publisher": "日本仏教綜合研究学会",
    "source": "search.library.ucla.edu",
    "title": "(Ronbun) Nissōsō Shunjō wo hattan toshita nissōkan 'Enshū kaitai' ronsō[論文]入宋僧俊芿を発端とした日宋間「円宗戒体」論争 [The Controversy between Japan and China over the Precepts (sila) : Concerning the Role of the Japanese Monk Shunjo (俊芿)]",
    "type": "article-journal",
    "volume": "14"
  },
]

Please feel free to email me if you would simply like the whole CSL file: tomnewhall [at] ucla [dot] edu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment