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.
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/)

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
\newcommand{\name}{Janis Hutz}
\newcommand{\street}{}
\newcommand{\city}{}
\newcommand{\street}{Street}
\newcommand{\city}{City}
\newcommand{\countrycode}{CH}
% Configure definition, lemma, theorem, etc numbering behaviour. 1 = Individual, 2 = Combined (apart from Definition), 3 = Combined
\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.
\setLang{en}
% Set the default command for theorem translation
\newcommand{\theoremde}{Satz}
% ----- %
% STYLE %

4
dist/letter.tex vendored
View File

@@ -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}
}
}%

1
dist/most.tex vendored
View File

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

Binary file not shown.

View File

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

View File

@@ -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.
You can also include some the pre-built configs from the \texttt{dist/} folder.

View File

@@ -4,11 +4,14 @@
\begin{itemize}
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
\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{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}
\subsection{Per-File config}
\label{sec:perFileConf}
\begin{itemize}
\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
@@ -16,7 +19,13 @@
\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{\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{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{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
@@ -26,13 +35,66 @@
\begin{itemize}
\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|\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|\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|\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}
\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
\subsection{Style}
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|\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|\smallhspace| Prints a 2mm hspace
\item \verb|\mediumhspace| Prints a 5mm hspace
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
\end{itemize}
\newpage
@@ -141,10 +206,9 @@ Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|
\newpage
\fhlc{Aquamarine}{Counter-enabled}
These ones also have a setting, namely, you can change the counter behaviour:\\
\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
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}.
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{minted}{latex}
@@ -178,6 +242,22 @@ Here, it is shown with the default setting, $1$, meaning they are numbered separ
\end{minted}
\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{minted}{latex}
\begin{axiom}[]{Title here}
@@ -236,25 +316,56 @@ Here, it is shown with the default setting, $1$, meaning they are numbered separ
See \ref{sec:counters} for a guide on how to change the current number.
\fhlc{Aquamarine}{Inline}
\begin{tables}{ll}{Command & Output}
\verb|\inlineex| & \inlineex\\
\verb|\inlinedef| & \inlinedef\\
\verb|\inlinetheorem| & \inlinetheorem\\
\verb|\inlinelemma| & \inlinelemma\\
\verb|\inlinecorollary| & \inlinecorollary\\
\verb|\inlineaxiom| & \inlineaxiom\\
\verb|\inlineproof| & \inlineproof\\
\begin{tables}{ll}{Command & Output}
\verb|\inlineex| & \inlineex \\
\verb|\inlinedef| & \inlinedef \\
\verb|\inlinetheorem| & \inlinetheorem \\
\verb|\inlinelemma| & \inlinelemma \\
\verb|\inlinecorollary| & \inlinecorollary \\
\verb|\inlineproposition| & \inlineproposition \\
\verb|\inlinefact| & \inlinefact \\
\verb|\inlineaxiom| & \inlineaxiom \\
\verb|\inlineproof| & \inlineproof \\
\end{tables}
\fhlc{Aquamarine}{Shortened}
\begin{tables}{ll}{Command & Output}
\verb|\shortex| & \shortex\\
\verb|\shortdef| & \shortdef\\
\verb|\shorttheorem| & \shorttheorem\\
\verb|\shortlemma| & \shortlemma\\
\verb|\shortcorollary| & \shortcorollary\\
\verb|\shortaxiom| & \shortaxiom\\
\verb|\shortproof| & \shortproof\\
\begin{tables}{ll}{Command & Output}
\verb|\shortex| & \shortex \\
\verb|\shortdef| & \shortdef \\
\verb|\shorttheorem| & \shorttheorem \\
\verb|\shortlemma| & \shortlemma \\
\verb|\shortcorollary| & \shortcorollary \\
\verb|\shortproposition| & \shortproposition \\
\verb|\shortfact| & \shortfact \\
\verb|\shortaxiom| & \shortaxiom \\
\verb|\shortproof| & \shortproof \\
\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}
@@ -279,8 +390,8 @@ You can set up nice looking tables using the \texttt{booktab} and \texttt{tabula
\end{minted}
This outputs as
\begin{tables}{ll}{Left & Right}
Left content & Right Content\\
\begin{tables}{ll}{Left & Right}
Left content & Right Content \\
\end{tables}
This doesn't use the \texttt{table} environment, so no captions are possible, as to why there is also
@@ -318,4 +429,4 @@ Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossa
\subsubsection{Minted}
\textit{Included in \texttt{full}}
No extra configs or commands provided by this one, simply an import for minted. Be sure to enable \texttt{shell-escape} for your compiler!
No extra configs or commands provided by this one, simply an import for minted. Be sure to enable \texttt{shell-escape} for your compiler!

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}

