LaTeX forum ⇒ Curricula Vitae / RésumésConsistent spacing after section title

ModernCV, Friggeri, Plasmati, Classicthesis-CV, and more
ronwelty
Posts: 3
Joined: Sun Jul 10, 2016 7:03 am

Consistent spacing after section title

Postby ronwelty » Sun Jul 10, 2016 7:18 am

I am using the awesome Friggeri template. Everything is fine, except for the fact that "contact" on the left column is of a smaller size when compared to "education" on the right hand side. Since they lie on the same line, different font sizes look sloppy.
The second issue is that the vertical space right after the section title is greater in the right hand side with respect to the left sidebar. I managed to add a
  1. \par\vspace{parskip}

after the definition of the section command but the compilation returns the "There's no line to break" error, even if the result looks exactly as I want. Ideas to suppress the error?
Thanks.
Last edited by ronwelty on Sun Jul 10, 2016 11:07 pm, edited 1 time in total.

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3790
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Jul 10, 2016 10:07 am

Please show a minimal working example and give a link to the template you are using.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8945
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jul 10, 2016 4:17 pm

Hi ronwelty,

welcome to the forum!

I'm sure the solution is simple. Just post your compilable code here, so we can fix it. Either use the "Code" button, or click on "Upload attachment" when writing a post.

Stefan
Site admin

ronwelty
Posts: 3
Joined: Sun Jul 10, 2016 7:03 am

Postby ronwelty » Sun Jul 10, 2016 10:46 pm

Hello and thank to both of you. I am using the Friggeri template, so that the minimal working example might be a little bit too long to paste.
I'll try to rephrase. The aside environment is defined as so in the .cls file:

  1. \RequirePackage[absolute,overlay]{textpos}
  2. \setlength{\TPHorizModule}{1cm}
  3. \setlength{\TPVertModule}{1cm}
  4. \newenvironment{aside}{%
  5. \let\oldsection\section
  6. \renewcommand{\section}[1]{
  7. \par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1}
  8. }
  9.  
  10. \begin{textblock}{3.6}(1.5, 4.33)
  11. \begin{flushright}
  12. \obeycr
  13. }{%
  14. \restorecr
  15. \end{flushright}
  16. \end{textblock}
  17. \let\section\oldsection
  18. }


while the main structure is defined as so:

  1. \renewcommand{\section}[1]{
  2. \par\vspace{\parskip}
  3. {%
  4. \LARGE\headingfont\color{headercolor}%
  5. \@sectioncolor #1%
  6. }
  7. \par\vspace{\parskip}
  8. }
  9.  
  10. \renewcommand{\subsection}[1]{
  11. \par\vspace{.5\parskip}%
  12. {\Large\headingfont\color{headercolor} #1}
  13. \par\vspace{.25\parskip}%
  14. }
  15.  
  16. \renewcommand{\subsubsection}[2]{
  17. \par\vspace{.5\parskip}%
  18. {\Large\headingfont\color{headercolor} #2}
  19. \par\vspace{.25\parskip}%
  20. }
  21.  
  22. \pagestyle{empty}


This makes the Section titles use \LARGE font, while the side bar simply \Large. Since the first sections titles will always lie on the same line, it looks pretty sloppy. I changed the aside environment section titles to \LARGE so that it looks better now, I thought this might help someone.

About the second issue, it looks like the vertical space after the section title is governed by the

  1. \par\vspace{\parskip}


that is after the definition of the heading font, so that in the main structure there is a nice space in between the section title and the first line of text. This does not occur in the aside environment, but when i try to add such space (so that they look the same on the first line, looks very sloppy otherwise) I get a compilation error

! LaTeX Error: There's no line here to end.


even if the compiled version looks fine (the space I want is there so that it looks ok). Any ideas on how to get it in a cleaner way?
Thanks a lot.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8945
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jul 10, 2016 11:00 pm

If it's too long to paste, you could add it as attachment.

Let me translate: "I won't bore you with long but easy compilable code, so I'll give you short snippets and let each one of you complete it to build own code for testing - with some luck your code might behave like mine". ;-)

Here it's late at night, I would have tested code, something else is a bit theoretical.

Stefan
Site admin

ronwelty
Posts: 3
Joined: Sun Jul 10, 2016 7:03 am

Postby ronwelty » Mon Jul 11, 2016 2:13 am

Since it requires the use of something which is publicly available, I did not see the need to do that. Since it looks like it is required, here you go.
After you download the .cls file, the MWE is the following:

  1. \documentclass[]{friggeri-cv}
  2. \begin{document}
  3. \header{Your}{Name}{Whatever}
  4. \begin{aside} % In the aside, each new line forces a line break
  5. \section{contact}
  6. Your Street
  7. Your Street Again
  8. ~
  9. Your Number
  10. \end{aside}
  11. \section{Your Section}
  12. Your text.
  13. \end{document}


Image

Now there's two issues with this:
1. the "Contact" and "Your Section" text lie on the same line but have different sizes. It looks sloppy.
2. the space after "Contact" is different from the space after "Your Section".

The first issues is addressed as I explained in my previous comment.
How to address the second?
Attachments
friggeri-cv.cls
Friggeri-cv
(6.95 KiB) Downloaded 45 times


Return to “Curricula Vitae / Résumés”

Who is online

Users browsing this forum: No registered users and 2 guests