I need special characters (accents, cyrillic glyphs) in my file. Cyrillic seems to work well with Linux Libertine, but accents trigger warnings:

LaTeX Font Warning: Font shape `OT1/LinLibertine_R.otf(0)/m/it' undefined
(Font)              using `OT1/cmr/m/n' instead on input line 26.

Question is: how do I need to fix my code/how can I use accents in this setup (xelatex + Libertine OTF fonts) without falling back to OT1/cmr?

Here is my example file:


% General font-related definitions at the top! (Taken from
% http://www.linuxlibertine.org/fileadmin/user_upload/PDF/Libertine-XeTex-DE.pdf)
%\usepackage{csquotes} % Causes some error messages?

% Load font from current working directory.
  BoldFont          = LinLibertine_RZ.otf,
  ItalicFont        = LinLibertine_RI.otf,
  BoldItalicFont    = LinLibertine_RZI.otf,
  BoldFont          = LinBiolinum_RB.otf,
  ItalicFont        = LinBiolinum_RI.otf,
  BoldItalicFont    = LinBiolinum_RI.otf, % FIXME?!

zas\'{y}pat’\\ % This is line 27.

(I have all the *.otf files in my current working directory.)

Thanks in advance.

  • 1
    Avoid loading xunicode (and also xltxtra). Instructions telling to load them are largely outdated. – egreg Jul 8 '14 at 12:01
  • And instrutions telling to load xunicode before fontspec are plainly wrong - even on old systems. xunicode must always be loaded after fontspec so that it can pick up the correct encoding. – Ulrike Fischer Jul 8 '14 at 13:12
  • I see, thanks! Without loading these two packages, accents seem to work flawlessly and without warnings. I guess I should suggest a fix for linuxlibertine.org/fileadmin/user_upload/PDF/…, from which I have taken my preambel. – mfuglos Jul 13 '14 at 0:47

Don't load xunicode along with fontspec. Instructions telling you to do so are very outdated. Also xltxtra is not needed, for the same reason.

There has been a period of time when loading xunicode was recommended; but this was at the initial stages of development of fontspec. Since some years, fontspec loads xunicode at the right point, so there are two cases:

  1. the call to xunicode comes before than fontspec, which will cause problems;

  2. the call to xunicode comes later than fontspec, which is useless.

The conclusion is obvious. ;-)

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.