diff --git a/.gitignore b/.gitignore index c745fde..d81d7fb 100644 --- a/.gitignore +++ b/.gitignore @@ -180,4 +180,4 @@ cython_debug/ rendercv_output/ # Include reference files -!/tests/reference_files/**/* \ No newline at end of file +!/tests/auxiliary_files/**/* \ No newline at end of file diff --git a/tests/auxiliary_files/John_Doe_CV.yaml b/tests/auxiliary_files/John_Doe_CV.yaml new file mode 100644 index 0000000..cf13d02 --- /dev/null +++ b/tests/auxiliary_files/John_Doe_CV.yaml @@ -0,0 +1,4 @@ +cv: + name: John Doe +design: + theme: classic diff --git a/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/dummytheme/__pycache__/__init__.cpython-312.pyc b/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/dummytheme/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..d73ed74 Binary files /dev/null and b/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/dummytheme/__pycache__/__init__.cpython-312.pyc differ diff --git a/tests/auxiliary_files/test_generate_latex_file/classic_empty/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file/classic_empty/John_Doe_CV.tex new file mode 100644 index 0000000..cdbb70f --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file/classic_empty/John_Doe_CV.tex @@ -0,0 +1,140 @@ +\documentclass[10pt, letterpaper]{article} + +% Packages: +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % seperation between body and footer + % showframe % for debugging + ]{geometry} % for adjusting page geometry +\usepackage[explicit]{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}{0, 79, 144} % define primary color +\usepackage{enumitem} % for customizing lists +\usepackage{fontawesome5} % for using icons +\usepackage[ + pdftitle={John Doe's CV}, + pdfauthor={John Doe}, + 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[default, type1]{sourcesanspro} % for using source sans pro font +\usepackage{ifthen} + +% Some settings: +\pagestyle{empty} % no header or footer +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip +\makeatletter +\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle +\patchcmd{\ps@customFooterStyle}{\thepage}{ + \color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}} +}{}{} % replace number by desired string +\makeatother +\pagestyle{customFooterStyle} + +\titleformat{\section}{ + % make the font size of the section title large and color it with the primary color + \Large\color{primaryColor} + }{ + }{ + }{ + % print bold title, give 0.15 cm space and draw a line of 0.8 pt thickness + % from the end of the title to the end of the body + \textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]\hspace{-0.1cm} + }[] % section title formatting + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm + }{ + % bottom space: + 0.2 cm + } % 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 +\newcolumntype{K}[1]{ + >{\let\newline\\\arraybackslash\hspace{0pt}}X +} % justified flexible width column type +\setlength\tabcolsep{-1.5pt} % no space between columns +\newenvironment{highlights}{ + \begin{itemize}[ + topsep=0pt, + parsep=0.10 cm, + partopsep=0pt, + itemsep=0pt, + after=\vspace{-1\baselineskip}, + leftmargin=0.4 cm + 3pt + ] + }{ + \end{itemize} + } % new environment for highlights + +\newenvironment{header}{ + \setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5} + }{ + \par\kern\topsep + } % new environment for the header + +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +% save the original href command in a new command: +\let\hrefWithoutArrow\href + % new command for external links: +\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 +\pdfgentounicode=1 + +\begin{document} + \placelastupdatedtext + + \begin{header} + \fontsize{30 pt}{30 pt} + \textbf{John Doe} + + \vspace{0.3 cm} + + \normalsize + \end{header} + + \vspace{0.3 cm} + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file/classic_filled/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file/classic_filled/John_Doe_CV.tex new file mode 100644 index 0000000..e02edf5 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file/classic_filled/John_Doe_CV.tex @@ -0,0 +1,334 @@ +\documentclass[10pt, letterpaper]{article} + +% Packages: +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % seperation between body and footer + % showframe % for debugging + ]{geometry} % for adjusting page geometry +\usepackage[explicit]{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}{0, 79, 144} % define primary color +\usepackage{enumitem} % for customizing lists +\usepackage{fontawesome5} % for using icons +\usepackage[ + pdftitle={John Doe's CV}, + pdfauthor={John Doe}, + 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[default, type1]{sourcesanspro} % for using source sans pro font +\usepackage{ifthen} + +% Some settings: +\pagestyle{empty} % no header or footer +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip +\makeatletter +\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle +\patchcmd{\ps@customFooterStyle}{\thepage}{ + \color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}} +}{}{} % replace number by desired string +\makeatother +\pagestyle{customFooterStyle} + +\titleformat{\section}{ + % make the font size of the section title large and color it with the primary color + \Large\color{primaryColor} + }{ + }{ + }{ + % print bold title, give 0.15 cm space and draw a line of 0.8 pt thickness + % from the end of the title to the end of the body + \textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]\hspace{-0.1cm} + }[] % section title formatting + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm + }{ + % bottom space: + 0.2 cm + } % 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 +\newcolumntype{K}[1]{ + >{\let\newline\\\arraybackslash\hspace{0pt}}X +} % justified flexible width column type +\setlength\tabcolsep{-1.5pt} % no space between columns +\newenvironment{highlights}{ + \begin{itemize}[ + topsep=0pt, + parsep=0.10 cm, + partopsep=0pt, + itemsep=0pt, + after=\vspace{-1\baselineskip}, + leftmargin=0.4 cm + 3pt + ] + }{ + \end{itemize} + } % new environment for highlights + +\newenvironment{header}{ + \setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5} + }{ + \par\kern\topsep + } % new environment for the header + +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +% save the original href command in a new command: +\let\hrefWithoutArrow\href + % new command for external links: +\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 +\pdfgentounicode=1 + +\begin{document} + \placelastupdatedtext + + \begin{header} + \fontsize{30 pt}{30 pt} + \hrefWithoutArrow{https://orcid.org/0000-0000-0000-0000}{\textbf{John Doe}} + + \vspace{0.3 cm} + + \normalsize + \mbox{\hrefWithoutArrow{tel:+905419999999}{{\footnotesize\faPhone*}\hspace*{0.13cm}+90 541 999 99 99}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{mailto:johndoe@example.com}{{\small\faEnvelope[regular]}\hspace*{0.13cm}johndoe@example.com}} + \hspace*{0.5 cm} + \mbox{{\small\faMapMarker*}\hspace*{0.13cm}Istanbul, Turkey} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://example.com/}{{\small\faLink}\hspace*{0.13cm}example.com}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://linkedin.com/in/johndoe}{{\small\faLinkedinIn}\hspace*{0.13cm}johndoe}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://github.com/johndoe}{{\small\faGithub}\hspace*{0.13cm}johndoe}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://instagram.com/johndoe}{{\small\faInstagram}\hspace*{0.13cm}johndoe}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://mastodon.social/@johndoe@example}{{\small\faMastodon}\hspace*{0.13cm}@johndoe@example}} + \hspace*{0.5 cm} + \end{header} + + \vspace{0.3 cm} + + \section{Section1} + + \begin{changemargin}{0.2 cm}{0.2 cm} + My Text Entry + \end{changemargin} + + + + + \vspace{0.2 cm} + \begin{changemargin}{0.2 cm}{0.2 cm} + My Text Entry + \end{changemargin} + + + + + + + \section{Section2} + + \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{4.1 cm}} + \textbf{My Title} + + \vspace{0.10 cm} + + \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} + + \vspace{0.10 cm} + + \href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648} () + & + Dec. 2023 + \end{tabularx} + + \vspace{0.2 cm} + \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{4.1 cm}} + \textbf{My Title} + + \vspace{0.10 cm} + + \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} + + \vspace{0.10 cm} + + \href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648} () + & + Dec. 2023 + \end{tabularx} + + + + \section{Section3} + + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + R{4.1 cm} + } + \textbf{CERN}, Researcher + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + \vspace{0.2 cm} + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + R{4.1 cm} + } + \textbf{CERN}, Researcher + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + + + \section{Section4} + + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + L{0.85cm} + K{0.2 cm} + R{4.1 cm} + } + \textbf{BS} + & + \textbf{Boğaziçi University}, Mechanical Engineering + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + \vspace{0.2 cm} + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + L{0.85cm} + K{0.2 cm} + R{4.1 cm} + } + \textbf{BS} + & + \textbf{Boğaziçi University}, Mechanical Engineering + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + + + \section{Section5} + + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + } + \textbf{My Entry} + + \vspace{0.10 cm} + + \end{tabularx} + + + \vspace{0.2 cm} + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + } + \textbf{My Entry} + + \vspace{0.10 cm} + + \end{tabularx} + + + + + \section{Section6} + + \begingroup\leftskip=0.2 cm + \advance\csname @rightskip\endcsname 0.2 cm + \advance\rightskip 0.2 cm + + \textbf{My One Line Entry:} My Details and some math $a=6^4 \frac{3}{5}$ \par\endgroup + + \vspace{0.2 cm} + \begingroup\leftskip=0.2 cm + \advance\csname @rightskip\endcsname 0.2 cm + \advance\rightskip 0.2 cm + + \textbf{My One Line Entry:} My Details and some math $a=6^4 \frac{3}{5}$ \par\endgroup + + + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file/moderncv_empty/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file/moderncv_empty/John_Doe_CV.tex new file mode 100644 index 0000000..d82f215 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file/moderncv_empty/John_Doe_CV.tex @@ -0,0 +1,70 @@ +%% start of file `template.tex'. +%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2022 moderncv maintainers (github.com/moderncv). +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version 1.3c, +% available at http://www.latex-project.org/lppl/. + +\documentclass[10pt,letterpaper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman') + +% moderncv themes +\moderncvstyle{classic} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy' +\moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red' +%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name + +% adjust the page margins +\usepackage[scale=0.75]{geometry} +\setlength{\hintscolumnwidth}{3.8 cm} % if you want to change the width of the column with the dates +%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... + +% font loading +% for luatex and xetex, do not use inputenc and fontenc +% see https://tex.stackexchange.com/a/496643 +\ifxetexorluatex + \usepackage{fontspec} + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX} + \setmainfont{Latin Modern Roman} + \setsansfont{Latin Modern Sans} + \setmonofont{Latin Modern Mono} + \setmathfont{Latin Modern Math} +\else + \usepackage[T1]{fontenc} + \usepackage{lmodern} +\fi + +% document language +\usepackage[english]{babel} % FIXME: using spanish breaks moderncv + +% personal data +\name{John Doe}{} +% \familyname{} + +% Social icons +% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted +% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted +% \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted +% \social[github]{jdoe} % optional, remove / comment the line if not wanted +% \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted +% \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted +% \social[bitbucket]{jdoe} % optional, remove / comment the line if not wanted +% \social[skype]{jdoe} % optional, remove / comment the line if not wanted +% \social[orcid]{0000-0000-000-000} % optional, remove / comment the line if not wanted +% \social[researchgate]{jdoe} % optional, remove / comment the line if not wanted +% \social[researcherid]{jdoe} % optional, remove / comment the line if not wanted +% \social[telegram]{jdoe} % optional, remove / comment the line if not wanted +% \social[whatsapp]{12345678901} % optional, remove / comment the line if not wanted +% \social[signal]{12345678901} % optional, remove / comment the line if not wanted +% \social[matrix]{@johndoe:matrix.org} % optional, remove / comment the line if not wanted +% \social[googlescholar]{googlescholarid} % optional, remove / comment the line if not wanted + +\begin{document} + \maketitle + + % 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*}}}} + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file/moderncv_filled/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file/moderncv_filled/John_Doe_CV.tex new file mode 100644 index 0000000..285564a --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file/moderncv_filled/John_Doe_CV.tex @@ -0,0 +1,134 @@ +%% start of file `template.tex'. +%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2022 moderncv maintainers (github.com/moderncv). +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version 1.3c, +% available at http://www.latex-project.org/lppl/. + +\documentclass[10pt,letterpaper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman') + +% moderncv themes +\moderncvstyle{classic} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy' +\moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red' +%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name + +% adjust the page margins +\usepackage[scale=0.75]{geometry} +\setlength{\hintscolumnwidth}{3.8 cm} % if you want to change the width of the column with the dates +%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... + +% font loading +% for luatex and xetex, do not use inputenc and fontenc +% see https://tex.stackexchange.com/a/496643 +\ifxetexorluatex + \usepackage{fontspec} + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX} + \setmainfont{Latin Modern Roman} + \setsansfont{Latin Modern Sans} + \setmonofont{Latin Modern Mono} + \setmathfont{Latin Modern Math} +\else + \usepackage[T1]{fontenc} + \usepackage{lmodern} +\fi + +% document language +\usepackage[english]{babel} % FIXME: using spanish breaks moderncv + +% personal data +\name{John Doe}{} +\title{Mechanical Engineer} % optional, remove / comment the line if not wanted +% \familyname{} +\address{Istanbul, Turkey}{} +\phone[mobile]{+90 541 999 99 99} +\email{johndoe@example.com} +\homepage{example.com} + +\social[linkedin]{johndoe} +\social[github]{johndoe} +\social[orcid]{0000-0000-0000-0000} +% Social icons +% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted +% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted +% \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted +% \social[github]{jdoe} % optional, remove / comment the line if not wanted +% \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted +% \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted +% \social[bitbucket]{jdoe} % optional, remove / comment the line if not wanted +% \social[skype]{jdoe} % optional, remove / comment the line if not wanted +% \social[orcid]{0000-0000-000-000} % optional, remove / comment the line if not wanted +% \social[researchgate]{jdoe} % optional, remove / comment the line if not wanted +% \social[researcherid]{jdoe} % optional, remove / comment the line if not wanted +% \social[telegram]{jdoe} % optional, remove / comment the line if not wanted +% \social[whatsapp]{12345678901} % optional, remove / comment the line if not wanted +% \social[signal]{12345678901} % optional, remove / comment the line if not wanted +% \social[matrix]{@johndoe:matrix.org} % optional, remove / comment the line if not wanted +% \social[googlescholar]{googlescholarid} % optional, remove / comment the line if not wanted + +\begin{document} + \maketitle + + % 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*}}}} + + \section{Section1} + + \cvlistitem{My Text Entry} + + \cvlistitem{My Text Entry} + + + + \section{Section2} + + \cventry{Dec. 2023}{My Title}{}{\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{}{} + \cvline{}{\small \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}}} + + \cventry{Dec. 2023}{My Title}{}{\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{}{} + \cvline{}{\small \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}}} + + + + \section{Section3} + + \cventry{}{Researcher}{CERN}{}{}{} + + + \cventry{}{Researcher}{CERN}{}{}{} + + + + + \section{Section4} + + \cventry{}{BS, Mechanical Engineering}{Boğaziçi University}{}{}{} + + + \cventry{}{BS, Mechanical Engineering}{Boğaziçi University}{}{}{} + + + + + \section{Section5} + + \cventry{}{My Entry}{}{}{}{} + + + \cventry{}{My Entry}{}{}{}{} + + + + + \section{Section6} + + \cvline{My One Line Entry}{My Details and some math $a=6^4 \frac{3}{5}$} + + \cvline{My One Line Entry}{My Details and some math $a=6^4 \frac{3}{5}$} + + + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file/sb2nov_empty/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file/sb2nov_empty/John_Doe_CV.tex new file mode 100644 index 0000000..c9afb74 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file/sb2nov_empty/John_Doe_CV.tex @@ -0,0 +1,145 @@ +%------------------------- +% Resume in Latex +% Author : Sourabh Bajaj +% License : MIT +%------------------------ + +\documentclass[10pt, letterpaper]{article} + +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % 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[hidelinks]{hyperref} +\usepackage{fancyhdr} +\usepackage[english]{babel} +\usepackage{tabularx} +\usepackage{ifthen} +\usepackage{fontawesome5} +\usepackage{calc} % for calculating lengths +\usepackage[pscoord]{eso-pic} % for floating text on the page +\usepackage{lastpage} % for getting the total number of pages +\input{glyphtounicode} + +\pagestyle{fancy} +\fancyhf{} % clear all header and footer fields +\fancyfoot[CO]{\color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\definecolor{primaryColor}{RGB}{0, 79, 144} % define primary color + +\urlstyle{same} + +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip + +% \raggedbottom +\setlength{\tabcolsep}{0in} + +% Sections formatting +\titleformat{\section}{ + \scshape\raggedright\large +}{}{0em}{}[\color{black}\titlerule] + +% Ensure that generate pdf is machine readable/ATS parsable +\pdfgentounicode=1 + + +\newcolumntype{R}[1]{ + >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} +} % right-aligned fixed width column type + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm - 0.1cm + }{ + % bottom space: + 0.2 cm + } % section title spacing + +%------------------------- +% Custom commands +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +\newcommand{\resumeItem}[2]{ + \item\small{ + \ifthenelse{\equal{#1}{}}{#2}{\textbf{#1}{: #2}} + } +} + +\newcommand{\resumeSubheading}[4]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small\ifthenelse{\equal{#2}{}}{#4}{#2}} \\ + \textit{\small#3} & \textit{\small\ifthenelse{\equal{#2}{}}{}{#4}} \\ + \end{tabularx} +} + +\newcommand{\resumeNormalSubheading}[2]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small #2} + \end{tabularx} +} + +\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}} + +\renewcommand{\labelitemii}{$\circ$} + +\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[left=0.2 cm, topsep=0pt, parsep=0.2 cm, partopsep=0pt, rightmargin=0.2 cm]} +\newcommand{\resumeSubHeadingListEnd}{\end{itemize}} +\newcommand{\resumeItemListStart}{\vspace{0.10 cm}\begin{itemize}[left=0.4 cm, topsep=-0.2 cm, itemsep=0.10 cm, partopsep=0pt, rightmargin=0cm]} +\newcommand{\resumeItemListEnd}{\end{itemize}} + +\begin{document} + \placelastupdatedtext + + { + \centering + \textbf{\fontsize{24 pt}{24 pt}\selectfont + John Doe + } \\ \vspace{3pt} + \small + + \vspace{0.3 cm} + + \begin{spacing}{1.6} + \end{spacing} + \par + } + + \vspace{0.3 cm} + + % 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*}}}} + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file/sb2nov_filled/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file/sb2nov_filled/John_Doe_CV.tex new file mode 100644 index 0000000..070d857 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file/sb2nov_filled/John_Doe_CV.tex @@ -0,0 +1,244 @@ +%------------------------- +% Resume in Latex +% Author : Sourabh Bajaj +% License : MIT +%------------------------ + +\documentclass[10pt, letterpaper]{article} + +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % 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[hidelinks]{hyperref} +\usepackage{fancyhdr} +\usepackage[english]{babel} +\usepackage{tabularx} +\usepackage{ifthen} +\usepackage{fontawesome5} +\usepackage{calc} % for calculating lengths +\usepackage[pscoord]{eso-pic} % for floating text on the page +\usepackage{lastpage} % for getting the total number of pages +\input{glyphtounicode} + +\pagestyle{fancy} +\fancyhf{} % clear all header and footer fields +\fancyfoot[CO]{\color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\definecolor{primaryColor}{RGB}{0, 79, 144} % define primary color + +\urlstyle{same} + +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip + +% \raggedbottom +\setlength{\tabcolsep}{0in} + +% Sections formatting +\titleformat{\section}{ + \scshape\raggedright\large +}{}{0em}{}[\color{black}\titlerule] + +% Ensure that generate pdf is machine readable/ATS parsable +\pdfgentounicode=1 + + +\newcolumntype{R}[1]{ + >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} +} % right-aligned fixed width column type + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm - 0.1cm + }{ + % bottom space: + 0.2 cm + } % section title spacing + +%------------------------- +% Custom commands +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +\newcommand{\resumeItem}[2]{ + \item\small{ + \ifthenelse{\equal{#1}{}}{#2}{\textbf{#1}{: #2}} + } +} + +\newcommand{\resumeSubheading}[4]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small\ifthenelse{\equal{#2}{}}{#4}{#2}} \\ + \textit{\small#3} & \textit{\small\ifthenelse{\equal{#2}{}}{}{#4}} \\ + \end{tabularx} +} + +\newcommand{\resumeNormalSubheading}[2]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small #2} + \end{tabularx} +} + +\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}} + +\renewcommand{\labelitemii}{$\circ$} + +\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[left=0.2 cm, topsep=0pt, parsep=0.2 cm, partopsep=0pt, rightmargin=0.2 cm]} +\newcommand{\resumeSubHeadingListEnd}{\end{itemize}} +\newcommand{\resumeItemListStart}{\vspace{0.10 cm}\begin{itemize}[left=0.4 cm, topsep=-0.2 cm, itemsep=0.10 cm, partopsep=0pt, rightmargin=0cm]} +\newcommand{\resumeItemListEnd}{\end{itemize}} + +\begin{document} + \placelastupdatedtext + + { + \centering + \textbf{\fontsize{24 pt}{24 pt}\selectfont + \href{https://orcid.org/0000-0000-0000-0000}{John Doe} + } \\ \vspace{3pt} + \small + + \vspace{0.3 cm} + + \begin{spacing}{1.6} + \mbox{\href{tel:+905419999999}{{\footnotesize\faPhone*}\hspace{4pt}+90 541 999 99 99}} + \hspace{0.5 cm} + \mbox{\href{mailto:johndoe@example.com}{{\small\faEnvelope[regular]}\hspace{4pt}johndoe@example.com}} + \hspace{0.5 cm} + \mbox{{\small\faMapMarker*}\hspace{4pt}Istanbul, Turkey} + \hspace{0.5 cm} + \mbox{\href{https://example.com/}{{\small\faLink}\hspace{4pt}example.com}} + \hspace{0.5 cm} + \mbox{\href{https://linkedin.com/in/johndoe}{{\small\faLinkedinIn}\hspace{4pt}johndoe}} + \hspace*{0.5 cm} + \mbox{\href{https://github.com/johndoe}{{\small\faGithub}\hspace{4pt}johndoe}} + \hspace*{0.5 cm} + \mbox{\href{https://instagram.com/johndoe}{{\small\faInstagram}\hspace{4pt}johndoe}} + \hspace*{0.5 cm} + \mbox{\href{https://mastodon.social/@johndoe@example}{{\small\faMastodon}\hspace{4pt}@johndoe@example}} + \hspace*{0.5 cm} + \end{spacing} + \par + } + + \vspace{0.3 cm} + + % 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*}}}} + + \section{Section1} + \resumeSubHeadingListStart + + \resumeSubItem{}{My Text Entry} + + \resumeSubItem{}{My Text Entry} + + + \resumeSubHeadingListEnd + \section{Section2} + \resumeSubHeadingListStart + + \resumeSubheading + {My Title}{Dec. 2023} + {\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{} + \resumeItemListStart + \resumeItem{}{\raggedright \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} \par} + \resumeItemListEnd + + \resumeSubheading + {My Title}{Dec. 2023} + {\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{} + \resumeItemListStart + \resumeItem{}{\raggedright \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} \par} + \resumeItemListEnd + + + \resumeSubHeadingListEnd + \section{Section3} + \resumeSubHeadingListStart + + \resumeSubheading + {CERN}{} + {Researcher}{} + + + \resumeSubheading + {CERN}{} + {Researcher}{} + + + + \resumeSubHeadingListEnd + \section{Section4} + \resumeSubHeadingListStart + + \resumeSubheading + {Boğaziçi University}{} + {BS in Mechanical Engineering}{} + + + \resumeSubheading + {Boğaziçi University}{} + {BS in Mechanical Engineering}{} + + + + \resumeSubHeadingListEnd + \section{Section5} + \resumeSubHeadingListStart + + \resumeNormalSubheading + {My Entry}{} + + + \resumeNormalSubheading + {My Entry}{} + + + + \resumeSubHeadingListEnd + \section{Section6} + \resumeSubHeadingListStart + + \vspace{0.08cm} + \resumeSubItem{My One Line Entry} + {My Details and some math $a=6^4 \frac{3}{5}$} + + \resumeSubItem{My One Line Entry} + {My Details and some math $a=6^4 \frac{3}{5}$} + + + \resumeSubHeadingListEnd + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/classic_empty/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/classic_empty/John_Doe_CV.tex new file mode 100644 index 0000000..cdbb70f --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/classic_empty/John_Doe_CV.tex @@ -0,0 +1,140 @@ +\documentclass[10pt, letterpaper]{article} + +% Packages: +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % seperation between body and footer + % showframe % for debugging + ]{geometry} % for adjusting page geometry +\usepackage[explicit]{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}{0, 79, 144} % define primary color +\usepackage{enumitem} % for customizing lists +\usepackage{fontawesome5} % for using icons +\usepackage[ + pdftitle={John Doe's CV}, + pdfauthor={John Doe}, + 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[default, type1]{sourcesanspro} % for using source sans pro font +\usepackage{ifthen} + +% Some settings: +\pagestyle{empty} % no header or footer +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip +\makeatletter +\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle +\patchcmd{\ps@customFooterStyle}{\thepage}{ + \color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}} +}{}{} % replace number by desired string +\makeatother +\pagestyle{customFooterStyle} + +\titleformat{\section}{ + % make the font size of the section title large and color it with the primary color + \Large\color{primaryColor} + }{ + }{ + }{ + % print bold title, give 0.15 cm space and draw a line of 0.8 pt thickness + % from the end of the title to the end of the body + \textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]\hspace{-0.1cm} + }[] % section title formatting + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm + }{ + % bottom space: + 0.2 cm + } % 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 +\newcolumntype{K}[1]{ + >{\let\newline\\\arraybackslash\hspace{0pt}}X +} % justified flexible width column type +\setlength\tabcolsep{-1.5pt} % no space between columns +\newenvironment{highlights}{ + \begin{itemize}[ + topsep=0pt, + parsep=0.10 cm, + partopsep=0pt, + itemsep=0pt, + after=\vspace{-1\baselineskip}, + leftmargin=0.4 cm + 3pt + ] + }{ + \end{itemize} + } % new environment for highlights + +\newenvironment{header}{ + \setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5} + }{ + \par\kern\topsep + } % new environment for the header + +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +% save the original href command in a new command: +\let\hrefWithoutArrow\href + % new command for external links: +\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 +\pdfgentounicode=1 + +\begin{document} + \placelastupdatedtext + + \begin{header} + \fontsize{30 pt}{30 pt} + \textbf{John Doe} + + \vspace{0.3 cm} + + \normalsize + \end{header} + + \vspace{0.3 cm} + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex new file mode 100644 index 0000000..e02edf5 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex @@ -0,0 +1,334 @@ +\documentclass[10pt, letterpaper]{article} + +% Packages: +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % seperation between body and footer + % showframe % for debugging + ]{geometry} % for adjusting page geometry +\usepackage[explicit]{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}{0, 79, 144} % define primary color +\usepackage{enumitem} % for customizing lists +\usepackage{fontawesome5} % for using icons +\usepackage[ + pdftitle={John Doe's CV}, + pdfauthor={John Doe}, + 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[default, type1]{sourcesanspro} % for using source sans pro font +\usepackage{ifthen} + +% Some settings: +\pagestyle{empty} % no header or footer +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip +\makeatletter +\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle +\patchcmd{\ps@customFooterStyle}{\thepage}{ + \color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}} +}{}{} % replace number by desired string +\makeatother +\pagestyle{customFooterStyle} + +\titleformat{\section}{ + % make the font size of the section title large and color it with the primary color + \Large\color{primaryColor} + }{ + }{ + }{ + % print bold title, give 0.15 cm space and draw a line of 0.8 pt thickness + % from the end of the title to the end of the body + \textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]\hspace{-0.1cm} + }[] % section title formatting + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm + }{ + % bottom space: + 0.2 cm + } % 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 +\newcolumntype{K}[1]{ + >{\let\newline\\\arraybackslash\hspace{0pt}}X +} % justified flexible width column type +\setlength\tabcolsep{-1.5pt} % no space between columns +\newenvironment{highlights}{ + \begin{itemize}[ + topsep=0pt, + parsep=0.10 cm, + partopsep=0pt, + itemsep=0pt, + after=\vspace{-1\baselineskip}, + leftmargin=0.4 cm + 3pt + ] + }{ + \end{itemize} + } % new environment for highlights + +\newenvironment{header}{ + \setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5} + }{ + \par\kern\topsep + } % new environment for the header + +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +% save the original href command in a new command: +\let\hrefWithoutArrow\href + % new command for external links: +\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 +\pdfgentounicode=1 + +\begin{document} + \placelastupdatedtext + + \begin{header} + \fontsize{30 pt}{30 pt} + \hrefWithoutArrow{https://orcid.org/0000-0000-0000-0000}{\textbf{John Doe}} + + \vspace{0.3 cm} + + \normalsize + \mbox{\hrefWithoutArrow{tel:+905419999999}{{\footnotesize\faPhone*}\hspace*{0.13cm}+90 541 999 99 99}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{mailto:johndoe@example.com}{{\small\faEnvelope[regular]}\hspace*{0.13cm}johndoe@example.com}} + \hspace*{0.5 cm} + \mbox{{\small\faMapMarker*}\hspace*{0.13cm}Istanbul, Turkey} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://example.com/}{{\small\faLink}\hspace*{0.13cm}example.com}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://linkedin.com/in/johndoe}{{\small\faLinkedinIn}\hspace*{0.13cm}johndoe}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://github.com/johndoe}{{\small\faGithub}\hspace*{0.13cm}johndoe}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://instagram.com/johndoe}{{\small\faInstagram}\hspace*{0.13cm}johndoe}} + \hspace*{0.5 cm} + \mbox{\hrefWithoutArrow{https://mastodon.social/@johndoe@example}{{\small\faMastodon}\hspace*{0.13cm}@johndoe@example}} + \hspace*{0.5 cm} + \end{header} + + \vspace{0.3 cm} + + \section{Section1} + + \begin{changemargin}{0.2 cm}{0.2 cm} + My Text Entry + \end{changemargin} + + + + + \vspace{0.2 cm} + \begin{changemargin}{0.2 cm}{0.2 cm} + My Text Entry + \end{changemargin} + + + + + + + \section{Section2} + + \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{4.1 cm}} + \textbf{My Title} + + \vspace{0.10 cm} + + \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} + + \vspace{0.10 cm} + + \href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648} () + & + Dec. 2023 + \end{tabularx} + + \vspace{0.2 cm} + \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{4.1 cm}} + \textbf{My Title} + + \vspace{0.10 cm} + + \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} + + \vspace{0.10 cm} + + \href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648} () + & + Dec. 2023 + \end{tabularx} + + + + \section{Section3} + + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + R{4.1 cm} + } + \textbf{CERN}, Researcher + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + \vspace{0.2 cm} + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + R{4.1 cm} + } + \textbf{CERN}, Researcher + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + + + \section{Section4} + + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + L{0.85cm} + K{0.2 cm} + R{4.1 cm} + } + \textbf{BS} + & + \textbf{Boğaziçi University}, Mechanical Engineering + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + \vspace{0.2 cm} + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + L{0.85cm} + K{0.2 cm} + R{4.1 cm} + } + \textbf{BS} + & + \textbf{Boğaziçi University}, Mechanical Engineering + + \vspace{0.10 cm} + + & + + + + \end{tabularx} + + + + \section{Section5} + + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + } + \textbf{My Entry} + + \vspace{0.10 cm} + + \end{tabularx} + + + \vspace{0.2 cm} + \begin{tabularx}{ + \textwidth-0.4 cm-0.13cm + }{ + K{0.2 cm} + } + \textbf{My Entry} + + \vspace{0.10 cm} + + \end{tabularx} + + + + + \section{Section6} + + \begingroup\leftskip=0.2 cm + \advance\csname @rightskip\endcsname 0.2 cm + \advance\rightskip 0.2 cm + + \textbf{My One Line Entry:} My Details and some math $a=6^4 \frac{3}{5}$ \par\endgroup + + \vspace{0.2 cm} + \begingroup\leftskip=0.2 cm + \advance\csname @rightskip\endcsname 0.2 cm + \advance\rightskip 0.2 cm + + \textbf{My One Line Entry:} My Details and some math $a=6^4 \frac{3}{5}$ \par\endgroup + + + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/moderncv_empty/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/moderncv_empty/John_Doe_CV.tex new file mode 100644 index 0000000..d82f215 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/moderncv_empty/John_Doe_CV.tex @@ -0,0 +1,70 @@ +%% start of file `template.tex'. +%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2022 moderncv maintainers (github.com/moderncv). +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version 1.3c, +% available at http://www.latex-project.org/lppl/. + +\documentclass[10pt,letterpaper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman') + +% moderncv themes +\moderncvstyle{classic} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy' +\moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red' +%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name + +% adjust the page margins +\usepackage[scale=0.75]{geometry} +\setlength{\hintscolumnwidth}{3.8 cm} % if you want to change the width of the column with the dates +%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... + +% font loading +% for luatex and xetex, do not use inputenc and fontenc +% see https://tex.stackexchange.com/a/496643 +\ifxetexorluatex + \usepackage{fontspec} + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX} + \setmainfont{Latin Modern Roman} + \setsansfont{Latin Modern Sans} + \setmonofont{Latin Modern Mono} + \setmathfont{Latin Modern Math} +\else + \usepackage[T1]{fontenc} + \usepackage{lmodern} +\fi + +% document language +\usepackage[english]{babel} % FIXME: using spanish breaks moderncv + +% personal data +\name{John Doe}{} +% \familyname{} + +% Social icons +% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted +% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted +% \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted +% \social[github]{jdoe} % optional, remove / comment the line if not wanted +% \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted +% \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted +% \social[bitbucket]{jdoe} % optional, remove / comment the line if not wanted +% \social[skype]{jdoe} % optional, remove / comment the line if not wanted +% \social[orcid]{0000-0000-000-000} % optional, remove / comment the line if not wanted +% \social[researchgate]{jdoe} % optional, remove / comment the line if not wanted +% \social[researcherid]{jdoe} % optional, remove / comment the line if not wanted +% \social[telegram]{jdoe} % optional, remove / comment the line if not wanted +% \social[whatsapp]{12345678901} % optional, remove / comment the line if not wanted +% \social[signal]{12345678901} % optional, remove / comment the line if not wanted +% \social[matrix]{@johndoe:matrix.org} % optional, remove / comment the line if not wanted +% \social[googlescholar]{googlescholarid} % optional, remove / comment the line if not wanted + +\begin{document} + \maketitle + + % 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*}}}} + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex new file mode 100644 index 0000000..285564a --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex @@ -0,0 +1,134 @@ +%% start of file `template.tex'. +%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2022 moderncv maintainers (github.com/moderncv). +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version 1.3c, +% available at http://www.latex-project.org/lppl/. + +\documentclass[10pt,letterpaper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman') + +% moderncv themes +\moderncvstyle{classic} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy' +\moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red' +%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name + +% adjust the page margins +\usepackage[scale=0.75]{geometry} +\setlength{\hintscolumnwidth}{3.8 cm} % if you want to change the width of the column with the dates +%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... + +% font loading +% for luatex and xetex, do not use inputenc and fontenc +% see https://tex.stackexchange.com/a/496643 +\ifxetexorluatex + \usepackage{fontspec} + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX} + \setmainfont{Latin Modern Roman} + \setsansfont{Latin Modern Sans} + \setmonofont{Latin Modern Mono} + \setmathfont{Latin Modern Math} +\else + \usepackage[T1]{fontenc} + \usepackage{lmodern} +\fi + +% document language +\usepackage[english]{babel} % FIXME: using spanish breaks moderncv + +% personal data +\name{John Doe}{} +\title{Mechanical Engineer} % optional, remove / comment the line if not wanted +% \familyname{} +\address{Istanbul, Turkey}{} +\phone[mobile]{+90 541 999 99 99} +\email{johndoe@example.com} +\homepage{example.com} + +\social[linkedin]{johndoe} +\social[github]{johndoe} +\social[orcid]{0000-0000-0000-0000} +% Social icons +% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted +% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted +% \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted +% \social[github]{jdoe} % optional, remove / comment the line if not wanted +% \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted +% \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted +% \social[bitbucket]{jdoe} % optional, remove / comment the line if not wanted +% \social[skype]{jdoe} % optional, remove / comment the line if not wanted +% \social[orcid]{0000-0000-000-000} % optional, remove / comment the line if not wanted +% \social[researchgate]{jdoe} % optional, remove / comment the line if not wanted +% \social[researcherid]{jdoe} % optional, remove / comment the line if not wanted +% \social[telegram]{jdoe} % optional, remove / comment the line if not wanted +% \social[whatsapp]{12345678901} % optional, remove / comment the line if not wanted +% \social[signal]{12345678901} % optional, remove / comment the line if not wanted +% \social[matrix]{@johndoe:matrix.org} % optional, remove / comment the line if not wanted +% \social[googlescholar]{googlescholarid} % optional, remove / comment the line if not wanted + +\begin{document} + \maketitle + + % 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*}}}} + + \section{Section1} + + \cvlistitem{My Text Entry} + + \cvlistitem{My Text Entry} + + + + \section{Section2} + + \cventry{Dec. 2023}{My Title}{}{\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{}{} + \cvline{}{\small \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}}} + + \cventry{Dec. 2023}{My Title}{}{\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{}{} + \cvline{}{\small \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}}} + + + + \section{Section3} + + \cventry{}{Researcher}{CERN}{}{}{} + + + \cventry{}{Researcher}{CERN}{}{}{} + + + + + \section{Section4} + + \cventry{}{BS, Mechanical Engineering}{Boğaziçi University}{}{}{} + + + \cventry{}{BS, Mechanical Engineering}{Boğaziçi University}{}{}{} + + + + + \section{Section5} + + \cventry{}{My Entry}{}{}{}{} + + + \cventry{}{My Entry}{}{}{}{} + + + + + \section{Section6} + + \cvline{My One Line Entry}{My Details and some math $a=6^4 \frac{3}{5}$} + + \cvline{My One Line Entry}{My Details and some math $a=6^4 \frac{3}{5}$} + + + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/sb2nov_empty/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/sb2nov_empty/John_Doe_CV.tex new file mode 100644 index 0000000..c9afb74 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/sb2nov_empty/John_Doe_CV.tex @@ -0,0 +1,145 @@ +%------------------------- +% Resume in Latex +% Author : Sourabh Bajaj +% License : MIT +%------------------------ + +\documentclass[10pt, letterpaper]{article} + +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % 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[hidelinks]{hyperref} +\usepackage{fancyhdr} +\usepackage[english]{babel} +\usepackage{tabularx} +\usepackage{ifthen} +\usepackage{fontawesome5} +\usepackage{calc} % for calculating lengths +\usepackage[pscoord]{eso-pic} % for floating text on the page +\usepackage{lastpage} % for getting the total number of pages +\input{glyphtounicode} + +\pagestyle{fancy} +\fancyhf{} % clear all header and footer fields +\fancyfoot[CO]{\color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\definecolor{primaryColor}{RGB}{0, 79, 144} % define primary color + +\urlstyle{same} + +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip + +% \raggedbottom +\setlength{\tabcolsep}{0in} + +% Sections formatting +\titleformat{\section}{ + \scshape\raggedright\large +}{}{0em}{}[\color{black}\titlerule] + +% Ensure that generate pdf is machine readable/ATS parsable +\pdfgentounicode=1 + + +\newcolumntype{R}[1]{ + >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} +} % right-aligned fixed width column type + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm - 0.1cm + }{ + % bottom space: + 0.2 cm + } % section title spacing + +%------------------------- +% Custom commands +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +\newcommand{\resumeItem}[2]{ + \item\small{ + \ifthenelse{\equal{#1}{}}{#2}{\textbf{#1}{: #2}} + } +} + +\newcommand{\resumeSubheading}[4]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small\ifthenelse{\equal{#2}{}}{#4}{#2}} \\ + \textit{\small#3} & \textit{\small\ifthenelse{\equal{#2}{}}{}{#4}} \\ + \end{tabularx} +} + +\newcommand{\resumeNormalSubheading}[2]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small #2} + \end{tabularx} +} + +\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}} + +\renewcommand{\labelitemii}{$\circ$} + +\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[left=0.2 cm, topsep=0pt, parsep=0.2 cm, partopsep=0pt, rightmargin=0.2 cm]} +\newcommand{\resumeSubHeadingListEnd}{\end{itemize}} +\newcommand{\resumeItemListStart}{\vspace{0.10 cm}\begin{itemize}[left=0.4 cm, topsep=-0.2 cm, itemsep=0.10 cm, partopsep=0pt, rightmargin=0cm]} +\newcommand{\resumeItemListEnd}{\end{itemize}} + +\begin{document} + \placelastupdatedtext + + { + \centering + \textbf{\fontsize{24 pt}{24 pt}\selectfont + John Doe + } \\ \vspace{3pt} + \small + + \vspace{0.3 cm} + + \begin{spacing}{1.6} + \end{spacing} + \par + } + + \vspace{0.3 cm} + + % 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*}}}} + + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex new file mode 100644 index 0000000..070d857 --- /dev/null +++ b/tests/auxiliary_files/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex @@ -0,0 +1,244 @@ +%------------------------- +% Resume in Latex +% Author : Sourabh Bajaj +% License : MIT +%------------------------ + +\documentclass[10pt, letterpaper]{article} + +\usepackage[ + ignoreheadfoot, % set margins without considering header and footer + top=2 cm, % seperation between body and page edge from the top + bottom=2 cm, % seperation between body and page edge from the bottom + left=2 cm, % seperation between body and page edge from the left + right=2 cm, % seperation between body and page edge from the right + footskip=1.0 cm, % 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[hidelinks]{hyperref} +\usepackage{fancyhdr} +\usepackage[english]{babel} +\usepackage{tabularx} +\usepackage{ifthen} +\usepackage{fontawesome5} +\usepackage{calc} % for calculating lengths +\usepackage[pscoord]{eso-pic} % for floating text on the page +\usepackage{lastpage} % for getting the total number of pages +\input{glyphtounicode} + +\pagestyle{fancy} +\fancyhf{} % clear all header and footer fields +\fancyfoot[CO]{\color{gray}\textit{\small John Doe - Page \thepage{} of \pageref*{LastPage}}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\definecolor{primaryColor}{RGB}{0, 79, 144} % define primary color + +\urlstyle{same} + +\setcounter{secnumdepth}{0} % no section numbering +\setlength{\parindent}{0pt} % no indentation +\setlength{\topskip}{0pt} % no top skip + +% \raggedbottom +\setlength{\tabcolsep}{0in} + +% Sections formatting +\titleformat{\section}{ + \scshape\raggedright\large +}{}{0em}{}[\color{black}\titlerule] + +% Ensure that generate pdf is machine readable/ATS parsable +\pdfgentounicode=1 + + +\newcolumntype{R}[1]{ + >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} +} % right-aligned fixed width column type + +\titlespacing{\section}{ + % left space: + 0pt + }{ + % top space: + 0.3 cm - 0.1cm + }{ + % bottom space: + 0.2 cm + } % section title spacing + +%------------------------- +% Custom commands +\newcommand{\placelastupdatedtext}{% \placetextbox{}{}{} + \AddToShipoutPictureFG*{% Add to current page foreground + \put( + \LenToUnit{\paperwidth-2 cm-0.2 cm+0.05cm}, + \LenToUnit{\paperheight-1.0 cm} + ){\vtop{{\null}\makebox[0pt][c]{ + \small\color{gray}\textit{Last updated in January 2024}\hspace{\widthof{Last updated in January 2024}} + }}}% + }% +}% + +\newcommand{\resumeItem}[2]{ + \item\small{ + \ifthenelse{\equal{#1}{}}{#2}{\textbf{#1}{: #2}} + } +} + +\newcommand{\resumeSubheading}[4]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small\ifthenelse{\equal{#2}{}}{#4}{#2}} \\ + \textit{\small#3} & \textit{\small\ifthenelse{\equal{#2}{}}{}{#4}} \\ + \end{tabularx} +} + +\newcommand{\resumeNormalSubheading}[2]{ + \item + \begin{tabularx}{0.98\textwidth-0.4 cm}[t]{X R{4.1 cm}} + \textbf{#1} & \textit{\small #2} + \end{tabularx} +} + +\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}} + +\renewcommand{\labelitemii}{$\circ$} + +\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[left=0.2 cm, topsep=0pt, parsep=0.2 cm, partopsep=0pt, rightmargin=0.2 cm]} +\newcommand{\resumeSubHeadingListEnd}{\end{itemize}} +\newcommand{\resumeItemListStart}{\vspace{0.10 cm}\begin{itemize}[left=0.4 cm, topsep=-0.2 cm, itemsep=0.10 cm, partopsep=0pt, rightmargin=0cm]} +\newcommand{\resumeItemListEnd}{\end{itemize}} + +\begin{document} + \placelastupdatedtext + + { + \centering + \textbf{\fontsize{24 pt}{24 pt}\selectfont + \href{https://orcid.org/0000-0000-0000-0000}{John Doe} + } \\ \vspace{3pt} + \small + + \vspace{0.3 cm} + + \begin{spacing}{1.6} + \mbox{\href{tel:+905419999999}{{\footnotesize\faPhone*}\hspace{4pt}+90 541 999 99 99}} + \hspace{0.5 cm} + \mbox{\href{mailto:johndoe@example.com}{{\small\faEnvelope[regular]}\hspace{4pt}johndoe@example.com}} + \hspace{0.5 cm} + \mbox{{\small\faMapMarker*}\hspace{4pt}Istanbul, Turkey} + \hspace{0.5 cm} + \mbox{\href{https://example.com/}{{\small\faLink}\hspace{4pt}example.com}} + \hspace{0.5 cm} + \mbox{\href{https://linkedin.com/in/johndoe}{{\small\faLinkedinIn}\hspace{4pt}johndoe}} + \hspace*{0.5 cm} + \mbox{\href{https://github.com/johndoe}{{\small\faGithub}\hspace{4pt}johndoe}} + \hspace*{0.5 cm} + \mbox{\href{https://instagram.com/johndoe}{{\small\faInstagram}\hspace{4pt}johndoe}} + \hspace*{0.5 cm} + \mbox{\href{https://mastodon.social/@johndoe@example}{{\small\faMastodon}\hspace{4pt}@johndoe@example}} + \hspace*{0.5 cm} + \end{spacing} + \par + } + + \vspace{0.3 cm} + + % 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*}}}} + + \section{Section1} + \resumeSubHeadingListStart + + \resumeSubItem{}{My Text Entry} + + \resumeSubItem{}{My Text Entry} + + + \resumeSubHeadingListEnd + \section{Section2} + \resumeSubHeadingListStart + + \resumeSubheading + {My Title}{Dec. 2023} + {\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{} + \resumeItemListStart + \resumeItem{}{\raggedright \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} \par} + \resumeItemListEnd + + \resumeSubheading + {My Title}{Dec. 2023} + {\href{https://doi.org/10.1109/TASC.2023.3340648}{10.1109/TASC.2023.3340648}}{} + \resumeItemListStart + \resumeItem{}{\raggedright \mbox{\textbf{\textit{J. Doe}}}, \mbox{\textbf{\textit{J. Doe}}} \par} + \resumeItemListEnd + + + \resumeSubHeadingListEnd + \section{Section3} + \resumeSubHeadingListStart + + \resumeSubheading + {CERN}{} + {Researcher}{} + + + \resumeSubheading + {CERN}{} + {Researcher}{} + + + + \resumeSubHeadingListEnd + \section{Section4} + \resumeSubHeadingListStart + + \resumeSubheading + {Boğaziçi University}{} + {BS in Mechanical Engineering}{} + + + \resumeSubheading + {Boğaziçi University}{} + {BS in Mechanical Engineering}{} + + + + \resumeSubHeadingListEnd + \section{Section5} + \resumeSubHeadingListStart + + \resumeNormalSubheading + {My Entry}{} + + + \resumeNormalSubheading + {My Entry}{} + + + + \resumeSubHeadingListEnd + \section{Section6} + \resumeSubHeadingListStart + + \vspace{0.08cm} + \resumeSubItem{My One Line Entry} + {My Details and some math $a=6^4 \frac{3}{5}$} + + \resumeSubItem{My One Line Entry} + {My Details and some math $a=6^4 \frac{3}{5}$} + + + \resumeSubHeadingListEnd + +\end{document} \ No newline at end of file diff --git a/tests/auxiliary_files/test_generate_markdown_file/classic_filled/John_Doe_CV.md b/tests/auxiliary_files/test_generate_markdown_file/classic_filled/John_Doe_CV.md index de50575..7a7e9f0 100644 --- a/tests/auxiliary_files/test_generate_markdown_file/classic_filled/John_Doe_CV.md +++ b/tests/auxiliary_files/test_generate_markdown_file/classic_filled/John_Doe_CV.md @@ -62,5 +62,5 @@ My Text Entry # Section6 -- My One Line Entry: My Details -- My One Line Entry: My Details +- My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$ +- My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$ diff --git a/tests/auxiliary_files/test_generate_markdown_file/moderncv_filled/John_Doe_CV.md b/tests/auxiliary_files/test_generate_markdown_file/moderncv_filled/John_Doe_CV.md index de50575..7a7e9f0 100644 --- a/tests/auxiliary_files/test_generate_markdown_file/moderncv_filled/John_Doe_CV.md +++ b/tests/auxiliary_files/test_generate_markdown_file/moderncv_filled/John_Doe_CV.md @@ -62,5 +62,5 @@ My Text Entry # Section6 -- My One Line Entry: My Details -- My One Line Entry: My Details +- My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$ +- My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$ diff --git a/tests/auxiliary_files/test_generate_markdown_file/sb2nov_filled/John_Doe_CV.md b/tests/auxiliary_files/test_generate_markdown_file/sb2nov_filled/John_Doe_CV.md index de50575..7a7e9f0 100644 --- a/tests/auxiliary_files/test_generate_markdown_file/sb2nov_filled/John_Doe_CV.md +++ b/tests/auxiliary_files/test_generate_markdown_file/sb2nov_filled/John_Doe_CV.md @@ -62,5 +62,5 @@ My Text Entry # Section6 -- My One Line Entry: My Details -- My One Line Entry: My Details +- My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$ +- My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$ diff --git a/tests/auxiliary_files/test_latex_to_pdf/classic_empty/John_Doe_CV.pdf b/tests/auxiliary_files/test_latex_to_pdf/classic_empty/John_Doe_CV.pdf new file mode 100644 index 0000000..a05d6e5 Binary files /dev/null and b/tests/auxiliary_files/test_latex_to_pdf/classic_empty/John_Doe_CV.pdf differ diff --git a/tests/auxiliary_files/test_latex_to_pdf/classic_filled/John_Doe_CV.pdf b/tests/auxiliary_files/test_latex_to_pdf/classic_filled/John_Doe_CV.pdf new file mode 100644 index 0000000..622874a Binary files /dev/null and b/tests/auxiliary_files/test_latex_to_pdf/classic_filled/John_Doe_CV.pdf differ diff --git a/tests/auxiliary_files/test_latex_to_pdf/moderncv_empty/John_Doe_CV.pdf b/tests/auxiliary_files/test_latex_to_pdf/moderncv_empty/John_Doe_CV.pdf new file mode 100644 index 0000000..0283115 Binary files /dev/null and b/tests/auxiliary_files/test_latex_to_pdf/moderncv_empty/John_Doe_CV.pdf differ diff --git a/tests/auxiliary_files/test_latex_to_pdf/moderncv_filled/John_Doe_CV.pdf b/tests/auxiliary_files/test_latex_to_pdf/moderncv_filled/John_Doe_CV.pdf new file mode 100644 index 0000000..bc02a40 Binary files /dev/null and b/tests/auxiliary_files/test_latex_to_pdf/moderncv_filled/John_Doe_CV.pdf differ diff --git a/tests/auxiliary_files/test_latex_to_pdf/sb2nov_empty/John_Doe_CV.pdf b/tests/auxiliary_files/test_latex_to_pdf/sb2nov_empty/John_Doe_CV.pdf new file mode 100644 index 0000000..a3c1069 Binary files /dev/null and b/tests/auxiliary_files/test_latex_to_pdf/sb2nov_empty/John_Doe_CV.pdf differ diff --git a/tests/auxiliary_files/test_latex_to_pdf/sb2nov_filled/John_Doe_CV.pdf b/tests/auxiliary_files/test_latex_to_pdf/sb2nov_filled/John_Doe_CV.pdf new file mode 100644 index 0000000..e1c23c7 Binary files /dev/null and b/tests/auxiliary_files/test_latex_to_pdf/sb2nov_filled/John_Doe_CV.pdf differ diff --git a/tests/auxiliary_files/test_markdown_to_html/classic_filled/John_Doe_CV_PASTETOGRAMMARLY.html b/tests/auxiliary_files/test_markdown_to_html/classic_filled/John_Doe_CV_PASTETOGRAMMARLY.html index 102f0c3..80d0779 100644 --- a/tests/auxiliary_files/test_markdown_to_html/classic_filled/John_Doe_CV_PASTETOGRAMMARLY.html +++ b/tests/auxiliary_files/test_markdown_to_html/classic_filled/John_Doe_CV_PASTETOGRAMMARLY.html @@ -36,6 +36,6 @@ My Text Entry

