# Upper case chapter titles, sections, subsections, list of tables and figures in the table of contents?

I used the resources here and it worked for me but still have errors on the list of tables and figures: Upper case chapter titles in the table of contents?. I am using a document class prepared by D. Leif Anderson \documentclass[nosmallcaps,toccaps,12pt]{csuthesis}.

My modification:

\makeatletter
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
{\protect\numberline{\thechapter}\MakeUppercase{#1}}%
\fi}
\makeatother

\makeatletter
\renewcommand\section{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@section\@section}
\def\@section[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{section}%
\typeout{\@secapp\space\thesection.}%
{\protect\numberline{\thesection}\MakeUppercase{#2}}%
\fi}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\renewcommand\subsection{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@subsection\@subsection}
\def\@subsection[#1]#2#3{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{subsection}%
\typeout{\@subsecapp\space\thesubsection.}%
{\protect\numberline{\thesubsection}\MakeUppercase{#3}}%
\fi}
\makeatother


Your help is a lot appreciated...

• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – user36296 Mar 26 '17 at 19:57
• Welcome! What exactly do you want to achieve? Do you just want the table of contents entries in uppercase? Then remove the definitions above, which are incompatible with the csuthesis class. The following lines should be sufficient: \makeatletter \renewcommand\tocsection[3]{\indentlabel {\@ifnotempty {#2}{\ignorespaces #1 #2.\quad }}\MakeUppercase{#3}} \let\tocchapter\tocsection \makeatother And similar for subsection. – gernot Mar 26 '17 at 21:29
• This \documentclass[nosmallcaps,toccaps,12pt]{csuthesis} produces lowercase table of contents and I was trying to Make all Uppercase. I couldn't fix in the cls and removing as you suggested did not work for me...thank so much. More:the required format at my university is : graduateschool.colostate.edu/wp-content/uploads/2016/01/… – Solomon Mar 27 '17 at 0:43
• @gernot your code worked for me.Thanks a lot. Few more: it keeps the chapter name as it is : as chapter 1: INTRODUCTION and CHAPTER 1: INTRODUCTION required and could not extend to appendix, list table and figures... Thanks again for your help! – Solomon Mar 27 '17 at 1:13

DISCLAIMER: The following answer only makes sense in this particular case (if at all), with the double-patched document class csuthesis.cls. The lines below are workarounds for workarounds for ...

\documentclass[12pt]{csuthesis}
\usepackage{xpatch}
\xpatchcmd\maketitle{\scshape Abstract}{ABSTRACT}{}{}
\xpatchcmd\maketitle{\scshape Acknowledgements}{ACKNOWLEDGEMENTS}{}{}
\makeatletter
\setcounter{tocdepth}{3}
\renewcommand{\tocsection}[3]%
\MakeUppercase{#3}%
}
\renewcommand{\tocappendix}[3]%
\MakeUppercase{#3}%
}
\let\tocchapter\tocsection
\let\tocsubsection\tocsection
\def\l@section{\@tocline{1}{0pt}{0pt}{}{}}
\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\bibname}{BIBLIOGRAPHY}
\renewcommand{\indexname}{INDEX}
\let\orig@caption\@caption
\def\@caption #1[#2]{\orig@caption#1[\MakeUppercase{#2}]}
\makeatother
...


\documentclass[12pt]{csuthesis}
\usepackage{xpatch}
\xpatchcmd\maketitle{\scshape Abstract}{ABSTRACT}{}{}
\xpatchcmd\maketitle{\scshape Acknowledgements}{ACKNOWLEDGEMENTS}{}{}
\makeatletter
\setcounter{tocdepth}{3}
\renewcommand{\tocsection}[3]%
\MakeUppercase{#3}%
}
\renewcommand{\tocappendix}[3]%
\MakeUppercase{#3}%
}
\let\tocchapter\tocsection
\let\tocsubsection\tocsection
\def\l@section{\@tocline{1}{0pt}{0pt}{}{}}
\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\bibname}{BIBLIOGRAPHY}
\renewcommand{\indexname}{INDEX}
\let\orig@caption\@caption
\def\@caption #1[#2]{\orig@caption#1[\MakeUppercase{#2}]}
\makeatother
\usepackage{lipsum}
\begin{document}
\title{The Title of This Thesis}
\author{The Author}
\departmentname{The Department Name}
\committee{The Committee}
\begin{abstract}
This is the abstract.
\end{abstract}
\begin{acknowledgements}
This is the abstract.
\end{acknowledgements}
\frontmatter
\maketitle
\tableofcontents
%\listoffigures
%\listoftables
\mainmatter
\chapter{First}
\lipsum[1]
\section{One}
\lipsum[1]
\begin{figure}
\rule{4cm}{3cm}
\caption{figure one}
\end{figure}
\lipsum[1]
\subsection{One one}
\lipsum[1]
\begin{table}
\rule{4cm}{3cm}
\caption{table one}
\end{table}
\lipsum[1]
\subsection{One two}
\lipsum[1]
\begin{figure}
\rule{4cm}{3cm}
\caption{figure two}
\end{figure}
\lipsum[1]
\section{Two}
\lipsum[1]
\begin{table}
\rule{4cm}{3cm}
\caption{table two}
\end{table}
\lipsum[1]
\subsection{Two one}
\lipsum[1]
\subsection{Two two}
\lipsum[1]
\chapter{Second}
\lipsum[1]
\section{One}
\lipsum[1]
\subsection{One one}
\lipsum[1]
\subsection{One two}
\lipsum[1]
\section{Two}
\lipsum[1]
\subsection{Two one}
\lipsum[1]
\subsection{Two two}
\lipsum[1]
\appendix
\chapter{Appendix}
\lipsum[1]
\end{document}

• +1 because I have just answered, in blissful ignorance, what seems to be the same question, presumably from the same person, about this hitherto-and-deservedly-obscure class, and we both deserve something for our pain. – Paul Stanley Mar 27 '17 at 22:23
• I thank you so very much. This extraordinary! Let me try and I will update you my progress @Paul I thank you so very much. – Solomon Mar 27 '17 at 22:27
• It did the magic. The only issue now is list figures and tables still all lowercase. I want all in the table of contents uppercased. Like: LIST OF TABLE....TABLE 1 ....TABLE 2....TABLE 3 etc. and FIGURE 1, FIGURE 2...I thank you very very much again! – Solomon Mar 27 '17 at 22:51
• @user3749929 Ok, done, this requires two more lines in the preamble, see above. I'm now off. If you need some more help, you will have to be patient for about 8 hours. – gernot Mar 27 '17 at 23:25
• You have a great night or day. I thank you so very very very much. It is solved. Everything looks great now. I will update you if I have few more issues tomorrow.@gernot – Solomon Mar 27 '17 at 23:44

I am more or less completely confused about what you want to do.

## LaTeX Classes

LaTeX uses "class" files, which are sort of templates. They are not interchangeable. Some are in very common use. Others are rare. They use different internal code. This means:

1. You cannot just assume that something you found somewhere that solved the problem in one class will also work in yours. Things about titling, sectioning, automated tables and so forth are quite likely to vary from class to class. So it's not surprising that you found the carrion-code you were trying to use didn't work.

2. If you are posting a question on here please make it clear what class you are using, because it may matter.

The class you are using is in fact, as some googling found out, based on the amsbook class, having been adapted by Dr Anderson, as he elegantly puts it

to meet the bullshit requirements of the Colorado State University Graduate School for the formatting of theses and dissertations

If you don't have to meet those "bullshit requirements" you had much better use a more standard class. If you do, I suggest you don't set about redefining things in a class that meets said requirements.

However ...

## Change "List of Figures" to "LIST OF FIGURES"

If you want to do this, redefine \figurename

\renewcommand{\listfigurename}{LIST OF FIGURES}


You can do the same with \contentsname and appendixname. In each case this is going to affect not only the way these appear in the table of contents but in the text as well, of course.

## Change the way List of Figures and List of Tables are printed ... in the table of contents only

If you want to have these uppercased in the Table of Contents, but upper and lower case in the text itself, then I think you need something like this. To my way of thinking this would be weird, but there you are.

\makeatletter
\def\@starttoc#1#2{%
\begingroup
\setTrue{#1}%
\let\secdef\@gobbletwo \chapter
\let\@secnumber\@empty % for \@tocwrite and \chaptermark
\ifx\contentsname#2%
\else \@tocwrite{chapter}{\MakeUppercase #2}\fi
\typeout{#2}\@xp\chaptermark\@xp{#2}%
\parskip\z@skip
\makeatletter
\@input{\jobname.#1}%
\if@filesw
\@xp\newwrite\csname tf@#1\endcsname
\immediate\@xp\openout\csname tf@#1\endcsname \jobname.#1\relax
\fi
\global\@nobreakfalse \endgroup
\newpage
}
\renewcommand{\tocappendix}[3]{%

(All this goes in the preamble, before \begin{document}. It involves minor adaptation of code from amsbook.cls, which the sainted Dr Anderson adapted to meet what he accurately called the "dumber, uglier CSU standards".)