engineeringresumes: finish the theme

This commit is contained in:
Sina Atalay 2024-03-29 20:05:55 +01:00
parent 93aa4dfdde
commit 3f3740bc05
10 changed files with 138 additions and 117 deletions

View File

@ -1,11 +1,2 @@
((* if not is_first_entry *))
\vspace{<<design.margins.entry_area.vertical_between>>}
((* 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>>
\textbullet \hspace{3pt} <<entry.bullet>>
\par\endgroup
$\vcenter{\hbox{\small$\bullet$}}$ \hspace{3pt} <<entry.bullet>>

View File

@ -1 +1,15 @@
\textbf{<<entry.institution>>} -- \textit{((* if entry.degree *))<<entry.degree>> in ((* endif *))<<entry.area>>((* if entry.location))} \hfill XXXX
((* if not is_first_entry *))
\vspace{8pt}
((* endif *))
\textbf{<<entry.institution>>}, ((* if entry.degree *))<<entry.degree>> in ((* endif *))<<entry.area>>((* if entry.location *)) -- <<entry.location>>((* endif *)) \hfill <<entry.date_string>>
((* for item in entry.highlights *))
((* if loop.first *))
\begin{highlights}
((* endif *))
\item <<item>>
((* if loop.last *))
\end{highlights}
((* endif *))
((* endfor *))

View File

@ -1,10 +1,15 @@
\cventry{
((*- if design.show_only_years *))<<-entry.date_string_only_years->>((* else *))<<-entry.date_string->>((* endif -*))
}{\textbf{<<entry.company>>}}{
<<-entry.position->>
}{
<<-entry.location->>
}{}{}
((* if not is_first_entry *))
\vspace{8pt}
((* endif *))
\textbf{<<entry.position>>}, <<entry.company>>((* if entry.location*)) -- <<entry.location>>((* endif *)) \hfill <<entry.date_string>>
((* for item in entry.highlights *))
\cvlistitem{<<item>>}
((* if loop.first *))
\begin{highlights}
((* endif *))
\item <<item>>
((* if loop.last *))
\end{highlights}
((* endif *))
((* endfor *))

View File

@ -1,11 +1,48 @@
((* if cv.name is not none *))
\maketitle
((* if design.show_last_updated_date *))
\placelastupdatedtext
((* endif *))
((* if cv.name is not none *))
\begin{header}
\fontsize{<<design.header_font_size>>}{<<design.header_font_size>>}
\textbf{<<cv.name>>}
\vspace{<<design.margins.header.vertical_between_name_and_connections>>}
% save the original href command in a new command:
\let\hrefWithoutArrow\href
% new command for external links:
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\color{color1} #2 \raisebox{.15ex}{\footnotesize \faExternalLink*}}}}
\normalsize
((* if cv.phone *))
\mbox{\hrefWithoutArrow{<<cv.phone|replace("-","")>>}{\color{black}{\footnotesize\faPhone*}\hspace*{0.13cm}<<cv.phone|replace("tel:", "")|replace("-"," ")>>}}
\hspace*{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* if cv.email *))
\mbox{\hrefWithoutArrow{mailto:<<cv.email>>}{\color{black}{\small\faEnvelope[regular]}\hspace*{0.13cm}<<cv.email|escape_latex_characters>>}}
\hspace*{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* if cv.location *))
\mbox{{\small\faMapMarker*}\hspace*{0.13cm}<<cv.location>>}
\hspace*{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* if cv.website *))
\mbox{\hrefWithoutArrow{<<cv.website>>}{\color{black}{\small\faLink}\hspace*{0.13cm}<<cv.website|replace("https://","")|reverse|replace("/", "", 1)|reverse>>}}
\hspace*{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((*
set icon_dictionary = {
"LinkedIn": "\\faLinkedinIn",
"GitHub": "\\faGithub",
"Instagram": "\\faInstagram",
"Mastodon": "\\faMastodon",
"Orcid": "\\faOrcid",
}
*))
((* if cv.social_networks *))
((* for network in cv.social_networks *))
((* if network.network in icon_dictionary *))
\mbox{\hrefWithoutArrow{<<network.url>>}{\color{black}{\small<<icon_dictionary[network.network]>>}\hspace*{0.13cm}<<network.username>>}}
\hspace*{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* endfor *))
((* endif *))
\end{header}
\hypersetup{pdftitle={<<cv.name>>'s CV}}
\vspace{<<design.margins.header.bottom>>}
((* endif *))

View File

@ -1,10 +1,15 @@
\cventry{
((*- if design.show_only_years *))<<-entry.date_string_only_years->>((* else *))<<-entry.date_string->>((* endif -*))
}{
<<-entry.name->>
}{
<<-entry.location->>
}{}{}{}
((* if not is_first_entry *))
\vspace{8pt}
((* endif *))
\textbf{<<entry.name>>}((* if entry.location *)) -- <<entry.location>>((* endif *)) \hfill <<entry.date_string>>
((* for item in entry.highlights *))
\cvlistitem{<<item>>}
((* if loop.first *))
\begin{highlights}
((* endif *))
\item <<item>>
((* if loop.last *))
\end{highlights}
((* endif *))
((* endfor *))

View File

@ -1,2 +1,3 @@
\textbf{<<entry.label>>:} <<entry.details>>

View File

@ -26,7 +26,7 @@
\usepackage{calc} % for calculating lengths
\usepackage{bookmark} % for bookmarks
\usepackage{lastpage} % for getting the total number of pages
\usepackage{charter} % for using charter font
% \usepackage{charter} % for using charter font
\usepackage{ifthen}
% Some settings:
@ -68,18 +68,17 @@
\newenvironment{highlights}{
\begin{itemize}[
topsep=0pt,
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
after=\vspace{-1\baselineskip},
leftmargin=<<design.margins.highlights_area.left>> + 3pt
% after=\vspace{-1\baselineskip},
leftmargin=10pt
]
}{
\end{itemize}
} % new environment for highlights
\newenvironment{header}{
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
\setlength{\topsep}{0pt}\par\kern\topsep\centering\linespread{1.5}
}{
\par\kern\topsep
} % new environment for the header
@ -87,7 +86,7 @@
\newcommand{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>}
\AddToShipoutPictureFG*{% Add <stuff> to current page foreground
\put(
\LenToUnit{\paperwidth-<<design.margins.page.right>>-<<design.margins.entry_area.left_and_right>>+0.05cm},
\LenToUnit{\paperwidth-<<design.margins.page.right>>+0.05cm},
\LenToUnit{\paperheight-<<design.margins.page.top|divide_length_by(2)>>}
){\vtop{{\null}\makebox[0pt][c]{
\small\color{gray}\textit{Last updated in <<today>>}\hspace{\widthof{Last updated in <<today>>}}

View File

@ -1,8 +1,17 @@
\cventry{
<<-entry.date_string->>
}{\textbf{<<entry.title>>}}{
<<-entry.journal->>
}{
((*- if entry.doi != "" -*))\href{<<entry.doi_url>>}{<<entry.doi>>}((*- endif -*))
}{}{}
\cvline{}{\small <<entry.authors|map("make_it_nolinebreak")|join(", ")>>}
((* if not is_first_entry *))
\vspace{8pt}
((* endif *))
\textbf{<<entry.title>>} -- <<entry.date_string>>
\begin{highlights}
\item <<entry.authors|map("make_it_nolinebreak")|join(", ")>>
((*- if entry.doi != "" and entry.journal != "" *)) \item ((* endif -*))
((*- if entry.doi != "" -*))
\href{<<entry.doi_url>>}{<<entry.doi>>}
((*- endif -*))
((*- if entry.doi != "" and entry.journal != "" *)) (((* endif -*))
((*- if entry.journal != "" -*))
<<entry.journal>>
((*- endif -*))
((*- if entry.doi != "" and entry.journal != "" *)))((* endif -*))
\end{highlights}

View File

@ -1 +1,6 @@
\cvline{}{<<entry>>}
((* if not is_first_entry *))
\vspace{8pt}
((* endif *))
<<entry>>

View File

@ -1,80 +1,35 @@
from typing import Literal
from typing import ClassVar as NotUsedInput
import pydantic
from .. import LaTeXDimension
from .. import ThemeOptions, LaTeXDimension
from .. import Margins as MarginsBase
class ModerncvThemeOptions(pydantic.BaseModel):
"""This class is the data model of the theme options for the moderncv theme."""
class Margins(MarginsBase):
"""This class is a data model for the margins."""
model_config = pydantic.ConfigDict(extra="forbid")
entry_area: NotUsedInput
highlights_area: NotUsedInput
theme: Literal["moderncv"]
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
default="10pt",
title="Font Size",
description='The font size of the CV. The default value is "10pt".',
examples=["10pt", "11pt", "12pt"],
)
page_size: Literal["a4paper", "letterpaper"] = pydantic.Field(
default="letterpaper",
title="Page Size",
description='The page size of the CV. The default value is "letterpaper".',
examples=["a4paper", "letterpaper"],
)
color: (
Literal["blue"]
| Literal["black"]
| Literal["burgundy"]
| Literal["green"]
| Literal["grey"]
| Literal["orange"]
| Literal["purple"]
| Literal["red"]
) = pydantic.Field(
default="blue",
validate_default=True,
title="Primary Color",
description='The primary color of the CV. The default value is "blue".',
examples=[
"blue",
"black",
"burgundy",
"green",
"grey",
"orange",
"purple",
"red",
],
)
date_width: LaTeXDimension = pydantic.Field(
default="3.8 cm",
validate_default=True,
title="Date and Location Column Width",
description='The width of the date column. The default value is "3.8 cm".',
)
content_scale: float = pydantic.Field(
default=0.75,
title="Content Scale",
class EngineeringresumesThemeOptions(ThemeOptions):
"""This class is the data model of the theme options for the engineeringresumes
theme.
"""
theme: Literal["engineeringresumes"]
header_font_size: LaTeXDimension = pydantic.Field(
default="25 pt",
title="Header Font Size",
description=(
"The scale of the content with respect to the page size. The default value"
' is "0.75".'
"The font size of the header (the name of the person). The default value is"
" 25 pt."
),
)
show_only_years: bool = pydantic.Field(
default=False,
title="Show Only Years",
description=(
'If "True", only the years will be shown in the date column. The default'
' value is "False".'
),
)
disable_page_numbers: bool = pydantic.Field(
default=False,
title="Disable Page Numbers",
description=(
'If "True", the page numbers will be disabled. The default value is'
' "False".'
),
margins: Margins = pydantic.Field(
default=Margins(),
title="Margins",
description="Page, section title, entry field, and highlights field margins.",
)