My Entry

Section6

    -
  • My One Line Entry: My Details
  • -
  • My One Line Entry: My Details
  • +
  • My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$
  • +
  • My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$
\ No newline at end of file diff --git a/tests/auxiliary_files/test_markdown_to_html/moderncv_filled/John_Doe_CV_PASTETOGRAMMARLY.html b/tests/auxiliary_files/test_markdown_to_html/moderncv_filled/John_Doe_CV_PASTETOGRAMMARLY.html index 102f0c3..80d0779 100644 --- a/tests/auxiliary_files/test_markdown_to_html/moderncv_filled/John_Doe_CV_PASTETOGRAMMARLY.html +++ b/tests/auxiliary_files/test_markdown_to_html/moderncv_filled/John_Doe_CV_PASTETOGRAMMARLY.html @@ -36,6 +36,6 @@ My Text Entry

My Entry

Section6

    -
  • My One Line Entry: My Details
  • -
  • My One Line Entry: My Details
  • +
  • My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$
  • +
  • My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$
\ No newline at end of file diff --git a/tests/auxiliary_files/test_markdown_to_html/sb2nov_filled/John_Doe_CV_PASTETOGRAMMARLY.html b/tests/auxiliary_files/test_markdown_to_html/sb2nov_filled/John_Doe_CV_PASTETOGRAMMARLY.html index 102f0c3..80d0779 100644 --- a/tests/auxiliary_files/test_markdown_to_html/sb2nov_filled/John_Doe_CV_PASTETOGRAMMARLY.html +++ b/tests/auxiliary_files/test_markdown_to_html/sb2nov_filled/John_Doe_CV_PASTETOGRAMMARLY.html @@ -36,6 +36,6 @@ My Text Entry

My Entry

Section6

    -
  • My One Line Entry: My Details
  • -
  • My One Line Entry: My Details
  • +
  • My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$
  • +
  • My One Line Entry: My Details and some math $a=6^4 \frac{3}{5}$
\ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 5e8b69f..28cf947 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -46,7 +46,7 @@ def normal_entry() -> dict[str, str]: def one_line_entry() -> dict[str, str]: return { "name": "My One Line Entry", - "details": "My Details", + "details": "My Details and some math $a=6^4 \\frac{3}{5}$", }