diff --git a/rendercv/themes/mcdowell/EducationEntry.j2.tex b/rendercv/themes/mcdowell/EducationEntry.j2.tex new file mode 100644 index 0000000..2d9c570 --- /dev/null +++ b/rendercv/themes/mcdowell/EducationEntry.j2.tex @@ -0,0 +1,8 @@ +\begin{cvsubsection}{<>}{<>}{<>} + \begin{itemize} + \item <> in <> +((* for item in entry.highlights *)) + \item <> +((* endfor *)) + \end{itemize} +\end{cvsubsection} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/ExperienceEntry.j2.tex b/rendercv/themes/mcdowell/ExperienceEntry.j2.tex new file mode 100644 index 0000000..6f518f9 --- /dev/null +++ b/rendercv/themes/mcdowell/ExperienceEntry.j2.tex @@ -0,0 +1,11 @@ +\begin{cvsubsection}{<>}{<>}{<>} +((* for item in entry.highlights *)) + ((* if loop.first *)) + \begin{itemize} + ((* endif *)) + \item <> + ((* if loop.last *)) + \end{itemize} + ((* endif *)) +((* endfor *)) +\end{cvsubsection} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/Header.j2.tex b/rendercv/themes/mcdowell/Header.j2.tex new file mode 100644 index 0000000..fa1fd8c --- /dev/null +++ b/rendercv/themes/mcdowell/Header.j2.tex @@ -0,0 +1 @@ +\makeheader \ No newline at end of file diff --git a/rendercv/themes/mcdowell/LICENSE b/rendercv/themes/mcdowell/LICENSE new file mode 100644 index 0000000..9d349e1 --- /dev/null +++ b/rendercv/themes/mcdowell/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Daniil Belyakov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/rendercv/themes/mcdowell/NormalEntry.j2.tex b/rendercv/themes/mcdowell/NormalEntry.j2.tex new file mode 100644 index 0000000..274de1c --- /dev/null +++ b/rendercv/themes/mcdowell/NormalEntry.j2.tex @@ -0,0 +1,11 @@ +\begin{cvpublicationsubsection}[1]{<>}{}{<>} +((* for item in entry.highlights *)) + ((* if loop.first *)) + \begin{itemize} + ((* endif *)) + \item <> + ((* if loop.last *)) + \end{itemize} + ((* endif *)) +((* endfor *)) +\end{cvpublicationsubsection} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/OneLineEntry.j2.tex b/rendercv/themes/mcdowell/OneLineEntry.j2.tex new file mode 100644 index 0000000..4473964 --- /dev/null +++ b/rendercv/themes/mcdowell/OneLineEntry.j2.tex @@ -0,0 +1,3 @@ +\begin{cvonelinesubsection}{}{}{} + \textbullet\hspace{0.1cm} \textbf{Instructor (2003 – 2005):} Taught two full-credit Computer Science courses; average ratings of 4.8 out of 5.0. +\end{cvonelinesubsection} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/Preamble.j2.tex b/rendercv/themes/mcdowell/Preamble.j2.tex new file mode 100644 index 0000000..961ec55 --- /dev/null +++ b/rendercv/themes/mcdowell/Preamble.j2.tex @@ -0,0 +1,44 @@ +%% The MIT License (MIT) +%% +%% Copyright (c) 2015 Daniil Belyakov +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the "Software"), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + +% The font could be set to Windows-specific Calibri by using the 'calibri' option +\documentclass[]{mcdowellcv} + +% For mathematical symbols +\usepackage{amsmath} + +% For links +\usepackage[colorlinks]{hyperref} +\usepackage{xcolor} + +% for icons +\usepackage{fontawesome5} + +% save the original href command in a new command: +\let\hrefWithoutArrow\href + % new command for external links: +\renewcommand{\href}[2]{\textnormal{\hrefWithoutArrow{#1}{\color{blue}\mbox{#2 \raisebox{.15ex}{\scriptsize \faExternalLink*}}}}} + +% Set applicant's personal data for header +\name{<>} +\address{<>} +\contacts{((* if cv.phone *))<> \linebreak((* endif *)) <>} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/PublicationEntry.j2.tex b/rendercv/themes/mcdowell/PublicationEntry.j2.tex new file mode 100644 index 0000000..0834136 --- /dev/null +++ b/rendercv/themes/mcdowell/PublicationEntry.j2.tex @@ -0,0 +1,3 @@ +\begin{cvpublicationsubsection}[2]{<> (\href{<>}{<>})}{}{<>} +<> +\end{cvpublicationsubsection} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/SectionBeginning.j2.tex b/rendercv/themes/mcdowell/SectionBeginning.j2.tex new file mode 100644 index 0000000..2e73c79 --- /dev/null +++ b/rendercv/themes/mcdowell/SectionBeginning.j2.tex @@ -0,0 +1 @@ +\begin{cvsection}{<>} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/SectionEnding.j2.tex b/rendercv/themes/mcdowell/SectionEnding.j2.tex new file mode 100644 index 0000000..f37fb4d --- /dev/null +++ b/rendercv/themes/mcdowell/SectionEnding.j2.tex @@ -0,0 +1 @@ +\end{cvsection} \ No newline at end of file diff --git a/rendercv/themes/mcdowell/TextEntry.j2.tex b/rendercv/themes/mcdowell/TextEntry.j2.tex new file mode 100644 index 0000000..6f40ea9 --- /dev/null +++ b/rendercv/themes/mcdowell/TextEntry.j2.tex @@ -0,0 +1,15 @@ +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) +{ +((* if design.text_alignment == "left-aligned" *)) +\raggedright +((* endif *)) +\setlength{\leftskip}{<>} +\setlength{\rightskip}{<>} + +<> + +\setlength{\leftskip}{0cm} +\setlength{\rightskip}{0cm} +} diff --git a/rendercv/themes/mcdowell/__init__.py b/rendercv/themes/mcdowell/__init__.py new file mode 100644 index 0000000..3565000 --- /dev/null +++ b/rendercv/themes/mcdowell/__init__.py @@ -0,0 +1,16 @@ +from typing import Literal, Annotated + +import pydantic + +LaTeXDimension = Annotated[ + str, + pydantic.Field( + pattern=r"\d+\.?\d* *(cm|in|pt|mm|ex|em)", + ), +] + + +class McdowellThemeOptions(pydantic.BaseModel): + """ """ + + theme: Literal["mcdowell"] diff --git a/rendercv/themes/mcdowell/mcdowellcv.cls b/rendercv/themes/mcdowell/mcdowellcv.cls index 2b4450f..a1c6669 100644 --- a/rendercv/themes/mcdowell/mcdowellcv.cls +++ b/rendercv/themes/mcdowell/mcdowellcv.cls @@ -245,6 +245,33 @@ Ligatures={TeX, NoCommon, NoDiscretionary}]{\mainfontface} \vspace*{\aftersubsectionspace} } +\newenvironment{cvpublicationsubsection}[4][2]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[3.5,p] X[r,p] } + \textbf{#2} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + \newenvironment{cvonelinesubsection}[4][1]{ \notblank{#2}{\toggletrue{lefttitledefined}}{} \notblank{#3}{\toggletrue{centertitledefined}}{}