From 5e598bbaf4688b2c12b3080939fb22d46e2ef543 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 18 Sep 2022 11:18:51 +0200 Subject: [PATCH] some more progress --- Makefile | 30 ++++++++++++++++------------ cv_base.cls | 20 +++++++++++++++---- cv_letter.cls | 16 +++++++++++++++ cv_letter.tex | 55 +++++++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 100 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 275cede..a4dbabe 100644 --- a/Makefile +++ b/Makefile @@ -5,30 +5,34 @@ SHELL := bash MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules -LATEX_CMD = lualatex --halt-on-error --synctex=1 --output-directory=out +LATEX_CMD = latexmk -lualatex --halt-on-error --synctex=1 --output-directory=out +.PHONY: clean clean_fonts all + +# create output folder! +$(info $(shell mkdir -p out)) + +all: out/cv_letter.pdf out/cv.pdf + +out/base.pdf: base.tex cv_base.cls fonts/sentinel + ${LATEX_CMD} base.tex + +out/cv.pdf: cv.tex cv_base.cls cv.cls fonts/sentinel + ${LATEX_CMD} cv.tex + +out/cv_letter.pdf: cv_letter.tex cv_base.cls cv_letter.cls fonts/sentinel + ${LATEX_CMD} cv_letter.tex -.PHONY: clean clean_fonts basics 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 {})' + fc-list | grep -E 'Lato-|DejaVu' | grep -v -- "-minimal" | cut -d : -f 1 | xargs -I{} bash -c 'ln -fs {} fonts/$$(basename {})' touch fonts/sentinel -basics: fonts/sentinel - mkdir -p out - clean: rm -rf out clean_fonts: 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_base.cls b/cv_base.cls index e4861f8..0bc53af 100644 --- a/cv_base.cls +++ b/cv_base.cls @@ -8,7 +8,7 @@ % Set main fonts \usepackage{fontspec} -\setmainfont[Color=2b2b2b, Path = fonts/,BoldItalicFont=Lato-Italic,BoldFont=Lato-Regular,ItalicFont=Lato-LightItalic]{Lato-Light} +\setmainfont[Color=000000,Ligatures=TeX,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}} @@ -19,13 +19,25 @@ % link styling and helpers \RequirePackage[dvipsnames]{xcolor} \hypersetup{colorlinks=true, linkcolor=RoyalBlue, urlcolor=RoyalBlue} - +% work around to have colored links, see https://tex.stackexchange.com/a/22061 +\makeatletter +\def\HyColor@@@@UseColor#1\@nil{\addfontfeatures{Color=#1}} +\makeatother + +% some helpers for adding links to printed documents +% \linkwithfooter will create a clickable link, and put the full url in the footer +% so that the link is visible even when printed. \newcommand{\linkwithfooter}[2]{\href{#2}{#1}\footnote{\href{#2}{#2}}} +% footerlink will create a footnote with a full url, for when you don't want +% link text in your document \newcommand{\footerlink}[1]{\footnote{\href{#1}{#1}}} % highlight color -\definecolor{hicolorcode}{RGB}{178, 79, 61} -\newcommand{\hicolor}{PineGreen} % PineGreen +\definecolor{hicolorcode}{RGB}{19, 84, 153} +\newcommand{\hicolor}{hicolorcode} % PineGreen \newcommand{\colorhi}[1]{\textit{#1}} + +% no paragraph indent +\setlength{\parindent}{0cm} \ No newline at end of file diff --git a/cv_letter.cls b/cv_letter.cls index 894a7b7..5709bb3 100644 --- a/cv_letter.cls +++ b/cv_letter.cls @@ -1,3 +1,19 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesClass{cv_letter}[2022/09/17 Custom CV Letter Class] \LoadClass{cv_base} + +\RequirePackage[left=.9in, right=.9in, bottom=.6in, top=.8in]{geometry} + +\RequirePackage{fontawesome} + +% larger line spaces +\renewcommand{\baselinestretch}{1.15} + +\newcommand{\absatz}{\vspace{.35cm}} + +\newcommand{\foothref}[2]{\href{#2}{#1}\footnote{\href{#2}{#2}}} +\newcommand{\footlink}[1]{\footnote{\href{#1}{#1}}} + +\newcommand{\crule}{{\color{\hicolor}\hrule}} + +\setmainfont[Scale=MatchLowercase,Ligatures=TeX, Path = fonts/]{DejaVuSans} diff --git a/cv_letter.tex b/cv_letter.tex index 2a12641..e403152 100644 --- a/cv_letter.tex +++ b/cv_letter.tex @@ -1,11 +1,58 @@ -\documentclass[]{cv_letter} +\documentclass{cv_letter} + +\usepackage[ngerman]{babel} \begin{document} +\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} r} + \latolight\Huge{\textcolor{\hicolor}{Max Musterfrau}} & \it\footnotesize\colorhi{\latolight\today} +\end{tabular*} +\vspace{.25cm} +\crule + \begin{flushright} + \latolight + \faPhone\, +49 123 456\,78\,999 \,\,\, \faEnvelope\, \href{mailto:Max@Musterfrau.com}{Max@Musterfrau.com} \\ + Musterstraße. 10, 12345, Musterstadt \\ + \end{flushright} + + \vspace{1cm} + + Musterfirma GmbH \\ + Muster-Firma-Str. 1 \\ + 12345 Münster + + \vspace{1cm} + + \textbf{\latoreg\Large \color{\hicolor}{Initiativbewerbung auf eine Werkstudentenstelle}} + \absatz + + Sehr geehrte Damen und Herren, + \absatz + + + lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + + \absatz + + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur\footnote{ipsum dolor sit amet, consetetur} sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + + \absatz + + Lorem ipsum dolor sit amet, \glqq consetetur sadipscing elitr\grqq, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + + \absatz -\section[testsec]{Test Section} + Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat. + + \absatz + + Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. + + \absatz + + Mit freundlichen Grüßen \\ + Max Musterfrau + - Hello world - \subsection{Subsection test} \end{document} \ No newline at end of file