diff --git a/rendercv/themes/sb2nov/BulletEntry.j2.tex b/rendercv/themes/sb2nov/BulletEntry.j2.tex index 039ef79..981d14c 100644 --- a/rendercv/themes/sb2nov/BulletEntry.j2.tex +++ b/rendercv/themes/sb2nov/BulletEntry.j2.tex @@ -1 +1,7 @@ -\resumeSubItem{}{<>} \ No newline at end of file +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) + +\begin{onecolentry} + \textbullet \hspace{3pt} <> +\end{onecolentry} diff --git a/rendercv/themes/sb2nov/EducationEntry.j2.tex b/rendercv/themes/sb2nov/EducationEntry.j2.tex index 1396eda..69cef5d 100644 --- a/rendercv/themes/sb2nov/EducationEntry.j2.tex +++ b/rendercv/themes/sb2nov/EducationEntry.j2.tex @@ -1,12 +1,39 @@ -\resumeSubheading - {\textbf{<>}}{\textit{<>}} - {\textit{((* if entry.degree *))<> in ((* endif *))<>}}{\textit{<>}} +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) + +((* if entry.date_string or entry.location *)) +\begin{threecolentry}{ + \vspace*{\fill} + \textbullet + \vspace*{3px} + \vspace*{\fill} +}{ + ((* if entry.date_string *))\textit{<>}((* endif *)) + + ((* if entry.location *))\textit{<>}((* endif *)) +} +((* else *)) +\begin{onecolentrybulleted} +((* endif *)) + \textbf{<>} + + \textit{((* if entry.degree *))<> in ((* endif *))<>} +((* if entry.date_string or entry.location *)) +\end{threecolentry} +((* else *)) +\end{onecolentrybulleted} +((* endif *)) + ((* for item in entry.highlights *)) ((* if loop.first *)) - \resumeItemListStart +\vspace{<>} +\begin{onecolentry} + \begin{highlights} ((* endif *)) - \resumeItem{}{<>} + \item <> ((* if loop.last *)) - \resumeItemListEnd + \end{highlights} +\end{onecolentry} ((* endif *)) -((* endfor *)) \ No newline at end of file +((* endfor *)) diff --git a/rendercv/themes/sb2nov/ExperienceEntry.j2.tex b/rendercv/themes/sb2nov/ExperienceEntry.j2.tex index 45863f6..b37ddaf 100644 --- a/rendercv/themes/sb2nov/ExperienceEntry.j2.tex +++ b/rendercv/themes/sb2nov/ExperienceEntry.j2.tex @@ -1,12 +1,39 @@ -\resumeSubheading - {\textbf{<>}}{\textit{<>}} - {\textit{<>}}{\textit{<>}} +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) + +((* if entry.date_string or entry.location *)) +\begin{threecolentry}{ + \vspace*{\fill} + \textbullet + \vspace*{3px} + \vspace*{\fill} +}{ + ((* if entry.date_string *))\textit{<>}((* endif *)) + + ((* if entry.location *))\textit{<>}((* endif *)) +} +((* else *)) +\begin{onecolentrybulleted} +((* endif *)) + \textbf{<>} + + \textit{<>} +((* if entry.date_string or entry.location *)) +\end{threecolentry} +((* else *)) +\end{onecolentrybulleted} +((* endif *)) + ((* for item in entry.highlights *)) ((* if loop.first *)) - \resumeItemListStart +\vspace{<>} +\begin{onecolentry} + \begin{highlights} ((* endif *)) - \resumeItem{}{<>} + \item <> ((* if loop.last *)) - \resumeItemListEnd + \end{highlights} +\end{onecolentry} ((* endif *)) -((* endfor *)) \ No newline at end of file +((* endfor *)) diff --git a/rendercv/themes/sb2nov/Header.j2.tex b/rendercv/themes/sb2nov/Header.j2.tex index c5e0155..efa8bae 100644 --- a/rendercv/themes/sb2nov/Header.j2.tex +++ b/rendercv/themes/sb2nov/Header.j2.tex @@ -1,59 +1,24 @@ ((* if not design.disable_last_updated_date *)) \placelastupdatedtext ((* endif *)) - ((* if cv.name is not none *)) -{ - \centering - \textbf{\fontsize{<>}{<>}\selectfont - <> - } \\ \vspace{3pt} - \small +\begin{header} + \textbf{\fontsize{<>}{<>}\selectfont <>} \vspace{<>} - - \begin{spacing}{1.6} - ((* if cv.phone *)) - \mbox{\href{<>}{{\footnotesize\faPhone*}\hspace{4pt}<>}} - \hspace{<>} - ((* endif *)) - ((* if cv.email *)) - \mbox{\href{mailto:<>}{{\small\faEnvelope[regular]}\hspace{4pt}<>}} - \hspace{<>} - ((* endif *)) - ((* if cv.location *)) - \mbox{{\small\faMapMarker*}\hspace{4pt}<>} - \hspace{<>} - ((* endif *)) - ((* if cv.website *)) - \mbox{\href{<>}{{\small\faLink}\hspace{4pt}<>}} - \hspace{<>} - ((* 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{\href{<>}{{\small<>}\hspace{4pt}<>}} - \hspace*{<>} - ((* endif *)) - ((* endfor *)) - ((* endif *)) - \end{spacing} - \par -} -\vspace{<>} -((* endif *)) + \normalsize + ((* for connection in cv.connections *)) + \mbox{ + ((* if connection["url"] *)) + \hrefWithoutArrow{<>}{\color{black}{\footnotesize<>}\hspace*{0.13cm}<>} + ((* else *)) + {\color{black}{\footnotesize<>}\hspace*{0.13cm}<>} + ((* endif *)) + } + \kern <> + ((* endfor *)) +\end{header} -% save the original href command in a new command: -\let\hrefWithoutArrow\href -% new command for external links: -\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\color{primaryColor}\mbox{\ifthenelse{\equal{#2}{}}{}{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}} \ No newline at end of file +\vspace{<> - <>} +((* endif *)) \ No newline at end of file diff --git a/rendercv/themes/sb2nov/LICENSE b/rendercv/themes/sb2nov/LICENSE deleted file mode 100644 index 4d4f656..0000000 --- a/rendercv/themes/sb2nov/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Sourabh Bajaj - -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/sb2nov/NormalEntry.j2.tex b/rendercv/themes/sb2nov/NormalEntry.j2.tex index 829d5a4..09d3a1e 100644 --- a/rendercv/themes/sb2nov/NormalEntry.j2.tex +++ b/rendercv/themes/sb2nov/NormalEntry.j2.tex @@ -1,11 +1,37 @@ -\resumeNormalSubheading - {<>}{<>((* if entry.date_string and entry.location *)), ((* endif *))<>} +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) + +((* if entry.date_string or entry.location *)) +\begin{threecolentry}{ + \vspace*{\fill} + \textbullet + \vspace*{3px} + \vspace*{\fill} +}{ + ((* if entry.date_string *))\textit{<>}((* endif *)) + + ((* if entry.location *))\textit{<>}((* endif *)) +} +((* else *)) +\begin{onecolentrybulleted} +((* endif *)) + \textbf{<>} +((* if entry.date_string or entry.location *)) +\end{threecolentry} +((* else *)) +\end{onecolentrybulleted} +((* endif *)) + ((* for item in entry.highlights *)) ((* if loop.first *)) - \resumeItemListStart +\vspace{<>} +\begin{onecolentry} + \begin{highlights} ((* endif *)) - \resumeItem{}{<>} + \item <> ((* if loop.last *)) - \resumeItemListEnd + \end{highlights} +\end{onecolentry} ((* endif *)) -((* endfor *)) \ No newline at end of file +((* endfor *)) diff --git a/rendercv/themes/sb2nov/OneLineEntry.j2.tex b/rendercv/themes/sb2nov/OneLineEntry.j2.tex index f4ed7d5..e7b963f 100644 --- a/rendercv/themes/sb2nov/OneLineEntry.j2.tex +++ b/rendercv/themes/sb2nov/OneLineEntry.j2.tex @@ -1,5 +1,7 @@ -((* if is_first_entry *)) -\vspace{0.08cm} +((* if not is_first_entry *)) +\vspace{<>} ((* endif *)) -\resumeSubItem{<>} - {<>} \ No newline at end of file + +\begin{onecolentry} + \textbf{<>:} <> +\end{onecolentry} diff --git a/rendercv/themes/sb2nov/Preamble.j2.tex b/rendercv/themes/sb2nov/Preamble.j2.tex index 60c8538..6e4506d 100644 --- a/rendercv/themes/sb2nov/Preamble.j2.tex +++ b/rendercv/themes/sb2nov/Preamble.j2.tex @@ -1,11 +1,6 @@ -%------------------------- -% Resume in Latex -% Author : Sourabh Bajaj -% License : MIT -%------------------------ - \documentclass[<>, <>]{article} +% Packages: \usepackage[ ignoreheadfoot, % set margins without considering header and footer top=<>, % seperation between body and page edge from the top @@ -15,84 +10,146 @@ footskip=<>, % seperation between body and footer % showframe % for debugging ]{geometry} % for adjusting page geometry -\usepackage{latexsym} -\usepackage[nobottomtitles*]{titlesec} -\usepackage{marvosym} -\usepackage{verbatim} -\usepackage{setspace} -\usepackage{xcolor} -\usepackage{enumitem} +\usepackage{titlesec} % for customizing section titles +\usepackage{tabularx} % for making tables with fixed width columns +\usepackage{array} % tabularx requires this +\usepackage[dvipsnames]{xcolor} % for coloring text +\definecolor{primaryColor}{RGB}{<>} % define primary color +\usepackage{enumitem} % for customizing lists +\usepackage{fontawesome5} % for using icons +\usepackage{amsmath} % for math \usepackage[ - hidelinks, pdftitle={<>'s CV}, - pdfauthor={<>} -]{hyperref} -\usepackage{fancyhdr} -\usepackage[english]{babel} -\usepackage{tabularx} -\usepackage{ifthen} -\usepackage{fontawesome5} -\usepackage{calc} % for calculating lengths + pdfauthor={<>}, + colorlinks=true, + urlcolor=primaryColor +]{hyperref} % for links, metadata and bookmarks \usepackage[pscoord]{eso-pic} % for floating text on the page +\usepackage{calc} % for calculating lengths +\usepackage{bookmark} % for bookmarks \usepackage{lastpage} % for getting the total number of pages +\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 -\input{glyphtounicode} -\pdfgentounicode=1 +% Ensure that generate pdf is machine readable/ATS parsable: +\ifpdf + \input{glyphtounicode} + \pdfgentounicode=1 +\fi -\pagestyle{fancy} -\fancyhf{} % clear all header and footer fields -((* if not design.disable_page_numbering *)) +% Some settings: +((* if design.text_alignment == "justified-with-no-hyphenation" *)) +\usepackage[none]{hyphenat} +\sloppy +((* elif design.text_alignment == "left-aligned" *)) +\raggedright +((* endif *)) +\AtBeginEnvironment{adjustwidth}{\partopsep0pt} % remove space before adjustwidth environment +\pagestyle{empty} % no header or footer +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip +((* if design.disable_page_numbering *)) +\pagenumbering{gobble} % no page numbering +((* else *)) ((* set page_numbering_style_placeholders = { "NAME": cv.name, "PAGE_NUMBER": "\\thepage{}", "TOTAL_PAGES": "\pageref*{LastPage}" } *)) -\fancyfoot[CO]{\color{gray}\textit{\small <>}} +\setlength{\columnsep}{0cm} % set column seperation + +\makeatletter +\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle +\patchcmd{\ps@customFooterStyle}{\thepage}{ + \color{gray}\textit{\small <>} +}{}{} % replace number by desired string +\makeatother +\pagestyle{customFooterStyle} ((* endif *)) -\renewcommand{\headrulewidth}{0pt} -\renewcommand{\footrulewidth}{0pt} -\definecolor{primaryColor}{RGB}{<>} % define primary color - -\urlstyle{same} - -\setcounter{secnumdepth}{0} % no section numbering -\setlength{\parindent}{0pt} % no indentation -\setlength{\topskip}{0pt} % no top skip - -% \raggedbottom -((* if design.text_alignment == "left-aligned"*)) -\raggedright -((* elif design.text_alignment == "justified-with-no-hyphenation" *)) -\usepackage[none]{hyphenat} % for disabling hyphenation -((* endif *)) -\setlength{\tabcolsep}{0in} - -% Sections formatting -\titleformat{\section}{ - \scshape\raggedright\large -}{}{0em}{}[\color{black}\titlerule] - - - -\newcolumntype{R}[1]{ - >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} -} % right-aligned fixed width column type +\titleformat{\section}{\needspace{4\baselineskip}\bfseries\large}{}{0pt}{}[\vspace{1pt}\titlerule] \titlespacing{\section}{ - % left space: - 0pt - }{ - % top space: - <> - 0.1cm - }{ - % bottom space: - <> - } % section title spacing + % left space: + -1pt +}{ + % top space: + <> +}{ + % bottom space: + <> +} % section title spacing + +\renewcommand\labelitemi{$\circ$} % custom bullet points +\newenvironment{highlights}{ + \begin{itemize}[ + topsep=<>, + parsep=<>, + partopsep=0pt, + itemsep=0pt, + leftmargin=<> + 10pt + <> + ] +}{ + \end{itemize} +} % new environment for highlights + + +\newenvironment{onecolentry}{ + \begin{adjustwidth}{ + <> + 0.00001 cm + }{ + <> + 0.00001 cm + } +}{ + \end{adjustwidth} +} % new environment for one column entries + +\newenvironment{onecolentrybulleted}{ + \onecolentry + \setcolumnwidth{<>, \fill} + \begin{paracol}{2} + \vspace*{\fill} + \textbullet + \vspace*{3px} + \vspace*{\fill} + \switchcolumn +}{ + \end{paracol} + \endonecolentry +} % new environment for one column entries with bullets + +\newenvironment{twocolentry}[2][]{ + \onecolentry + \def\secondColumn{#2} + \setcolumnwidth{\fill, <>} + \begin{paracol}{2} +}{ + \switchcolumn \raggedleft \secondColumn + \end{paracol} + \endonecolentry +} % new environment for two column entries + +\newenvironment{threecolentry}[3][]{ + \onecolentry + \def\thirdColumn{#3} + \setcolumnwidth{<>, \fill, <>} + \begin{paracol}{3} + #2 \switchcolumn +}{ + \switchcolumn \raggedleft \thirdColumn + \end{paracol} + \endonecolentry +} % new environment for three column entries + +\newenvironment{header}{ + \setlength{\topsep}{0pt}\par\kern\topsep\centering\linespread{1.5} +}{ + \par\kern\topsep +} % new environment for the header -%------------------------- -% Custom commands ((* set last_updated_date_style_placeholders = { "TODAY": today, } *)) @@ -107,48 +164,10 @@ }% }% -\newcommand{\resumeItem}[2]{ - \item\small{ - \ifthenelse{\equal{#1}{}}{#2}{\textbf{#1:}{ #2}} - } -} +% save the original href command in a new command: +\let\hrefWithoutArrow\href -\newcommand{\resumeItemWithoutBullet}[2]{ - \item[]\small{ - \ifthenelse{\equal{#1}{}}{#2}{\textbf{#1:}{ #2}} - } -} - -\newcommand{\resumeSubheading}[4]{ - \item - \begin{tabularx}{0.98\textwidth-<>}[t]{X R{<>}} - #1 & \small\ifthenelse{\equal{#2}{}}{#4}{#2} \\ - {\small#3} & \small\ifthenelse{\equal{#2}{}}{}{#4} \\ - \end{tabularx} -} - -\newcommand{\resumePublicationSubheading}[3]{ - \item - \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} - #1 & \small#2 \\ - #3 - \end{tabularx} -} - -\newcommand{\resumeNormalSubheading}[2]{ - \item - \begin{tabularx}{0.98\textwidth-<>}[t]{X R{<>}} - \textbf{#1} & \textit{\small #2} - \end{tabularx} -} - -\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}} - -\newcommand{\resumeSubItemWithoutBullet}[2]{\resumeItemWithoutBullet{#1}{#2}} - -\renewcommand{\labelitemii}{$\circ$} - -\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[left=<>, topsep=0pt, parsep=<>, partopsep=0pt, rightmargin=<>]} -\newcommand{\resumeSubHeadingListEnd}{\end{itemize}} -\newcommand{\resumeItemListStart}{\vspace{<>}\begin{itemize}[left=<>, topsep=-<>, itemsep=<>, partopsep=0pt, rightmargin=0cm]} -\newcommand{\resumeItemListEnd}{\end{itemize}} +% new command for external links: +((* if not design.disable_external_link_icons *)) +\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\ifthenelse{\equal{#2}{}}{ }{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}} +((* endif *)) \ No newline at end of file diff --git a/rendercv/themes/sb2nov/PublicationEntry.j2.tex b/rendercv/themes/sb2nov/PublicationEntry.j2.tex index e13538d..688d580 100644 --- a/rendercv/themes/sb2nov/PublicationEntry.j2.tex +++ b/rendercv/themes/sb2nov/PublicationEntry.j2.tex @@ -1,18 +1,34 @@ -\resumePublicationSubheading{ - \textbf{<>} -}{ - \textit{<>} -} -{ - ((*- if entry.doi -*)) - \small\textit{\href{<>}{<>}} - ((*- endif -*)) - ((*- if entry.doi and entry.journal *)) (((* endif -*)) - ((*- if entry.journal -*)) - \small\textit{<>} - ((*- endif -*)) - ((*- if entry.doi and entry.journal *)))((* endif -*)) -} -\resumeItemListStart - \resumeItem{}{\raggedright <> \par} -\resumeItemListEnd \ No newline at end of file +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) + +\begin{samepage} + \begin{threecolentry}{ + \vspace*{\fill} + \textbullet + \vspace*{3px} + \vspace*{\fill} + }{ + <> + } + \textbf{<>} + \end{threecolentry} + + ((* if entry.doi or entry.journal *)) + \vspace{<>} + + \begin{onecolentry} + \hspace{<> - 0.1cm} + ((* endif *)) + ((* if entry.doi -*)) + \href{<>}{<>} + ((*- endif -*)) + ((*- if entry.doi and entry.journal *)) (((* endif -*)) + ((*- if entry.journal -*)) + <> + ((*- endif -*)) + ((*- if entry.doi and entry.journal *)))((* endif -*)) + ((* if entry.doi or entry.journal *)) + \end{onecolentry} + ((* endif *)) +\end{samepage} diff --git a/rendercv/themes/sb2nov/SectionBeginning.j2.tex b/rendercv/themes/sb2nov/SectionBeginning.j2.tex index cde297d..b72afb4 100644 --- a/rendercv/themes/sb2nov/SectionBeginning.j2.tex +++ b/rendercv/themes/sb2nov/SectionBeginning.j2.tex @@ -1,2 +1 @@ -\section{<>} - \resumeSubHeadingListStart \ No newline at end of file +\section{<>} \ No newline at end of file diff --git a/rendercv/themes/sb2nov/SectionEnding.j2.tex b/rendercv/themes/sb2nov/SectionEnding.j2.tex index 5247af9..e69de29 100644 --- a/rendercv/themes/sb2nov/SectionEnding.j2.tex +++ b/rendercv/themes/sb2nov/SectionEnding.j2.tex @@ -1 +0,0 @@ -\resumeSubHeadingListEnd \ No newline at end of file diff --git a/rendercv/themes/sb2nov/TextEntry.j2.tex b/rendercv/themes/sb2nov/TextEntry.j2.tex index 867e420..0c6cb18 100644 --- a/rendercv/themes/sb2nov/TextEntry.j2.tex +++ b/rendercv/themes/sb2nov/TextEntry.j2.tex @@ -1 +1,7 @@ -\resumeSubItemWithoutBullet{}{<>} \ No newline at end of file +((* if not is_first_entry *)) +\vspace{<>} +((* endif *)) + +\begin{onecolentry} + <> +\end{onecolentry} \ No newline at end of file diff --git a/rendercv/themes/sb2nov/__init__.py b/rendercv/themes/sb2nov/__init__.py index ae2f77d..11e918a 100644 --- a/rendercv/themes/sb2nov/__init__.py +++ b/rendercv/themes/sb2nov/__init__.py @@ -2,14 +2,35 @@ from typing import Literal import pydantic -from .. import ThemeOptions, LaTeXDimension +from .. import ThemeOptions, LaTeXDimension, Margins, EntryAreaMargins + + +class EntryAreaMarginsForSb2nov(EntryAreaMargins): + """This class is a data model for the entry area margins.""" + + bullet_width: LaTeXDimension = pydantic.Field( + default="0.6 cm", + title="Width of the Entry Bullet", + description=( + "The width of the bullet for each entry. The default value is 1 cm." + ), + ) + + +class MarginsForSb2nov(Margins): + """This class is a data model for the margins.""" + + entry_area: EntryAreaMarginsForSb2nov = pydantic.Field( + default=EntryAreaMarginsForSb2nov(), + title="Entry Area Margins", + description="Entry area margins.", + ) class Sb2novThemeOptions(ThemeOptions): - """This class is the data model of the theme options for the sb2nov theme.""" + """This class is the data model of the theme options for the `sb2nov` theme.""" theme: Literal["sb2nov"] - header_font_size: LaTeXDimension = pydantic.Field( default="24 pt", title="Header Font Size", @@ -19,3 +40,8 @@ class Sb2novThemeOptions(ThemeOptions): " 24 pt." ), ) + margins: MarginsForSb2nov = pydantic.Field( + default=MarginsForSb2nov(), + title="Margins", + description="Page, section title, entry field, and highlights field margins.", + )