Ran latexindent

This commit is contained in:
Marko Korhonen 2024-05-10 20:44:59 +03:00
parent 41e1ed4bee
commit 684fdbffcf
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -4,7 +4,7 @@
\DeclareOption{nocolors}{\def\@cv@nocolors{}} \DeclareOption{nocolors}{\def\@cv@nocolors{}}
\DeclareOption{print}{\def\@cv@print{}} \DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{% \DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}% \PassOptionsToClass{\CurrentOption}{article}%
} }
\ProcessOptions\relax \ProcessOptions\relax
\LoadClass{article} \LoadClass{article}
@ -34,31 +34,31 @@
\definecolor{blue}{HTML}{6CE0F1} \definecolor{blue}{HTML}{6CE0F1}
\ifdefined\@cv@print \ifdefined\@cv@print
\colorlet{green}{gray} \colorlet{green}{gray}
\colorlet{orange}{gray} \colorlet{orange}{gray}
\colorlet{purple}{gray} \colorlet{purple}{gray}
\colorlet{brown}{gray} \colorlet{brown}{gray}
\colorlet{red}{gray} \colorlet{red}{gray}
\colorlet{blue}{gray} \colorlet{blue}{gray}
\colorlet{fillheader}{white} \colorlet{fillheader}{white}
\colorlet{header}{gray} \colorlet{header}{gray}
\else \else
\colorlet{fillheader}{gray} \colorlet{fillheader}{gray}
\colorlet{header}{white} \colorlet{header}{white}
\fi \fi
\colorlet{textcolor}{gray} \colorlet{textcolor}{gray}
\colorlet{headercolor}{gray} \colorlet{headercolor}{gray}
\ifdefined\@cv@nocolors \ifdefined\@cv@nocolors
\colorlet{green}{gray} \colorlet{green}{gray}
\colorlet{rdfgreen}{gray} \colorlet{rdfgreen}{gray}
\colorlet{orange}{gray} \colorlet{orange}{gray}
\colorlet{rdforange}{gray} \colorlet{rdforange}{gray}
\colorlet{purple}{gray} \colorlet{purple}{gray}
\colorlet{rdfpurple}{gray} \colorlet{rdfpurple}{gray}
\colorlet{brown}{gray} \colorlet{brown}{gray}
\colorlet{red}{gray} \colorlet{red}{gray}
\colorlet{blue}{gray} \colorlet{blue}{gray}
\fi \fi
%%%%%%%%% %%%%%%%%%
@ -70,8 +70,8 @@
\newfontfamily\bodyfont \newfontfamily\bodyfont
[BoldFont=texgyreheros-bold.otf, [BoldFont=texgyreheros-bold.otf,
ItalicFont=texgyreheros-italic.otf, ItalicFont=texgyreheros-italic.otf,
BoldItalicFont=texgyreheros-bolditalic.otf] BoldItalicFont=texgyreheros-bolditalic.otf]
{texgyreheros-regular.otf} {texgyreheros-regular.otf}
\newfontfamily\thinfont[]{Lato-Light.ttf} \newfontfamily\thinfont[]{Lato-Light.ttf}
\newfontfamily\headingfont[]{texgyreheros-bold.otf} \newfontfamily\headingfont[]{texgyreheros-bold.otf}
@ -79,9 +79,9 @@ BoldItalicFont=texgyreheros-bolditalic.otf]
\defaultfontfeatures{Mapping=tex-text} \defaultfontfeatures{Mapping=tex-text}
\setmainfont \setmainfont
[Mapping=tex-text, Color=textcolor, [Mapping=tex-text, Color=textcolor,
BoldFont=texgyreheros-bold.otf, BoldFont=texgyreheros-bold.otf,
ItalicFont=texgyreheros-italic.otf, ItalicFont=texgyreheros-italic.otf,
BoldItalicFont=texgyreheros-bolditalic.otf BoldItalicFont=texgyreheros-bolditalic.otf
] ]
{texgyreheros-regular.otf} {texgyreheros-regular.otf}
@ -95,25 +95,25 @@ BoldItalicFont=texgyreheros-bolditalic.otf
\RequirePackage{tikz} \RequirePackage{tikz}
\newcommand{\rolefont}{% \newcommand{\rolefont}{%
\fontsize{14pt}{24pt}\selectfont% \fontsize{14pt}{24pt}\selectfont%
\thinfont% \thinfont%
\color{white}% \color{white}%
} }
\newcommand{\header}[3]{% \newcommand{\header}[3]{%
\begin{tikzpicture}[remember picture,overlay] \begin{tikzpicture}[remember picture,overlay]
\node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=4cm] (box) at (current page.north){}; \node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=4cm] (box) at (current page.north){};
\node [anchor=center] (name) at (box) {% \node [anchor=center] (name) at (box) {%
\fontsize{40pt}{72pt}\color{header}% \fontsize{40pt}{72pt}\color{header}%
{\thinfont #1}{\bodyfont #2} {\thinfont #1}{\bodyfont #2}
}; };
\node [anchor=north] at (name.south) {% \node [anchor=north] at (name.south) {%
\fontsize{14pt}{24pt}\color{header}% \fontsize{14pt}{24pt}\color{header}%
\thinfont #3% \thinfont #3%
}; };
\end{tikzpicture} \end{tikzpicture}
\vspace{2.5cm} \vspace{2.5cm}
\vspace{-2\parskip} \vspace{-2\parskip}
} }
@ -124,40 +124,40 @@ BoldItalicFont=texgyreheros-bolditalic.otf
\newcounter{colorCounter} \newcounter{colorCounter}
\def\@sectioncolor#1#2#3{% \def\@sectioncolor#1#2#3{%
{% {%
\color{% \color{%
\ifcase\value{colorCounter}% \ifcase\value{colorCounter}%
blue\or% blue\or%
red\or% red\or%
orange\or% orange\or%
green\or% green\or%
purple\or% purple\or%
brown\else% brown\else%
headercolor\fi% headercolor\fi%
} #1#2#3% } #1#2#3%
}% }%
\stepcounter{colorCounter}% \stepcounter{colorCounter}%
} }
\renewcommand{\section}[1]{ \renewcommand{\section}[1]{
\par\vspace{\parskip} \par\vspace{\parskip}
{% {%
\LARGE\headingfont\color{headercolor}% \LARGE\headingfont\color{headercolor}%
\@sectioncolor #1% \@sectioncolor #1%
} }
\par\vspace{\parskip} \par\vspace{\parskip}
} }
\renewcommand{\subsection}[1]{ \renewcommand{\subsection}[1]{
\par\vspace{.5\parskip}% \par\vspace{.5\parskip}%
{\Large\headingfont\color{headercolor} #1} {\Large\headingfont\color{headercolor} #1}
\par\vspace{.25\parskip}% \par\vspace{.25\parskip}%
} }
\renewcommand{\subsubsection}[2]{ \renewcommand{\subsubsection}[2]{
\par\vspace{.5\parskip}% \par\vspace{.5\parskip}%
{\Large\headingfont\color{headercolor} #2} {\Large\headingfont\color{headercolor} #2}
\par\vspace{.25\parskip}% \par\vspace{.25\parskip}%
} }
\pagestyle{empty} \pagestyle{empty}
@ -169,18 +169,18 @@ BoldItalicFont=texgyreheros-bolditalic.otf
\setlength{\tabcolsep}{0pt} \setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{% \newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{% }{%
\end{tabular*} \end{tabular*}
} }
\renewcommand{\bfseries}{\headingfont\color{headercolor}} \renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{% \newcommand{\entry}[4]{%
\parbox[t]{2cm}{#1}&\parbox[t]{11.3cm}{% \parbox[t]{2cm}{#1}&\parbox[t]{11.3cm}{%
\textbf{#2}% \textbf{#2}%
\hfill% \hfill%
{\footnotesize\addfontfeature{Color=lightgray} #3}\\% {\footnotesize\addfontfeature{Color=lightgray} #3}\\%
#4\vspace{\parsep}% #4\vspace{\parsep}%
}\\} }\\}
%%%%%%%%%%%%%% %%%%%%%%%%%%%%
@ -191,18 +191,18 @@ BoldItalicFont=texgyreheros-bolditalic.otf
\setlength{\TPHorizModule}{1cm} \setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm} \setlength{\TPVertModule}{1cm}
\newenvironment{aside}{% \newenvironment{aside}{%
\let\oldsection\section \let\oldsection\section
\renewcommand{\section}[1]{ \renewcommand{\section}[1]{
\par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1} \par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1}
} }
\begin{textblock}{5.0}(0.5, 4.33) \begin{textblock}{5.0}(0.5, 4.33)
\begin{flushright} \begin{flushright}
\obeycr \obeycr
}{% }{%
\restorecr \restorecr
\end{flushright} \end{flushright}
\end{textblock} \end{textblock}
\let\section\oldsection \let\section\oldsection
} }
%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%
@ -218,126 +218,126 @@ BoldItalicFont=texgyreheros-bolditalic.otf
\DeclareFieldFormat[report]{title}{#1\par} \DeclareFieldFormat[report]{title}{#1\par}
\DeclareBibliographyDriver{article}{% \DeclareBibliographyDriver{article}{%
\printfield{title}% \printfield{title}%
\newblock% \newblock%
\printnames{author}% \printnames{author}%
\par% \par%
\newblock% \newblock%
{% {%
\footnotesize\addfontfeature{Color=lightgray}\itshape% \footnotesize\addfontfeature{Color=lightgray}\itshape%
\usebibmacro{journal+issuetitle}% \usebibmacro{journal+issuetitle}%
\setunit{\space}% \setunit{\space}%
\printfield{pages}% \printfield{pages}%
\newunit% \newunit%
\printlist{publisher}% \printlist{publisher}%
\setunit*{\addcomma\space}% \setunit*{\addcomma\space}%
\printfield{year}% \printfield{year}%
\newunit% \newunit%
} }
\par\vspace{0.3\baselineskip} \par\vspace{0.3\baselineskip}
} }
\DeclareBibliographyDriver{book}{% \DeclareBibliographyDriver{book}{%
\printfield{title}% \printfield{title}%
\newblock% \newblock%
\printnames{author}% \printnames{author}%
\par% \par%
\newblock% \newblock%
{% {%
\footnotesize\addfontfeature{Color=lightgray}\itshape% \footnotesize\addfontfeature{Color=lightgray}\itshape%
\printlist{publisher}% \printlist{publisher}%
\setunit*{\addcomma\space}% \setunit*{\addcomma\space}%
\printfield{note}% \printfield{note}%
\setunit*{\addcomma\space}% \setunit*{\addcomma\space}%
\printfield{year}% \printfield{year}%
\setunit{\addcomma\space}% \setunit{\addcomma\space}%
\printlist{location}% \printlist{location}%
\newunit% \newunit%
} }
\par\vspace{0.3\baselineskip} \par\vspace{0.3\baselineskip}
} }
\DeclareBibliographyDriver{inproceedings}{% \DeclareBibliographyDriver{inproceedings}{%
\printfield{title}% \printfield{title}%
\newblock% \newblock%
\printnames{author}% \printnames{author}%
\par% \par%
\newblock% \newblock%
{% {%
\footnotesize\addfontfeature{Color=lightgray}% \footnotesize\addfontfeature{Color=lightgray}%
\printfield{booktitle}% \printfield{booktitle}%
\setunit{\addcomma\space}% \setunit{\addcomma\space}%
\printfield{year}% \printfield{year}%
\setunit{\addcomma\space}% \setunit{\addcomma\space}%
\printlist{location}% \printlist{location}%
\newunit% \newunit%
} }
\par\vspace{0.3\baselineskip} \par\vspace{0.3\baselineskip}
} }
\DeclareBibliographyDriver{misc}{% \DeclareBibliographyDriver{misc}{%
\printfield{title}% \printfield{title}%
\newblock% \newblock%
\printnames{author}% \printnames{author}%
\par% \par%
\newblock% \newblock%
{% {%
\footnotesize\addfontfeature{Color=lightgray}\itshape% \footnotesize\addfontfeature{Color=lightgray}\itshape%
\printfield{booktitle}% \printfield{booktitle}%
\setunit*{\addcomma\space}% \setunit*{\addcomma\space}%
\printfield{note}% \printfield{note}%
\setunit*{\addcomma\space}% \setunit*{\addcomma\space}%
\printfield{year}% \printfield{year}%
\setunit{\addcomma\space}% \setunit{\addcomma\space}%
\printlist{location}% \printlist{location}%
\newunit% \newunit%
} }
\par\vspace{0.3\baselineskip} \par\vspace{0.3\baselineskip}
} }
\DeclareBibliographyDriver{report}{% \DeclareBibliographyDriver{report}{%
\printfield{title}% \printfield{title}%
\newblock% \newblock%
\printnames{author}% \printnames{author}%
\par% \par%
\newblock% \newblock%
{% {%
\footnotesize\addfontfeature{Color=lightgray}\itshape% \footnotesize\addfontfeature{Color=lightgray}\itshape%
\printfield{type}% \printfield{type}%
\setunit{\space}% \setunit{\space}%
\printfield{number}% \printfield{number}%
\setunit{\addcomma\space}% \setunit{\addcomma\space}%
\printfield{year}% \printfield{year}%
\newunit% \newunit%
} }
\par\vspace{0.3\baselineskip} \par\vspace{0.3\baselineskip}
} }
\DeclareNameFormat{author}{% \DeclareNameFormat{author}{%
\small\addfontfeature{Color=lightgray}% \small\addfontfeature{Color=lightgray}%
\nameparts{#1}\ifblank{\namepartgiven}{}{\namepartgiven\space}\namepartfamily% \nameparts{#1}\ifblank{\namepartgiven}{}{\namepartgiven\space}\namepartfamily%
\ifthenelse{\value{listcount}<\value{liststop}} \ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space} {\addcomma\space}
{}% {}%
} }
\defbibheading{bibheading}[\bibname]{% \defbibheading{bibheading}[\bibname]{%
\subsubsection*{#1} \subsubsection*{#1}
\markboth{#1}{#1} \markboth{#1}{#1}
} }
\newcommand{\printbibsection}[2]{ \newcommand{\printbibsection}[2]{
\begin{refsection} \begin{refsection}
\newrefcontext[sorting=chronological]% \newrefcontext[sorting=chronological]%
\nocite{*} \nocite{*}
\printbibliography[type={#1}, title={#2}, heading=bibheading] \printbibliography[type={#1}, title={#2}, heading=bibheading]
\end{refsection} \end{refsection}
} }
\DeclareSortingTemplate{chronological}{ \DeclareSortingTemplate{chronological}{
\sort[direction=descending]{\field{year}} \sort[direction=descending]{\field{year}}
\sort[direction=descending]{\field{month}} \sort[direction=descending]{\field{month}}
} }
@ -349,11 +349,11 @@ BoldItalicFont=texgyreheros-bolditalic.otf
\RequirePackage[left=6.1cm,top=2cm,right=2.5cm,bottom=2.5cm,nohead,nofoot]{geometry} \RequirePackage[left=6.1cm,top=2cm,right=2.5cm,bottom=2.5cm,nohead,nofoot]{geometry}
\RequirePackage{hyperref} \RequirePackage{hyperref}
\hypersetup{ \hypersetup{
colorlinks=false, colorlinks=false,
linkcolor=red, linkcolor=red,
citecolor=red, citecolor=red,
filecolor=red, filecolor=red,
urlcolor = red} urlcolor = red}
% A fix for \href{}{} colors not working with fontspec % A fix for \href{}{} colors not working with fontspec
\makeatletter \makeatletter