Text Formattingchapter title in uppercase?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
blinklily
Posts: 2
Joined: Wed Jan 28, 2009 7:11 am

chapter title in uppercase?

Post by blinklily »

I have a style file that prints the title of each chapter like this:
Chapter 1
INTRODUCTION

but I need the "Chapter" part in all caps too and cannot figure it out, keeps giving errors anytime I add \uppercase...though I am fairly new to this

here is the style file that concerns the chapter headings:

Code: Select all

% \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
%
\def\@makechapterhead#1{%           % Heading for \chapter command
  \vspace*{\z@}%                    % Space at top of text page.
  {\parindent \z@ \raggedright 
    \ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1 THEN
                                    % Print '\chaptername' and number.
      \normalsize\bf\centering \@chapapp{} \thechapter 
      \par 
      \vskip 20\p@ \fi              % Space between number and title.
    \normalsize \bf                 % Title.
    \uppercase\expandafter{#1}\par 
    \nobreak                        % TeX penalty to prevent page break.
    \vskip 40\p@                    % Space between title and text.
  }}

% \@makechapterhead {TEXT} : Makes the heading for the \chapterfoot command.
%
\newcommand{\@makechapterfoothead}[2]{%    % Heading for \chapterfoot command
  \vspace*{\z@}%                    % Space at top of text page.
  {\parindent \z@ \raggedright 
    \ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1 THEN
                                    % Print '\chaptername' and number.
      \normalsize\bf\centering \@chapapp{} \thechapter
      \par 
      \vskip 20\p@ \fi              % Space between number and title.
    \normalsize \bf                 % Title.
    \uppercase\expandafter{#1}\footnote{\textmd{#2}} \par
    \nobreak                        % TeX penalty to prevent page break.
    \vskip 40\p@                    % Space between title and text.
  }}


% \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
%
\def\@makeschapterhead#1{%          % Heading for \chapter* command
  \vspace*{\z@}%                    % Space at top of page.
  {\parindent \z@ \raggedright 
    \normalsize \bf \centering     % Title.
    \uppercase\expandafter{#1}\par 
    \nobreak                        % TeX penalty to prevent page break.
    \vskip 40\p@                    % Space between title and text.
  }}
Please help, this is for my thesis and they will reject it if I can't get the formatting just right.

Recommended reading 2024:

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

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

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

chapter title in uppercase?

Post by localghost »

The word "Chapter" is typeset by a macro which can be redefined.

Code: Select all

\renewcommand{\chaptername}{CHAPTER}
If that doesn't work, let us know if you are using babel and with which language option.


Best regards and welcome to the board
Thorsten¹
Post Reply