Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the ModernCV class for creating a resumé in LaTeX. I found three styles provided by Miktex for this purpose. My question is: how is the section header created in the document? All I see is a colored box followed by the given section text, but I can't find anything in the class or style regarding the above colored box. I found the below line in the file moderncv.cls but it doesn't have any information about colored box.

% makes a cv section
% usage: \section{<title>}
\newcommand*{\section}[1]{}
% starred variant, which is identical but defined to allow its use (e.g. for natbib compatibility, who uses \section*{} for the bibliography header)
\RequirePackage{suffix}
\AtBeginDocument{\WithSuffix\newcommand\section*{\section}}
share|improve this question

1 Answer 1

moderncv.cls defines section via

\newcommand*{\section}[1]{%
  \vspace*{2.5ex}%
  \parbox[m]{\hintscolumnwidth}%
    {\raggedleft\hintfont{\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}}}%

\rule{\hintscolumnwidth}{1ex} makes a rule (rectangle) of the colour specified by \color{sectionrectanglecolor} which in turn is defined by the various options of the class.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.