1

CJK names still pose a problem in bibliographies using biblatex: there is no built-in option to differentiate between the name in transcription and in CJK characters, which sometimes leads to constructs that are not adaptable like

author = {{Wang Li 王力}}

There’s a great solution written by the user moewe for the package biblatex-chicago: CJK Bibliography Problem, Biblatex-Chicago author-date style

It lets you specify names as shown below and will display them correctly in the footnote and the bibliography:

author = {family=Wang, given=Li, cjk=王力}

I’m not proficient enough myself, but could it be adapted to work with biblatex?

Philipp
  • 1,595
  • The name code should also work for standard biblatex styles. You just need to copy it and change chicago-authordate.dbx to <name of the style you want to use>.dbx (e.g. authoryear.dbx). – moewe Sep 01 '21 at 16:02
  • 93-nameparts.tex in the doc/latex/biblatex/examples folder contains also an example of the cjk name template. – Ulrike Fischer Sep 01 '21 at 16:07
  • @moewe Thanks for pointing that out, it works. Should I delete this question or do you want to make your comment an answer so it might help others? – Philipp Sep 03 '21 at 12:33

1 Answers1

2

The CJK code from CJK Bibliography Problem, Biblatex-Chicago author-date style is largely based on what the biblatex example document 93-nameparts.tex does (93-nameparts.tex and 93-nameparts.dbx). Indeed the code applies to formatting macros that are the same in biblatex-chicago and the biblatex standard styles, so

\documentclass[a4paper]{article}
\usepackage{libertinus-otf}
\usepackage[fallback]{xeCJK}

\begin{filecontents}{morenameparts-cjk.dbx} \ProvidesFile{cjk-names.dbx}[2016/07/24 extended name format for biblatex] \DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,cjk} \end{filecontents}

\usepackage[ backend=biber, style=authoryear, datamodel=morenameparts-cjk, ]{biblatex}

\DeclareSortingNamekeyTemplate[cjk]{ \keypart{ \namepart{family} } \keypart{ \namepart{given} } \keypart{ \namepart{cjk} } }

\DeclareUniquenameTemplate[cjk]{ \namepart[base=true]{family} \namepart[disambiguation=full]{given} \namepart[disambiguation=full]{cjk} }

\newbibmacro*{name:cjk}[3]{% \usebibmacro{name:delim}{#2#3#1}% \usebibmacro{name:hook}{#2#3#1}% \mkbibnamefamily{#1}% \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}}% \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnamecjk{#3}}}

\newbibmacro{labelname:western}{% \ifcase\value{uniquename}% \usebibmacro{name:family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}% \or \ifuseprefix {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffixi}} {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiveni} {\namepartprefixi} {\namepartsuffixi}}% \or \usebibmacro{name:given-family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}% \fi \usebibmacro{name:andothers}}

\newbibmacro{labelname:cjk}{% \iffieldequalstr{uniquepart}{base}% {\usebibmacro{name:cjk} {\namepartfamily} {\empty} {\empty}} {\iffieldequalstr{uniquepart}{given}% {\usebibmacro{name:cjk} {\namepartfamily} {\namepartgiven} {\empty}} {\usebibmacro{name:cjk} {\namepartfamily} {\namepartgiven} {\namepartcjk}}}}

\DeclareNameFormat{labelname}{% \ifuniquenametemplatename{cjk} {\usebibmacro{labelname:cjk}} {\usebibmacro{labelname:western}}% \usebibmacro{name:andothers}}

\DeclareNameFormat{family-given}{% \ifsortingnamekeytemplatename{cjk} {\usebibmacro{name:cjk}{\namepartfamily}{\namepartgiven}{\namepartcjk}} {\ifgiveninits {\usebibmacro{name:family-given} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:family-given} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}% \usebibmacro{name:andothers}}

\DeclareNameFormat{given-family}{% \ifsortingnamekeytemplatename{cjk} {\usebibmacro{name:cjk}{\namepartfamily}{\namepartgiven}{\namepartcjk}} {\ifgiveninits {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}% \usebibmacro{name:andothers}}

\DeclareNameFormat{family-given/given-family}{% \ifsortingnamekeytemplatename{cjk} {\usebibmacro{name:cjk}{\namepartfamily}{\namepartgiven}{\namepartcjk}} {\ifnumequal{\value{listcount}}{1} {\ifgiveninits {\usebibmacro{name:family-given} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:family-given} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}} \ifboolexpe{% test {\ifdefvoid\namepartgiven} and test {\ifdefvoid\namepartprefix}} {} {\usebibmacro{name:revsdelim}}} {\ifgiveninits {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}} \usebibmacro{name:andothers}}

\begin{filecontents}{\jobname.bib} @book{zhaos, title = {A Nation-State by Construction}, subtitle = {Dynamics of Modern {Chinese} Nationalism}, author = {given=Suisheng, family=Zhao, cjk=趙歲升, nametemplates=cjk}, year = {2011}, address = {Stanford}, publisher = {Stanford University Press}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} \autocite{zhaos} \printbibliography \end{document}

should work.

(On my machine I can't get the CJK characters to show, but I'm not really familiar enough with xeCJK to debug this.)

moewe
  • 175,683