2

I want to buld a book, but I have non stop error! The file use everywhere on tex file Linux Libertine O and other linux libertine font. I would like to know, how to change all font without change every font by another font.

\documentclass[12pt,french]{book}
\usepackage{libertine}
\setmainfont{Linux Libertine O}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Mapping=tex-text]{Linux Biolinum O}

\begin{document}
\include{frontmatter}
\pagestyle{headings}
\pagenumbering{arabic}
\include{touslesserpents}
\include{8multipliés}
\include{Tortues}
ABC abc
\end{document}

Error is :

The font "Linux Libertine O" cannot be found.
The font "Linux Biolinum O" cannot be found
11
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Commented Apr 7, 2015 at 22:20
  • 1
    Could you explain what you want to do, as well? What do you mean by changing all the fonts (?) without changing every font? We definitely need an MWE to see how you are configuring the fonts now. It would also help to know what errors you are getting - what makes you think the font is the problem?
    – cfr
    Commented Apr 7, 2015 at 22:22
  • 1
    What happens if you replace \usepackage{libertine} with \usepackage{fontspec}?
    – Mico
    Commented Apr 7, 2015 at 22:29
  • 2
    You need to install the linux libertine fonts or delete the lines \usepackage{libertine} \setmainfont{Linux Libertine O} \setromanfont[Mapping=tex-text]{Linux Libertine O} \setsansfont[Mapping=tex-text]{Linux Biolinum O} and use the default tex fonts instead Commented Apr 7, 2015 at 22:31
  • 1
    @cfr they are, but then tex wouldn't say it couldn't find them in a standard distribution, so given the rather sketchy information in the question, backing stuff out to get a working document seems like the start of a plan:-) Commented Apr 7, 2015 at 23:58

2 Answers 2

4

The best solution is probably just to load the libertine package. This package will automatically detect that you are using XeLaTeX or LuaTeX and load fontspec in that case. If you are using LaTeX or pdfLaTeX, it will use a traditional font configuration instead.

\documentclass[12pt,french]{book}
\usepackage{libertine}

\begin{document}
\include{frontmatter}
\pagestyle{headings}
\pagenumbering{arabic}
\include{touslesserpents}
\include{8multipliés}
\include{Tortues}
\end{document}

I do get a couple of warnings in this case. Apparently, the libertine package attempts to pick some font features which the fonts don't actually support. (At least, not in the versions I have.) But starting with the package is definitely the best strategy. You can then customise it by picking appropriate options if you wish.

0

I don't know what operating system or TeX platform you're using but on Ubuntu with TeXLive 2014 this works for me, when compiled with xelatex.

\documentclass[12pt,french]{book}
\usepackage[MnSymbol]{mathspec}
\setmainfont{Linux Libertine O}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Mapping=tex-text]{Linux Biolinum O}

\begin{document}
« Bonjour tout le monde ! »
\end{document}

Alternatively, if that does not work, try:

\documentclass[12pt,french]{book}
\usepackage[MnSymbol]{mathspec}
\setmainfont{Linux Libertine}
\setromanfont[Mapping=tex-text]{Linux Libertine}
\setsansfont[Mapping=tex-text]{Linux Biolinum}

\begin{document}
« Bonjour tout le monde ! »
\end{document}
11
  • How does this solve the problem?
    – user31729
    Commented Apr 7, 2015 at 22:51
  • On OS X 10.10 and all tex update installed this code doesn't work! fontspec error: "font-not-found" The font "Linux Libertine O" cannot be found.
    – SigmaPi
    Commented Apr 7, 2015 at 22:54
  • Try Linux Libertine and Linux Biolinum without the O at the end and see if that works. Commented Apr 7, 2015 at 22:55
  • Same probleme...
    – SigmaPi
    Commented Apr 7, 2015 at 22:56
  • 1
    Ok I fund a part of the solution! If I remove the O that work. thx @JoeCorneli
    – SigmaPi
    Commented Apr 7, 2015 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .