From 907d5009a72c94553cfbf2a13eed1370bc73bfd8 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sun, 17 Aug 2025 08:13:12 +0200 Subject: [PATCH] Format source files with latexindent --- dist/letter.tex | 4 +- dist/most.tex | 1 - docs/docs.tex | 2 +- docs/parts/custom-loader.tex | 4 +- docs/parts/reference.tex | 2 +- docs/parts/troubleshooting.tex | 2 +- docs/parts/usage.tex | 2 +- examples/letter/letter.tex | 10 ++--- extra/bib.tex | 2 +- extra/minted.tex | 2 +- include.tex | 1 - main/index.tex | 2 +- main/math.tex | 2 +- main/style/common.tex | 20 +++++----- main/style/counters.tex | 27 +++++++------- main/style/cs.tex | 4 +- main/style/language.tex | 4 +- main/style/style.tex | 68 +++++++++++++++++----------------- main/tables.tex | 10 ++--- 19 files changed, 84 insertions(+), 85 deletions(-) diff --git a/dist/letter.tex b/dist/letter.tex index d3a1955..681290b 100644 --- a/dist/letter.tex +++ b/dist/letter.tex @@ -25,8 +25,8 @@ \parbox[t][\headheight][t]{4cm}{% \vspace*{2cm} - \usekomavar{fromname} \newline - \usekomavar{fromaddress} \newline + \usekomavar{fromname} \newline + \usekomavar{fromaddress} \newline \usekomavar{fromplace} } }% diff --git a/dist/most.tex b/dist/most.tex index 02d4a84..61d4649 100644 --- a/dist/most.tex +++ b/dist/most.tex @@ -1,4 +1,3 @@ - \newcommand{\loadMost}{ \typeout{[CustomLaTeXHelperLoader]: Loaded most} \input{\dir/dist/minimal.tex} diff --git a/docs/docs.tex b/docs/docs.tex index 43f0105..dcad7e2 100644 --- a/docs/docs.tex +++ b/docs/docs.tex @@ -15,7 +15,7 @@ \newpage \section{Introduction} -This set of \LaTeX files is designed to give you a good looking, pre-configured \LaTeX setup, which helps you get started much more quickly. +This set of \LaTeX files is designed to give you a good looking, pre-configured \LaTeX setup, which helps you get started much more quickly. It has some configuration options already, but more are to come soon. If you have any suggestions as to what should be added, don't hesitate to open a support ticket at \url{https://support.janishutz.com?a=add} or contacting me via email to \texttt{development@janishutz.com}. diff --git a/docs/parts/custom-loader.tex b/docs/parts/custom-loader.tex index 4ea986b..09eb07e 100644 --- a/docs/parts/custom-loader.tex +++ b/docs/parts/custom-loader.tex @@ -1,6 +1,6 @@ \newsection \section{Custom Loader} -You can create a custom loader by defining a \verb|load|\{\textit{string}\} macro (or any other, if you are aware you need to change that in your main file for it to work) that uses the \verb|\dir| command to resolve the custom parts. +You can create a custom loader by defining a \verb|load|\{\textit{string}\} macro (or any other, if you are aware you need to change that in your main file for it to work) that uses the \verb|\dir| command to resolve the custom parts. Take a look at the \texttt{/include.tex} file for inspiration on how to do it, if you also want it to do case distinction. -You can also include some the pre-built configs from the \texttt{dist/} folder. \ No newline at end of file +You can also include some the pre-built configs from the \texttt{dist/} folder. diff --git a/docs/parts/reference.tex b/docs/parts/reference.tex index 6099d76..643e957 100644 --- a/docs/parts/reference.tex +++ b/docs/parts/reference.tex @@ -356,7 +356,7 @@ See \ref{sec:counters} for a guide on how to change the current number. \end{tables} \fhlc{Aquamarine}{Shortened (Named)} -\begin{tables}{ll}{Command & Output} +\begin{tables}{ll}{Command & Output} \verb|\compactex|\{\textit{string}\} & \compactex{Exercise} \\ \verb|\compactdef|\{\textit{string}\} & \compactdef{Definition} \\ \verb|\compacttheorem|\{\textit{string}\} & \compacttheorem{Theorem} \\ diff --git a/docs/parts/troubleshooting.tex b/docs/parts/troubleshooting.tex index 443ca04..cba1102 100644 --- a/docs/parts/troubleshooting.tex +++ b/docs/parts/troubleshooting.tex @@ -31,4 +31,4 @@ You have set the \textit{scope} to \texttt{full}, which loads the \texttt{minted Your host system is lacking the \texttt{pygmentize} package or you have not added the \texttt{pip} path to your \$PATH. This is also the reason as to why the \texttt{-shell-escape} flag has to be set, as minted needs to access external libraries (namely \texttt{pygmentize}) to do the syntax highlighting. \subsection{Any other error} -Ensure that you are not missing any closing brackets or a math environment is still open. If nothing helps, contact support at \url{https://support.janishutz.com} \ No newline at end of file +Ensure that you are not missing any closing brackets or a math environment is still open. If nothing helps, contact support at \url{https://support.janishutz.com} diff --git a/docs/parts/usage.tex b/docs/parts/usage.tex index 7378812..2a2a1a9 100644 --- a/docs/parts/usage.tex +++ b/docs/parts/usage.tex @@ -57,4 +57,4 @@ Letters require a different setup compared to a normal \LaTeX document: \end{document} \end{minted} -If you are using the snippets, you can type \texttt{latex-letter} and press tab. \ No newline at end of file +If you are using the snippets, you can type \texttt{latex-letter} and press tab. diff --git a/examples/letter/letter.tex b/examples/letter/letter.tex index b404744..d1bd8f4 100644 --- a/examples/letter/letter.tex +++ b/examples/letter/letter.tex @@ -7,11 +7,11 @@ % Subject \setkomavar{subject}{Test} \begin{document}\raggedright - \begin{letter}{Company \\ Name \\ Address \\ CH-Place} - \opening{Intro} +\begin{letter}{Company \\ Name \\ Address \\ CH-Place} + \opening{Intro} - Test + Test - \closing{Kind regards} - \end{letter} + \closing{Kind regards} +\end{letter} \end{document} diff --git a/extra/bib.tex b/extra/bib.tex index 9e821ae..18fa5a0 100644 --- a/extra/bib.tex +++ b/extra/bib.tex @@ -4,7 +4,7 @@ % | _ (| | _ \ | | / __ \ ) ( % | (_) ) | |_) ) | | ( ___// /\ \ % (____/(_)_ __/ (_) \____)_) (_) - + % Configs if you want to use BibTeX. Not included in any default configs. \newcommand{\setupBibtex}[1]{ diff --git a/extra/minted.tex b/extra/minted.tex index 16e1042..6371ecf 100644 --- a/extra/minted.tex +++ b/extra/minted.tex @@ -1 +1 @@ -\usepackage{minted} \ No newline at end of file +\usepackage{minted} diff --git a/include.tex b/include.tex index 4caa90d..b101e39 100644 --- a/include.tex +++ b/include.tex @@ -1,4 +1,3 @@ - % Loader \newcommand{\load}[1]{ \edef\recommended{recommended} diff --git a/main/index.tex b/main/index.tex index cfe27a2..e1cb0f3 100644 --- a/main/index.tex +++ b/main/index.tex @@ -6,7 +6,7 @@ % ██ ██ ██ ███ ██ ██▀▀▀▀▀▀ ███ % ██ ██ ██ ▀██ ██ ██▄ ▄ ▄█▀ ██▄ % ▄████▄████ ████▄ ▀████▀███▄ ▀█████▀██▄ ▄██▄ - + % For using index package \newcommand{\prepareIndex}{ diff --git a/main/math.tex b/main/math.tex index 8417baf..3d1775f 100644 --- a/main/math.tex +++ b/main/math.tex @@ -6,7 +6,7 @@ % █ ██▄█▀ ██ ▄█████ ██ ██ ██ % █ ▀██▀ ██ ██ ██ ██ ██ ██ % ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄ - + \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} diff --git a/main/style/common.tex b/main/style/common.tex index 93692bd..9f28e02 100644 --- a/main/style/common.tex +++ b/main/style/common.tex @@ -5,35 +5,35 @@ %▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ \newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} + overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} \newtcolorbox{remarks}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} \newtcolorbox{guides}[3][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} \newtcolorbox{properties}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} \newtcolorbox{restrictions}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} \newtcolorbox{limitations}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} % Terms and notation \newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} + overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} \newtcolorbox{notation}[2][]{mainboxstyle,colback=Peach!5!white,colframe=Peach!75!black,colbacktitle=Peach!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} + overlay={\node[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} \newtcolorbox{usage}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} % Task @@ -46,7 +46,7 @@ overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame. % General \newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} % Simple \newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1} diff --git a/main/style/counters.tex b/main/style/counters.tex index a6b3265..068e67f 100644 --- a/main/style/counters.tex +++ b/main/style/counters.tex @@ -21,12 +21,13 @@ \newcommand{\definitions}{definitions} \newcommand{\useSubsection}{\ifnum\value{numberSubsections}>0{\arabic{subsection}.}\else{}\fi} \newcommand{\useSubsubsection}{\ifnum\value{numberSubsections}>1{\arabic{subsubsection}.}\else{}\fi} + \newcommand{\usenumberArabic}[1]{\ifnum\value{numberingConfig}<4{\arabic{section}.\useSubsection\useSubsubsection\ifnum\value{numberingConfig}<3{\ifnum\value{numberingConfig}<2{\arabic{#1}\stepcounter{#1}}\else{ -\ifx#1\definitions - \arabic{#1}\stepcounter{#1} -\else - \arabic{all}\stepcounter{all} -\fi}\fi}\else{\arabic{all}\stepcounter{all}}\fi}\else{}\fi} + \ifx#1\definitions + \arabic{#1}\stepcounter{#1} + \else + \arabic{all}\stepcounter{all} + \fi}\fi}\else{\arabic{all}\stepcounter{all}}\fi}\else{}\fi} % Reset definition, lemma, etc counters, add a new page @@ -56,35 +57,35 @@ % Theorems \newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde} \usenumberArabic{theorems}};},#1} + overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde} \usenumberArabic{theorems}};},#1} % Lemmas \newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma \usenumberArabic{lemmas}};},#1} + overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma \usenumberArabic{lemmas}};},#1} % Corollaries \newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar} \usenumberArabic{corollaries}};},#1} + overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar} \usenumberArabic{corollaries}};},#1} % Axioms \newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom \usenumberArabic{axioms}};},#1} + overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom \usenumberArabic{axioms}};},#1} % Facts \newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt} \usenumberArabic{facts}};},#1} + overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt} \usenumberArabic{facts}};},#1} % Propositions \newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition \usenumberArabic{propositions}};},#1} + overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition \usenumberArabic{propositions}};},#1} % Examples \newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel} \usenumberArabic{examples}};},#1} + overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel} \usenumberArabic{examples}};},#1} % Formula \newtcolorbox{formula}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel} \usenumberArabic{formulas}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel} \usenumberArabic{formulas}};},#1} % Inline environments (inline) \newcommand{\inlineex}{\textbf{\translate{Example}{Beispiel} \usenumberArabic{examples}:}} diff --git a/main/style/cs.tex b/main/style/cs.tex index 5b45175..010a479 100644 --- a/main/style/cs.tex +++ b/main/style/cs.tex @@ -18,8 +18,8 @@ \begin{spacing}{1.2} \caption{\textsc{#1}} \begin{algorithmic}[1] -}{ + }{ \end{algorithmic} \end{spacing} \end{algorithm} -} \ No newline at end of file +} diff --git a/main/style/language.tex b/main/style/language.tex index e24da16..cbc28b8 100644 --- a/main/style/language.tex +++ b/main/style/language.tex @@ -4,7 +4,7 @@ % Specific styles for language summaries and docs \newtcolorbox{conjugation}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1} + overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1} \newtcolorbox{forms}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2}, -overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} diff --git a/main/style/style.tex b/main/style/style.tex index 38ff709..d4538ef 100644 --- a/main/style/style.tex +++ b/main/style/style.tex @@ -12,32 +12,32 @@ \newcommand{\usetcolorboxes}{ \tcbset{ mainboxstyle/.style={ - arc=3mm, - colback=red!5!white, - colframe=red!75!black, - colbacktitle=red!75!black, - fonttitle=\bfseries, - enhanced, - attach boxed title to top left={yshift=-2mm,xshift=5mm}, - breakable, - top=0.4cm, - } + arc=3mm, + colback=red!5!white, + colframe=red!75!black, + colbacktitle=red!75!black, + fonttitle=\bfseries, + enhanced, + attach boxed title to top left={yshift=-2mm,xshift=5mm}, + breakable, + top=0.4cm, + } } \tikzset{ overlaystyle/.style={ - draw=red!75!black, - thick, - fill=red!75!black, - left, - anchor=east, - text=white, - rounded corners=1mm, - font=\bfseries, - xshift=-5mm, - yshift=1mm, - inner xsep=3mm, - inner ysep=1.5mm - } + draw=red!75!black, + thick, + fill=red!75!black, + left, + anchor=east, + text=white, + rounded corners=1mm, + font=\bfseries, + xshift=-5mm, + yshift=1mm, + inner xsep=3mm, + inner ysep=1.5mm + } } } @@ -49,17 +49,17 @@ \newcommand{\bi}[1]{\textbf{\textit{#1}}} % Add a color shade (similar to \fhlc, but nicer boxes) -\newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} -] {\textbf{#3}}} +\newcommand{\background}[3]{\tcbox[on line, + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} diff --git a/main/tables.tex b/main/tables.tex index e5f8925..081c8e2 100644 --- a/main/tables.tex +++ b/main/tables.tex @@ -4,8 +4,8 @@ % | | / _ ) _ \ | | / __ \ __) % | | ( (_| | |_) )| |( ___/__ \ % (_) \__ _)_ __/(___)\____)____/ - - + + \usepackage{booktabs} \usepackage{tabulary} @@ -14,9 +14,9 @@ \begin{center} \begin{tabular}{#1} \toprule - #2\\ + #2 \\ \midrule -}{ + }{ \bottomrule \end{tabular} \end{center} @@ -27,7 +27,7 @@ \edef\tableCaption{#3} \begin{table}[h!] \begin{tables}{#1}{#2} -}{ + }{ \end{tables} \caption{\tableCaption} \end{table}