diff --git a/Makefile b/Makefile index ecd3ba8..275cede 100644 --- a/Makefile +++ b/Makefile @@ -18,11 +18,17 @@ fonts/sentinel: basics: fonts/sentinel mkdir -p out -base.pdf: base.tex cv_base.cls basics - ${LATEX_CMD} base.tex - clean: rm -rf out clean_fonts: - rm -rf fonts/ \ No newline at end of file + rm -rf fonts/ + +base.pdf: base.tex cv_base.cls basics + ${LATEX_CMD} base.tex + +cv.pdf: cv.tex cv_base.cls cv.cls basics + ${LATEX_CMD} cv.tex + +cv_letter.pdf: cv_letter.tex cv_base.cls cv_letter.cls basics + ${LATEX_CMD} cv_letter.tex diff --git a/cv.cls b/cv.cls index f1f213b..f98a1ae 100644 --- a/cv.cls +++ b/cv.cls @@ -1,20 +1,75 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesClass{cv}[2022/09/17 Custom CV Class] -\LoadClass{cv_base} +\LoadClass[letterpaper, 11pt]{cv_base} + + +% change geometry +\RequirePackage[left=.9in, right=.9in, bottom=1in, top=1in]{geometry} % section / subsection formatting \RequirePackage{titlesec} \titleformat{\section} % Customise the \section command - {\Large\raggedright} % Make the \section headers large (\Large), + {\Large\latolight\selectfont \raggedright\uppercase} % Make the \section headers large (\Large), % small capitals (\scshape) and left aligned (\raggedright) {}{0em} % Can be used to give a prefix to all sections, like 'Section ...' {} % Can be used to insert code before the heading [\titlerule] % Inserts a horizontal line after the heading \titleformat{\subsection} - {\large\raggedright} + {\large\latolight\selectfont \raggedright\uppercase} {}{0em} {} + +% no paragraph indent +\setlength{\parindent}{0cm} + +% larger line spaces +\renewcommand{\baselinestretch}{1.15} + +% sizing parameters +\RequirePackage{setspace, longtable, multicol} + +\newcommand{\tblitemsep}{\vspace{.5cm}} +\newcommand{\tblitemsepsmall}{\vspace{.2cm}} +\newcommand{\preitemizesep}{\vspace{.3em}} +\newcommand{\initemizesep}{ + \setlength{\itemsep}{.2em} + \setlength{\parsep}{0em} + \setlength{\parskip}{.3em} +} +\newcommand{\crule}{{\color{\hicolor}\hrule}} +\newcommand{\notextitemizepre}{\vspace{-.5cm}} + +\setlength{\multicolsep}{0pt} + + +% fancy header +\RequirePackage{lastpage, fancyhdr, datetime} + +\newcommand{\MakeHeader}[2]{ + \fancyhf{} + \rfoot{\thepage \,/ \pageref{LastPage}} + \lhead{\latolight\footnotesize #1} + \chead{} + \rhead{\latolight\footnotesize\colorhi{#2}} + + \fancypagestyle{firstpage}{ %section openning + \fancyhf{} + \fancyfoot[RO]{Seite \thepage} + \renewcommand{\headrulewidth}{0pt} + } + +} + +\pagestyle{fancy} + +% header color +\let\oldheadrule\headrule% Copy \headrule into \oldheadrule +\renewcommand{\headrule}{\color{\hicolor}\oldheadrule} + +% footnote color +\let\oldfootnoterule\footnoterule +\renewcommand{\footnoterule}{{\color{\hicolor}{\oldfootnoterule}}} diff --git a/cv.tex b/cv.tex index e69de29..4e91f96 100644 --- a/cv.tex +++ b/cv.tex @@ -0,0 +1,15 @@ +\documentclass[]{cv} + +\usepackage[ngerman]{babel} + +\MakeHeader{Anton Lydike}{17. Sep. 2022} + +\begin{document} + +\section[testsec]{Test öäüßẞ ẞ Section} + + Hello world öäüß ẞ + + \subsection{Subsection öäüß test} + +\end{document} \ No newline at end of file diff --git a/cv_base.cls b/cv_base.cls index 18b53b3..e4861f8 100644 --- a/cv_base.cls +++ b/cv_base.cls @@ -3,12 +3,7 @@ \LoadClass{article} % base setup -\RequirePackage{microtype, hyperref, fancyhdr, enumitem, amsmath} - - -% DejaVuSans font -%\RequirePackage[scaled=0.825]{Lato} -%\renewcommand*\familydefault{\sfdefault} +\RequirePackage{microtype, hyperref, enumitem, amsmath} % Set main fonts @@ -16,16 +11,21 @@ \setmainfont[Color=2b2b2b, Path = fonts/,BoldItalicFont=Lato-Italic,BoldFont=Lato-Regular,ItalicFont=Lato-LightItalic]{Lato-Light} \setsansfont[Scale=MatchLowercase,Ligatures=TeX, Path = fonts/]{DejaVuSans-ExtraLight} +\newcommand{\latolight}{\fontspec[Path = fonts/]{Lato-Light}} + +\newcommand{\latoreg}{\fontspec[Path = fonts/]{Lato-Regular}} + + % link styling and helpers \RequirePackage[dvipsnames]{xcolor} \hypersetup{colorlinks=true, linkcolor=RoyalBlue, urlcolor=RoyalBlue} - \newcommand{\linkwithfooter}[2]{\href{#2}{#1}\footnote{\href{#2}{#2}}} \newcommand{\footerlink}[1]{\footnote{\href{#1}{#1}}} + % highlight color \definecolor{hicolorcode}{RGB}{178, 79, 61} -\newcommand{\hicolor}{Sepia} % PineGreen +\newcommand{\hicolor}{PineGreen} % PineGreen \newcommand{\colorhi}[1]{\textit{#1}} diff --git a/cv_letter.tex b/cv_letter.tex index e69de29..2a12641 100644 --- a/cv_letter.tex +++ b/cv_letter.tex @@ -0,0 +1,11 @@ +\documentclass[]{cv_letter} + +\begin{document} + +\section[testsec]{Test Section} + + Hello world + + \subsection{Subsection test} + +\end{document} \ No newline at end of file