View File

@@ -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.
If you are using the snippets, you can type \texttt{latex-letter} and press tab.

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

@@ -4,7 +4,7 @@
% | _ (| | _ \ | | / __ \ ) (
% | (_) ) | |_) ) | | ( ___// /\ \
% (____/(_)_ __/ (_) \____)_) (_)
% Configs if you want to use BibTeX. Not included in any default configs.
\newcommand{\setupBibtex}[1]{

View File

@@ -1 +1 @@
\usepackage{minted}
\usepackage{minted}

View File

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

View File

@@ -1,4 +1,4 @@
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
@@ -6,7 +6,7 @@
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
@@ -34,6 +34,8 @@
\usepackage{ifthen}
\usepackage[hidelinks]{hyperref}
\usepackage{enumitem}
\usepackage{gensymb}
\usepackage{pifont}
% Language Switching. Currently only English and German are supported
@@ -51,6 +53,7 @@
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\input{\dir/main/lang/de}
\else
\typeout{[Lang Switcher] No such language!}
\fi
@@ -60,17 +63,17 @@
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\usepackage[ngerman]{babel}
\setcounter{lang}{2}
}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
@@ -107,7 +110,7 @@
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupbarebones}[1]{
\newcommand{\setupBarebones}[1]{
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
@@ -115,13 +118,32 @@
}
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupexams}[1]{
\newcommand{\setupCheatSheet}[1]{
\loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28cm,includehead]{geometry}
\title{#1}
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% translate the document between two languages
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\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{algpseudocodex}
\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{\tc}[1]{\timecomplexity $\Theta (#1)$}
\newcommand{\tct}[1]{$\Theta (#1)$}
\newcommand{\tco}[1]{$O(#1)$}
\newcommand{\tcl}[1]{$\Omega(#1)$}
\newcommand{\tc}[1]{\timecomplexity $\Theta\left(#1\right)$}
\newcommand{\tct}[1]{$\Theta\left(#1\right)$}
\newcommand{\tco}[1]{$\mathcal{O}\left(#1\right)$}
\newcommand{\tcl}[1]{$\Omega\left(#1\right)$}

View File

@@ -6,7 +6,7 @@
% ██ ██ ██ ███ ██ ██▀▀▀▀▀▀ ███
% ██ ██ ██ ▀██ ██ ██▄ ▄ ▄█▀ ██▄
% ▄████▄████ ████▄ ▀████▀███▄ ▀█████▀██▄ ▄██▄
% For using index package
\newcommand{\prepareIndex}{

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

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

View File

@@ -6,16 +6,16 @@
% █ ██▄█▀ ██ ▄█████ ██ ██ ██
% █ ▀██▀ ██ ██ ██ ██ ██ ██
% ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄
\renewcommand{\vec}[1]{\overrightarrow{#1}}
\renewcommand{\hat}[1]{\widehat{#1}}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\I}{\mathbb{I}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\D}{\mathbb{D}}
\newcommand{\8}{\infty}
\newcommand{\dx}{\mbox{d}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
@@ -26,8 +26,19 @@
\newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}}
\newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}}
\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{\defImplies}{\overset{\text{def}}{\Rightarrow}}
\newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
\newcommand{\mbeq}{\overset{!}{=}}
\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

@@ -5,35 +5,39 @@
%▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
\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
\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
@@ -42,4 +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}

View File

@@ -5,6 +5,7 @@
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\usepackage{xstring}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemmas}
\newcounter{definitions}
@@ -12,14 +13,21 @@
\newcounter{theorems}
\newcounter{axioms}
\newcounter{examples}
\newcounter{facts}
\newcounter{propositions}
\newcounter{formulas}
\newcounter{all}
\newcommand{\usenumberArabic}[1]{\ifnum\value{numberingConfig}<4{\arabic{section}.\ifnum\value{numberingConfig}<3{\ifnum\value{numberingConfig}<2{\arabic{#1}\stepcounter{#1}}\else{
\ifx#1definitions
\arabic{#1}\stepcounter{#1}
\else
\arabic{all}\stepcounter{all}
\fi}\fi}\else{\arabic{all}\stepcounter{all}}\fi}\else{}\fi}
\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}
% Reset definition, lemma, etc counters, add a new page
@@ -36,6 +44,9 @@
\setcounter{theorems}{1}
\setcounter{axioms}{1}
\setcounter{examples}{1}
\setcounter{facts}{1}
\setcounter{propositions}{1}
\setcounter{formulas}{1}
\setcounter{all}{1}
}
\newsectionNoPB
@@ -46,36 +57,80 @@
% 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 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},
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}
% 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},
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)
\newcommand{\inlineex}{\textbf{\translate{Example}{Beispiel} \usenumberArabic{examples}}}
\newcommand{\inlineex}{\textbf{\translate{Example}{Beispiel} \usenumberArabic{examples}:}}
\newcommand{\inlinedef}{\bg{blue}{Definition \usenumberArabic{definitions}:}}
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:}}
\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{\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}:}}
% 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)
\newcommand{\shortex}{\textbf{\translate{Ex}{Bsp} \usenumberArabic{examples}}}
\newcommand{\shortex}{\textbf{\translate{Ex}{Bsp} \usenumberArabic{examples}:}}
\newcommand{\shortdef}{\bg{blue}{D \usenumberArabic{definitions}:}}
\newcommand{\short}{\bg{red}{F \usenumberArabic{formulas}:}}
\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{\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}:}}
% 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,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}

View File

@@ -4,7 +4,8 @@
% ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌
% ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀
% Math specific tcolorboxes
\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}};},#1}
% Replace some commonly used commands with better ones
\renewcommand{\vec}[1]{\overrightarrow{#1}}
\renewcommand{\hat}[1]{\widehat{#1}}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\newcommand{\proven}{$\hspace{17cm}\square$}

View File

@@ -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
}
}
}
@@ -46,18 +46,20 @@
% -------------------- %
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
\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,
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}}
@@ -75,6 +77,10 @@
% Add a colorbox around your text with the color specified. Text is bold and underlined
\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 %

View File

@@ -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}

View File

@@ -123,6 +123,24 @@
],
"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": {
"prefix": "terms",
"body": [
@@ -159,15 +177,24 @@
],
"description": "Inserts a tcolorbox to show notation"
},
"Example": {
"prefix": "example",
"body": [
"\\begin{example}[]{$1}",
"\t$2",
"\\end{example}"
],
"description": "Inserts a tcolorbox to show example"
},
"Example": {
"prefix": "example",
"body": [
"\\begin{example}[]{$1}",
"\t$2",
"\\end{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": {
"prefix": "usage",
"body": [
@@ -204,6 +231,15 @@
],
"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": {
"prefix": "derivative",
"body": [
@@ -270,6 +306,30 @@
"\\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)": {
"prefix": "axiom-inline",
"body": [
@@ -354,7 +414,7 @@
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{recommended}\n",
"\\load{letter}\n",
"% Subject",
"\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright",
@@ -366,4 +426,4 @@
"\\end{document}"
]
}
}
}