8

I am using the scrreprt documentclass and I keep getting the warning:

Usage of deprecated font command `\rm'!(scrreprt) You should note, that in 1994 font command `\rm' has(scrreprt) been defined for compatiblitiy to Script 2.0 only.

Using a MWE, it comes out that the warning is generated from the commands \tableofcontents{} , \listoftables{} and \listoffigures{}

While digging a little bit further, my scrreprt.cls already contains \scr@DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}

Does any one knows how to get rid of this warning?

Update: Here is a the MWE: Remark: I just found out that using the package fncychap is causing the warning. I use it to generate decoration rectangles at the beginning of chapters:

% !TeX spellcheck = en_US
\documentclass[11pt,headings=small,fleqn]{scrreprt} % highest level is chapter

\usepackage[Glenn]{fncychap} %To add a rectangle at the beginning of each chapter
\usepackage[greek,english]{babel} % for English text only

\begin{document}

\pagenumbering{roman} \setcounter{page}{1}

%%-----------Table of Contents------------------
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents{}
\addcontentsline{toc}{section}{Table of Contents}
%%------------List of Tables----------------------
\listoftables{}
\addcontentsline{toc}{section}{List of Tables}
%%------------List of Figures----------------------
\listoffigures{}
\addcontentsline{toc}{section}{List of Figures}

%maintain Roman numerals on the previous page
\clearpage%set pagination to Arabic
\pagenumbering{arabic} 

\chapter{Chapter1}

\end{document}
5
  • 'Don't use \rm': I'm not quite sure what you are looking for, really.
    – Joseph Wright
    Sep 28, 2015 at 7:43
  • Can you post your MWE? When I make one I get no such warnings. Sep 28, 2015 at 8:03
  • 2
    The package fncychap (which provides the ugliest chapter styles I've ever seen) uses those obsolete commands.
    – egreg
    Sep 28, 2015 at 8:19
  • 1
    @egreg True, the package fncychap is the one using those commands. Just for the defense of the package, saying that it provides the ugliest chapter styles is a personal opinion. Sep 28, 2015 at 8:27
  • @user2536125 Yes, it's personal opinion. My judgment stems from both aesthetics and TeX code.
    – egreg
    Sep 28, 2015 at 8:30

1 Answer 1

11

The warning is caused by fncychap, which must use \rm for the Glenn style. I would just not use that package. If you really want it, add

\ChTitleVar{\bfseries\Large\rmfamily}
\ChNameVar{\bfseries\Large\sffamily}

after loading fncychap. These are copied from the fncychap manual, but with \rm replaced by \rmfamily and \sf replaced with \sffamily.

Additional notes:

  • fontsize=11pt is the default for KOMA classes, so you don't actually have to specify it.
  • With the scrbook class you get the \frontmatter, \mainmatter and \backmatter commands. The first sets up roman numbering of pages, the second switches to arabic.

  • To add the float lists to the ToC, add listof=totoc as an option to the document class. This does not add the ToC itself to the ToC, but \setuptoc{toc}{totoc} will do that.

  • By the way, \tableofcontents and \listof.. doesn't take an argument, so the brace pairs are unnecessary.

  • As I switched from scrreprt to scrbook in the code below, I added oneside and openany to the class options, as that is what scrreprt does by default. Naturally, if you want margins set up for twosided printing and chapters to start on recto pages, remove those.

% !TeX spellcheck = en_US
\documentclass[
  headings=small,
  fleqn,
  oneside,
  openany,
  listof=totoc,
  toc=listof]{scrbook} % highest level is chapter

\setuptoc{toc}{totoc}

\usepackage[Glenn]{fncychap} %To add a rectangle at the beginning of each chapter
\ChTitleVar{\bfseries\Large\rmfamily}
\ChNameVar{\bfseries\Large\sffamily}
\usepackage[english]{babel} % for English text only

\begin{document}

\frontmatter

%%-----------Table of Contents------------------
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents
%%------------List of Tables----------------------
\listoftables
%%------------List of Figures----------------------
\listoffigures

\mainmatter

\chapter{Chapter1}

\end{document}
5
  • I absolutely agree, but I like the rectangles enclosing the chapter title so I do want to use the package fncychap. If you find a workaround, please update your answer and i will be glad to accept it as an answer. Sep 28, 2015 at 8:28
  • @user2536125 I updated a minute ago. Sep 28, 2015 at 8:28
  • @clemens Thanks! I meant to check if KOMA had something similar, but I forgot ... Will edit my answer. Sep 28, 2015 at 10:50
  • @clemens Is there some option for adding the ToC to the ToC? (Which the OP apparently want.) Sep 28, 2015 at 10:56
  • @clemens Only thing I can think of was if there was other stuff (listed in the ToC) before the ToC, so that you can see where you are in relation to those things. But yeah, not really necessary. Sep 28, 2015 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.