1. Predefined lengths for space boxes
%% MACROS %%
% size of the boxes used to align text
\newlength{\spacebox}
\settowidth{\spacebox}{123456789}
As you can see, we set this new length to be equal to the width of the box formed by 123456789. It is also
convenient to define a macro to easily insert the same vertical separation between entries each time:
% vertical space separator between entries
\newcommand{\sepspace}{\vspace*{1em}}
2. Name macro
Now it is time to write the macro that prints our name at the top of the CV:
% name
\newcommand{\name}[1]{
\Huge % font size
\fontfamily{phv}\selectfont % font family
% print name centered and bold
\begin{center} \textbf{#1} \end{center}\par
% back to normal size and font
\normalsize\normalfont}
This macro does the following:
First, it sets the \Huge font size, so that our name outstands in the document.
Next, it changes the font family. In this case, we chose the Helvetica font family, with font code phv.
Following that it prints the name (which is passed as the first and unique argument to the macro) centered and using the boldface.
After all of this, it ends the paragraph with \par and sets back the default size and font.
3. Slogan macro
A similar macro is used to define the motto, or slogan, of the candidate:
% motto
\newcommand{\motto}[1]{
\large % font size
\fontfamily{phv}\selectfont % font family
% print motto centered and slanted
\begin{center} \textsl{#1}\end{center}\par
% back to normal size and font
\normalsize \normalfont}
Do'stlaringiz bilan baham: |