Compare commits

...

42 Commits

Author SHA1 Message Date
907d5009a7 Format source files with latexindent 2025-08-17 08:13:12 +02:00
e570f36669 Fix arccosh naming 2025-07-29 07:38:10 +02:00
3c24b99445 Add more translation aids 2025-07-14 11:16:34 +02:00
e005c18ea0 Add translation aids 2025-07-14 08:50:22 +02:00
d824616d80 Add improved commands for def, lemma, theorems, etc 2025-07-13 11:22:32 +02:00
1e7726f2ce Fix shortening of string 2025-07-13 10:52:08 +02:00
d1821ae509 Fix translation for theorem 2025-07-13 10:47:02 +02:00
e2414dd7e2 [Docs] Add additional reference section 2025-07-06 11:04:38 +02:00
3d068ed36b Add sequences and limit shortcuts 2025-06-08 15:09:25 +02:00
785fd05a59 Add bold italic shortcut 2025-06-04 10:11:47 +02:00
6d48881dad Add new simple tcolorbox 2025-06-04 08:32:15 +02:00
2f14bb759d Fix issues 2025-06-04 08:11:10 +02:00
a687681316 Improve cheatsheet setup command 2025-05-13 16:57:30 +02:00
d2652d270e Fix naming for trigo function 2025-05-12 11:09:37 +02:00
377b7801e1 Add additional trigonometric functions 2025-05-12 10:41:19 +02:00
131372572f Add derivatives macros 2025-05-11 10:59:50 +02:00
d17f33bb76 Add additional font 2025-05-01 16:13:45 +02:00
3d9c9ddf5a Add indentation macro 2025-05-01 08:40:43 +02:00
7f6fc218c0 Add domain symbol shortcut 2025-04-18 10:59:14 +02:00
9dd134b1a5 Add irrational numbers shortcut 2025-04-18 08:08:05 +02:00
16586327d2 Add proven command 2025-04-03 09:20:57 +02:00
42ccf02808 Add new package 2025-04-01 19:01:50 +02:00
f2d2299e8b Improve formulas 2025-04-01 12:55:15 +02:00
58ca8acfeb Language handling improvements 2025-03-28 16:36:57 +01:00
d3b2c379b3 Add information on language selection 2025-03-28 16:26:49 +01:00
6e695d651b Add limit shortcut 2025-03-28 13:49:07 +01:00
fe3a0a5f62 Add new counter-based environments 2025-03-27 18:55:47 +01:00
7cf08f2c99 Add shortcut for expected value 2025-03-27 16:32:46 +01:00
cab909372f Fix incorrect docs for cheat sheet setup 2025-03-18 09:48:22 +01:00
0a2b1eb5ae Add spacing guidelines 2025-03-05 17:15:06 +01:00
4eb7b4881c Add new Tcolorbox template 2025-02-28 09:00:16 +01:00
ffe81249b0 Fix letters + improvements for them. More fixes to come 2025-02-20 13:34:33 +01:00
b8276dcf2f Update README.md 2025-02-03 12:15:54 +00:00
f288af7781 Fix parenthesis size for time complexity commands 2025-01-15 09:56:47 +01:00
f2cb7b6ef1 Add verbatim package 2025-01-10 15:06:21 +01:00
05ce1db257 Add more troubleshooting to the docs 2025-01-08 13:24:17 +01:00
ed2c9a80c3 Add new CS configs, update docs for that + troubleshooting guide 2025-01-08 11:53:22 +01:00
85ffdfdc68 Add new commands, docs still missing for some 2025-01-08 10:41:15 +01:00
f099566e8f Add more docs on extra commands 2025-01-07 18:40:16 +01:00
08369be70d Add more numbering options, update docs for that 2025-01-07 17:24:18 +01:00
61966ce867 Update README with project logo 2025-01-07 14:17:58 +01:00
a432064c15 Update readme 2025-01-07 14:08:51 +01:00
31 changed files with 520 additions and 141 deletions

View File

