diff --git a/tests/reference_files/classic_theme_auxiliary_files/fonts/LICENSE.md b/tests/reference_files/classic_theme_auxiliary_files/fonts/LICENSE.md deleted file mode 100644 index d2b80be..0000000 --- a/tests/reference_files/classic_theme_auxiliary_files/fonts/LICENSE.md +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2010-2022 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Bold.ttf b/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Bold.ttf deleted file mode 100644 index 55f6138..0000000 Binary files a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Bold.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-BoldItalic.ttf b/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-BoldItalic.ttf deleted file mode 100644 index ddeed16..0000000 Binary files a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-BoldItalic.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Italic.ttf b/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Italic.ttf deleted file mode 100644 index 8ea9acf..0000000 Binary files a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Italic.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Regular.ttf b/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Regular.ttf deleted file mode 100644 index 803d4da..0000000 Binary files a/tests/reference_files/classic_theme_auxiliary_files/fonts/SourceSans3-Regular.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_full/classic_theme_CV.log b/tests/reference_files/classic_theme_full/classic_theme_CV.log index 18cd267..de92a17 100644 --- a/tests/reference_files/classic_theme_full/classic_theme_CV.log +++ b/tests/reference_files/classic_theme_full/classic_theme_CV.log @@ -1,8 +1,8 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.13) 14 FEB 2024 19:46 +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.13) 14 FEB 2024 20:21 entering extended mode restricted \write18 enabled. %&-line parsing enabled. -**C:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/classic_theme_full/classic_theme_CV.tex +**c:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/classic_theme_full/classic_theme_CV.tex (c:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/classic_theme_full/classic_theme_CV.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> @@ -498,8 +498,8 @@ L3 programming layer <2024-01-22> *********** ) Here is how much of TeX's memory you used: - 13949 strings out of 476161 - 247151 string characters out of 5790867 + 13948 strings out of 476161 + 247083 string characters out of 5790867 1924978 words of memory out of 5000000 35810 multiletter control sequences out of 15000+600000 603836 words of font info for 44 fonts, out of 8000000 for 9000 diff --git a/tests/reference_files/classic_theme_full/classic_theme_CV.pdf b/tests/reference_files/classic_theme_full/classic_theme_CV.pdf index 9b0e6d6..32ea8a9 100644 Binary files a/tests/reference_files/classic_theme_full/classic_theme_CV.pdf and b/tests/reference_files/classic_theme_full/classic_theme_CV.pdf differ diff --git a/tests/reference_files/classic_theme_full/fonts/LICENSE.md b/tests/reference_files/classic_theme_full/fonts/LICENSE.md deleted file mode 100644 index d2b80be..0000000 --- a/tests/reference_files/classic_theme_full/fonts/LICENSE.md +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2010-2022 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/tests/reference_files/classic_theme_full/fonts/SourceSans3-Bold.ttf b/tests/reference_files/classic_theme_full/fonts/SourceSans3-Bold.ttf deleted file mode 100644 index 55f6138..0000000 Binary files a/tests/reference_files/classic_theme_full/fonts/SourceSans3-Bold.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_full/fonts/SourceSans3-BoldItalic.ttf b/tests/reference_files/classic_theme_full/fonts/SourceSans3-BoldItalic.ttf deleted file mode 100644 index ddeed16..0000000 Binary files a/tests/reference_files/classic_theme_full/fonts/SourceSans3-BoldItalic.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_full/fonts/SourceSans3-Italic.ttf b/tests/reference_files/classic_theme_full/fonts/SourceSans3-Italic.ttf deleted file mode 100644 index 8ea9acf..0000000 Binary files a/tests/reference_files/classic_theme_full/fonts/SourceSans3-Italic.ttf and /dev/null differ diff --git a/tests/reference_files/classic_theme_full/fonts/SourceSans3-Regular.ttf b/tests/reference_files/classic_theme_full/fonts/SourceSans3-Regular.ttf deleted file mode 100644 index 803d4da..0000000 Binary files a/tests/reference_files/classic_theme_full/fonts/SourceSans3-Regular.ttf and /dev/null differ diff --git a/tests/reference_files/dummytheme/__init__.py b/tests/reference_files/dummytheme/__init__.py deleted file mode 100644 index 1824399..0000000 --- a/tests/reference_files/dummytheme/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Literal - -import pydantic - - -class DummythemeThemeOptions(pydantic.BaseModel): - """ """ - - theme: Literal["dummytheme"] diff --git a/tests/reference_files/dummytheme/__pycache__/__init__.cpython-312.pyc b/tests/reference_files/dummytheme/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 4d7de64..0000000 Binary files a/tests/reference_files/dummytheme/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/tests/reference_files/dummytheme/auixiliary_directory/dummy_theme_file.cls b/tests/reference_files/dummytheme/auixiliary_directory/dummy_theme_file.cls new file mode 100644 index 0000000..d8fb41d --- /dev/null +++ b/tests/reference_files/dummytheme/auixiliary_directory/dummy_theme_file.cls @@ -0,0 +1,301 @@ +%% The MIT License (MIT) +%% +%% Copyright (c) 2015 Daniil Belyakov +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the "Software"), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + +\ProvidesClass{mcdowellcv}[2022/03/18 v1.2.0 McDowell CV class] + +% Set up the fonts according to options +\def\mainfontsize{11pt} +\def\mainfontface{Times New Roman} + +\DeclareOption{calibri}{% + \def\mainfontface{Calibri} +} + +% Set up papersize according to options, default to US letter +\def\papersize{letterpaper} +%Set up bool for adjusting vspacing later +\newif\ifpapersize + +\DeclareOption{a4paper}{% + \def\papersize{a4paper} + \papersizetrue +} + +\DeclareOption{letterpaper}{% + \def\papersize{letterpaper} + \papersizefalse +} +\ProcessOptions\relax + +% Set font size and paper type +\LoadClass[\papersize,\mainfontsize]{article} + +% Set document margins +\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} + +% Set font face +% \usepackage{fontspec} +% \setmainfont[SmallCapsFeatures={Renderer=Basic}, +% Ligatures={TeX, NoCommon, NoDiscretionary}]{\mainfontface} + +% Remove paragraph indentation +\usepackage[parfill]{parskip} + +% Required for boldface (\bf and \bfseries) tabular columns +\usepackage{array} + +% Required for ifthenelse statements +\usepackage{etoolbox} + +% Suppress page numbers +\pagestyle{empty} + +% Flexible tables +\usepackage{tabu} + +% For custom margins +\usepackage{changepage} + +% To customize lists +\usepackage{enumitem} +% Remove left margin from lists, suppress vertical item separation and set top +% separation to a negative value to suppress a single parskip before lists +\setlist{leftmargin=*, noitemsep, topsep=-1\parskip} + +% For adjusting spacing based on the platform used +\usepackage{ifthen} +\usepackage{ifplatform} + +% For spcaed small caps +\usepackage{microtype} + +\DeclareMicrotypeSet*{smallcapsi} { + encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2}, + shape = {sc*,si,scit} +} + +%-------------------------------------------------------------------------------- +% Constants - +%-------------------------------------------------------------------------------- + +\ifthenelse{\equal{\platformname}{\notwindowsname}}{ + \def\namespaceskip{0.575em} + \def\afterheaderspace{1.1pt} + \def\beforesectionheaderspace{5pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{2.85pt} + \def\sectionheaderhrlueheight{0.518pt} + \def\aftersectionheaderspace{-5.8pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-5.75pt} + \else + \def\aftersinglelinesubsectionheaderspace{-20.25pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-11.75pt} + \def\aftermultilinesubsectionheaderspace{-7.75pt} + \def\afteremptysubsectionheaderspace{1.25pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{2.1pt} +}{ + \def\namespaceskip{0.4em} + \def\afterheaderspace{3pt} + \def\beforesectionheaderspace{4.75pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{3pt} + \def\sectionheaderhrlueheight{0.5pt} + \def\aftersectionheaderspace{-4pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-4pt} + \else + \def\aftersinglelinesubsectionheaderspace{-18.5pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-10pt} + \def\aftermultilinesubsectionheaderspace{-6pt} + \def\afteremptysubsectionheaderspace{3pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{4pt} +} + +%-------------------------------------------------------------------------------- +% Header Setup and Printing - +%-------------------------------------------------------------------------------- + +% Address +\makeatletter + +\newcommand\address[1]{\def\@address{#1}} +\address{} + +\newcommand\printaddress{ + \small{\@address} +} + +\makeatother + +% Name +\makeatletter + +\newcommand\name[1]{\def\@name{#1}} +\name{} + +\newcommand\printname{ + \typeout {kokoko} + \typeout \spaceskip + \spaceskip \namespaceskip \relax + \textbf{\LARGE\textls[110]{\textsc{\@name}}} +} + +\makeatother + +% Contacts +\makeatletter + +\newcommand\contacts[1]{\def\@contacts{#1}} +\contacts{} + +\newcommand\printcontacts{ + \small{\@contacts} +} + +\makeatother + +\makeatletter +\newcommand\makeheader{ + \begin{center} + \begin{tabu} to 1\textwidth { X[l,m] X[2,c,m] X[r,m] } + \printaddress & \printname & \printcontacts \\ + \end{tabu} + \end{center} + \vspace*{\afterheaderspace} +} +\makeatother + +%-------------------------------------------------------------------------------- +% Sections and Subsections - +%-------------------------------------------------------------------------------- + +% Print a section header +\makeatletter +\newenvironment{cvsection}[1]{ + \vspace*{\beforesectionheaderspace} + % Set text margins to equal \tabcolsep (6pt by default) + \begin{adjustwidth}{\sectionheadermargin}{\sectionheadermargin} + \textsc{\textbf{#1}} + \end{adjustwidth} + \vspace*{\beforesectionheaderhrulespace} + \hrule height \sectionheaderhrlueheight + \vspace*{\aftersectionheaderspace} +}{} +\makeatother + +% Print a subsection +\makeatletter +% Define toggles checking if titles were defined +\newtoggle{lefttitledefined} +\newtoggle{centertitledefined} +\newtoggle{righttitledefined} + +\newenvironment{cvsubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvpublicationsubsection}[4][2]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[3.5,p] X[r,p] } + \textbf{#2} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvonelinesubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{-5pt} +} +\makeatother diff --git a/tests/reference_files/dummytheme/auxiliary_directory/test_auxiliary_file.cls b/tests/reference_files/dummytheme/auxiliary_directory/test_auxiliary_file.cls deleted file mode 100644 index e69de29..0000000 diff --git a/tests/reference_files/dummytheme/dummy_theme_file.cls b/tests/reference_files/dummytheme/dummy_theme_file.cls new file mode 100644 index 0000000..d8fb41d --- /dev/null +++ b/tests/reference_files/dummytheme/dummy_theme_file.cls @@ -0,0 +1,301 @@ +%% The MIT License (MIT) +%% +%% Copyright (c) 2015 Daniil Belyakov +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the "Software"), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + +\ProvidesClass{mcdowellcv}[2022/03/18 v1.2.0 McDowell CV class] + +% Set up the fonts according to options +\def\mainfontsize{11pt} +\def\mainfontface{Times New Roman} + +\DeclareOption{calibri}{% + \def\mainfontface{Calibri} +} + +% Set up papersize according to options, default to US letter +\def\papersize{letterpaper} +%Set up bool for adjusting vspacing later +\newif\ifpapersize + +\DeclareOption{a4paper}{% + \def\papersize{a4paper} + \papersizetrue +} + +\DeclareOption{letterpaper}{% + \def\papersize{letterpaper} + \papersizefalse +} +\ProcessOptions\relax + +% Set font size and paper type +\LoadClass[\papersize,\mainfontsize]{article} + +% Set document margins +\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} + +% Set font face +% \usepackage{fontspec} +% \setmainfont[SmallCapsFeatures={Renderer=Basic}, +% Ligatures={TeX, NoCommon, NoDiscretionary}]{\mainfontface} + +% Remove paragraph indentation +\usepackage[parfill]{parskip} + +% Required for boldface (\bf and \bfseries) tabular columns +\usepackage{array} + +% Required for ifthenelse statements +\usepackage{etoolbox} + +% Suppress page numbers +\pagestyle{empty} + +% Flexible tables +\usepackage{tabu} + +% For custom margins +\usepackage{changepage} + +% To customize lists +\usepackage{enumitem} +% Remove left margin from lists, suppress vertical item separation and set top +% separation to a negative value to suppress a single parskip before lists +\setlist{leftmargin=*, noitemsep, topsep=-1\parskip} + +% For adjusting spacing based on the platform used +\usepackage{ifthen} +\usepackage{ifplatform} + +% For spcaed small caps +\usepackage{microtype} + +\DeclareMicrotypeSet*{smallcapsi} { + encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2}, + shape = {sc*,si,scit} +} + +%-------------------------------------------------------------------------------- +% Constants - +%-------------------------------------------------------------------------------- + +\ifthenelse{\equal{\platformname}{\notwindowsname}}{ + \def\namespaceskip{0.575em} + \def\afterheaderspace{1.1pt} + \def\beforesectionheaderspace{5pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{2.85pt} + \def\sectionheaderhrlueheight{0.518pt} + \def\aftersectionheaderspace{-5.8pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-5.75pt} + \else + \def\aftersinglelinesubsectionheaderspace{-20.25pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-11.75pt} + \def\aftermultilinesubsectionheaderspace{-7.75pt} + \def\afteremptysubsectionheaderspace{1.25pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{2.1pt} +}{ + \def\namespaceskip{0.4em} + \def\afterheaderspace{3pt} + \def\beforesectionheaderspace{4.75pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{3pt} + \def\sectionheaderhrlueheight{0.5pt} + \def\aftersectionheaderspace{-4pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-4pt} + \else + \def\aftersinglelinesubsectionheaderspace{-18.5pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-10pt} + \def\aftermultilinesubsectionheaderspace{-6pt} + \def\afteremptysubsectionheaderspace{3pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{4pt} +} + +%-------------------------------------------------------------------------------- +% Header Setup and Printing - +%-------------------------------------------------------------------------------- + +% Address +\makeatletter + +\newcommand\address[1]{\def\@address{#1}} +\address{} + +\newcommand\printaddress{ + \small{\@address} +} + +\makeatother + +% Name +\makeatletter + +\newcommand\name[1]{\def\@name{#1}} +\name{} + +\newcommand\printname{ + \typeout {kokoko} + \typeout \spaceskip + \spaceskip \namespaceskip \relax + \textbf{\LARGE\textls[110]{\textsc{\@name}}} +} + +\makeatother + +% Contacts +\makeatletter + +\newcommand\contacts[1]{\def\@contacts{#1}} +\contacts{} + +\newcommand\printcontacts{ + \small{\@contacts} +} + +\makeatother + +\makeatletter +\newcommand\makeheader{ + \begin{center} + \begin{tabu} to 1\textwidth { X[l,m] X[2,c,m] X[r,m] } + \printaddress & \printname & \printcontacts \\ + \end{tabu} + \end{center} + \vspace*{\afterheaderspace} +} +\makeatother + +%-------------------------------------------------------------------------------- +% Sections and Subsections - +%-------------------------------------------------------------------------------- + +% Print a section header +\makeatletter +\newenvironment{cvsection}[1]{ + \vspace*{\beforesectionheaderspace} + % Set text margins to equal \tabcolsep (6pt by default) + \begin{adjustwidth}{\sectionheadermargin}{\sectionheadermargin} + \textsc{\textbf{#1}} + \end{adjustwidth} + \vspace*{\beforesectionheaderhrulespace} + \hrule height \sectionheaderhrlueheight + \vspace*{\aftersectionheaderspace} +}{} +\makeatother + +% Print a subsection +\makeatletter +% Define toggles checking if titles were defined +\newtoggle{lefttitledefined} +\newtoggle{centertitledefined} +\newtoggle{righttitledefined} + +\newenvironment{cvsubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvpublicationsubsection}[4][2]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[3.5,p] X[r,p] } + \textbf{#2} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvonelinesubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{-5pt} +} +\makeatother diff --git a/tests/reference_files/dummytheme/test_auxiliary_file.cls b/tests/reference_files/dummytheme/test_auxiliary_file.cls deleted file mode 100644 index e69de29..0000000 diff --git a/tests/reference_files/dummytheme_theme_auxiliary_files/auixiliary_directory/dummy_theme_file.cls b/tests/reference_files/dummytheme_theme_auxiliary_files/auixiliary_directory/dummy_theme_file.cls new file mode 100644 index 0000000..d8fb41d --- /dev/null +++ b/tests/reference_files/dummytheme_theme_auxiliary_files/auixiliary_directory/dummy_theme_file.cls @@ -0,0 +1,301 @@ +%% The MIT License (MIT) +%% +%% Copyright (c) 2015 Daniil Belyakov +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the "Software"), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + +\ProvidesClass{mcdowellcv}[2022/03/18 v1.2.0 McDowell CV class] + +% Set up the fonts according to options +\def\mainfontsize{11pt} +\def\mainfontface{Times New Roman} + +\DeclareOption{calibri}{% + \def\mainfontface{Calibri} +} + +% Set up papersize according to options, default to US letter +\def\papersize{letterpaper} +%Set up bool for adjusting vspacing later +\newif\ifpapersize + +\DeclareOption{a4paper}{% + \def\papersize{a4paper} + \papersizetrue +} + +\DeclareOption{letterpaper}{% + \def\papersize{letterpaper} + \papersizefalse +} +\ProcessOptions\relax + +% Set font size and paper type +\LoadClass[\papersize,\mainfontsize]{article} + +% Set document margins +\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} + +% Set font face +% \usepackage{fontspec} +% \setmainfont[SmallCapsFeatures={Renderer=Basic}, +% Ligatures={TeX, NoCommon, NoDiscretionary}]{\mainfontface} + +% Remove paragraph indentation +\usepackage[parfill]{parskip} + +% Required for boldface (\bf and \bfseries) tabular columns +\usepackage{array} + +% Required for ifthenelse statements +\usepackage{etoolbox} + +% Suppress page numbers +\pagestyle{empty} + +% Flexible tables +\usepackage{tabu} + +% For custom margins +\usepackage{changepage} + +% To customize lists +\usepackage{enumitem} +% Remove left margin from lists, suppress vertical item separation and set top +% separation to a negative value to suppress a single parskip before lists +\setlist{leftmargin=*, noitemsep, topsep=-1\parskip} + +% For adjusting spacing based on the platform used +\usepackage{ifthen} +\usepackage{ifplatform} + +% For spcaed small caps +\usepackage{microtype} + +\DeclareMicrotypeSet*{smallcapsi} { + encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2}, + shape = {sc*,si,scit} +} + +%-------------------------------------------------------------------------------- +% Constants - +%-------------------------------------------------------------------------------- + +\ifthenelse{\equal{\platformname}{\notwindowsname}}{ + \def\namespaceskip{0.575em} + \def\afterheaderspace{1.1pt} + \def\beforesectionheaderspace{5pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{2.85pt} + \def\sectionheaderhrlueheight{0.518pt} + \def\aftersectionheaderspace{-5.8pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-5.75pt} + \else + \def\aftersinglelinesubsectionheaderspace{-20.25pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-11.75pt} + \def\aftermultilinesubsectionheaderspace{-7.75pt} + \def\afteremptysubsectionheaderspace{1.25pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{2.1pt} +}{ + \def\namespaceskip{0.4em} + \def\afterheaderspace{3pt} + \def\beforesectionheaderspace{4.75pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{3pt} + \def\sectionheaderhrlueheight{0.5pt} + \def\aftersectionheaderspace{-4pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-4pt} + \else + \def\aftersinglelinesubsectionheaderspace{-18.5pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-10pt} + \def\aftermultilinesubsectionheaderspace{-6pt} + \def\afteremptysubsectionheaderspace{3pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{4pt} +} + +%-------------------------------------------------------------------------------- +% Header Setup and Printing - +%-------------------------------------------------------------------------------- + +% Address +\makeatletter + +\newcommand\address[1]{\def\@address{#1}} +\address{} + +\newcommand\printaddress{ + \small{\@address} +} + +\makeatother + +% Name +\makeatletter + +\newcommand\name[1]{\def\@name{#1}} +\name{} + +\newcommand\printname{ + \typeout {kokoko} + \typeout \spaceskip + \spaceskip \namespaceskip \relax + \textbf{\LARGE\textls[110]{\textsc{\@name}}} +} + +\makeatother + +% Contacts +\makeatletter + +\newcommand\contacts[1]{\def\@contacts{#1}} +\contacts{} + +\newcommand\printcontacts{ + \small{\@contacts} +} + +\makeatother + +\makeatletter +\newcommand\makeheader{ + \begin{center} + \begin{tabu} to 1\textwidth { X[l,m] X[2,c,m] X[r,m] } + \printaddress & \printname & \printcontacts \\ + \end{tabu} + \end{center} + \vspace*{\afterheaderspace} +} +\makeatother + +%-------------------------------------------------------------------------------- +% Sections and Subsections - +%-------------------------------------------------------------------------------- + +% Print a section header +\makeatletter +\newenvironment{cvsection}[1]{ + \vspace*{\beforesectionheaderspace} + % Set text margins to equal \tabcolsep (6pt by default) + \begin{adjustwidth}{\sectionheadermargin}{\sectionheadermargin} + \textsc{\textbf{#1}} + \end{adjustwidth} + \vspace*{\beforesectionheaderhrulespace} + \hrule height \sectionheaderhrlueheight + \vspace*{\aftersectionheaderspace} +}{} +\makeatother + +% Print a subsection +\makeatletter +% Define toggles checking if titles were defined +\newtoggle{lefttitledefined} +\newtoggle{centertitledefined} +\newtoggle{righttitledefined} + +\newenvironment{cvsubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvpublicationsubsection}[4][2]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[3.5,p] X[r,p] } + \textbf{#2} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvonelinesubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{-5pt} +} +\makeatother diff --git a/tests/reference_files/dummytheme_theme_auxiliary_files/auxiliary_directory/test_auxiliary_file.cls b/tests/reference_files/dummytheme_theme_auxiliary_files/auxiliary_directory/test_auxiliary_file.cls deleted file mode 100644 index e69de29..0000000 diff --git a/tests/reference_files/dummytheme_theme_auxiliary_files/dummy_theme_file.cls b/tests/reference_files/dummytheme_theme_auxiliary_files/dummy_theme_file.cls new file mode 100644 index 0000000..d8fb41d --- /dev/null +++ b/tests/reference_files/dummytheme_theme_auxiliary_files/dummy_theme_file.cls @@ -0,0 +1,301 @@ +%% The MIT License (MIT) +%% +%% Copyright (c) 2015 Daniil Belyakov +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the "Software"), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + +\ProvidesClass{mcdowellcv}[2022/03/18 v1.2.0 McDowell CV class] + +% Set up the fonts according to options +\def\mainfontsize{11pt} +\def\mainfontface{Times New Roman} + +\DeclareOption{calibri}{% + \def\mainfontface{Calibri} +} + +% Set up papersize according to options, default to US letter +\def\papersize{letterpaper} +%Set up bool for adjusting vspacing later +\newif\ifpapersize + +\DeclareOption{a4paper}{% + \def\papersize{a4paper} + \papersizetrue +} + +\DeclareOption{letterpaper}{% + \def\papersize{letterpaper} + \papersizefalse +} +\ProcessOptions\relax + +% Set font size and paper type +\LoadClass[\papersize,\mainfontsize]{article} + +% Set document margins +\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} + +% Set font face +% \usepackage{fontspec} +% \setmainfont[SmallCapsFeatures={Renderer=Basic}, +% Ligatures={TeX, NoCommon, NoDiscretionary}]{\mainfontface} + +% Remove paragraph indentation +\usepackage[parfill]{parskip} + +% Required for boldface (\bf and \bfseries) tabular columns +\usepackage{array} + +% Required for ifthenelse statements +\usepackage{etoolbox} + +% Suppress page numbers +\pagestyle{empty} + +% Flexible tables +\usepackage{tabu} + +% For custom margins +\usepackage{changepage} + +% To customize lists +\usepackage{enumitem} +% Remove left margin from lists, suppress vertical item separation and set top +% separation to a negative value to suppress a single parskip before lists +\setlist{leftmargin=*, noitemsep, topsep=-1\parskip} + +% For adjusting spacing based on the platform used +\usepackage{ifthen} +\usepackage{ifplatform} + +% For spcaed small caps +\usepackage{microtype} + +\DeclareMicrotypeSet*{smallcapsi} { + encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2}, + shape = {sc*,si,scit} +} + +%-------------------------------------------------------------------------------- +% Constants - +%-------------------------------------------------------------------------------- + +\ifthenelse{\equal{\platformname}{\notwindowsname}}{ + \def\namespaceskip{0.575em} + \def\afterheaderspace{1.1pt} + \def\beforesectionheaderspace{5pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{2.85pt} + \def\sectionheaderhrlueheight{0.518pt} + \def\aftersectionheaderspace{-5.8pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-5.75pt} + \else + \def\aftersinglelinesubsectionheaderspace{-20.25pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-11.75pt} + \def\aftermultilinesubsectionheaderspace{-7.75pt} + \def\afteremptysubsectionheaderspace{1.25pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{2.1pt} +}{ + \def\namespaceskip{0.4em} + \def\afterheaderspace{3pt} + \def\beforesectionheaderspace{4.75pt} + \def\sectionheadermargin{6pt} + \def\beforesectionheaderhrulespace{3pt} + \def\sectionheaderhrlueheight{0.5pt} + \def\aftersectionheaderspace{-4pt} + + \ifpapersize + \def\aftersinglelinesubsectionheaderspace{-4pt} + \else + \def\aftersinglelinesubsectionheaderspace{-18.5pt} + \fi + + \def\afterdoublelinesubsectionheaderspace{-10pt} + \def\aftermultilinesubsectionheaderspace{-6pt} + \def\afteremptysubsectionheaderspace{3pt} + \def\subsectionmargin{9pt} + \def\aftersubsectionspace{4pt} +} + +%-------------------------------------------------------------------------------- +% Header Setup and Printing - +%-------------------------------------------------------------------------------- + +% Address +\makeatletter + +\newcommand\address[1]{\def\@address{#1}} +\address{} + +\newcommand\printaddress{ + \small{\@address} +} + +\makeatother + +% Name +\makeatletter + +\newcommand\name[1]{\def\@name{#1}} +\name{} + +\newcommand\printname{ + \typeout {kokoko} + \typeout \spaceskip + \spaceskip \namespaceskip \relax + \textbf{\LARGE\textls[110]{\textsc{\@name}}} +} + +\makeatother + +% Contacts +\makeatletter + +\newcommand\contacts[1]{\def\@contacts{#1}} +\contacts{} + +\newcommand\printcontacts{ + \small{\@contacts} +} + +\makeatother + +\makeatletter +\newcommand\makeheader{ + \begin{center} + \begin{tabu} to 1\textwidth { X[l,m] X[2,c,m] X[r,m] } + \printaddress & \printname & \printcontacts \\ + \end{tabu} + \end{center} + \vspace*{\afterheaderspace} +} +\makeatother + +%-------------------------------------------------------------------------------- +% Sections and Subsections - +%-------------------------------------------------------------------------------- + +% Print a section header +\makeatletter +\newenvironment{cvsection}[1]{ + \vspace*{\beforesectionheaderspace} + % Set text margins to equal \tabcolsep (6pt by default) + \begin{adjustwidth}{\sectionheadermargin}{\sectionheadermargin} + \textsc{\textbf{#1}} + \end{adjustwidth} + \vspace*{\beforesectionheaderhrulespace} + \hrule height \sectionheaderhrlueheight + \vspace*{\aftersectionheaderspace} +}{} +\makeatother + +% Print a subsection +\makeatletter +% Define toggles checking if titles were defined +\newtoggle{lefttitledefined} +\newtoggle{centertitledefined} +\newtoggle{righttitledefined} + +\newenvironment{cvsubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvpublicationsubsection}[4][2]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[3.5,p] X[r,p] } + \textbf{#2} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{\aftersubsectionspace} +} + +\newenvironment{cvonelinesubsection}[4][1]{ + \notblank{#2}{\toggletrue{lefttitledefined}}{} + \notblank{#3}{\toggletrue{centertitledefined}}{} + \notblank{#4}{\toggletrue{righttitledefined}}{} + \ifboolexpr{togl {lefttitledefined} or togl {centertitledefined} or togl {righttitledefined}}{ + \begin{tabu} to 1\textwidth { X[l,p] X[c,p] X[r,p] } + \textbf{#2} & \textbf{#3} & \textbf{#4} \\ + \end{tabu} + % Add space according to the specidied number of lines + \ifnumcomp{#1}{=}{1}{\vspace*{\aftersinglelinesubsectionheaderspace}}{ + \ifnumcomp{#1}{=}{2}{\vspace*{\afterdoublelinesubsectionheaderspace}}{ + \vspace*{\aftermultilinesubsectionheaderspace} + } + } + }{ + \vspace*{\afteremptysubsectionheaderspace} + } + \togglefalse{lefttitledefined} + \togglefalse{centertitledefined} + \togglefalse{righttitledefined} + \begin{adjustwidth}{\subsectionmargin}{\subsectionmargin} +} +{ + \end{adjustwidth} + \vspace*{-5pt} +} +\makeatother diff --git a/tests/reference_files/dummytheme_theme_auxiliary_files/test_auxiliary_file.cls b/tests/reference_files/dummytheme_theme_auxiliary_files/test_auxiliary_file.cls deleted file mode 100644 index e69de29..0000000 diff --git a/tests/reference_files/markdown_and_html_files/classic_theme_CV.html b/tests/reference_files/markdown_and_html_files/classic_theme_CV.md_PASTETOGRAMMARLY.html similarity index 100% rename from tests/reference_files/markdown_and_html_files/classic_theme_CV.html rename to tests/reference_files/markdown_and_html_files/classic_theme_CV.md_PASTETOGRAMMARLY.html diff --git a/tests/reference_files/markdown_and_html_files/mcdowell_theme_CV.html b/tests/reference_files/markdown_and_html_files/mcdowell_theme_CV.md_PASTETOGRAMMARLY.html similarity index 100% rename from tests/reference_files/markdown_and_html_files/mcdowell_theme_CV.html rename to tests/reference_files/markdown_and_html_files/mcdowell_theme_CV.md_PASTETOGRAMMARLY.html diff --git a/tests/reference_files/markdown_and_html_files/moderncv_theme_CV.html b/tests/reference_files/markdown_and_html_files/moderncv_theme_CV.md_PASTETOGRAMMARLY.html similarity index 100% rename from tests/reference_files/markdown_and_html_files/moderncv_theme_CV.html rename to tests/reference_files/markdown_and_html_files/moderncv_theme_CV.md_PASTETOGRAMMARLY.html diff --git a/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.log b/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.log index ba05eb4..3f96b02 100644 --- a/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.log +++ b/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.log @@ -1,8 +1,8 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.13) 14 FEB 2024 19:46 +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.13) 14 FEB 2024 20:22 entering extended mode restricted \write18 enabled. %&-line parsing enabled. -**C:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.tex +**c:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.tex (c:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> @@ -441,8 +441,8 @@ Package rerunfilecheck Info: File `mcdowell_theme_CV.out' has not changed. (rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0. ) Here is how much of TeX's memory you used: - 15809 strings out of 476161 - 276091 string characters out of 5790867 + 15808 strings out of 476161 + 276022 string characters out of 5790867 1924978 words of memory out of 5000000 37652 multiletter control sequences out of 15000+600000 565222 words of font info for 64 fonts, out of 8000000 for 9000 diff --git a/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.pdf b/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.pdf index ec96078..81e4b85 100644 Binary files a/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.pdf and b/tests/reference_files/mcdowell_theme_full/mcdowell_theme_CV.pdf differ diff --git a/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.log b/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.log index e948ab0..73ce3a2 100644 --- a/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.log +++ b/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.log @@ -1,8 +1,8 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.13) 14 FEB 2024 19:46 +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.13) 14 FEB 2024 20:21 entering extended mode restricted \write18 enabled. %&-line parsing enabled. -**C:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.tex +**c:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.tex (c:/GIT/ARCHIVE/rendercv-v1/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> @@ -720,8 +720,8 @@ Package rerunfilecheck Info: File `moderncv_theme_CV.out' has not changed. (rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0. ) Here is how much of TeX's memory you used: - 26653 strings out of 476161 - 526063 string characters out of 5790867 + 26652 strings out of 476161 + 525994 string characters out of 5790867 1926978 words of memory out of 5000000 48209 multiletter control sequences out of 15000+600000 585922 words of font info for 68 fonts, out of 8000000 for 9000 diff --git a/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.pdf b/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.pdf index ba6d4c6..92ddd40 100644 Binary files a/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.pdf and b/tests/reference_files/moderncv_theme_full/moderncv_theme_CV.pdf differ diff --git a/tests/reference_files/rendercv_output/John_Doe_CV.aux b/tests/reference_files/rendercv_output/John_Doe_CV.aux deleted file mode 100644 index 2b19003..0000000 --- a/tests/reference_files/rendercv_output/John_Doe_CV.aux +++ /dev/null @@ -1,9 +0,0 @@ -\relax -\providecommand\hyper@newdestlabel[2]{} -\providecommand\HyField@AuxAddToFields[1]{} -\providecommand\HyField@AuxAddToCoFields[2]{} -\providecommand\BKM@entry[2]{} -\newlabel{LastPage}{{}{1}{}{page.1}{}} -\gdef\lastpage@lastpage{1} -\gdef\lastpage@lastpageHy{1} -\gdef \@abspage@last{1} diff --git a/tests/reference_files/rendercv_output/John_Doe_CV.html b/tests/reference_files/rendercv_output/John_Doe_CV.html deleted file mode 100644 index 0814fe1..0000000 --- a/tests/reference_files/rendercv_output/John_Doe_CV.html +++ /dev/null @@ -1 +0,0 @@ -