24

So in the last couple of weeks I've had some issues with the Linux Libertine font and package, both don't seem to work anymore on a completely up-to-date version of MacTeX (which is equivalent to TeX Live 2012). The issues don't appear on a Ubuntu 12.04 box which is running TeX Live 2009; I work on both computers regularly so it would be nice if any solution would work on both systems.

I'm compiling my files with pdflatex.

As I have two problems (one with the package and one with the font itself) I'll split this question in two parts.

Libertine Package

I've always been using the libertine package like this:

\documentclass{article}
\usepackage[osf]{libertine}
\usepackage[T1]{fontenc}
\begin{document}
The quick brown fox jumps over the sleazy dog, 0123456789.
\end{document}

This however gives me the following warning and error:

LaTeX Warning: You have requested package `libertine-type1',
               but the package provides `LinuxLibertineO'.


! LaTeX Error: Unknown option `osf' for package `libertine-type1'.

When I ignore it, the output seems to be fine: Linux Libertine

Libertine font

I've also been using this font directly in other documents, like this (cf. How do I use a particular font for a small section of text in my document?):

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\fontfamily{fxlj}\selectfont
The quick brown fox jumps over the sleazy dog, 0123456789.
\end{document}

This gives the following warning:

LaTeX Font Warning: Font shape `OT1/fxlj/m/n' undefined
(Font)              using `OT1/cmr/m/n' instead on input line 3.

And shows the following output:

Not Linux Libertine

1

3 Answers 3

22

The Linux Libertine fonts recently switched from libertine-legacy to libertine-type1 in TeX Live. This resulted in many documents not working any more, especially with old-style-figures.

Libertine Package

Old-style-figures are default in the latest version, so just use:
\usepackage{libertine} or \usepackage[oldstyle]{libertine}.

The fact that the osf option doesn't work seems to be a bug, as they list it in the documentation (nf is also broken).

If you don't want old-style-figures, use: \usepackage[lining]{libertine}

The options oldstyle and lining won't work with the old package - so it's kind of a shame that osf and nf are broken. As of (at least) 2012-10-30 libertine has support for osf and nf again.

Libertine font

The packages and font-names have changed, now you can use one of the following:

\fontfamily{LinuxLibertineO-OsF}\selectfont
\fontfamily{LinuxLibertineO-LF}\selectfont

The first is for old-style figures. Remember: you should always import the package the font comes with, even if you only use it in titles. If you don't, you might have to select the font weight and shape manually (after the font-family) with:

\fontseries{m} % Choose from m (medium), b (bold) and sb (semibold)
\fontshape{i}  % Choose from n (normal), it (italic) and sc (small-caps)

There are many more shapes, the rest is listed in the documentation.

Compatibility

If you want to make your document work on both TeX Live 2012 and 2009, I recommend defining a command for it:

\IfFileExists{libertine-type1.sty}{ % Check for libertine-type1 package
    \newcommand\libertine{LinuxLibertineO-OsF}
}{
    \newcommand\libertine{fxlj}
}

And use the following in your document:

\fontfamily{\libertine}\selectfont

If you want to add options to the libertine package, you can do this in the same way:

\IfFileExists{libertine-type1.sty}{ % Check for libertine-type1 package
    \usepackage[oldstyle]{libertine}
}{
    \usepackage[osf]{libertine}
}

This will work with both the old and the new package. It is also nice to know that the new libertine package also does the \usepackage[T1]{fontenc} for you.

Example

In the following example I've tried to apply as much as possible:

\documentclass{article}
\usepackage{lipsum} % For dummy text

\IfFileExists{libertine-type1.sty}{ % Check for libertine-type1 package
    \newcommand\libertine{LinuxLibertineO-OsF}
    \usepackage[oldstyle]{libertine}
}{
    \newcommand\libertine{fxlj}
    \usepackage[osf]{libertine}
    \usepackage[T1]{fontenc}
}

\begin{document}
\section{\fontfamily{\libertine}\fontseries{b}\fontshape{sc}\selectfont Lorem ipsum dolor sit amet}
\lipsum[2]
\end{document}

With MacTeX 2012:

Lorem ipsum, 2012

With TeX Live 2009:

Lorem ipsum, 2009

It's not exactly the same, but acceptable.

4
  • 7
    To sum up: The new libertine package changes syntax and semantics. If I update my Tex distro, I do not only have to "fix" the code of my present documents, they also get typesetted differently! My carefully tailored 20-page-limited grant application my suddenly end up on page 21. Anybody else feeling reminded of the Windows "DLL hell" from the 90s? Oh my god...
    – Daniel
    Commented Oct 22, 2012 at 8:56
  • While libertine-type1 works with osf or nf, biolinum-type1 apparently doesn't (MiKTeX 2.9); I get "unknown option" errors.
    – doncherry
    Commented Nov 9, 2012 at 20:30
  • The situation may have improved recently, at least in some distributions. I use pdflatex from TexLive on Windows 7. I installed TexLive in early September 2012, and first tried to use biolinum today. It wasn't working as the docs led me to expect; I found this posting, looked around in my install, and concluded that the libertine-legacy package was installed. I just reinstalled TexLive, and biolinum now works fine. The current package seems to be named `libertine'. HTH.
    – Tom Zych
    Commented Apr 13, 2013 at 15:05
  • 1
    @TomZych: The Libertine package has been under quite some development after this answer was written. If I have some spare time I'll see if I can update it or create yet another Q&A about Libertine.
    – Silke
    Commented Apr 13, 2013 at 17:47
3

I preffered to install the package libertine-legacy into a local TDS-directory. As I use texlive, I installed the package from CTAN into TEXMFHOME, following the advice here: http://www.tug.org/pipermail/tex-live/2012-October/032462.html.

This is not as trivial as it seems. I had to enable the Map libertine.map via updmap. And kpsewhich refused to find libertine.sty despite my various attempts to run texhash.

However, it works and I will go on using it, until luatex is standard. But it seems that LuaTeX is no longer developed. The last version is almost 18 monthes old. Let's face it: The future of LuaTeX is uncertain.

3
  • May I ask why you'd rather go through the trouble of installing libertine-legacy manually instead of using the libertine-type1 package?
    – Silke
    Commented Oct 21, 2012 at 11:43
  • As far as I understand this mess, libertine-type1 only provides libertine, but not biolinum. It fails to provide commands like \libertineGlyph and \biolinumGlyph. I just want to go on with what I have -- thousands of documents with libertine.
    – Keks Dose
    Commented Oct 21, 2012 at 13:20
  • The new libertine package does include biolinum-type1. As for \libertineGlyph and \biolinumGlyph: they are not included in libertine or libertine-type1, but they are included in libertineotf if you use XeLaTeX or LuaLaTeX.
    – Silke
    Commented Oct 21, 2012 at 13:39
1

As long as you download and unzip the package http://www.ctan.org/tex-archive/fonts/libertine to your local tree, followed by tlmgr update --all , run mktexlsr or texhash and updmap-sys enable Map libertine.map , the package must work.

As of May 2013 Texlive is frozen, so the above works like a charm.

1

You must log in to answer this question.

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