Latex 中的现代 CV 使用问题

Latex 中的现代 CV 使用问题

我正在使用 ModernCV 类在 LaTeX 中创建简历。我发现 Miktex 为此提供了三种样式。我的问题是:如何在文档中创建节标题?我看到的只是一个彩色框,后面跟着给定的节文本,但我在类或样式中找不到有关上述彩色框的任何内容。我在文件中找到了下面的一行,moderncv.cls但它没有关于彩色框的任何信息。

% 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}}

答案1

moderncv.cls 通过以下方式定义部分

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

\rule{\hintscolumnwidth}{1ex}制定一个由指定颜色的规则(矩形),该颜色\color{sectionrectanglecolor}又由类的各种选项定义。

相关内容