现代简历结构问题

现代简历结构问题

我正在使用 Modern CV 创建我的简历:http://www.latextemplates.com/template/moderncv-cv-and-cover-letter

从本页示例(John Smith)中可以看出,每个部分(如“教育”)前面都有一行粗体字。我想:

  • 减少或增加此行的长度/大小
  • 突出显示每个部分,例如在“教育”下划线或添加本地字体

有可能吗?欢迎提供任何示例!

编辑:例如:

\documentclass[11pt,a4paper,sans]{moderncv} 

\moderncvstyle{casual} 
\moderncvcolor{blue} 

\usepackage[scale=0.75]{geometry} 

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John} % Your first name
\familyname{Smith} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\address{123 Broadway}{City, State 12345}
\mobile{(000) 111 1111}
\phone{(000) 111 1112}
\fax{(000) 111 1113}
\email{[email protected]}
\homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith}

%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle % Print the CV title

%----------------------------------------------------------------------------------------
%   EDUCATION SECTION
%----------------------------------------------------------------------------------------

\section{Education}

\end{document}

因此,我想用与文本相同的颜色在“教育”下划线,并减少左侧的粗线大小/长度

答案1

在你的序言中添加以下几行:

\makeatletter
\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{\underline{#1}}}}
\RenewDocumentCommand{\section}{sm}{%
  \par\addvspace{2.5ex}%
  \phantomsection{}% reset the anchor for hyperrefs
  \addcontentsline{toc}{section}{#2}%
  \parbox[t]{3em}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{3em}{0.55ex}}}%
  \hspace{\separatorcolumnwidth}%
  \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#2}}%
  \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
\makeatother

这将按照您的要求重新定义章节标题的排版方式:

在此处输入图片描述

完整代码:

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{casual}
\moderncvcolor{blue}

\makeatletter
\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{\underline{#1}}}}
\RenewDocumentCommand{\section}{sm}{%
  \par\addvspace{2.5ex}%
  \phantomsection{}% reset the anchor for hyperrefs
  \addcontentsline{toc}{section}{#2}%
  \parbox[t]{3em}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{3em}{0.55ex}}}%
  \hspace{\separatorcolumnwidth}%
  \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#2}}%
  \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
\makeatother

\usepackage[scale=0.75]{geometry}

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John} % Your first name
\familyname{Smith} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\address{123 Broadway}{City, State 12345}
\mobile{(000) 111 1111}
\phone{(000) 111 1112}
\fax{(000) 111 1113}
\email{[email protected]}
%\homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith}

%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle % Print the CV title

%----------------------------------------------------------------------------------------
%   EDUCATION SECTION
%----------------------------------------------------------------------------------------

\section{Education}

\end{document} 

编辑

如果您不想在章节标题下划线,而是想将其框起来,请用以下行代替

\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{\underline{#1}}}}

\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{\fbox{#1}}}}

结果是

在此处输入图片描述


编辑#2

如果要完全删除章节标题之前的行,请删除以下行

  \parbox[t]{3em}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{3em}{0.55ex}}}%
  \hspace{\separatorcolumnwidth}%

你会得到

在此处输入图片描述

PS 我不会增加盒子的宽度,否则它看起来太重了......

相关内容