0

I am using custom class and when I use ${\rm test}$ I get complaint that it is Undefined control sequence. It does not in text mode either. I tried searching through the cls file and other relevant linked files for \rm but I can never find where it would be removed, actaully, it is used in the class as:

\newcommand\@makecopyrightpage{
   \ColumnSave
   \pagenumbering{roman}
   \setcounter{page}{2}
   %\thispagestyle{empty} 
   \thispagestyle{plain}
   \null
   \vfill
   \if@copyright
      \begin{center}
         %\normalsize \rm Copyright \copyright\ \@copyrightyear
         %\ifx\@copyrightyear\@degreeyear\else , \@degreeyear \fi
         %\ by \@author \\
         %\@copyrightinfo
         \normalsize \normalfont \copyright\  \@copyrightyear  \hspace{1pt}
         \@author \\
      \end{center}
   \fi
   \vfill
   \ColumnRestore
}

the only other places that \rm can be found in the class:

\def\ps@headings{\def\@oddfoot{}\def\@evenfoot{}%     No feet.
\def\@oddhead{\hbox {}\slshape \rightmark \hfil \rm\thepage}% Heading.
\def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne
  \@chapapp\ \thechapter. \ \fi ##1}}}}

% Definition of 'myheadings' page style.
%
\def\ps@myheadings{\def\@oddhead{\hbox{}\slshape\rightmark \hfil \rm\thepage}%
\def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\slshape\leftmark\hbox {}}%
\def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}}

When i switch to \documentclass{report} everything works. How can i investigate where it got lost?

Mico
  • 506,678
atapaka
  • 254

1 Answers1

5

The syntax for roman in math in LaTeX is $\mathrm{test}$ not ${\rm test}$.

\rm has not been defined in LaTeX since LaTeX2e was released in 1993.

As described in clsguide the guide to writing latex classes that comes with latex, you could define \rm via

\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}

and the report class does this, however that was over compatibility concerns with documents written in the 1980s. No documents written this century should be using \rm so for a class being written now it is better not to define \rm and assume that the document has correct markup. That way bad markup in the document is easily found and corrected.

David Carlisle
  • 757,742