4

I have TeX Live 2011. I set

\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}

but I get a warning that these fonts are not found! If I try \usepackage{libertineotf}, I get the same warning. I compile with xelatex. Please tell me what is wrong.

  • Imho in texlive xetex doesn't search the texmf trees for open type fonts. You will either have to add them to fontconfig or install the fonts in your system. – Ulrike Fischer Apr 13 '12 at 17:59
  • 1
    Maybe this is not the problem here, but sometimes the "O" is not part of the font name. Run fc-list :outline -f "%{family}\n" in a terminal to get a list of available fonts and check the name. – Gonzalo Medina Apr 13 '12 at 18:48
  • Please, add the information about your operating system. – egreg Apr 14 '12 at 10:35
  • @egreg. My OS is the last of MacBookPro. Probably the Libertine font is already in TeXLive 2011 distribution. – Ratera Apr 15 '12 at 7:32
  • Once you get the font path issue settled, please consider using the libertinus fonts instead. Libertinus Serif is an updated fork of Linus Libertine O, and Libertinus Mono is an updated for of Linux Biolinum O. There is also Libertinus Mono (Linux Libertine Mono O) and Libertinus Math. The one package libertinus has them all. No *.sty file or *.fd files, because the Libertinus fonts are ONLY Open Type, so they ONLY work with fontspec. – user139954 Dec 14 '17 at 18:14
2

I use the following code to help with supporting xetex and pdftex with Linux Libertine and Latin Modern Mono along with Biolinum. You need to use fontspec, and you don't need to load the libertine package at all with xetex unless you want some of the libertine-specific glyph commands, so you can remove it.

\usepackage{ifxetex}
\usepackage{ifthen}

\ifxetex
    \usepackage{libertine}
    \usepackage[log-declarations=false]{xparse} % same as below
  \usepackage[quiet]{fontspec} % remove quiet option to check for errors
  \setromanfont[Ligatures={Common,TeX}]{Linux  Libertine O}
  \setmainfont[Ligatures={Common,TeX}]{Linux  Libertine O}
    \setmonofont[SmallCapsFont={Latin Modern Mono Caps}]{Latin Modern Mono Light}
    \setsansfont{Linux Biolinum O}
    \usepackage{xunicode}
\else
    \usepackage{sansmath}
    %\usepackage{lmodern}
    \usepackage{libertine}
    \usepackage{DejaVuSansMono}
  \usepackage[utf8]{inputenc}
  \usepackage[T1]{fontenc}
  \usepackage{textcomp}
  \usepackage{epstopdf}
  \usepackage[final,expansion=true,protrusion=true,spacing=true,kerning=true]{microtype}
\fi

TeX Live should have the fonts installed already, but I use miktex, so I can't help with distribution specific troubles. Remember to rehash your db.

Update: disregard DejaVuSansMono and update the pdftex code accordingly.

1

You just have to download and install the fonts from: http://www.linuxlibertine.org.

  • The site seems dead. The sourceforge site works, though. – tomasz Dec 13 '17 at 21:41
  • @tomasz, I corrected the link. – Joseph Dec 14 '17 at 15:49

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.