mirror of https://github.com/eyhc1/rendercv.git
classic: improve templates and fix long highlights problem (#47)
This commit is contained in:
parent
a5ea48878c
commit
068f4d6758
|
@ -1,11 +1,7 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
\begingroup((* if design.text_alignment == "left-aligned" *))\raggedright((* endif *))
|
|
||||||
\leftskip=<<design.margins.entry_area.left_and_right>>
|
|
||||||
\advance\csname @rightskip\endcsname <<design.margins.entry_area.left_and_right>>
|
|
||||||
\advance\rightskip <<design.margins.entry_area.left_and_right>>
|
|
||||||
|
|
||||||
|
\begin{onecolentry}
|
||||||
\textbullet \hspace{3pt} <<entry.bullet>>
|
\textbullet \hspace{3pt} <<entry.bullet>>
|
||||||
\par\endgroup
|
\end{onecolentry}
|
||||||
|
|
||||||
|
|
|
@ -6,27 +6,11 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
|
||||||
((# width: \textwidth #))
|
\begin{threecolentry}{\textbf{<<entry.degree>>}}{
|
||||||
((# preamble: first column, second column, third column #))
|
<<date_and_location_strings|join("\n\n")>>
|
||||||
((# first column: p{0.55cm}; constant width, ragged left column #))
|
|
||||||
((# second column: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
|
|
||||||
((# third column: R{<<design.margins.entry_area.date_and_location_width>>}; constant widthm ragged right column #))
|
|
||||||
\begin{tabularx}{
|
|
||||||
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
|
|
||||||
}{
|
|
||||||
L{0.85cm}
|
|
||||||
K{<<design.margins.entry_area.left_and_right>>}
|
|
||||||
R{<<design.margins.entry_area.date_and_location_width>>}
|
|
||||||
}
|
}
|
||||||
\textbf{<<entry.degree>>}
|
|
||||||
&
|
|
||||||
\textbf{<<entry.institution>>}, <<entry.area>>
|
\textbf{<<entry.institution>>}, <<entry.area>>
|
||||||
|
|
||||||
((* if entry.highlights *))
|
|
||||||
\vspace{<<design.margins.highlights_area.top>>}
|
|
||||||
((* endif *))
|
|
||||||
|
|
||||||
((* for item in entry.highlights *))
|
((* for item in entry.highlights *))
|
||||||
((* if loop.first *))
|
((* if loop.first *))
|
||||||
\begin{highlights}
|
\begin{highlights}
|
||||||
|
@ -36,6 +20,4 @@
|
||||||
\end{highlights}
|
\end{highlights}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
&
|
\end{threecolentry}
|
||||||
<<date_and_location_strings|join("\n\n")>>
|
|
||||||
\end{tabularx}
|
|
|
@ -6,20 +6,10 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
|
|
||||||
((* if date_and_location_strings == ["", "", ""] or date_and_location_strings == ["", ""] *))
|
((* if date_and_location_strings == ["", "", ""] or date_and_location_strings == ["", ""] *))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
\begin{onecolentry}
|
||||||
((# width: \textwidth #))
|
|
||||||
((# preamble: first column #))
|
|
||||||
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
|
|
||||||
\begin{tabularx}{
|
|
||||||
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
|
|
||||||
}{
|
|
||||||
K{<<design.margins.entry_area.left_and_right>>}
|
|
||||||
}
|
|
||||||
\textbf{<<entry.company>>}, <<entry.position>>
|
\textbf{<<entry.company>>}, <<entry.position>>
|
||||||
|
|
||||||
\vspace{<<design.margins.highlights_area.top>>}
|
|
||||||
|
|
||||||
((* for item in entry.highlights *))
|
((* for item in entry.highlights *))
|
||||||
((* if loop.first *))
|
((* if loop.first *))
|
||||||
\begin{highlights}
|
\begin{highlights}
|
||||||
|
@ -29,23 +19,12 @@
|
||||||
\end{highlights}
|
\end{highlights}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{tabularx}
|
\end{onecolentry}
|
||||||
((* else *))
|
((* else *))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
\begin{twocolentry}{
|
||||||
((# width: \textwidth #))
|
<<date_and_location_strings|join("\n\n")>>
|
||||||
((# preamble: first column, second column #))
|
|
||||||
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
|
|
||||||
((# second column: R{<<design.margins.entry_area.date_and_location_width>>}; constant width ragged right column #))
|
|
||||||
\begin{tabularx}{
|
|
||||||
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
|
|
||||||
}{
|
|
||||||
K{<<design.margins.entry_area.left_and_right>>}
|
|
||||||
R{<<design.margins.entry_area.date_and_location_width>>}
|
|
||||||
}
|
}
|
||||||
\textbf{<<entry.company>>}, <<entry.position>>
|
\textbf{<<entry.company>>}, <<entry.position>>
|
||||||
|
|
||||||
\vspace{<<design.margins.highlights_area.top>>}
|
|
||||||
|
|
||||||
((* for item in entry.highlights *))
|
((* for item in entry.highlights *))
|
||||||
((* if loop.first *))
|
((* if loop.first *))
|
||||||
\begin{highlights}
|
\begin{highlights}
|
||||||
|
@ -55,7 +34,5 @@
|
||||||
\end{highlights}
|
\end{highlights}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
&
|
\end{twocolentry}
|
||||||
<<date_and_location_strings|join("\n\n")>>
|
|
||||||
\end{tabularx}
|
|
||||||
((* endif *))
|
((* endif *))
|
|
@ -6,20 +6,10 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
|
|
||||||
((* if date_and_location_strings == ["", "", ""] or date_and_location_strings == ["", ""] *))
|
((* if date_and_location_strings == ["", "", ""] or date_and_location_strings == ["", ""] *))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
\begin{onecolentry}
|
||||||
((# width: \textwidth #))
|
|
||||||
((# preamble: first column #))
|
|
||||||
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
|
|
||||||
\begin{tabularx}{
|
|
||||||
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
|
|
||||||
}{
|
|
||||||
K{<<design.margins.entry_area.left_and_right>>}
|
|
||||||
}
|
|
||||||
\textbf{<<entry.name>>}
|
\textbf{<<entry.name>>}
|
||||||
|
|
||||||
\vspace{<<design.margins.highlights_area.top>>}
|
|
||||||
|
|
||||||
((* for item in entry.highlights *))
|
((* for item in entry.highlights *))
|
||||||
((* if loop.first *))
|
((* if loop.first *))
|
||||||
\begin{highlights}
|
\begin{highlights}
|
||||||
|
@ -29,23 +19,12 @@
|
||||||
\end{highlights}
|
\end{highlights}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{tabularx}
|
\end{onecolentry}
|
||||||
((* else *))
|
((* else *))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
\begin{twocolentry}{
|
||||||
((# width: \textwidth #))
|
<<date_and_location_strings|join("\n\n")>>
|
||||||
((# preamble: first column, second column #))
|
|
||||||
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
|
|
||||||
((# second column: R{<<design.margins.entry_area.date_and_location_width>>}; constant width ragged right column #))
|
|
||||||
\begin{tabularx}{
|
|
||||||
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
|
|
||||||
}{
|
|
||||||
K{<<design.margins.entry_area.left_and_right>>}
|
|
||||||
R{<<design.margins.entry_area.date_and_location_width>>}
|
|
||||||
}
|
}
|
||||||
\textbf{<<entry.name>>}
|
\textbf{<<entry.name>>}
|
||||||
|
|
||||||
\vspace{<<design.margins.highlights_area.top>>}
|
|
||||||
|
|
||||||
((* for item in entry.highlights *))
|
((* for item in entry.highlights *))
|
||||||
((* if loop.first *))
|
((* if loop.first *))
|
||||||
\begin{highlights}
|
\begin{highlights}
|
||||||
|
@ -55,7 +34,5 @@
|
||||||
\end{highlights}
|
\end{highlights}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
&
|
\end{twocolentry}
|
||||||
<<date_and_location_strings|join("\n\n")>>
|
|
||||||
\end{tabularx}
|
|
||||||
((* endif *))
|
((* endif *))
|
|
@ -1,10 +1,7 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
\begingroup((* if design.text_alignment == "left-aligned" *))\raggedright((* endif *))
|
|
||||||
\leftskip=<<design.margins.entry_area.left_and_right>>
|
|
||||||
\advance\csname @rightskip\endcsname <<design.margins.entry_area.left_and_right>>
|
|
||||||
\advance\rightskip <<design.margins.entry_area.left_and_right>>
|
|
||||||
|
|
||||||
|
\begin{onecolentry}
|
||||||
\textbf{<<entry.label>>:} <<entry.details>>
|
\textbf{<<entry.label>>:} <<entry.details>>
|
||||||
\par\endgroup
|
\end{onecolentry}
|
||||||
|
|
|
@ -29,7 +29,16 @@
|
||||||
\usepackage{bookmark} % for bookmarks
|
\usepackage{bookmark} % for bookmarks
|
||||||
\usepackage{lastpage} % for getting the total number of pages
|
\usepackage{lastpage} % for getting the total number of pages
|
||||||
\usepackage[default, type1]{sourcesanspro} % for using source sans 3 font
|
\usepackage[default, type1]{sourcesanspro} % for using source sans 3 font
|
||||||
\usepackage{ifthen}
|
\usepackage{changepage} % for one column entries (adjustwidth environment)
|
||||||
|
\usepackage{paracol} % for two and three column entries
|
||||||
|
\usepackage{ifthen} % for conditional statements
|
||||||
|
\usepackage{needspace} % for avoiding page brake right after the section title
|
||||||
|
|
||||||
|
% Ensure that generate pdf is machine readable/ATS parsable:
|
||||||
|
\ifpdf
|
||||||
|
\input{glyphtounicode}
|
||||||
|
\pdfgentounicode=1
|
||||||
|
\fi
|
||||||
|
|
||||||
% Some settings:
|
% Some settings:
|
||||||
\pagestyle{empty} % no header or footer
|
\pagestyle{empty} % no header or footer
|
||||||
|
@ -44,6 +53,8 @@
|
||||||
"PAGE_NUMBER": "\\thepage{}",
|
"PAGE_NUMBER": "\\thepage{}",
|
||||||
"TOTAL_PAGES": "\pageref*{LastPage}"
|
"TOTAL_PAGES": "\pageref*{LastPage}"
|
||||||
} *))
|
} *))
|
||||||
|
\setlength{\columnsep}{0.15cm} % set column seperation
|
||||||
|
|
||||||
\makeatletter
|
\makeatletter
|
||||||
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle
|
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle
|
||||||
\patchcmd{\ps@customFooterStyle}{\thepage}{
|
\patchcmd{\ps@customFooterStyle}{\thepage}{
|
||||||
|
@ -54,6 +65,8 @@
|
||||||
((* endif *))
|
((* endif *))
|
||||||
|
|
||||||
\titleformat{\section}{
|
\titleformat{\section}{
|
||||||
|
% avoid page braking right after the section title
|
||||||
|
\needspace{4\baselineskip}
|
||||||
% make the font size of the section title large and color it with the primary color
|
% make the font size of the section title large and color it with the primary color
|
||||||
\Large\color{primaryColor}
|
\Large\color{primaryColor}
|
||||||
}{
|
}{
|
||||||
|
@ -75,40 +88,52 @@
|
||||||
<<design.margins.section_title.bottom>>
|
<<design.margins.section_title.bottom>>
|
||||||
} % section title spacing
|
} % section title spacing
|
||||||
|
|
||||||
\newcolumntype{L}[1]{
|
|
||||||
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
|
||||||
} % left-aligned fixed width column type
|
|
||||||
\newcolumntype{R}[1]{
|
|
||||||
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
|
||||||
} % right-aligned fixed width column type
|
|
||||||
((* if design.text_alignment == "justified" *))
|
|
||||||
\newcolumntype{K}[1]{
|
|
||||||
>{\let\newline\\\arraybackslash\hspace{0pt}}X
|
|
||||||
} % justified flexible width column type
|
|
||||||
((* elif design.text_alignment == "justified-with-no-hyphenation" *))
|
|
||||||
\newcolumntype{K}[1]{
|
|
||||||
>{\let\newline\\\arraybackslash\hspace{0pt}}X
|
|
||||||
} % justified flexible width column type
|
|
||||||
\usepackage[none]{hyphenat} % for disabling hyphenation
|
|
||||||
((* elif design.text_alignment == "left-aligned" *))
|
|
||||||
\newcolumntype{K}[1]{
|
|
||||||
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}X
|
|
||||||
} % left-aligned flexible width column type
|
|
||||||
((* endif *))
|
|
||||||
\setlength\tabcolsep{-1.5pt} % no space between columns
|
|
||||||
\newenvironment{highlights}{
|
\newenvironment{highlights}{
|
||||||
\begin{itemize}[
|
\begin{itemize}[
|
||||||
topsep=0pt,
|
topsep=<<design.margins.highlights_area.top>>,
|
||||||
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
|
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
|
||||||
partopsep=0pt,
|
partopsep=0pt,
|
||||||
itemsep=0pt,
|
itemsep=0pt,
|
||||||
after=\vspace{-1\baselineskip},
|
|
||||||
leftmargin=<<design.margins.highlights_area.left>> + 3pt
|
leftmargin=<<design.margins.highlights_area.left>> + 3pt
|
||||||
]
|
]
|
||||||
}{
|
}{
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
} % new environment for highlights
|
} % new environment for highlights
|
||||||
|
|
||||||
|
|
||||||
|
\newenvironment{onecolentry}{
|
||||||
|
\begin{adjustwidth}{
|
||||||
|
<<design.margins.entry_area.left_and_right>> + 0.00001 cm
|
||||||
|
}{
|
||||||
|
<<design.margins.entry_area.left_and_right>> + 0.00001 cm
|
||||||
|
}
|
||||||
|
}{
|
||||||
|
\end{adjustwidth}
|
||||||
|
} % new environment for one column entries
|
||||||
|
|
||||||
|
\newenvironment{twocolentry}[2][]{
|
||||||
|
\onecolentry
|
||||||
|
\def\secondColumn{#2}
|
||||||
|
\setcolumnwidth{\fill, 4.2cm}
|
||||||
|
\begin{paracol}{2}
|
||||||
|
}{
|
||||||
|
\switchcolumn \raggedleft \secondColumn
|
||||||
|
\end{paracol}
|
||||||
|
\endonecolentry
|
||||||
|
} % new environment for two column entries
|
||||||
|
|
||||||
|
\newenvironment{threecolentry}[3][]{
|
||||||
|
\onecolentry
|
||||||
|
\def\thirdColumn{#3}
|
||||||
|
\setcolumnwidth{1cm, \fill, 4.2cm}
|
||||||
|
\begin{paracol}{3}
|
||||||
|
\raggedright #2 \switchcolumn
|
||||||
|
}{
|
||||||
|
\switchcolumn \raggedleft \thirdColumn
|
||||||
|
\end{paracol}
|
||||||
|
\endonecolentry
|
||||||
|
} % new environment for three column entries
|
||||||
|
|
||||||
\newenvironment{header}{
|
\newenvironment{header}{
|
||||||
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
|
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
|
||||||
}{
|
}{
|
||||||
|
@ -130,16 +155,3 @@
|
||||||
\let\hrefWithoutArrow\href
|
\let\hrefWithoutArrow\href
|
||||||
% new command for external links:
|
% new command for external links:
|
||||||
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\ifthenelse{\equal{#2}{}}{ }{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}}
|
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\ifthenelse{\equal{#2}{}}{ }{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}}
|
||||||
|
|
||||||
\let\originalTabularx\tabularx
|
|
||||||
\let\originalEndTabularx\endtabularx
|
|
||||||
|
|
||||||
\renewenvironment{tabularx}{\bgroup\centering\originalTabularx}{\originalEndTabularx\par\egroup}
|
|
||||||
|
|
||||||
% For TextEntrys (see https://tex.stackexchange.com/a/600/287984):
|
|
||||||
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1\topsep=0pt\itemsep=0pt\parsep=0pt\parskip=0pt\labelwidth=0pt\itemindent=0pt\labelsep=0pt}\item[]}
|
|
||||||
\let\endchangemargin=\endlist
|
|
||||||
|
|
||||||
% Ensure that generate pdf is machine readable/ATS parsable
|
|
||||||
\input{glyphtounicode}
|
|
||||||
\pdfgentounicode=1
|
|
|
@ -1,12 +1,10 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
|
||||||
((# width: \textwidth #))
|
\begin{twocolentry}{
|
||||||
((# preamble: first column, second column #))
|
<<entry.date_string>>
|
||||||
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
|
}
|
||||||
((# second column: R{<<design.margins.entry_area.date_and_location_width>>}; constant width ragged right column #))
|
|
||||||
\begin{tabularx}{\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm}{K{<<design.margins.entry_area.left_and_right>>} R{<<design.margins.entry_area.date_and_location_width>>}}
|
|
||||||
\textbf{<<entry.title>>}
|
\textbf{<<entry.title>>}
|
||||||
|
|
||||||
\vspace{<<design.margins.highlights_area.vertical_between_bullet_points>>}
|
\vspace{<<design.margins.highlights_area.vertical_between_bullet_points>>}
|
||||||
|
@ -24,6 +22,5 @@
|
||||||
<<entry.journal>>
|
<<entry.journal>>
|
||||||
((*- endif -*))
|
((*- endif -*))
|
||||||
((*- if entry.doi and entry.journal *)))((* endif -*))
|
((*- if entry.doi and entry.journal *)))((* endif -*))
|
||||||
&
|
|
||||||
<<entry.date_string>>
|
\end{twocolentry}
|
||||||
\end{tabularx}
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
((* if not is_first_entry *))
|
((* if not is_first_entry *))
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
\vspace{<<design.margins.entry_area.vertical_between>>}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
\begingroup((* if design.text_alignment == "left-aligned" *))\raggedright((* endif *))
|
|
||||||
\leftskip=<<design.margins.entry_area.left_and_right>>
|
|
||||||
\advance\csname @rightskip\endcsname <<design.margins.entry_area.left_and_right>>
|
|
||||||
\advance\rightskip <<design.margins.entry_area.left_and_right>>
|
|
||||||
|
|
||||||
<<entry>>
|
\begin{onecolentry}
|
||||||
\par\endgroup
|
This is an example resume to showcase the capabilities of the open-source LaTeX CV generator, \href{https://github.com/sinaatalay/rendercv}{RenderCV}. A substantial part of the content is taken from \href{https://www.careercup.com/resume}{here}, where a \textit{clean and tidy CV} pattern is proposed by \textbf{Gayle L. McDowell}.
|
||||||
|
\end{onecolentry}
|
|
@ -6,7 +6,7 @@ from .. import ThemeOptions
|
||||||
|
|
||||||
|
|
||||||
class ClassicThemeOptions(ThemeOptions):
|
class ClassicThemeOptions(ThemeOptions):
|
||||||
"""This class is the data model of the theme options for the classic theme."""
|
"""This class is the data model of the theme options for the `classic` theme."""
|
||||||
|
|
||||||
theme: Literal["classic"]
|
theme: Literal["classic"]
|
||||||
show_timespan_in: list[str] = pydantic.Field(
|
show_timespan_in: list[str] = pydantic.Field(
|
||||||
|
|
Loading…
Reference in New Issue