Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multi-column (1 and 2) cvsubsection #15

Open
madhur4127 opened this issue Jan 26, 2020 · 1 comment
Open

Support for multi-column (1 and 2) cvsubsection #15

madhur4127 opened this issue Jan 26, 2020 · 1 comment

Comments

@madhur4127
Copy link

Currently the environment cvsubsection provides fixed numbers of columns — 3.

If the text in middle column is long with left and right columns being under unutilized still there is a need to break the text in middle column over several lines, which wastes space.

Illustration:

image


A single line could suffice for this long title provided there is a single column instead of 3.

Code:

\begin{cvsection}{Additional Experience and Awards}
    \begin{cvsubsection}[3]{}{Gayle's Sample CV Experiences and awards}{}
        \begin{itemize}
            \item \textbf{Instructor (2003 – 2005):} Taught two full-credit Computer Science courses; average ratings of 4.8
            \item \textbf{Third Prize, Senior Design Projects:} Awarded 3rd prize for Synchronized Calendar project, out of
        \end{itemize}
    \end{cvsubsection}
\end{cvsection}
@madhur4127
Copy link
Author

If somebody needs a quickfix, paste these lines before \makeatother at the very end:

\newenvironment{cvsubsectioncenter}[2][1]{
	\notblank{#2}{\toggletrue{centertitledefined}}{}
	\ifboolexpr{togl {centertitledefined}}{
		\begin{center}
			\textbf{#2} \linebreak
		\end{center}
		% Add space according to the specidied number of lines
		\ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{
			\ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{
				\vspace*{\aftermultilinesubsectionheaderspace}
			}
		}
	} {
		\vspace*{\afteremptysubsectionheaderspace}
	}
	\togglefalse{centertitledefined}
	\begin{adjustwidth}{\subsectionmargin}{\subsectionmargin}
}
{
	\end{adjustwidth}
	\vspace*{\aftersubsectionspace}
}

Now the required functionality is available by using

\begin{cvsubsectioncenter}[number of lines -- optional]{title}
........
\end{cvsubsectioncenter}

instead of vanilla 3 column cvsubsection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant