3

I have a TEX file which works OK with Texlive 2013 but is no longer working on 2014 (using OSX). It gives no error in the 2014 edition, but it does not produce the expected output.

Here is a minimal example that works with 2013 but not in 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}

The output of the 2013 version is this:

enter image description here

And this is the 2014 output:

enter image description here

Pep
  • 31
  • Does other \textarabic stuff work fine and is it only the bibliography that is affected? Do you get any warnings (not necessarily errors)? – moewe Aug 14 '14 at 17:41
  • No problems with \textarabic in the main text. It is a bibliography issue. There is a warning: "Package biblatex Warning: Data model macro 'DeclareDatamodelFields' cannot be u sed in preamble." Has "DeclareDatamodelFields" changed in 2014? – Pep Aug 14 '14 at 17:48
  • If you run your file you will get a warning about \DeclareDatamodelFields: It cannot be used in the preamble anymore. The easiest answer is to put the lines with \DeclareDatamodelFields into a .dbx file (say arabicname.dbx) and load that datamodel file with the datamodel option datamodel=arabname.dbx (so \usepackage[style=authortitle]{biblatex} becomes \usepackage[style=authortitle,datamodel=arabname.dbx]{biblatex}). – moewe Aug 14 '14 at 17:51
  • Exactly \DeclareDatamodelFields used to be usable in the preamble (but it was not encouraged and could lead to nasty errors), so that possibility was removed and now \DeclareDatamodelFields can only be used from datamodel .dbx files. – moewe Aug 14 '14 at 17:52
  • I'm sorry, it should have been datamodel=arabname and \usepackage[style=authortitle,datamodel=arabname]{biblatex} above. One does not add the .dbx file extension in the options. – moewe Aug 14 '14 at 18:01
  • 4
    This question appears to be off-topic because it is about not using certain commands the way they they are intended to be used (which used to be OK with biblatex, but isn't any more). – moewe Aug 15 '14 at 04:09

0 Answers0