undo changes to number of arguments, just make it clearer which argument does what.

Ensure that there is always a header-like title/position or organization displayed.
This commit is contained in:
Miguel Barreto 2024-06-19 18:07:04 -04:00
parent 60af788701
commit a138c7254b
3 changed files with 39 additions and 14 deletions

View file

@ -82,6 +82,8 @@
\RequirePackage[skins]{tcolorbox} \RequirePackage[skins]{tcolorbox}
% Needed to deal a paragraphs % Needed to deal a paragraphs
\RequirePackage{parskip} \RequirePackage{parskip}
% Needed to improve tables for subentry
\RequirePackage{multirow}
% Needed to deal hyperlink % Needed to deal hyperlink
\RequirePackage[hidelinks,unicode,pdfpagelabels=false]{hyperref} \RequirePackage[hidelinks,unicode,pdfpagelabels=false]{hyperref}
\hypersetup{% \hypersetup{%
@ -193,8 +195,8 @@
\newcommand*{\descriptionstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\upshape\color{text} #1}} \newcommand*{\descriptionstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\upshape\color{text} #1}}
% For elements of subentry % 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*{\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*{\subentrydatestyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
\newcommand*{\subentrylocationstyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{awesome} #1}} \newcommand*{\subentrylocationstyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
\newcommand*{\subdescriptionstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}} \newcommand*{\subdescriptionstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}}
@ -420,6 +422,7 @@
% Others % Others
\newcommand{\acvSectionTopSkip}{3mm} \newcommand{\acvSectionTopSkip}{3mm}
\newcommand{\acvSectionContentTopSkip}{2.5mm} \newcommand{\acvSectionContentTopSkip}{2.5mm}
\newcommand{\acvSubsectionContentTopSkip}{2.0mm}
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
@ -678,20 +681,40 @@
% Define an environment for cvsubentry % Define an environment for cvsubentry
\newenvironment{cvsubentries}{% \newenvironment{cvsubentries}{%
\vspace{-2.0mm}
\begin{center} \begin{center}
}{% }{%
\end{center} \end{center}
} }
% Define a subentry of cv information % Define a subentry of cv information
% Usage: \cvsubentry{<position>}{<date>}{<description>} % Usage: \cvsubentry{<title>}{<organization>}{<date>}{<description>}
\newcommand*{\cvsubentry}[3]{% \newcommand*{\cvsubentry}[4]{%
\setlength\tabcolsep{0pt} \setlength\tabcolsep{0pt}%
\setlength{\extrarowheight}{0pt} \setlength{\extrarowheight}{0pt}%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}L{\textwidth - 4.5cm} R{4.5cm}} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}L{\textwidth - 4.5cm} R{4.5cm}}
\subentrytitlestyle{#1} & \subentrydatestyle{#2} \\ \ifempty{#2}{%
\ifstrempty{#3} % 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{\textwidth}}{\subdescriptionstyle{#3}} \\} {%
\multicolumn{2}{L{\textwidth}}{%
\vspace{1.5mm}
\subdescriptionstyle{#4}
} \\
}
\end{tabular*} \end{tabular*}
} }

Binary file not shown.

View file

@ -177,16 +177,18 @@
% \item {Conducted penetration testing on SAMSUNG Smart TV.} % \item {Conducted penetration testing on SAMSUNG Smart TV.}
% \end{cvitems} % \end{cvitems}
\begin{cvsubentries} \begin{cvsubentries}
\cvsubentry{KNOX(Solution for Enterprise Mobile Security) Penetration Testing}{Sep. 2013} \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 % These are dummy descriptions of work, since previously the subentry would not compile
% if you added any description to the subentry. % if you added any description to the subentry.
\begin{cvitems} \begin{cvitems}
\item One Thing I did at KNOX \item One Thing I did at Samsung Smart TV
\item Another thing I did at KNOX \item Another thing I did at Samsung Smart TV
\end{cvitems} \end{cvitems}
} }
\cvsubentry{Smart TV Penetration Testing}{Mar. 2011 - Oct. 2011}{}
\end{cvsubentries} \end{cvsubentries}
} }