From 8e8ad51007bb168a2bd8a5738fedd27349ec1c45 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sat, 17 Sep 2022 10:57:23 +0200 Subject: [PATCH] initial version --- .gitignore | 7 +++++++ Makefile | 25 +++++++++++++++++++++++++ README.md | 6 ++++++ base.tex | 11 +++++++++++ cv.cls | 20 ++++++++++++++++++++ cv.tex | 0 cv_base.cls | 31 +++++++++++++++++++++++++++++++ cv_letter.cls | 3 +++ cv_letter.tex | 0 9 files changed, 103 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 base.tex create mode 100644 cv.cls create mode 100644 cv.tex create mode 100644 cv_base.cls create mode 100644 cv_letter.cls create mode 100644 cv_letter.tex diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92c5507 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +fonts +*.aux +*.log +*.out +*.pdf +*.synctex.gz +out diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3be0338 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +SHELL := bash +.SHELLFLAGS := -eu -o pipefail -c +.ONESHELL: +.DELETE_ON_ERROR: +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules + +LATEX_CMD = lualatex --halt-on-error --synctex=1 --output-directory=out + + +.PHONY: clean clean_fonts + +fonts/sentinel: + mkdir -p fonts + fc-list | grep -E 'Lato-|DejaVu' | grep -v -- "-minimal" | cut -d : -f 1 | xargs -I{} bash -c 'ln -s {} fonts/$$(basename {})' + touch fonts/sentinel + +base.pdf: base.tex cv_base.cls fonts/sentinel + ${LATEX_CMD} base.tex + +clean: + rm -rf out + +clean_fonts: + rm -rf fonts/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..cf66f34 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# CV and Letter documentclasses + +This repo tries to provide a uniform CV and cover letter document class (and template) + + + diff --git a/base.tex b/base.tex new file mode 100644 index 0000000..ab8d4d6 --- /dev/null +++ b/base.tex @@ -0,0 +1,11 @@ +\documentclass[]{cv_base} + +\begin{document} + +\section[testsec]{Test Section} + + Hello world + + \subsection{Subsection test} + +\end{document} \ No newline at end of file diff --git a/cv.cls b/cv.cls new file mode 100644 index 0000000..f1f213b --- /dev/null +++ b/cv.cls @@ -0,0 +1,20 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{cv}[2022/09/17 Custom CV Class] +\LoadClass{cv_base} + + +% section / subsection formatting +\RequirePackage{titlesec} + +\titleformat{\section} % Customise the \section command + {\Large\raggedright} % 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} + {}{0em} + {} + diff --git a/cv.tex b/cv.tex new file mode 100644 index 0000000..e69de29 diff --git a/cv_base.cls b/cv_base.cls new file mode 100644 index 0000000..a663641 --- /dev/null +++ b/cv_base.cls @@ -0,0 +1,31 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{cv_base}[2022/09/17 Custom CV Base Class] +\LoadClass{article} + +% base setup +\RequirePackage{microtype, hyperref, fancyhdr, enumitem, amsmath} + + +% DejaVuSans font +%\RequirePackage[scaled=0.825]{Lato} +%\renewcommand*\familydefault{\sfdefault} + + +% Set main fonts +\usepackage{fontspec} +\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} + +% 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{\colorhi}[1]{\textit{#1}} + diff --git a/cv_letter.cls b/cv_letter.cls new file mode 100644 index 0000000..894a7b7 --- /dev/null +++ b/cv_letter.cls @@ -0,0 +1,3 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{cv_letter}[2022/09/17 Custom CV Letter Class] +\LoadClass{cv_base} diff --git a/cv_letter.tex b/cv_letter.tex new file mode 100644 index 0000000..e69de29