# What does \renewcommand*{\rmdefault}{fxlj} exactly do?

I'm writing a document with multiple hundred of pages and noticed some glitches with the selected font I use. I'm using a template provided by the institute I'm working at. The font I have chosen is libertine.

This is - what I could break down - a minimal working example of Libertine in action:

\documentclass{article}
\usepackage{libertine}
\begin{document}
\noindent This text is \textbf{bold}.
\section{Minimal working example}
This text \textit{isn't}.
\end{document}


Now, however, does the class definition file of my template include another statement that I can not comprehend, and - breaks everything font related:

  \renewcommand*{\rmdefault}{fxlj}


This causes the default font to be reset to Roman, which I do not want. And sometimes the font is not default Roman, but Libertine. However, bold and italic Libertine is not working anymore.

This is the most basic minimal not working example I could come up with:

\documentclass{article}
\usepackage{libertine}
\renewcommand*{\rmdefault}{fxlj}
\begin{document}
\noindent This text is \textbf{bold}.
\section{Minimal not working example}
This text \textit{isn't}.
\end{document}


Now, I want to understand what the \renewcommand*{\rmdefault}{fxlj} command exactly does, and - important - what the intention is. Simply removing it seems to fix my issue, but I can't do this unless I understand the implications.

• It defines the font family that should be used, whenever \rmfamily or \textrm is used. But if it is in the class file and not delayed with \AtBeginDocument or similar, it should not matter, because libertine also redefines \rmdefault. – Schweinebacke Jan 10 '17 at 10:26
• BTW: AFAIR fxlj was the family name of one of the Libertine Type-1 fonts, several years ago, now only avaliable as obsolete package libertine-legacy. AFAIK support of that old Libertine version ended 2009 or 2010. – Schweinebacke Jan 10 '17 at 10:31

This is a consequence of using low level commands in documents instead of packages.

When you compile your document, you get the warnings

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

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

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


The first warning tells you that the family fxlj corresponds to no .fd file for the OT1 encoding, so a default substitution is made, with the standard cmr family. The other two might be misleading if one doesn't take into consideration the fact that LaTeX has already decided that fxlj becomes cmr.

The naming scheme suggests that fxlj should point to Linux Libertine with oldstyle digits (the trailing j), but the family name has changed over time. Nowadays the font family for Linux Libertine is called

LinuxLibertineT-<suffix>


The suffix can be

TLF
TOsF
LF
OsF


where LF stands for “lining figures” and OsF for “oldstyle figures”; the T means “tabular figures”, if absent it means that proportional figures are used.

Thus with Linux Libertine it's a bad idea to set directly the family name: better use the higher level calls:

\usepackage[
%tabular,
%proportional,
%lining,
%oldstyle,
]{libertine}


Uncomment the keys you need.

• This is a really nice answer that highlights a type of problem that is probably more common than we would like to see, while pointing us in the proper direction of using higher-level commands, where possible. – Steven B. Segletes Jan 10 '17 at 12:10
• Thanks. I'm actually using the higher level commands already, just removed them to make the mwe as minimal as possible. Now I'm confident, the leftovers of the very old template can simply be removed. After some testing, the results are fine. – Afr Jan 10 '17 at 22:52