@@ -1,7 +1,25 @@
# LaTeX helpers <div id="title" align="center">
<img src="./assets/logo.jpg" width="300">
<h1>LaTeX Helper files</h1>
</div>
This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly. This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly.
See the docs [here](https://git.janishutz.com/janishutz/latex/src/branch/main/docs/main/docs.pdf) to get started.
# Getting started
See the docs [here](https://git.janishutz.com/janishutz/latex/src/branch/main/docs/docs.pdf) to get started.
# Recommended LaTeX editors
1. [TeX Studio](https://www.texstudio.org/)
2. [VSCode](https://code.visualstudio.com/) with LaTeX Workshop and LaTeX Utilities. You will need to have TeXLive installed (https://tug.org/texlive/)
3. [Neovim](https://neovim.io/) with the vimtex plugin and texlab installed
The editors are ordered in terms of ease of use and my personal preference list is exactly the other way round.
<div id="donate" align="center">
<a href="https://store.janishutz.com/donate" target="_blank"><img src="https://store-cdn.janishutz.com/static/support-me.jpg" width="150px"></a>
</div>
[LaTeX helper files](https://git.janishutz.com/janishutz/latex) © 2024 by [Janis Hutz](https://janishutz.com) is licensed under [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/) [LaTeX helper files](https://git.janishutz.com/janishutz/latex) © 2024 by [Janis Hutz](https://janishutz.com) is licensed under [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/)

BIN
assets/LaTeX_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
assets/logo.xcf Normal file

Binary file not shown.

View File

@@ -15,17 +15,23 @@
% Configure your address here % Configure your address here
\newcommand{\name}{Janis Hutz} \newcommand{\name}{Janis Hutz}
\newcommand{\street}{} \newcommand{\street}{Street}
\newcommand{\city}{} \newcommand{\city}{City}
\newcommand{\countrycode}{CH} \newcommand{\countrycode}{CH}
% Configure definition, lemma, theorem, etc numbering behaviour. 1 = Individual, 2 = Combined (apart from Definition), 3 = Combined % Configure definition, lemma, theorem, etc numbering behaviour. 1 = Individual, 2 = Combined (apart from Definition), 3 = Combined
\setcounter{numberingConfig}{1} \setcounter{numberingConfig}{1}
% Configure if for definitions, lemmas, etc, numbering should be (0) = <section>.<number> or (1) = <section>.<subsection>.<number> or (2) = <section>.<subsection>.<subsubsection>.<number>
\setcounter{numberSubsections}{0}
% Set the default language. % Set the default language.
\setLang{en} \setLang{en}
% Set the default command for theorem translation
\newcommand{\theoremde}{Satz}
% ----- % % ----- %
% STYLE % % STYLE %

1
dist/most.tex vendored
View File

@@ -1,4 +1,3 @@
\newcommand{\loadMost}{ \newcommand{\loadMost}{
\typeout{[CustomLaTeXHelperLoader]: Loaded most} \typeout{[CustomLaTeXHelperLoader]: Loaded most}
\input{\dir/dist/minimal.tex} \input{\dir/dist/minimal.tex}

Binary file not shown.

View File

@@ -32,4 +32,6 @@ You may also install the VSCode snippets found in the vscode-snippets folder. Th
\input{./parts/reference.tex} \input{./parts/reference.tex}
\input{./parts/troubleshooting.tex}
\end{document} \end{document}

View File

@@ -4,11 +4,14 @@
\begin{itemize} \begin{itemize}
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter} \item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
\item \textit{string}: Any normal text \item \textit{string}: Any normal text
\item \textit{math}: Any math input
\item \textit{number}: Any non-negative integer, i.e. no commas \item \textit{number}: Any non-negative integer, i.e. no commas
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor} \item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor}
\item \textit{langauge}: 2-character country code (currently only \texttt{de} and \texttt{en} supported)
\end{itemize} \end{itemize}
\subsection{Per-File config} \subsection{Per-File config}
\label{sec:perFileConf}
\begin{itemize} \begin{itemize}
\item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only \item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only
\item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only \item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only
@@ -16,7 +19,13 @@
\item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only \item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only
\item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only \item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only
\item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only \item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only
\item \verb|\renewcommand{\theoremde}|\{\textit{string}\} Change the translation for theorem in German (usually either ``Satz'' or ``Theorem'')
\item \verb|\setcounter{numberingConfig}|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 1 = Separately, 2 = Combined (except for definition), 3 = Combined, 4 = Off \item \verb|\setcounter{numberingConfig}|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 1 = Separately, 2 = Combined (except for definition), 3 = Combined, 4 = Off
\item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc.
0 = $<$section$>$.$<$number$>$,\\
1 = $<$section$>$.$<$subsection$>$.$<$number$>$,\\
2 = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$\\
Changing this won't affect all of numbering prior to the command, only after. You can change this setting (and the one above) at any point in the document
\item \verb|\setcounter{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors \item \verb|\setcounter{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors
\item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command \item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command
\item \verb|\setLang|\{\textit{language}\} Change the language. Will automatically load babel in German. Can only be used once and only at the start of the document or in the preamble, as repeated usage leads to undefined behaviour \item \verb|\setLang|\{\textit{language}\} Change the language. Will automatically load babel in German. Can only be used once and only at the start of the document or in the preamble, as repeated usage leads to undefined behaviour
@@ -26,13 +35,66 @@
\begin{itemize} \begin{itemize}
\item \verb|\load|\{\textit{scope}\} Load the selected \textit{scope} \item \verb|\load|\{\textit{scope}\} Load the selected \textit{scope}
\item \verb|\setup|\{\textit{string}\} Prepare the document with the \textit{string} being the title \item \verb|\setup|\{\textit{string}\} Prepare the document with the \textit{string} being the title
\item \verb|\setupExam|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title \item \verb|\setupCheatSheet|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title
\item \verb|\setupBarebones|\{\textit{string}\} Minimal setup, only borders and title set \item \verb|\setupBarebones|\{\textit{string}\} Minimal setup, only borders and title set
\item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}| \item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}|
\item \verb|\usetcolorboxes| Initialize tcolorboxes. In main body, if you want to use fancy boxes. (requires \texttt{most} or up) \item \verb|\usetcolorboxes| Initialize tcolorboxes. In main body, if you want to use fancy boxes. (requires \texttt{most} or up)
\item \verb|\translate|\{\textit{string}\}\{\textit{string}\} First \textit{string} is English, second \textit{string} is German. Switches automatically based on language selected \item \verb|\translate|\{\textit{string}\}\{\textit{string}\} First \textit{string} is English, second \textit{string} is German. Switches automatically based on language selected
\item \verb|\tr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate|
\end{itemize} \end{itemize}
\newpage
\subsection{Math-Commands}
All these have to be executed in the math environment.
\begin{itemize}
\item \verb|\R| Prints $\R$. Same goes for \verb|\C| printing $\C$, etc.
\item \verb|\floor|\{\textit{math}\} Round down symbol, e.g. $\floor{n}$
\item \verb|\ceil|\{\textit{math}\} Round up symbol, e.g. $\ceil{n}$
\item \verb|\hastoeq| or \verb|\mbeq| Has to equal symbol (non-standard), $\hastoeq$
\item \verb|\Leftrightarrowequiv| Equivalence transformation symbol, $\Leftrightarrowequiv$.
\item \verb|\Rightarrowequiv| Equivalence transformation symbol, $\Rightarrowequiv$.
\item \verb|\Leftarrowequiv| Equivalence transformation symbol, $\Leftarrowequiv$.
\item \verb|\defAs| Define as, i.e. $\defAs$
\item \verb|\defEquiv| Define as, but with a two-sided implication instead of equality, i.e. $\defEquiv$
\item \verb|\defImplies| Define as, but with one-sided implication, i.e. $\defImplies$
\item \verb|\divides| Divider or divides symbol, e.g. $a \divides b$
\item \verb|\lcm| Least common multiple, $\lcm$
\item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$
\item \verb|\arcosh| Inverse of hyperbolic cosine, $\arcosh$
\item \verb|\arctanh| Inverse of hyperbolic tangent, $\arctanh$
\item \verb|\limit|\{\textit{math}\}\{\textit{math}\} Shortened limit notation, $\displaystyle \limit{x}{x_0}$
\item \verb|\limni| Shortened limit notation for $n \rightarrow \infty$, $\displaystyle \limni$
\item \verb|\liminfni| Shortened limit inferior notation for $n \rightarrow \infty$, $\displaystyle \liminfni$
\item \verb|\limsupni| Shortened limit superior notation for $n \rightarrow \infty$, $\displaystyle \limsupni$
\item \verb|\der|\{\textit{math}\} Derivative, $\displaystyle \der{x}$
\item \verb|\dern|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \dern{x}{2}$
\end{itemize}
\subsection{CS-Commands}
These commands have to be executed outside the math environment.
\begin{itemize}
\item \verb|\timecomplexity| Prints the word time complexity with a coloured box.
\item \verb|\tc| Shorthand for \verb|\tct|. Deprecated
\item \verb|\tct| Time complexity in \tct{}-notation (average case)
\item \verb|\tco| Time complexity in \tco{}-notation (worst case / upper bound)
\item \verb|\tcl| Time complexity in \tcl{}-notation (best case / lower bound)
\end{itemize}
\fhlc{Aquamarine}{Algorithms}
\begin{minted}{latex}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
\State\Return "Hello World"
\EndProcedure
\end{algo}
\end{minted}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
\State\Return "Hello World"
\EndProcedure
\end{algo}
\newpage \newpage
\subsection{Style} \subsection{Style}
General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope} General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope}
@@ -44,6 +106,9 @@ General styling commands. All other commands, except these ones require at least
\item \verb|\fhlc|\{\textit{color}\}\{\textit{string}\} Print \fhlc{ForestGreen}{bold, underlined text in a coloured box} \item \verb|\fhlc|\{\textit{color}\}\{\textit{string}\} Print \fhlc{ForestGreen}{bold, underlined text in a coloured box}
\item \verb|\fhl|\{\textit{string}\} Print \fhl{bold, underlined text in a white box} \item \verb|\fhl|\{\textit{string}\} Print \fhl{bold, underlined text in a white box}
\item \verb|\printtoc|\{\textit{color}\} Print the table of contents (as seen on the first page). The normal \verb|\tableofcontents| still works as expected \item \verb|\printtoc|\{\textit{color}\} Print the table of contents (as seen on the first page). The normal \verb|\tableofcontents| still works as expected
\item \verb|\smallhspace| Prints a 2mm hspace
\item \verb|\mediumhspace| Prints a 5mm hspace
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
\end{itemize} \end{itemize}
\newpage \newpage
@@ -141,10 +206,9 @@ Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|
\newpage \newpage
\fhlc{Aquamarine}{Counter-enabled} \fhlc{Aquamarine}{Counter-enabled}
These ones also have a setting, namely, you can change the counter behaviour:\\ These ones also have two settings, namely, you can change the counter behaviour and the inclusion of subsections in the numbering. See \ref{sec:perFileConf}.
\verb|\setcounter{numberingConfig}|\{\textit{number}\}: Change the numbering of definitions, lemmas, etc for this document. 1 = Separately, 2 = Combined (except for definition), 3 = Combined, 4 = Off
Here, it is shown with the default setting, $1$, meaning they are numbered separately. See \ref{sec:counters} for a guide on how to change the current number. See \ref{sec:counters} for a guide on how to change the current number.
\begin{definition}[]{Title here} \begin{definition}[]{Title here}
\begin{minted}{latex} \begin{minted}{latex}
@@ -178,6 +242,22 @@ Here, it is shown with the default setting, $1$, meaning they are numbered separ
\end{minted} \end{minted}
\end{corollary} \end{corollary}
\begin{proposition}[]{Title here}
\begin{minted}{latex}
\begin{proposition}[]{Title here}
\end{proposition}
\end{minted}
\end{proposition}
\begin{fact}[]{Title here}
\begin{minted}{latex}
\begin{fact}[]{Title here}
\end{fact}
\end{minted}
\end{fact}
\begin{axiom}[]{Title here} \begin{axiom}[]{Title here}
\begin{minted}{latex} \begin{minted}{latex}
\begin{axiom}[]{Title here} \begin{axiom}[]{Title here}
@@ -242,6 +322,8 @@ See \ref{sec:counters} for a guide on how to change the current number.
\verb|\inlinetheorem| & \inlinetheorem \\ \verb|\inlinetheorem| & \inlinetheorem \\
\verb|\inlinelemma| & \inlinelemma \\ \verb|\inlinelemma| & \inlinelemma \\
\verb|\inlinecorollary| & \inlinecorollary \\ \verb|\inlinecorollary| & \inlinecorollary \\
\verb|\inlineproposition| & \inlineproposition \\
\verb|\inlinefact| & \inlinefact \\
\verb|\inlineaxiom| & \inlineaxiom \\ \verb|\inlineaxiom| & \inlineaxiom \\
\verb|\inlineproof| & \inlineproof \\ \verb|\inlineproof| & \inlineproof \\
\end{tables} \end{tables}
@@ -253,9 +335,38 @@ See \ref{sec:counters} for a guide on how to change the current number.
\verb|\shorttheorem| & \shorttheorem \\ \verb|\shorttheorem| & \shorttheorem \\
\verb|\shortlemma| & \shortlemma \\ \verb|\shortlemma| & \shortlemma \\
\verb|\shortcorollary| & \shortcorollary \\ \verb|\shortcorollary| & \shortcorollary \\
\verb|\shortproposition| & \shortproposition \\
\verb|\shortfact| & \shortfact \\
\verb|\shortaxiom| & \shortaxiom \\ \verb|\shortaxiom| & \shortaxiom \\
\verb|\shortproof| & \shortproof \\ \verb|\shortproof| & \shortproof \\
\end{tables} \end{tables}
\newpage
\fhlc{Aquamarine}{Inline (Named)}
\begin{tables}{ll}{Command & Output}
\verb|\fancyex|\{\textit{string}\} & \fancyex{Exercise} \\
\verb|\fancydef|\{\textit{string}\} & \fancydef{Definition} \\
\verb|\fancytheorem|\{\textit{string}\} & \fancytheorem{Theorem} \\
\verb|\fancylemma|\{\textit{string}\} & \fancylemma{Lemma} \\
\verb|\fancycorollary|\{\textit{string}\} & \fancycorollary{Corollary} \\
\verb|\fancyproposition|\{\textit{string}\} & \fancyproposition{Corollary} \\
\verb|\fancyfact|\{\textit{string}\} & \fancyfact{Fact} \\
\verb|\fancyaxiom|\{\textit{string}\} & \fancyaxiom{Axiom} \\
\verb|\fancyproof|\{\textit{string}\} & \fancyproof{Proof} \\
\end{tables}
\fhlc{Aquamarine}{Shortened (Named)}
\begin{tables}{ll}{Command & Output}
\verb|\compactex|\{\textit{string}\} & \compactex{Exercise} \\
\verb|\compactdef|\{\textit{string}\} & \compactdef{Definition} \\
\verb|\compacttheorem|\{\textit{string}\} & \compacttheorem{Theorem} \\
\verb|\compactlemma|\{\textit{string}\} & \compactlemma{Lemma} \\
\verb|\compactcorollary|\{\textit{string}\} & \compactcorollary{Corollary} \\
\verb|\compactproposition|\{\textit{string}\} & \compactproposition{Corollary} \\
\verb|\compactfact|\{\textit{string}\} & \compactfact{Fact} \\
\verb|\compactaxiom|\{\textit{string}\} & \compactaxiom{Axiom} \\
\verb|\compactproof|\{\textit{string}\} & \compactproof{Proof} \\
\end{tables}
\subsubsection{Changing the counters} \subsubsection{Changing the counters}

View File

@@ -0,0 +1,34 @@
\newsection
\section{Troubleshooting}
\subsection{Visual Errors}
\subsubsection{Missing headers \& footers}
You have most likely forgotten about \verb|\startDocument| after \verb|\begin{document}|, or you are using \verb|\setupbarebones| or \verb|\setupexams|.
You can easily distinguish from simply looking at the PDF. If the title is missing too, it's the first one, if it is there, it is most likely the second.
\subsubsection{Right box of guides tcolorbox is a weird title}
You have most likely forgotten about the second argument. Then, the first letter is removed from the body and used as the title.
\subsection{pgfkeys: Don't know mainboxstyle}
You have most likely forgotten about \verb|\usetcolorboxes| after \verb|\startDocument|.
\subsection{Undefined commands}
You have most likely loaded a too small \textit{scope}
\subsection{Lots of errors and no compile}
You have most likely selected a non-existant \textit{scope} in the \verb|\load| function. You can verify by searching the \texttt{<document name>.log} file for any mention of \texttt{INVALID CONFIG SPECIFIED, NOTHING LOADED!}
\subsection{Minted}
\texttt{minted} is a syntax highlighting library. It can cause issues when running, as it needs extra configuration for the compiler.
\subsubsection{You must invoke LaTeX with the -shell-escape flag}
You have set the \textit{scope} to \texttt{full}, which loads the \texttt{minted} package for code highlighting. You will need to configure your latex compiler to use \texttt{-shell-escape} if you want to use it. If you do not plan to use it, simply switch to a smaller \textit{scope}.
\subsubsection{You must have pygmentize installed}
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}

BIN
examples/letter/letter.pdf Normal file

Binary file not shown.

View File

@@ -0,0 +1,17 @@
\documentclass[12pt,a4paper]{scrlttr2}
\newcommand{\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!
\input{\dir/include.tex}
\load{letter}
% Subject
\setkomavar{subject}{Test}
\begin{document}\raggedright
\begin{letter}{Company \\ Name \\ Address \\ CH-Place}
\opening{Intro}
Test
\closing{Kind regards}
\end{letter}
\end{document}

View File

@@ -1,11 +1,10 @@
% Loader % Loader
\newcommand{\load}[1]{ \newcommand{\load}[1]{
\edef\recommended{recommended} \edef\recommended{recommended}
\edef\minimal{minimal} \edef\minimal{minimal}
\edef\most{most} \edef\most{most}
\edef\full{full} \edef\full{full}
\edef\letter{letter} \edef\letters{letter}
\edef\temp{#1} \edef\temp{#1}
\ifx \temp\recommended \ifx \temp\recommended
\typeout{[CustomLaTeXHelperLoader]: Loading config recommended} \typeout{[CustomLaTeXHelperLoader]: Loading config recommended}
@@ -27,11 +26,14 @@
\input{\dir/dist/full.tex} \input{\dir/dist/full.tex}
\loadFull \loadFull
\else \else
\ifx \temp\letter \ifx \temp\letters
\typeout{[CustomLaTeXHelperLoader]: Loading config letter} \typeout{[CustomLaTeXHelperLoader]: Loading config letter}
\input{\dir/dist/minimal.tex}
\loadMinimal
% \input{\dir/config/config.tex}
\input{\dir/dist/letter.tex} \input{\dir/dist/letter.tex}
\else \else
\typeout{[CustomLaTeXHelperLoader]: NO CONFIG SPECIFIED, NOTHING LOADED!} \typeout{[CustomLaTeXHelperLoader]: INVALID CONFIG SPECIFIED, NOTHING LOADED!}
\fi \fi
\fi \fi
\fi \fi

View File

@@ -34,6 +34,8 @@
\usepackage{ifthen} \usepackage{ifthen}
\usepackage[hidelinks]{hyperref} \usepackage[hidelinks]{hyperref}
\usepackage{enumitem} \usepackage{enumitem}
\usepackage{gensymb}
\usepackage{pifont}
% Language Switching. Currently only English and German are supported % Language Switching. Currently only English and German are supported
@@ -51,6 +53,7 @@
\ifx\lang\de \ifx\lang\de
\typeout{[Lang Switcher] Loading German} \typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2} \setcounter{lang}{2}
\input{\dir/main/lang/de}
\else \else
\typeout{[Lang Switcher] No such language!} \typeout{[Lang Switcher] No such language!}
\fi \fi
@@ -62,7 +65,6 @@
\typeout{[Lang Loader] Loaded English} \typeout{[Lang Loader] Loaded English}
}\else { }\else {
\typeout{[Lang Loader] Loaded German} \typeout{[Lang Loader] Loaded German}
\usepackage[ngerman]{babel}
\setcounter{lang}{2} \setcounter{lang}{2}
} }
\fi \fi
@@ -71,6 +73,7 @@
% Create config counters / variables. See the config file for changing them % Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig} \newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength} \newcounter{descriptorShadeStrength}
\newcounter{shadeStrength} \newcounter{shadeStrength}
@@ -107,7 +110,7 @@
} }
% Set up the latex document, only configuring the author, title and page size % Set up the latex document, only configuring the author, title and page size
\newcommand{\setupbarebones}[1]{ \newcommand{\setupBarebones}[1]{
\loadLang \loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}} \title{\Huge \textbf{#1}}
@@ -115,13 +118,32 @@
} }
% Set up the latex document for exam summaries (Extra wide body, small margins, no header) % Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupexams}[1]{ \newcommand{\setupCheatSheet}[1]{
\loadLang \loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28cm,includehead]{geometry} \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{#1} \title{\Huge \textbf{#1}}
\author{\authorTitle} \author{\authorTitle}
} }
% translate the document between two languages % ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi} \newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
\newcommand{\tr}[2]{\translate{#1}{#2}}
% ┌ ┐
% │ Translation aids (commonly used) │
% └ ┘
\newcommand{\trif}{\translate{if }{falls }}
\newcommand{\trIf}{\translate{If }{Falls }}
\newcommand{\trLet}{\translate{Let }{Sei }}
\newcommand{\trLets}{\translate{Let }{Seien }}
\newcommand{\trFor}{\translate{For }{Für }}
\newcommand{\trfor}{\translate{for }{für }}
\newcommand{\trand}{\translate{and }{und }}
\newcommand{\tror}{\translate{or }{oder }}
\newcommand{\trst}{\translate{s.t. }{s.d. }}
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
\newcommand{\trwith}{\translate{with }{mit }}

View File

@@ -8,10 +8,12 @@
\usepackage{algorithm} \usepackage{algorithm}
\usepackage{algpseudocodex} \usepackage{algpseudocodex}
\usepackage{setspace} \usepackage{setspace}
\usepackage{verbatim}
\newcommand{\Indent}{\hspace{\algorithmicindent}}
\newcommand{\timecomplexity}{\fhlc{orange}{\ifnum\value{lang}<2{Time complexity}\else {Laufzeit}\fi} \hspace{0.5em}} \newcommand{\timecomplexity}{\fhlc{orange}{\ifnum\value{lang}<2{Time complexity}\else {Laufzeit}\fi} \hspace{0.5em}}
\newcommand{\tc}[1]{\timecomplexity $\Theta (#1)$} \newcommand{\tc}[1]{\timecomplexity $\Theta\left(#1\right)$}
\newcommand{\tct}[1]{$\Theta (#1)$} \newcommand{\tct}[1]{$\Theta\left(#1\right)$}
\newcommand{\tco}[1]{$O(#1)$} \newcommand{\tco}[1]{$\mathcal{O}\left(#1\right)$}
\newcommand{\tcl}[1]{$\Omega(#1)$} \newcommand{\tcl}[1]{$\Omega\left(#1\right)$}

1
main/lang/de.tex Normal file
View File

@@ -0,0 +1 @@
\usepackage[ngerman]{babel}

View File

@@ -8,14 +8,14 @@
% ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄ % ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄
\renewcommand{\vec}[1]{\overrightarrow{#1}}
\renewcommand{\hat}[1]{\widehat{#1}}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\newcommand{\R}{\mathbb{R}} \newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}} \newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}} \newcommand{\C}{\mathbb{C}}
\newcommand{\Q}{\mathbb{Q}} \newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}} \newcommand{\Z}{\mathbb{Z}}
\newcommand{\I}{\mathbb{I}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\D}{\mathbb{D}}
\newcommand{\8}{\infty} \newcommand{\8}{\infty}
\newcommand{\dx}{\mbox{d}} \newcommand{\dx}{\mbox{d}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
@@ -26,8 +26,19 @@
\newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}} \newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}}
\newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}} \newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}}
\newcommand{\defAs}{\overset{\text{def}}{=}} \newcommand{\defAs}{\overset{\text{def}}{=}}
\newcommand{\der}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
\newcommand{\dern}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
\newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}} \newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}}
\newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}} \newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}}
\newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}} \newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
\newcommand{\mbeq}{\overset{!}{=}} \newcommand{\mbeq}{\overset{!}{=}}
\newcommand{\lcm}{\text{lcm}} \newcommand{\lcm}{\text{lcm}}
\newcommand{\limit}[2]{\lim_{#1 \rightarrow #2}}
\newcommand{\seq}[1]{(#1_n)_{n \geq 1}}
\newcommand{\ser}[2]{\sum_{k = 1}^{#2} #1_k}
\newcommand{\limni}{\limit{n}{\infty}}
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
\DeclareMathOperator\arctanh{arctanh}
\DeclareMathOperator\arccosh{arccosh}
\DeclareMathOperator\arcsinh{arcsinh}

View File

@@ -36,6 +36,10 @@ overlay={\node[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.
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
\newtcolorbox{task}[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{Task}{Aufgabe}};},#1}
% Proof % Proof
\newtcolorbox{proof}[2][]{mainboxstyle,colback=magenta!5!white,colframe=magenta!75!black,colbacktitle=magenta!75!black,title={\large #2},overlay={\node[overlaystyle,draw=magenta!75!black,fill=magenta!75!black] at (frame.north east) {\large \translate{Proof}{Beweis}};},#1} \newtcolorbox{proof}[2][]{mainboxstyle,colback=magenta!5!white,colframe=magenta!75!black,colbacktitle=magenta!75!black,title={\large #2},overlay={\node[overlaystyle,draw=magenta!75!black,fill=magenta!75!black] at (frame.north east) {\large \translate{Proof}{Beweis}};},#1}
@@ -43,3 +47,6 @@ overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.
% General % General
\newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, \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}

View File

@@ -5,6 +5,7 @@
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌ % ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀ % ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\usepackage{xstring}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters % tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemmas} \newcounter{lemmas}
\newcounter{definitions} \newcounter{definitions}
@@ -12,10 +13,17 @@
\newcounter{theorems} \newcounter{theorems}
\newcounter{axioms} \newcounter{axioms}
\newcounter{examples} \newcounter{examples}
\newcounter{facts}
\newcounter{propositions}
\newcounter{formulas}
\newcounter{all} \newcounter{all}
\newcommand{\usenumberArabic}[1]{\ifnum\value{numberingConfig}<4{\arabic{section}.\ifnum\value{numberingConfig}<3{\ifnum\value{numberingConfig}<2{\arabic{#1}\stepcounter{#1}}\else{ \newcommand{\definitions}{definitions}
\ifx#1definitions \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} \arabic{#1}\stepcounter{#1}
\else \else
\arabic{all}\stepcounter{all} \arabic{all}\stepcounter{all}
@@ -36,6 +44,9 @@
\setcounter{theorems}{1} \setcounter{theorems}{1}
\setcounter{axioms}{1} \setcounter{axioms}{1}
\setcounter{examples}{1} \setcounter{examples}{1}
\setcounter{facts}{1}
\setcounter{propositions}{1}
\setcounter{formulas}{1}
\setcounter{all}{1} \setcounter{all}{1}
} }
\newsectionNoPB \newsectionNoPB
@@ -46,36 +57,80 @@
% Theorems % Theorems
\newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2}, \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 Theorem \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}, \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}, \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}, \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}
% 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}
% Examples
\newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2}, \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}
% Inline environments (inline) % Inline environments (inline)
\newcommand{\inlineex}{\textbf{\translate{Example}{Beispiel} \usenumberArabic{examples}}} \newcommand{\inlineex}{\textbf{\translate{Example}{Beispiel} \usenumberArabic{examples}:}}
\newcommand{\inlinedef}{\bg{blue}{Definition \usenumberArabic{definitions}:}} \newcommand{\inlinedef}{\bg{blue}{Definition \usenumberArabic{definitions}:}}
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:}}
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:}} \newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:}}
\newcommand{\inlinetheorem}{\bg{ForestGreen}{Theorem \usenumberArabic{theorems}:}} \newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde} \usenumberArabic{theorems}:}}
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:}} \newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:}}
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:}} \newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:}}
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:}}
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition \usenumberArabic{propositions}:}}
\newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}} \newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced inline environments
\newcommand{\fancyex}[1]{\bg{gray}{\translate{Example}{Beispiel} \usenumberArabic{examples}:} \textit{(#1)}}
\newcommand{\fancydef}[1]{\bg{blue}{Definition \usenumberArabic{definitions}:} \textit{(#1)}}
\newcommand{\fancyformula}[1]{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:} \textit{(#1)}}
\newcommand{\fancylemma}[1]{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:} \textit{(#1)}}
\newcommand{\fancytheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde} \usenumberArabic{theorems}:} \textit{(#1)}}
\newcommand{\fancyaxiom}[1]{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:} \textit{(#1)}}
\newcommand{\fancycorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:} \textit{(#1)}}
\newcommand{\fancyfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:} \textit{(#1)}}
\newcommand{\fancyproposition}[1]{\bg{Cyan}{Proposition \usenumberArabic{propositions}:} \textit{(#1)}}
\newcommand{\fancyproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
% short environments (abbreviated) % short environments (abbreviated)
\newcommand{\shortex}{\textbf{\translate{Ex}{Bsp} \usenumberArabic{examples}}} \newcommand{\shortex}{\textbf{\translate{Ex}{Bsp} \usenumberArabic{examples}:}}
\newcommand{\shortdef}{\bg{blue}{D \usenumberArabic{definitions}:}} \newcommand{\shortdef}{\bg{blue}{D \usenumberArabic{definitions}:}}
\newcommand{\short}{\bg{red}{F \usenumberArabic{formulas}:}}
\newcommand{\shortlemma}{\bg{Aquamarine}{L \usenumberArabic{lemmas}:}} \newcommand{\shortlemma}{\bg{Aquamarine}{L \usenumberArabic{lemmas}:}}
\newcommand{\shorttheorem}{\bg{ForestGreen}{T \usenumberArabic{theorems}:}} \newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}} \usenumberArabic{theorems}:}}
\newcommand{\shortaxiom}{\bg{JungleGreen}{A \usenumberArabic{axioms}:}} \newcommand{\shortaxiom}{\bg{JungleGreen}{A \usenumberArabic{axioms}:}}
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K} \usenumberArabic{corollaries}:}} \newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K} \usenumberArabic{corollaries}:}}
\newcommand{\shortfact}{\bg{SeaGreen}{F \usenumberArabic{facts}:}}
\newcommand{\shortproposition}{\bg{Cyan}{P \usenumberArabic{propositions}:}}
\newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}} \newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced short environments (abbreviated)
\newcommand{\compactex}[1]{\bg{gray}{\translate{Ex}{Bsp} \usenumberArabic{examples}:} \textit{(#1)}}
\newcommand{\compactdef}[1]{\bg{blue}{D \usenumberArabic{definitions}:} \textit{(#1)}}
\newcommand{\compactformula}[1]{\bg{red}{F \usenumberArabic{formulas}:} \textit{(#1)}}
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{L \usenumberArabic{lemmas}:} \textit{(#1)}}
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}} \usenumberArabic{theorems}:} \textit{(#1)}}
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{A \usenumberArabic{axioms}:} \textit{(#1)}}
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{C}{K} \usenumberArabic{corollaries}:} \textit{(#1)}}
\newcommand{\compactfact}[1]{\bg{SeaGreen}{F \usenumberArabic{facts}:} \textit{(#1)}}
\newcommand{\compactproposition}[1]{\bg{Cyan}{P \usenumberArabic{propositions}:} \textit{(#1)}}
\newcommand{\compactproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}

View File

@@ -0,0 +1,25 @@
% ▄▄
% ▄▄█▀▀▀█▄█ ██ ▄█▀▀▀█▄█ ██
% ▄██▀ ▀█ ██ ▄██ ▀█
% ██▀ ▀ ▄██▀██▄▀████████▄█████▄ ▀████████▄▀███ ▀███ ██████ ▄▄█▀██▀███▄███ ▀███▄ ▄██▀██▀███ ▄▄█▀██▀████████▄ ▄██▀██ ▄▄█▀██
% ██ ██▀ ▀██ ██ ██ ██ ██ ▀██ ██ ██ ██ ▄█▀ ██ ██▀ ▀▀ ▀█████▄█▀ ██ ██ ▄█▀ ██ ██ ██ ██▀ ██ ▄█▀ ██
% ██▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀▀▀▀▀ ██ ▄ ▀███ ██ ██▀▀▀▀▀▀ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██ ██ ██ ▄██ ██ ██ ██ ██▄ ▄ ██ ██ ███▄ ▄ ██ ██▄ ▄ ██ ██ ██▄ ▄██▄ ▄
% ▀▀█████▀ ▀█████▀▄████ ████ ████▄ ██████▀ ▀████▀███▄ ▀████ ▀█████▀████▄ █▀█████▀ █████▀▄████▄ ▀█████▀████ ████▄█████▀ ▀█████▀
% ██
% ▄████▄
\usepackage{forest}
\tikzset{algpxIndentLine/.style={draw=lightgray}}
\algrenewcommand{\alglinenumber}[1]{#1}
\newenvironment{algo}[1]{
\begin{algorithm}
\begin{spacing}{1.2}
\caption{\textsc{#1}}
\begin{algorithmic}[1]
}{
\end{algorithmic}
\end{spacing}
\end{algorithm}
}

View File

@@ -4,7 +4,8 @@
% ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌ % ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌
% ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀ % ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀
% Math specific tcolorboxes % Replace some commonly used commands with better ones
\newtcolorbox{formula}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2}, \renewcommand{\vec}[1]{\overrightarrow{#1}}
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}};},#1} \renewcommand{\hat}[1]{\widehat{#1}}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\newcommand{\proven}{$\hspace{17cm}\square$}

View File

@@ -46,6 +46,7 @@
% -------------------- % % -------------------- %
\renewcommand{\footrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt}
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}} \newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
% Add a color shade (similar to \fhlc, but nicer boxes) % Add a color shade (similar to \fhlc, but nicer boxes)
\newcommand{\background}[3]{\tcbox[on line, \newcommand{\background}[3]{\tcbox[on line,
@@ -55,6 +56,7 @@
top=0pt, top=0pt,
bottom=0pt, bottom=0pt,
colframe=white, colframe=white,
frame empty,
colback=#1!#2!white, colback=#1!#2!white,
highlight math style={enhanced} highlight math style={enhanced}
] {\textbf{#3}}} ] {\textbf{#3}}}
@@ -75,6 +77,10 @@
% Add a colorbox around your text with the color specified. Text is bold and underlined % Add a colorbox around your text with the color specified. Text is bold and underlined
\newcommand{\fhlc}[2]{\textbf{\underline{\colorbox{#1}{#2}}}} \newcommand{\fhlc}[2]{\textbf{\underline{\colorbox{#1}{#2}}}}
% Spacing (horizontal)
\newcommand{\smallhspace}{\hspace{2mm}}
\newcommand{\mediumhspace}{\hspace{5mm}}
\newcommand{\largehspace}{\hspace{1cm}}
% ----------------- % % ----------------- %
% Table of contents % % Table of contents %

View File

@@ -123,6 +123,24 @@
], ],
"description": "Inserts a tcolorbox to inform about corollaries" "description": "Inserts a tcolorbox to inform about corollaries"
}, },
"Proposition": {
"prefix": "proposition",
"body": [
"\\begin{proposition}[]{$1}",
"\t$2",
"\\end{proposition}"
],
"description": "Inserts a tcolorbox to inform about propositions"
},
"Fact": {
"prefix": "fact",
"body": [
"\\begin{fact}[]{$1}",
"\t$2",
"\\end{fact}"
],
"description": "Inserts a tcolorbox to inform about facts"
},
"Terms": { "Terms": {
"prefix": "terms", "prefix": "terms",
"body": [ "body": [
@@ -167,6 +185,15 @@
"\\end{example}" "\\end{example}"
], ],
"description": "Inserts a tcolorbox to show example" "description": "Inserts a tcolorbox to show example"
},
"Task": {
"prefix": "task",
"body": [
"\\begin{task}[]{$1}",
"\t$2",
"\\end{task}"
],
"description": "Inserts a tcolorbox to show example"
}, },
"Usage": { "Usage": {
"prefix": "usage", "prefix": "usage",
@@ -204,6 +231,15 @@
], ],
"description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour" "description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour"
}, },
"Simple-Tcolorbox": {
"prefix": "simple-tcb",
"body": [
"\\begin{simplebox}[]{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
"\t$2",
"\\end{simplebox}"
],
"description": "Inserts a simple tcolorbox. No title, first argument the colour colour"
},
"Derivative": { "Derivative": {
"prefix": "derivative", "prefix": "derivative",
"body": [ "body": [
@@ -270,6 +306,30 @@
"\\shortcorollary" "\\shortcorollary"
] ]
}, },
"Proposition (inline)": {
"prefix": "proposition-inline",
"body": [
"\\inlineproposition"
]
},
"Proposition (short)": {
"prefix": "proposition-short",
"body": [
"\\shortproposition"
]
},
"Fact (inline)": {
"prefix": "fact-inline",
"body": [
"\\inlinefact"
]
},
"Fact (short)": {
"prefix": "fact-short",
"body": [
"\\shortfact"
]
},
"Axiom (inline)": { "Axiom (inline)": {
"prefix": "axiom-inline", "prefix": "axiom-inline",
"body": [ "body": [
@@ -354,7 +414,7 @@
"\\documentclass[12pt,a4paper]{scrlttr2}\n", "\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!", "\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}", "\\input{\\dir/include.tex}",
"\\load{recommended}\n", "\\load{letter}\n",
"% Subject", "% Subject",
"\\setkomavar{subject}{$1}", "\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright", "\\begin{document}\\raggedright",