General ⇒ Changing Header and Setting Titles Uppercase
Changing Header and Setting Titles Uppercase
I need a new favour (and the last, i hope) from this forum; I need to change some format from my class but i dont know how to do it. To be exact, I need to change the format of the chapter and section format, from lowercasse, to uppercase. I know that I can do it manually, but i also know that there is a easy way to do it.
And, I need to change the header of the chapter. actually is something like this:
_________________________
Chapter 3
Name of the chapter
____________
and I need to look like this
____________
3. NAME OF THE CHAPTER
_______________
I've already try it usin the code ' \renewcommand{\chaptername}{}' but the result is not the desire:
_________________________
3
Name of the chapter
____________
Which doesnt look good..
Thanks to anyone who wants to help me
Carlos Andrés
PS: i'm using a nonstandard class...called 'mymothesis.cls' which is attached.
- Attachments
-
- mymothesis.cls
- (2.21 KiB) Downloaded 329 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Changing Header and Setting Titles Uppercase
Code: Select all
\makeatletter
\renewcommand{\@makechapterhead}[1]{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\hrule % horizontal line
\vspace{5pt}% % add some vertical space
\ifnum \c@secnumdepth >\m@ne
\huge \scshape \thechapter. % Only chapter followed by period
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\Huge \scshape #1\par % chapter title
\vspace{5pt}% % add some vertical space
\hrule % horizontal rule
\nobreak
\vskip 40\p@
}}
\makeatother
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Changing Header and Setting Titles Uppercase
But I still need a way to change all the chapter and section tittles to Uppercase letter.... is there a easy way to do it?
Thanks, again
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Changing Header and Setting Titles Uppercase
Code: Select all
\makeatletter
\renewcommand{\@makechapterhead}[1]{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\hrule % horizontal line
\vspace{5pt}% % add some vertical space
\ifnum \c@secnumdepth >\m@ne
\huge \thechapter. % Only chapter followed by period
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\Huge \MakeUppercase{#1}\par % chapter title in capitals
\vspace{5pt}% % add some vertical space
\hrule % horizontal rule
\nobreak
\vskip 40\p@
}}
\makeatother
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10