Matnlarga ishlov berish LaTex text Formatting


The only thing that changes with respect to the \name macro is that the font size is now \large, and the text is printed with a slanted font


Download 0.75 Mb.
bet15/18
Sana09.04.2023
Hajmi0.75 Mb.
#1344635
1   ...   10   11   12   13   14   15   16   17   18
Bog'liq
Matnlarga ishlov berish

The only thing that changes with respect to the \name macro is that the font size is now \large, and the text is printed with a slanted font.
4. Personal details macro
Once we have the heading of our CV, we want to print the personal details of the candidate (contact information, address, and the like). Thus we define a macro to write each of these personal entries:
% personal information
\newcommand{\info}[2]{
% set specific indentation for personal information
\noindent\hangindent=2em\hangafter=0
% create a box to align two pieces of text
\parbox{\spacebox}{%
\textsl{#1}} % slanted entry name
#2 \par} % entry value
Let’s break down what this macro does since it is pretty different from the ones defined before:

  • Before the contents of the macro, note that it will be passed to parameters: the first one will specify the name of the (personal information) entry, while the second will specify the contents of that entry. We separate these two so that we can give different format to each of them, and also set some separation.

  • For this entries we set a specific indentation from the right margin. We first delete the default
    indentation with \noindent, then set our custom indentation with \hangindent, and finally indicate for how many lines we want this indentation with \hangafter (zero means that all the lines will have this same indentation).

  • Now we create a paragraph mode box with \parbox of size \spacebox as was defined previously. Inside this box we want to have the entry name slanted.

  • Finally, we print the entry contents using the default font and end the paragraph with \par.


If you get what this macro does, and understand what each command means, the remaining macros will be a piece of cake, since the structure is very similar.

Download 0.75 Mb.

Do'stlaringiz bilan baham:
1   ...   10   11   12   13   14   15   16   17   18




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling