PandaScience / FortySecondsCV

A highly customizable and improved version of Carmine Spagnuolo's Twenty Seconds Curriculum Vitae.
BSD 3-Clause "New" or "Revised" License
213 stars 66 forks source link

How to increase space before first `cvsection` entry? #46

Closed paulmenzel closed 1 year ago

paulmenzel commented 1 year ago

Thank you very much for this style. With no profile picture, I deleted the top, so the name is at the very beginning:

diff --git a/fortysecondscv.cls b/fortysecondscv.cls
index 510bf69..32ea9c0 100644
--- a/fortysecondscv.cls
+++ b/fortysecondscv.cls
@@ -47,6 +47,7 @@
        nofoot,
        nomarginpar,
 ]{geometry}
+\RequirePackage{moresize}

 % pre-define some colors the user can choose from
 \definecolor{cvblue}{HTML}{0E5484}
@@ -366,8 +367,8 @@

 % TODO find a cleaner solution for consistent spacing
 \newcommand{\nameandjob}{%
-       {\Huge\color{maincolor}\cvname}\par%
-       \setlength{\parskip}{2ex}
+       {\HUGE\color{maincolor}\cvname}\par%
+       \setlength{\parskip}{5ex}
        {\Large\color{black!80}\cvjobtitle}\par%
        \setlength{\parskip}{1ex}
 }
@@ -681,23 +682,16 @@

 \newcommand{\makefrontsidebar}{%
        \begin{sidebar}
-               % most sidebar commands end with \par; increase space between them
-               \setlength{\parskip}{1ex}
-
-               % optionally insert logo picture before profile
-               \plotlogobefore
-
-               % optionally insert profile picture
-               \plotprofilepicture
-
-               % optionally insert logo picture after profile
-               \plotlogoafter
-
                \vspace{1ex}

                % name and job
                \nameandjob

+               % most sidebar commands end with \par; increase space between them
+               \setlength{\parskip}{1ex}
+
+               \vspace{5ex}
+
                % personal information
                \vspace*{0.5em}
                \begin{icontable}[1.6]{1.7em}{0.4em}

Now I am trying that the name (big font size), and the CV section (smaller than name font size) are aligned at the font bottom and not top.

%-------------------------------------------------------------------------------
%                         TABLE ENTRIES RIGHT COLUMN
%-------------------------------------------------------------------------------
\begin{document}

\makefrontsidebar

\cvsection{Experience}
[…]

Unfortunately, I am unable to add space before the first \cvsection{…}. \vspace{} is ignored, and changing the <before> in \titlespacing*{\section} also does not apply it for the first title of the page.

% section style for cv table headings in right column
% \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before>}[<after>]
\newcommand*{\cvsection}[1]{\section*{#1}}                                        
\titleformat{\section}%
        {\color{sectioncolor}\normalfont\bfseries\LARGE}{}{0pt}{}
\titlespacing*{\section}{0pt}{1.5ex}{1ex}

Do you have a hint, how I can achieve this?

PandaScience commented 1 year ago

If you just want to add a fixed spacing before the first \cvsection for manual aligning, a simple

\begin{document}
\makefrontsidebar
\vspace*{-1ex}      % <--- use this
\cvsection{Experience}
[...]

does the trick for me. Note the additional * in \vspace* though.

Why negative spacing? Adding an element before the first section header (even if it's just spacing) will make it think it's not at the top, so it will add the pre-configured 1.5ex title spacing. Hence, -1ex will effectively add 0.5ex on top.

paulmenzel commented 1 year ago

Awesome! Thank you so much for your help and the solution. \vspace*{-3ex} worked for me.