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

Fix \cvsubentry not compiling while description had any content. #524

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 32 additions & 14 deletions awesome-cv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
\RequirePackage[skins]{tcolorbox}
% Needed to deal a paragraphs
\RequirePackage{parskip}
% Needed to improve tables for subentry
\RequirePackage{multirow}
% Needed to deal hyperlink
\RequirePackage[hidelinks,unicode,pdfpagelabels=false]{hyperref}
\hypersetup{%
Expand Down Expand Up @@ -193,8 +195,8 @@
\newcommand*{\descriptionstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\upshape\color{text} #1}}

% For elements of subentry
\newcommand*{\subentryorganizationstyle}[1]{{\fontsize{8pt}{1em}\bodyfont\scshape\color{graytext} #1}}
\newcommand*{\subentrytitlestyle}[1]{{\fontsize{8pt}{1em}\bodyfont\mdseries\color{graytext} #1}}
\newcommand*{\subentrypositionstyle}[1]{{\fontsize{7pt}{1em}\bodyfont\scshape\color{graytext} #1}}
\newcommand*{\subentrydatestyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
\newcommand*{\subentrylocationstyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
\newcommand*{\subdescriptionstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}}
Expand Down Expand Up @@ -420,6 +422,7 @@
% Others
\newcommand{\acvSectionTopSkip}{3mm}
\newcommand{\acvSectionContentTopSkip}{2.5mm}
\newcommand{\acvSubsectionContentTopSkip}{2.0mm}


%-------------------------------------------------------------------------------
Expand Down Expand Up @@ -660,7 +663,7 @@
\end{center}
}
% Define an entry of cv information
% Usage: \cventry{<position>}{<title>}{<location>}{<date>}{<description>}
% Usage: \cventry{<position>}{<organization>}{<location>}{<date>}{<description>}
\newcommand*{\cventry}[5]{%
\vspace{-2.0mm}
\setlength\tabcolsep{0pt}
Expand All @@ -678,25 +681,40 @@

% Define an environment for cvsubentry
\newenvironment{cvsubentries}{%
\vspace{-2.0mm}
\begin{center}
}{%
\end{center}
}
% Define a subentry of cv information
% Usage: \cvsubentry{<position>}{<title>}{<date>}{<description>}
% Usage: \cvsubentry{<title>}{<organization>}{<date>}{<description>}
\newcommand*{\cvsubentry}[4]{%
\setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
\setlength\leftskip{0.2cm}
\subentrytitlestyle{#2} & \ifthenelse{\equal{#1}{}}
{\subentrydatestyle{#3}}{}
\ifthenelse{\equal{#1}{}}
{}
{\subentrypositionstyle{#1} & \subentrydatestyle{#3} \\}
\ifthenelse{\equal{#4}{}}
\setlength\tabcolsep{0pt}%
\setlength{\extrarowheight}{0pt}%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}L{\textwidth - 4.5cm} R{4.5cm}}
\ifempty{#2}{%
% organization is empty, line date up with title but use organization style
\subentryorganizationstyle{#1} & \subentrydatestyle{#3} \\
}{%
% organization exists
\ifempty{#1}{%
% Organization exists but title doesn't
\subentryorganizationstyle{#2} & \subentrydatestyle{#3} \\
}
{%
% both organization and title exist
\subentryorganizationstyle{#2} & \multirow[b]{2}{*}{\subentrydatestyle{#3}} \\
\subentrytitlestyle{#1} & \\
}
}
\ifstrempty{#4}
{}
{\multicolumn{2}{L{17.0cm}}{\subdescriptionstyle{#4}} \\}
{%
\multicolumn{2}{L{\textwidth}}{%
\vspace{1.5mm}
\subdescriptionstyle{#4}
} \\
}
\end{tabular*}
}

Expand Down
Binary file modified examples/cv.pdf
Binary file not shown.
26 changes: 18 additions & 8 deletions examples/cv/experience.tex
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,24 @@
{S.Korea} % Location
{Sep. 2013, Mar. 2011 - Oct. 2011} % Date(s)
{
\begin{cvitems} % Description(s) of tasks/responsibilities
\item {Conducted penetration testing on SAMSUNG KNOX, which is solution for enterprise mobile security.}
\item {Conducted penetration testing on SAMSUNG Smart TV.}
\end{cvitems}
%\begin{cvsubentries}
% \cvsubentry{}{KNOX(Solution for Enterprise Mobile Security) Penetration Testing}{Sep. 2013}{}
% \cvsubentry{}{Smart TV Penetration Testing}{Mar. 2011 - Oct. 2011}{}
%\end{cvsubentries}
% \begin{cvitems} % Description(s) of tasks/responsibilities
% \item {Conducted penetration testing on SAMSUNG KNOX, which is solution for enterprise mobile security.}
% \item {Conducted penetration testing on SAMSUNG Smart TV.}
% \end{cvitems}
\begin{cvsubentries}
\cvsubentry{}{KNOX(Solution for Enterprise Mobile Security) Penetration Testing}{Sep. 2013}
{Conducted penetration testing on SAMSUNG KNOX, which is solution for enterprise mobile security.}
%This entry has another title to test the logic for multiple lines
\cvsubentry{Penetration Tester}{Smart TV Penetration Testing}{Mar. 2011 - Oct. 2011}
{
% These are dummy descriptions of work, since previously the subentry would not compile
% if you added any description to the subentry.
\begin{cvitems}
\item One Thing I did at Samsung Smart TV
\item Another thing I did at Samsung Smart TV
\end{cvitems}
}
\end{cvsubentries}
}

%---------------------------------------------------------
Expand Down