3

I'm having the problem, that commands like \mathrm, \mathbf, ... change the look of the entire line of the equation and not only the code that is wrapped by the braces.

I'm using the IEEEAerospaceCLS document class (http://aeroconf.org/latex-instructions) and guess that this could be the problem. Any ideas?

Cheers Jan

Minimal example:

\documentclass[twocolumn,letterpaper]{IEEEAerospaceCLS}
\usepackage{amsmath}

\begin{document}
\begin{align}
F = \mathrm{m} a
\end{align}
\end{document}
Jan
  • 31

1 Answers1

7

The class is badly written (to use understatement), I'm afraid. In 2014 it loads oldlfont, which is a package to be used only for typesetting documents written with LaTeX2.09, that's been obsolete for more than twenty years.

In the class file you find

%% WARNING: math font problems and workaround:
%%          Standard math commands like
%%              $\mathbf{N}(0,P(0))$
%%          will not work properly. The reason is, that this is
%%          a simple hack of an old LaTeX2.09 style files.
%%          To get it running, I used the packages
%%              'rawfonts' and 'oldlfont'
%%          They are responsible for the font problems.
%%          This is a known feature, see
%%              http://www.tex.ac.uk/CTAN/latex/bugs.html
%%
%%      WORKAROUND:
%%      Use an additional pair of braces, like
%%      {\mathbf{y}}
%%      to introduce an additional level of scope.
%%      Examples:
%%              $\mathbf{N}(0,P(0))$ but ${\mathbf{N}}(0,P(0))$
%%              $\mathcal{N}(0,P(0))$ but ${\mathcal{N}}(0,P(0))$
%%              $\mathcal{G}_{t}$ but ${\mathcal{G}}_{t}$
%%              $\mathfrak{G}_t$ but ${\mathfrak{G}}_t$

The text is typeset using the Computer Modern math fonts along with Times for text, which is simply horrible.

The workaround would be very simple: changing \usepackage{mathptmx} instead of \usepackage{times} (that's loaded twice for mysterious reasons) and removing \usepackage{oldlfont} and `\usepackage{rawfonts}.

Changing your formula into

F={\mathrm{m}}a

produces

enter image description here

(notice Computer Modern for math).

egreg
  • 1,121,712
  • With oldlfont surely {\rm m}? – Joseph Wright Sep 18 '14 at 09:27
  • @JosephWright Of course. But it's fighting with windmills. – egreg Sep 18 '14 at 09:28
  • Unfortunately \maketitle doesn't work anymore after removing \usepackage{oldlfont}. Guess I have to use {\mathrm{...}}. – Jan Sep 18 '14 at 11:39
  • @Jan are these people in the market for someone to convert their package to current latex? (sounds like a nice job for someone about to retire...) – wasteofspace Sep 18 '14 at 12:00
  • @wasteofspace The class is actively developed: it says the last changes were made in May 2015. ;-) – egreg Sep 18 '14 at 12:16
  • @Jan Changing the class yourself is useless, unless they just want the PDF. If you change the class just add \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} to your document preamble or change the occurrences of \bf in the class with \bfseries. My impression is that the class maintainers were bitten by \bf not being defined and resorted to oldlfont, which is the worst thing to do. – egreg Sep 18 '14 at 12:24