我有一个 TEX 文件,它在 Texlive 2013 中可以正常工作,但在 2014 中就不能正常工作了(使用 OSX)。它在 2014 版中没有出现错误,但没有产生预期的输出。
下面是一个适用于 2013 年但不适用于 2014 年的最小示例:
\documentclass[a4paper,12pt]{article}
\usepackage{hyperref}
\usepackage{fontspec}
\newfontfamily\arabicfont[Script=Arabic]{XB Zar}
\setmainfont[Numbers=OldStyle,Ligatures=Historic,Scale=1.3]{TeX Gyre Pagella}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\usepackage[hyperref=true,natbib=true,style=authortitle,citestyle=authoryear-ibid,
sorting=nyt,autocite=footnote,backref=true,doi=false,isbn=false,url=false,
eprint=false,backend=biber,maxbibnames=30]{biblatex}
%% ARABIC NAME fields definition
\DeclareDatamodelFields[type=field, datatype=literal]{arabname}
\DeclareDatamodelFields[type=field, datatype=literal]{arabsurname}
\DeclareDatamodelFields[type=field, datatype=literal]{name}
\DeclareDatamodelFields[type=field, datatype=literal]{surname}
\DeclareDatamodelFields[type=field, datatype=literal]{rname}
\DeclareDatamodelFields[type=field, datatype=literal]{rsurname}
\DeclareDatamodelFields[type=field, datatype=literal]{lrname}
\DeclareDatamodelFields[type=field, datatype=literal]{hyear}
\DeclareDatamodelFields[type=field, datatype=literal]{sortaname}
%% ARABIC bibliography Driver
\DeclareBibliographyDriver{arabicname}{%
\usebibmacro{bibindex}%
\iffieldundef{name}{\textit{\printfield{rname}}}{
\iffieldundef{surname}{\textit{\printfield{name}}}
{\textit{\printfield{surname}}\addcomma\addspace
\textit{\printfield{name}}}}
\addspace
\iffieldundef{arabsurname}{\printfield{arabname}}
{\printfield{arabsurname}\addspace\printfield{arabname}}
\addspace
\printfield[parens]{year}
\addcomma\addspace
\usebibmacro{pageref}
}
\DeclareCiteCommand{\acite}
{}{\iffieldundef{name}{\printtext[bibhyperref]{\textit{\printfield{rname}}}}
{\iffieldundef{surname}{\printtext[bibhyperref]{\textit{\printfield{name}}}}
{\printtext[bibhyperref]{\textit{\printfield{name}}\addspace\textit{\printfield{surname}}}}}}
{}{}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@arabicname{yusuf,
arabname = {\textarabic{الحجاج}},
arabsurname = {\textarabic{بن يوسف الثقفي}},
name = {al-Ḥajjāj},
surname = {\autocap{i}bn Yūsuf al-Thaqfī},
rname = {al-Hajjaj},
rsurname = {ibn Yusuf al-Thaqfi},
year = {661-714},
hyear = {40-95},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This is a special text cite \acite{yusuf}
\printbibliography
\end{document}
2013 版本的输出如下:
这是 2014 年的产量: