Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
    
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

2 Answers 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.

share|improve this answer

Install the fonts from: http://www.linuxlibertine.org/index.php?id=91&L=1.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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