I really need help if possible. I am struggling with an error I do not how to fix. After tracking it, it points to the langsci-unified style I am using since with other bibliography styles (for instance, apa), the document prints fine. The error is always related to something like IsDOIGray like this one : ! Undefined control sequence. \blx@theformat #1->{\color {lsDOIGray}DOI\addcolon \space \ifhyperref {\href... l.17 or ! Package xcolor Error: Undefined color `lsDOIGray'.

Please help me to fix it if possible. I am compiling with Xelatex.

\setmainfont{Times New Roman}
\usepackage[style=langsci-unified, natbib]{biblatex}






2 Answers 2


Apparently langsci-unified, which is distributed on CTAN as part of the langsci bundle, is assumed to be used together with the langscibook document class.

If you use the style with a different class, you need to make sure you load xcolor and supply a suitable colour definition for lsDOIGray. The definition in the following is taken from langscibook.cls


\usepackage[style=langsci-unified, natbib]{biblatex}





Sigfridsson, Emma & Ulf Ryde. 1998. Comparison of methods for deriving atomic charges from the electrostatic potential and moments. Journal of Computational Chemistry 19(4). 377–395. DOI: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

It is pretty unusual for a bibliography style to tacitly assume you are using a specific class, so you may want to contact the style developer about this at https://github.com/langsci/langscibook/issues.

  • Thanks a lot. It works now. I think that is what I should do. May 20 at 18:54

I may have a workaround. The Trick may be, to not use the langsci-class, but your usual document class (e.g. scrartcl) and to paste a whole lot of code into the preamble, in order to define the langsci-style right in the document. For instance, I could not even implement style=langsci-unified, it was treated as if there was no such style.

Stefan Müller proposes to simply paste the following code into the preamble and it works fine for me (source: https://hpsg.hu-berlin.de/~stefan/Lehre/unified-biblatex.sty):

    datamodel=langsci,   % add authauthor and autheditor as possible fields to
                                % bibtex entries
    useprefix = true, %sort von, van, de where they should appear
%        sorting=ydnt,


% if no langid is set, it is English:
% https://tex.stackexchange.com/a/279302
      \step[fieldset=langid, fieldvalue={english}]

% If the user provided a shortauthor in the bibtex entry, we use the authentic author (as with the
% authorindex package) if it is defined, otherwise we use the author.
% This gets F/T as shorthand right and puts the guys in the index.

    {\iffieldequalstr{labelnamesource}{shortauthor} % If biblatex uses shortauthor as the label of a bibitem
      {\ifnameundef{authauthor}                     % we check whether there is something in authauthor
        {\indexnames{author}}                       % if not, we use author
        {\indexnames{authauthor}}}                  % if yes, we use authauthor
      {\iffieldequalstr{labelnamesource}{author}    % if biblatex uses author we similarly test for
                                                    % authauthor and use this field
        {\ifnameundef{authauthor}% if defined use authauthor
          {\indexnames{authauthor}}} % if defined use this field
        {\iffieldequalstr{labelnamesource}{shorteditor} % same for editor
          {\indexnames{labelname}}}}}               % as a fallback we index on whatever biblatex used.



% cite somebodys work


ATTENTION: If you use \addbibresource, you have to put it right after the line ]{biblatex} and before \usepackage{xcolor}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.