現代履歷中的附加行

現代履歷中的附加行

我嘗試用​​現代簡歷創建我的簡歷。這是一個小程式碼:

\documentclass[10pt,a4paper]{moderncv}
\moderncvtheme[blue]{classic}                
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage[inner=1.2cm,outer=1.2cm,top=0.4cm,bottom=0.4cm]{geometry}

\usepackage{sourcesanspro}
\renewcommand*{\sectionfont}{\Large\bfseries\scshape}

\firstname{\Large{Aaaa}}
\familyname{\Large{\textsc{Bbbb}}}
\title{\normalsize Iiiiiiiiiiiii }
\address{\textbf{113 iiiii}}{\textbf{000 Vvvvv}}  
\mobile{\textbf{0000000}}             
\email{[email protected]} 
\extrainfo{\textbf{bla bla}}  

\begin{document}
\pagestyle{empty}
\maketitle

\section{Experience}
\end{document}

正如您所看到的,“體驗”部分前面有一條巨大的藍線。我希望出現相同的行 「經驗」並根據需要擴展(直到達到作為限制的邊緣)。那可能嗎 ?

答案1

在序言中加入以下行

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

實現你想要的。

MWE(請注意,自從您加載以來我已經添加了sans該選項):moderncvsourcesanspro

\documentclass[10pt,a4paper,sans]{moderncv}
\moderncvtheme[blue]{classic}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage[inner=1.2cm,outer=1.2cm,top=0.4cm,bottom=0.4cm]{geometry}

\usepackage{sourcesanspro}
\renewcommand*{\sectionfont}{\Large\bfseries\scshape}

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

\firstname{\Large{Aaaa}}
\familyname{\Large{\textsc{Bbbb}}}
\title{\normalsize Iiiiiiiiiiiii }
\address{\textbf{113 iiiii}}{\textbf{000 Vvvvv}}
\mobile{\textbf{0000000}}
\email{[email protected]}
\extrainfo{\textbf{bla bla}}

\begin{document}
\pagestyle{empty}
\maketitle

\section{Experience}
\end{document} 

輸出

在此輸入影像描述

相關內容