BibLatex Chinese Characters in reference, XeLatex not an option

by Pia   Last Updated April 15, 2019 11:23 AM - source

I am need to cite chinese authors in my thesis. It works fine with Latex but not in BibLatex where I need to cite it within my refernces. Using Xelatex is not an option, as too many errors are showing when converting it. I tried several options before but none of them are working for Biblatex without Xelatex. Any new suggestions?

Thanks in advance!

Edit:

I've been asked to post an example, an entry in my .bib file would look like this:

@misc{chin2012pat,
  author={彤陈},
  year={2012},
  title={Obtaining fatty acids from insect larvae},
  howpublished={Investigacion y Comercializacion
  Biotecnologica Omebit S.A, Santiago. US8895767 B2},
  note={Jun. 11, 2010},
}

As for what I've tried before: I tried to use a CJK block in biblatex, of course that didn't compile properly. I then tried to search stackexchange, unfortunately all solutions involve xelatex.

I don't have a lot of chinese references in my paper, so I was thinking there could be some way to "hardcode" it in, but I'm out of guesses.

Thanks a lot!

Tags : biblatex cjk


Answers 2


Calling biblatex with the option bibencoding=utf8 ensures that unknown Unicode points will be saved as \x{<code point>} in the .bbl file. With the help of \bibsetup we can then change the meaning of \x to do what we prefer with its argument.

For instance, I defined \x to be \chinesechar (a macro name of my own invention), that loads a graphic file named pia<code point>, that I prepared with XeLaTeX; for example, this is pia5f64.tex:

\documentclass{standalone}
\usepackage{fontspec}
\setmainfont{Songti SC}
\begin{document}
^^^^5f64
\end{document}

The other character is Unicode U+9648.

If you are able to coerce CJKutf8 into producing a character from its Unicode, then this indirect method is not necessary. Unfortunately, the documentation seems to be only in Chinese.

I also added a sortname field to the bib entry, in order to get correct alphabetic sorting (I hope Google Translate guessed right).

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{chin2012pat,
  author={彤陈},
  sortname={{Chen Tong}},
  year={2012},
  title={Obtaining fatty acids from insect larvae},
  howpublished={Investigacion y Comercializacion
  Biotecnologica Omebit S.A, Santiago. US8895767 B2},
  note={Jun. 11, 2010},
}
@article{a,
  author={A. Uthor},
  title={Title},
  journal={Journal},
  year=2013,
}
@article{b,
  author={T. Best},
  title={Title},
  journal={Journal},
  year=2013,
}
\end{filecontents*}

\documentclass{article}

\usepackage{graphicx}

\usepackage[bibencoding=utf8]{biblatex}
\addbibresource{\jobname.bib}
\appto\bibsetup{\let\x\chinesechar}

\newcommand\chinesechar[1]{\includegraphics[height=\fontcharht\font`T]{pia#1}}

\begin{document}

\cite{chin2012pat}, \cite{a}, \cite{b}

\printbibliography

\end{document}

enter image description here

Maybe better method

I did some blind experiment with CJKutf8 and this seems to work.

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{chin2012pat,
  author={{\begin{CJK*}{UTF8}{gbsn}彤陈\end{CJK*}}},
  sortname={{Chen Tong}},
  year={2012},
  title={Obtaining fatty acids from insect larvae},
  howpublished={Investigacion y Comercializacion
  Biotecnologica Omebit S.A, Santiago. US8895767 B2},
  note={Jun. 11, 2010},
}
@article{a,
  author={A. Uthor},
  title={Title},
  journal={Journal},
  year=2013,
}
@article{b,
  author={T. Best},
  title={Title},
  journal={Journal},
  year=2013,
}
\end{filecontents*}

\documentclass{article}
\usepackage{CJKutf8}

\usepackage{graphicx}

\usepackage[bibencoding=utf8]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\cite{chin2012pat}, \cite{a}, \cite{b}

\printbibliography

\end{document}

enter image description here

Note

The filecontents* environment is just for convenience in preparing self-contained examples. You don't need it, just supply your own .bib file in the \addbibresource instruction.

egreg
egreg
December 01, 2015 10:12 AM

Just for reference, looks like everything works OK now (2019) using plain bib entry author={彤陈}, in xelatex with fontspec and a suitable font, and biblatex/biber:

chinese characters

MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{chin2012pat,
%  author={{\begin{CJK*}{UTF8}{gbsn}彤陈\end{CJK*}}},
  author={彤陈}, 
  sortname={{Chen Tong}},
  year={2012},
  title={Obtaining fatty acids from insect larvae},
  howpublished={Investigacion y Comercializacion
  Biotecnologica Omebit S.A, Santiago. US8895767 B2},
  note={Jun. 11, 2010},
}
@article{a,
  author={A. Uthor},
  title={Title},
  journal={Journal},
  year=2013,
}
@article{b,
  author={T. Best},
  title={Title},
  journal={Journal},
  year=2013,
}
\end{filecontents*}

\documentclass{article}
%\usepackage{CJKutf8}
\usepackage{fontspec}

\setmainfont{Noto Serif CJK SC}

%\usepackage{graphicx}

%\usepackage[bibencoding=utf8]{biblatex}
\usepackage{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\cite{chin2012pat}, \cite{a}, \cite{b}

\printbibliography

\end{document}
Cicada
Cicada
April 15, 2019 11:14 AM

Related Questions




Revert packages to prior versions

Updated March 06, 2017 22:23 PM