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?
\rmhas been deprecated and not defined by default in latex since latex2e was released in 1993.reportclass defines it for compatibility with documents written in the 1980s but other classes may not. – David Carlisle Mar 03 '20 at 20:35\rmcommand has been deprecated for 25 years. Some document classes define it for back compatibility. There are classes and packages around that use\rmand siblings: it's a sure sign that they should be avoided. – egreg Mar 03 '20 at 20:36reportclass and copy it over, it should do the trick? – atapaka Mar 03 '20 at 20:37\rmfamilyor if you really must, copy the definition of\rmfrom report, which is\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}– David Carlisle Mar 03 '20 at 20:37\rmwould be better. – David Carlisle Mar 03 '20 at 20:37\rmfamilydoes not work in math mode (which is the whole purpose for me to need\rm). So what is there in math mode? Also, if it is undefined in the class, how can the class use it in the above code? – atapaka Mar 03 '20 at 20:39\mathrm{zzz}in math mode but none of the uses you show in your question are in math. – David Carlisle Mar 03 '20 at 20:40\rmcopied from report, it says to use\normalfont\rmfamilyin text and\mathrmin math. – David Carlisle Mar 03 '20 at 20:41TeXfunction declaration and how they work is really a pain... I have found Lamport's book to be the best so far coveringLatexas well as someTexcommands. – atapaka Mar 03 '20 at 20:43texdoc clsguideis the document that comes with latex that describes how to write a class and also how to define\rmif you really must. See section 6.4 – David Carlisle Mar 03 '20 at 20:47