Curricula Vitae / RésumésRemoving the horizontal bar to the left of section headings

ModernCV, Friggeri, Plasmati, Classicthesis-CV, and more
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Removing the horizontal bar to the left of section headings

Post by templateuser »

Hi Vel,
Can you suggest how I might remove the horizontal bar at each section heading, and shift the section heading text (e.g. “Education”) to the left such that it occupies the position where the bar had been? In other words, I want to replace the horizontal bar with the section heading text.

Thanks for your help and for such a great template!
Joel

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Removing the horizontal bar to the left of section headings

Post by Vel »

Hi Joel,

Simply comment out line 164 of moderncvstyleclassic.sty:

Code: Select all

\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}%
{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}
Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: Removing the horizontal bar to the left of section headi

Post by templateuser »

How to increase the length of the horizontal bar at each section heading, so that I can insert more information at the column, for eg: under the eduation section, I want to insert '1 Sep 2011 - 1 Sep 2012' instead '2011-2013'...(the bar should cover the inserted numbers)?

prem006in
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Removing the horizontal bar to the left of section headings

Post by Vel »

Hey,

Just go to line 72 in moderncvstyleclassic.sty: \setlength{\hintscolumnwidth}{0.175\textwidth} and change the value before \textwidth to something larger!

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: Removing the horizontal bar to the left of section headi

Post by templateuser »

Hi Vel,
Can you suggest how I can change the positions of 'the horizontal bar at each section heading', and 'the section heading text'. I want to interchange the positions so that I will get a long horizontal bar at the right side and section text at the left side .

Thanks for your help!
Prem
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Removing the horizontal bar to the left of section headings

Post by Vel »

Hi Prem,

Go to moderncvstyleclassic.sty and find this block:

Code: Select all

\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}%
  \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}%
  \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading

Replace it with this:

\renewcommand*{\section}[1]{%
  \par\addvspace{2.5ex}%
  \phantomsection{}% reset the anchor for hyperrefs
  \addcontentsline{toc}{section}{#1}%
  \parbox[t]{\hintscolumnwidth}{\strut\sectionstyle{#1}}%
  \hspace{\separatorcolumnwidth}%
  \parbox[t]{\hintscolumnwidth}{\strut\raggedright\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
  \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
Your titles will now be on the left and the bars on the right. Note that long titles will now wrap and look ugly so you'll have to either keep them brief or change the \hintscolumnwidth value where the title is printed.

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
Post Reply