Created
August 26, 2012 07:09
-
-
Save bbinet/3475534 to your computer and use it in GitHub Desktop.
moderncv \section patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% BBI edition %%%%%%%%%%%%%%%%%%%%%%%%%% | |
% add: | |
\newlength{\argtextwidth}% | |
\newlength{\freespace}% | |
\newcommand*{\calcfreespace}[1]{% | |
\settowidth{\argtextwidth}{#1}% | |
\setlength{\freespace}{\maincolumnwidth}% | |
\addtolength{\freespace}{-\argtextwidth}% | |
\addtolength{\freespace}{-\separatorcolumnwidth}% | |
} | |
% end BBI edition %%%%%%%%%%%%%%%%%%%%%%% | |
\newlength{\baseletterheight} | |
\settoheight{\baseletterheight}{\sectionstyle{o}} | |
\setlength{\baseletterheight}{\baseletterheight-0.95ex} | |
\renewcommand*{\section}[1]{% | |
\par\addvspace{2.5ex}% | |
\phantomsection{}% reset the anchor for hyperrefs | |
\addcontentsline{toc}{section}{#1}% | |
\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}% | |
\hspace{\separatorcolumnwidth}% | |
% BBI edition %%%%%%%%%%%%%%%%%%%%%%%%%% | |
% replace: | |
% \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}% | |
% by: | |
\parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1} | |
\hspace{\separatorcolumnwidth}% | |
\calcfreespace{\sectionstyle{#1}}% | |
\raisebox{\baseletterheight}{\color{color1}\rule{\freespace}{0.95ex}}} | |
% end BBI edition %%%%%%%%%%%%%%%%%%%%%%% | |
\par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment