現代履歷結構問題

現代履歷結構問題

我正在使用 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我不會增加盒子的寬度,否則看起來太重了...

相關內容