Text FormattingCapitalizing Some headers in a text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Capitalizing Some headers in a text

Post by maranatha »

Hello there

I wanted to change the way some headers in my thesis look. According to the guide line of my university, all headers should be capitalized. I was successful in capitalizing the headers in the body text. But the headers "Contents", "List of Figure", "List of Tables" and "Bibliography" had to be changed to unbolded "TABLE OF CONTENTS", "LIST OF FIGURES";"LIST OF TABLES" and "REFERENCES". But I havent got it done yet. I am using the book documentclass. I tried to modify the following in the book.cls file but it didnt help. I would be so glad if any one is willing to help me.

\newcommand\contentsname{Contents}
\newcommand\listfigurename{List of Figure}
\newcommand\listtablename{List of Tables}
\newcommand\bibname{Bibilography}

in to

\newcommand\contentsname{TABLE OF CONTENTS}
\newcommand\listfigurename{LIST OF FIGURES}
\newcommand\listtablename{LIST OF TABLES}
\newcommand\bibname{REFERENCES}
Last edited by maranatha on Thu May 05, 2011 1:43 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Capitalizing Some headers in a text

Post by localghost »

maranatha wrote:[…] I tried to modify the following in the book.cls file but it didnt help. […]
Never ever edit a class file directly. Always do the necessary redefinitions in the preamble of your document.

But somehow I don't see the problem.

Code: Select all

\documentclass[11pt,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\renewcommand*{\contentsname}{TABLE OF CONTENTS}
\renewcommand*{\listfigurename}{LIST OF FIGURES}
\renewcommand*{\listtablename}{LIST OF TABLES}
\renewcommand*{\bibname}{REFERENCES}

\begin{document}
  \tableofcontents
  \listoffigures
  \listoftables

  \begin{thebibliography}{9}
    \bibitem{key} Bibliography Item
  \end{thebibliography}
\end{document}
If that doesn't work for you, please show the opposite by a minimal example.


Best regards and welcome to the board
Thorsten
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Re: Capitalizing Some headers in a text

Post by maranatha »

Very ideal solution....thank you very much.
It was really helpful. I spent 3 days to fix this. I was editing the class file for in vain. I have some more problems and I will show up after few trials.

Cheers!
Post Reply