How to Center and Capitalize Awesome-CV Section Headings
At a glance
- 1. Redefine the style
Add a redefinition of Awesome-CV’s sectionstyle command to your document preamble.
- 2. Center the heading
Use a local centering declaration and end the paragraph before the style group closes.
- 3. Apply uppercase
Wrap the heading text in MakeUppercase so every section title is displayed in capitals.
- 4. Use cvsection normally
Keep writing cvsection with ordinary text; the redefined style formats each heading automatically.
Awesome-CV formats section headings through the \sectionstyle command. Redefining that command in your preamble lets you center the heading and display it in uppercase without changing the formatting of the CV body. In the standard class definition, however, the horizontal section divider will move to the line below the heading.
Add this to the preamble
Place the redefinition after \documentclass and before \begin{document}:
\renewcommand{\sectionstyle}[1]{%
\par\begingroup
\centering
\fontsize{16pt}{1em}\bodyfont\bfseries\color{text}%
\MakeUppercase{#1}\par
\endgroup
}
The argument #1 is the heading text passed to \cvsection. The \centering declaration centers the heading paragraph, and \MakeUppercase{#1} makes its text uppercase. The group confines the centering and font settings to the heading, so they do not unexpectedly affect the content that follows. Because this definition ends the heading paragraph, Awesome-CV’s section divider, which follows \sectionstyle in the standard class definition, appears on the next line. Keeping the divider beside the heading would require changing the \cvsection layout as well.
Complete example
This example shows where the redefinition goes and how to call the section command:
\documentclass[11pt,a4paper]{awesome-cv}
\renewcommand{\sectionstyle}[1]{%
\par\begingroup
\centering
\fontsize{16pt}{1em}\bodyfont\bfseries\color{text}%
\MakeUppercase{#1}\par
\endgroup
}
\name{Ada}{Lovelace}
\begin{document}
\makecvheader
\cvsection{Education}
Your education details go here.
\end{document}
The result is a centered EDUCATION heading, with the section divider on the following line in the standard class definition. Keep the ordinary capitalization in the argument to \cvsection; the style command converts it when typesetting. Compile with the Awesome-CV class and its required fonts and dependencies installed.
Why redefine \sectionstyle?
Awesome-CV’s \cvsection{...} command uses \sectionstyle to typeset the heading. Changing the style macro is more convenient than editing every section individually: all headings that use \cvsection receive the same formatting. It also avoids modifying the class file, which could be overwritten when you update the template.
The example retains the class’s usual font size, body font, bold weight, and text color. If your version of Awesome-CV defines those settings differently, preserve the font and color instructions from your own \sectionstyle definition and add the centering and uppercase formatting around them.
Common mistakes
- Putting the change after
\begin{document}: Keep the redefinition in the preamble, before the document begins. - Using
\centeringwithout ending the paragraph: The explicit\parcreates a centered heading paragraph and keeps the declaration local to its group. - Editing the class file unnecessarily: A preamble redefinition is easier to maintain and does not alter the template installation.
- Confusing uppercase with title case:
\MakeUppercaseturns the whole heading into capitals. For a heading like “Education” with only its first letter capitalized, simply write\cvsection{Education}and omit\MakeUppercase. - Using a different template version or fork: If LaTeX reports that
\sectionstyleis undefined, inspect that version’s class file for the command used to format\cvsectionheadings and redefine the corresponding command instead.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.