XeTeX package fontspec: Use previously defined \newfontfamily with \setmainfont [closed]

Because of some problems in Windows with system-installed Linux Libertine/Biolinum Open Type fonts, I decided to define their usage w.r.t. different font shapes in XeLaTeX with the fontspec package:

\documentclass{artcl}

\usepackage{fontspec}
\newfontfamily\LinuxLibertine[  Path            = fonts/,
BoldFont        = LinLibertine_RB.otf,
ItalicFont      = LinLibertine_RI.otf,
BoldItalicFont  = LinLibertine_RBI.otf,
SlantedFont     = LinLibertine_aRL.otf,
BoldSlantedFont = LinLibertine_aBL.otf,
SmallCapsFont   = LinLibertine_aS.otf,
Mapping         = tex-text]{LinLibertine_R.otf}
\setmainfont[                   Path            = fonts/,
BoldFont        = LinLibertine_RB.otf,
ItalicFont      = LinLibertine_RI.otf,
BoldItalicFont  = LinLibertine_RBI.otf,
SlantedFont     = LinLibertine_aRL.otf,
BoldSlantedFont = LinLibertine_aBL.otf,
SmallCapsFont   = LinLibertine_aS.otf,
Mapping         = tex-text]{LinLibertine_R.otf}

\begin{document}
Some text here...
\end{document}


Is there a possibility to use the previously defined font family in the \setmainfont command, e.g.:

\setmainfont{\LinuxLibertine}

-

migrated from stackoverflow.comSep 25 '11 at 10:43

This question came from our site for professional and enthusiast programmers.

closed as too localized by egreg, lockstep, Joseph Wright♦Nov 8 '11 at 9:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  N.N. Sep 25 '11 at 10:46
It's hard to understand why this code is necessary and the simple \setmainfont doesn't suffice. Could you explain more in your question? –  egreg Sep 25 '11 at 11:22
@egreg: The Linux Libertine font family comes with many different styles. In general, XeTeX (or better: fontspec) does recognize them correctly, but sometimes it makes errors. Sadly, this is the case with the LL. Steps to reproduce: Install Vanilla TeXLive 2011 on *nix and put the .otf fonts of the LL into ~/.fonts/type1/linuxlibertine/ and the .ttf versions into ~/.fonts/type1/truetype/linuxlibertine/. (cont.) –  Frakturfreund Sep 26 '11 at 15:09
Compile with xelatex: \documentclass{minimal} \usepackage{fonspec} \setmainfont{Linux Libertine O} \begin{document} regular text, but \emph{italics are to bold}. \end{document} So that’s the reason why one want to set up the LL fonts ›by hand‹. –  Frakturfreund Sep 26 '11 at 15:09
@Frakturfreund I don't have any issue. Having two different versions (.otf and .ttf) around can be a source of problems. –  egreg Sep 26 '11 at 19:21