Compare commits

32 Commits

Author SHA1 Message Date
d03c9b9f4c [Old] Add back 2026-02-22 15:01:13 +01:00
1cb3f47217 [Examples] Delete 2026-02-22 15:01:10 +01:00
e1ab62ab1b [Docs] Update 2026-02-22 15:01:05 +01:00
1b9f0e516f [General] Fix some issues 2026-02-22 12:15:52 +01:00
d0541b4ce7 [Docs] Finish migration guide 2026-02-22 10:16:09 +01:00
2f12f17c4e [Docs] Start migration guide 2026-02-22 08:41:44 +01:00
4bfd6107b7 [Core] tocloft warning fixed 2026-02-21 18:07:50 +01:00
5012eb934d [Core] Try to fix tocloft warning 2026-02-21 18:06:09 +01:00
ee409a6dbe [Spacing] Add more changes 2026-02-21 17:45:28 +01:00
f4ae32c7e0 [Index] Add new command 2026-02-21 17:27:52 +01:00
c6d00748cd [General] Various fixes 2026-02-21 17:26:26 +01:00
28301eb82d [Snippets] Update 2026-02-21 17:11:23 +01:00
14e3825368 [Docs] Update 2026-02-21 16:57:56 +01:00
96739ec7eb Update colors 2026-02-21 16:47:44 +01:00
921f3447ba fix incorrect command 2026-02-21 16:42:45 +01:00
1f1e51b29c Fix issue with spacing, remove pipeline for now 2026-02-21 16:37:57 +01:00
37b3fb0bd2 revert 31e92b012b
revert [skip ci] Build helpers on push
2026-02-21 15:30:14 +00:00
Helpers compiler [bot]
31e92b012b [skip ci] Build helpers on push 2026-02-21 15:26:29 +00:00
baebaa99d0 Update docs (mostly), fixes, etc
Some checks failed
Update docs / build_docs (push) Has been cancelled
Update helpers / build_helpers (push) Successful in 25s
2026-02-21 16:24:21 +01:00
2a592753bf Update some old commands 2026-02-21 11:32:53 +01:00
2c37a724ee Add minted back 2026-02-20 18:28:34 +01:00
35bd979c98 Get working 2026-02-19 19:49:59 +01:00
b7b365dd36 Fix some errors 2026-02-19 18:27:43 +01:00
c4c0266fd8 Improve build 2026-02-19 18:07:27 +01:00
165dedfe30 Some more attempted fixes 2026-02-19 17:59:21 +01:00
36ced5e37a Some fixes 2026-02-19 17:21:10 +01:00
5fb9574af5 Add compile to tex file 2026-02-19 17:04:45 +01:00
811dc9f9eb Store to move back to normal tex files 2026-02-19 16:52:35 +01:00
201423b8a3 Add new labeller 2026-02-19 13:49:34 +01:00
354626cf88 Continue 2026-02-05 19:54:03 +01:00
a8a06cf62f Start reworking helpers 2026-02-05 09:12:17 +01:00
5b1b65b0d8 [Build] Some experimentation 2025-11-03 15:40:18 +01:00
76 changed files with 5282 additions and 1748 deletions

1
.gitignore vendored
View File

@@ -301,3 +301,4 @@ TSWLatexianTemp*
# Uncomment the next line to have this generated file ignored.
#*Notes.bib
__pycache__

View File

@@ -5,11 +5,11 @@
This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly.
# New import scheme
I have done some tweaks to support a new import scheme, making imports much more flexible
# Getting started
See the docs [here](https://git.janishutz.com/janishutz/latex/src/branch/main/docs/docs.pdf) to get started.

View File

@@ -1,58 +1,4 @@
#!/bin/sh
echo "
▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
█ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
█ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
█ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
█ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
█ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
█▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
==> Building <==
"
mkdir dist/
cat ./scopes/header.tex >>./dist/minimal.sty
# Build minimal scope
cat ./main/core.tex >>./dist/minimal.sty
echo "\n" >>./dist/minimal.sty
cat ./main/style/style.tex >>./dist/minimal.sty
echo "\n" >>./dist/minimal.sty
cat ./main/style/common.tex >>./dist/minimal.sty
# Build most
cat ./dist/minimal.sty >./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/math.tex >>./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/cs.tex >>./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/index.tex >>./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/style/counters.tex >>./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/style/cs.tex >>./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/style/math.tex >>./dist/most.sty
echo "\n" >>./dist/most.sty
cat ./main/style/language.tex >>./dist/most.sty
# Build recommended
cat ./dist/most.sty >./dist/recommended.sty
echo "\n" >>./dist/recommended.sty
cat ./extra/bib.tex >>./dist/recommended.sty
echo "\n" >>./dist/recommended.sty
cat ./extra/glossary.tex >>./dist/recommended.sty
# Build full
cat ./dist/recommended.sty >./dist/full.sty
echo "\n" >>./dist/full.sty
cat ./extra/minted.tex >>./dist/full.sty
# Copy letter
cp ./scopes/letter.tex ./dist/letter.sty
echo "==> Done"
cd build/
python build.py

61
build/build.py Normal file
View File

@@ -0,0 +1,61 @@
import os
from typing import List
import labels
import datetime
import sys
version = "1.0.1"
print("""
▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
█ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
█ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
█ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
█ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
█ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
█▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
""")
build_sty = False
try:
build_sty = sys.argv.index("sty") > -1
except:
pass
def load_all_files_of_array(dirname: str, files: List[str]):
data = ""
for filename in files:
with open(dirname + "/" + filename, "r") as file:
data += (file.read() + "\n\n").replace( 'RequirePackage', 'usepackage' )
return data
output = load_all_files_of_array("../src/", ["header.sty"])
if build_sty:
output += f"\\ProvidesPackage{{janishutz-helpers}}[{datetime.datetime.now().date().isoformat()} v{version}]\n\n"
output += load_all_files_of_array("../src/", ["core.sty"])
output += load_all_files_of_array("../config/", os.listdir("../config/"))
l = labels.generate_labels()
output += l[0] + "\n\n"
output += l[1]
output += load_all_files_of_array("../src/", ["style.sty"])
output += load_all_files_of_array("../src/core/", os.listdir("../src/core/"))
output += load_all_files_of_array("../src/counters/", os.listdir("../src/counters/"))
output += load_all_files_of_array("../src/style/", os.listdir("../src/style/"))
output += "\\endinput"
if not build_sty:
with open("../janishutz-helpers.tex", "w") as file:
file.write(output)
else:
with open("../janishutz-helpers.sty", "w") as file:
file.write(output)
print("==> Built successfully. Output to project-root/janishutz-helpers.tex\n")

63
build/labels.py Normal file
View File

@@ -0,0 +1,63 @@
# Auto-generate labels and version numbers
def generate_labels():
data = ""
reset_func = "\\newcommand{\\resetNumbering}{"
for label in [
"definition",
"example",
"theorem",
"lemma",
"corollary",
"proposition",
"axiom",
"fact",
"formula",
"remark",
"combined",
]:
data += f"\\newcounter{{{label}none}}\n"
reset_func += f"\n \\setcounter{{{label}none}}{{0}}\n"
data += f"\\newcounter{{{label}section}}[section]\n"
data += f"\\renewcommand{{\\the{label}section}}{{\\thesection.\\arabic{{{label}section}}}}\n"
reset_func += f" \\setcounter{{{label}section}}{{0}}\n"
data += f"\\newcounter{{{label}subsection}}[subsection]\n"
data += f"\\renewcommand{{\\the{label}subsection}}{{\\thesubsection.\\arabic{{{label}subsection}}}}\n"
reset_func += f" \\setcounter{{{label}subsection}}{{0}}\n"
data += f"\\newcounter{{{label}subsubsection}}[subsubsection]\n"
data += f"\\renewcommand{{\\the{label}subsubsection}}{{\\thesubsubsection.\\arabic{{{label}subsubsection}}}}\n"
reset_func += f" \\setcounter{{{label}subsubsection}}{{0}}\n"
data += f"\\newcounter{{{label}paragraph}}[paragraph]\n"
data += f"\\renewcommand{{\\the{label}paragraph}}{{\\theparagraph.\\arabic{{{label}paragraph}}}}\n"
reset_func += f" \\setcounter{{{label}paragraph}}{{0}}\n"
# Generate tcolorboxes
if label != "combined":
data += f"""\\newtcolorbox{{{label}}}[2][]{{
mainboxstyle,
colback={label}color!5!white,
colframe={label}color!75!black,
colbacktitle={label}color!75!black,
title={{\\large #2}},
overlay={{
\\node[overlaystyle,
draw={label}color!75!black,
fill={label}color!75!black
] at (frame.north east)
{{
\\large \\tr{{\\{label}NamingEN}}{{\\{label}NamingDE}}\\printLabel{{{label}}}
}};
}}, #1
}}\n\n"""
data += f"\\newcommand{{\\inline{label}}}[1][NONAME]{{\\inline[#1]{{{label}}}}}"
data += f"\\newcommand{{\\short{label}}}[1][NONAME]{{\\short[#1]{{{label}}}}}"
reset_func += "\n \\setcounter{table}{0}\n"
reset_func += " \\setcounter{figure}{0}\n"
reset_func += "}\n"
return data, reset_func

29
config/colors.sty Normal file
View File

@@ -0,0 +1,29 @@
% ┌ ┐
% │ Colours │
% └ ┘
% The colour-saturation of the short / inline descriptors (default = 40)
\setcounter{descriptorShadeStrength}{40}
% The colour-saturation of the shade command (default = 20)
\setcounter{shadeStrength}{20}
% You may also use \definecolor{<name>}{rgb}{r, g, b} to define a fully custom color
% see https://www.overleaf.com/learn/latex/Using_colors_in_LaTeX#Creating_your_own_colors for more information
\colorlet{definitioncolor}{blue}
\colorlet{theoremcolor}{ForestGreen}
\colorlet{lemmacolor}{Aquamarine}
\colorlet{corollarycolor}{teal}
\colorlet{axiomcolor}{JungleGreen}
\colorlet{factcolor}{SeaGreen}
\colorlet{propositioncolor}{Cyan}
\colorlet{examplecolor}{gray}
\colorlet{formulacolor}{red}
\colorlet{remarkcolor}{green}
\colorlet{proofcolor}{magenta}
\colorlet{intuitioncolor}{Emerald}
\colorlet{termcolor}{orange}
\colorlet{notationcolor}{Peach}
\colorlet{taskcolor}{gray}
\colorlet{usagecolor}{LimeGreen}
\colorlet{recallcolor}{yellow}
\colorlet{propertiescolor}{purple}

View File

@@ -1,44 +0,0 @@
% ___ ___
% ( _ \ / ___)_
% | ( (_) _ ___ | (__ (_) __
% | | _ / _ \/ _ \ __)| |/ _ \
% | (_( ) (_) ) ( ) | | | | (_) |
% (____/ \___/(_) (_)_) (_)\__ |
% ( )_) |
% \___/
% To be loaded *after* main/core.tex
% Configure your author name here
\newcommand{\authorTitle}{Janis Hutz\\\url{https://janishutz.com}}
\newcommand{\authorHeaders}{Janis Hutz}
% Configure your address here
\newcommand{\name}{Janis Hutz}
\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 %
% ----- %
% The colour-saturation of the short / inline descriptors (default = 40)
\setcounter{descriptorShadeStrength}{40}
% The colour-saturation of the shade command (default = 20)
\setcounter{shadeStrength}{20}

25
config/main.sty Normal file
View File

@@ -0,0 +1,25 @@
% ┌ ┐
% │ General config │
% └ ┘
% Configure your author name here
\newcommand{\authorTitle}{Janis Hutz\\\url{https://janishutz.com}}
\newcommand{\authorHeaders}{Janis Hutz}
% ┌ ┐
% │ Rendering │
% └ ┘
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
% - #1 is the name of the descriptor
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
% - #3 is the name passed (non-empty asserted)
\newcommand{\shortDescriptorTemplate}[3]{\bg{#1color}{\shortNamingTranslate{#1} #2} \textit{(#3)}}
\newcommand{\inlineDescriptorTemplate}[3]{\bg{#1color}{\namingTranslate{#1} #2}: \textit{(#3)}}
% These are used if no name is provided and argument #4 from above is the missing argument
\newcommand{\anonymousShortDescriptorTemplate}[2]{\bg{#1color}{\shortNamingTranslate{#1} #2}\ }
\newcommand{\anonymousInlineDescriptorTemplate}[2]{\bg{#1color}{\namingTranslate{#1} #2}\ }
% background command config (draws a small box around the content)
\newcommand{\backgroundPadding}{2pt}
\newcommand{\backgroundRounding}{1pt}

81
config/naming.sty Normal file
View File

@@ -0,0 +1,81 @@
% ┌ ┐
% │ Naming │
% └ ┘
% Here you may specify how each descriptor is named
\newcommand{\definitionNamingEN}{Definition}
\newcommand{\theoremNamingEN}{Theorem}
\newcommand{\lemmaNamingEN}{Lemma}
\newcommand{\corollaryNamingEN}{Corollary}
\newcommand{\axiomNamingEN}{Axiom}
\newcommand{\factNamingEN}{Fact}
\newcommand{\propositionNamingEN}{Proposition}
\newcommand{\exampleNamingEN}{Example}
\newcommand{\formulaNamingEN}{Formula}
\newcommand{\remarkNamingEN}{Remark}
\newcommand{\proofNamingEN}{Proof}
\newcommand{\intuitionNamingEN}{Intuition}
\newcommand{\termNamingEN}{Term}
\newcommand{\notationNamingEN}{Notation}
\newcommand{\taskNamingEN}{Task}
\newcommand{\usageNamingEN}{Usage}
\newcommand{\recallNamingEN}{Recall}
\newcommand{\propertiesNamingEN}{Properties}
\newcommand{\definitionNamingDE}{Definition}
\newcommand{\theoremNamingDE}{Theorem}
\newcommand{\lemmaNamingDE}{Lemma}
\newcommand{\corollaryNamingDE}{Korollar}
\newcommand{\axiomNamingDE}{Axiom}
\newcommand{\factNamingDE}{Fakt}
\newcommand{\propositionNamingDE}{Satz}
\newcommand{\exampleNamingDE}{Beispiel}
\newcommand{\formulaNamingDE}{Formel}
\newcommand{\remarkNamingDE}{Bemerkung}
\newcommand{\proofNamingDE}{Beweis}
\newcommand{\intuitionNamingDE}{Intuition}
\newcommand{\termNamingDE}{Begriff}
\newcommand{\notationNamingDE}{Notation}
\newcommand{\taskNamingDE}{Aufgabe}
\newcommand{\usageNamingDE}{Nutzung}
\newcommand{\recallNamingDE}{Repetition}
\newcommand{\propertiesNamingDE}{Eigenschaften}
% Specify here what they should be shortened to
\newcommand{\definitionShortNamingEN}{D}
\newcommand{\theoremShortNamingEN}{T}
\newcommand{\lemmaShortNamingEN}{L}
\newcommand{\corollaryShortNamingEN}{C}
\newcommand{\axiomShortNamingEN}{A}
\newcommand{\factShortNamingEN}{F}
\newcommand{\propositionShortNamingEN}{P}
\newcommand{\exampleShortNamingEN}{E}
\newcommand{\formulaShortNamingEN}{F}
\newcommand{\remarkShortNamingEN}{R}
\newcommand{\proofShortNamingEN}{Proof}
\newcommand{\intuitionShortNamingEN}{Intuition}
\newcommand{\termShortNamingEN}{Term}
\newcommand{\notationShortNamingEN}{Not.}
\newcommand{\taskShortNamingEN}{Task}
\newcommand{\usageShortNamingEN}{Usage}
\newcommand{\recallShortNamingEN}{Recall}
\newcommand{\propertiesShortNamingEN}{P}
\newcommand{\definitionShortNamingDE}{D}
\newcommand{\theoremShortNamingDE}{T}
\newcommand{\lemmaShortNamingDE}{L}
\newcommand{\corollaryShortNamingDE}{K}
\newcommand{\axiomShortNamingDE}{A}
\newcommand{\factShortNamingDE}{F}
\newcommand{\propositionShortNamingDE}{S}
\newcommand{\exampleShortNamingDE}{Bsp}
\newcommand{\formulaShortNamingDE}{F}
\newcommand{\remarkShortNamingDE}{B}
\newcommand{\proofShortNamingDE}{Bew.}
\newcommand{\intuitionShortNamingDE}{Int.}
\newcommand{\termShortNamingDE}{Begriff}
\newcommand{\notationShortNamingDE}{Not.}
\newcommand{\taskShortNamingDE}{Aufg.}
\newcommand{\usageShortNamingDE}{Nutz.}
\newcommand{\recallShortNamingDE}{Rep.}
\newcommand{\propertiesShortNamingDE}{E}

37
config/numbering.sty Normal file
View File

@@ -0,0 +1,37 @@
% ┌ ┐
% │ Numbering │
% └ ┘
% Set a preset, can be combined, separate or off.
% If set to custom, all type specific commands need to be set below.
\newcommand{\numberingpreset}{combined}
% Specify how elements are to be numbered. Can be (X is the current number of the element):
% - none (X)
% - section (section.X)
% - subsection (section.subsection.X)
% - subsubsection (section.subsection.subsubsection.X)
% - paragraph (section.subsection.subsubsection.paragraph.X)
\newcommand{\subsectionnumbering}{subsection}
% Set for a specific type. Can each be combined, separate, default or off:
% If set to anything but 'default', it will override the overarching style
% set by \numberingpreset
\newcommand{\definitionnumbering}{default}
\newcommand{\theoremnumbering}{default}
\newcommand{\lemmanumbering}{default}
\newcommand{\corollarynumbering}{default}
\newcommand{\axiomnumbering}{default}
\newcommand{\factnumbering}{default}
\newcommand{\propositionnumbering}{default}
\newcommand{\examplenumbering}{default}
\newcommand{\formulanumbering}{default}
\newcommand{\remarknumbering}{default}
\newcommand{\proofnumbering}{default}
\newcommand{\intuitionnumbering}{default}
\newcommand{\termnumbering}{default}
\newcommand{\notationnumbering}{default}
\newcommand{\tasknumbering}{default}
\newcommand{\usagenumbering}{default}
\newcommand{\recallnumbering}{default}
\newcommand{\propertiesnumbering}{default}

Binary file not shown.

View File

@@ -1,79 +1,57 @@
\documentclass{article}
\newcommand{\dir}{~/projects/latex}
\input{\dir/include.tex}
\load{full}
\input{../janishutz-helpers.tex}
\setup{Docs - \LaTeX \hspace{0mm} helpers}
\setLang{en}
\begin{document}
\startDocument
\usetcolorboxes
\vspace{4cm}
% ── Title page ──────────────────────────────────────────────────────
\vspace{2cm}
\begin{center}
\includegraphics[width=0.5\linewidth]{../assets/logo.jpg}
\end{center}
\vspace{5cm}
\begin{center}
\begin{Large}
\textsc{Usage guide for Version 2.0.0}
\end{Large}
\hlurl{https://git.janishutz.com/janishutz/latex}
\end{center}
% ── Table of contents ───────────────────────────────────────────────
\newpage
\printtoc{Aquamarine}
\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.
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}.
\section{Breaking Changes}
Please note that the regex provided below are for NeoVim and you may need to replace \verb|\(\)| with \verb|()|
\subsection{Time complexity}
The timecomplexity commands have been updated to require math environment. You can use the following regex to fix them
\verb|/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g| (execute first)\\
and \verb|/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g|
\subsection{Labels \& Environments}
The counter environments can now be referenced (see \ref{sec:counters}).
Due to the new requirements set out by that addition, it is now no longer possible to manually update the counters using
\verb|\setcounter|.
Use the below regex to replace all occurrences of \verb|\setcounter| with the new format.
Please note that this will overwrite \textit{all} occurrences of \verb|\setcounter| with the specific old format with \verb|\setLabelNumber|:
\verb|/\\setcounter{\(.*\)s}/\\setLabelNumber{\1}/g| and \verb|/\\setcounter{all}/\\setLabelNumber{all}/g|
and for the \verb|\stepcounter| as well
\verb|/\\stepcounter{\(.*\)s}/\\stepLabelNumber{\1}| and \verb|/\\stepcounter{all}/\\stepLabelNumber{all}/g|.
\section{Installation}
You can install these helper files by downloading this repo and storing it to any location on your PC, remembering where that location is.
You may also install the VSCode snippets found in the vscode-snippets folder. These snippets provide autocompletion for many of the commands that this helper file provides.
\input{./parts/usage.tex}
\input{./parts/custom-loader.tex}
% ┌ ┐
% │ Reference
% │ Imports
% └ ┘
\input{./parts/intro.tex}
\input{./parts/usage.tex}
\input{./parts/migration.tex}
% ── Reference ───────────────────────────────────────────────────────
\input{./parts/reference/intro.tex}
\input{./parts/reference/loading.tex}
\input{./parts/reference/math.tex}
\input{./parts/reference/cs.tex}
\input{./parts/reference/style/intro.tex}
\input{./parts/reference/style/spacing.tex}
\input{./parts/reference/style/tcolorbox/default.tex}
\input{./parts/reference/style/tcolorbox/counter.tex}
\input{./parts/reference/style/tcolorbox/other.tex}
\input{./parts/reference/style/descriptors.tex}
\input{./parts/reference/tables-index.tex}
\input{./parts/reference/extras.tex}
\input{./parts/troubleshooting.tex}
\end{document}

View File

@@ -1,6 +0,0 @@
\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.
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.

23
docs/parts/intro.tex Normal file
View File

@@ -0,0 +1,23 @@
\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.
There are quite a lot of configuration options, but it is likely that more are to come in the future.
If you have any suggestions as to what should be added, don't hesitate to open a \hlhref{https://support.janishutz.com?a=add}{support ticket}\
or contacting me via email to \texttt{development@janishutz.com}.
If you are fairly new to \LaTeX, then you may find \texttt{Detextify} (or the iOS app \texttt{DeTeXt}) very handy.
There you can draw a symbol and it tells you how to typeset the symbol in \LaTeX
\section{Breaking Changes}
The current version is almost entirely incompatible with Version 1.X and you should familiarize yourself with the new commands.
The docs contain a section (section \ref{sec:migration}) on migrating from V1.X to V2.X
\section{Installation}
You can install these helper files by downloading this repo and storing it to any location on your PC, remembering where that location is.
You may also install the VSCode snippets found in the vscode-snippets folder. These snippets provide autocompletion for many of the commands that this helper file provides.

30
docs/parts/migration.tex Normal file
View File

@@ -0,0 +1,30 @@
\newpage
\section{Migration from janishutz-helpers V1.X}
\label{sec:migration}
The updated helpers do not feature scopes anymore.
You can continue using the old helpers, simply check out the \texttt{v1} branch, using \texttt{git checkout v1}.
To switch back to the latest version, run \texttt{git checkout main}.
Alternatively, you can change one line: The input line should point to \texttt{<repo>/old/janishutz-helpers-v1.tex}
\begin{enumerate}
\item Update the import path to \texttt{/path/to/helpers/janishutz-helpers.tex}
\item If you don't plan to change the design of your cheat sheet, then replace \verb|\setupCheatSheet|\{\textit{string}\} with \verb|\setupCheatSheet[false]|\{\textit{string}\}
\item Remove \verb|\usetcolorboxes| if it was used (now integrated into \verb|\startDocument|)
\item Replace any \verb|\setNumberingStyle|\{\textit{number}\} with \verb|\setnumberingpreset|\{\textit{preset}\} (see \ref{sec:perFileConf})
\item Replace any \verb|\setSubsectionNumbering|\{\textit{number}\} with \verb|\setsubsectionnumbering|\{\textit{preset}\}
\item Remove any \verb|\drmvspace| and the like, they have been deprecated. \verb|\rmvspace|[\textit{number}] is still around, but only for edge cases,
where the \texttt{Xverticalspacing} (\texttt{X} can be replaced with \texttt{no}, \texttt{small}, \texttt{medium} or \texttt{large}) commands don't do a good enough job.
\item \verb|\fhlc| and \verb|\fhl| have been removed. The closes replacement is \verb|\shade|.
\item Environments \texttt{remarks}, \texttt{conjugation}, \texttt{forms} and \texttt{guides} have been removed
\item All descriptors no longer automatically have a label attached to them.
If you want to make a label \texttt{ref}able, then use \verb|\labeledShort|, or \verb|\labeledInline|, respectively (see \ref{sec:counter-ref}).
\item The descriptors \verb|\shortdef| and \verb|\shortex| have been renamed to \verb|\shortdefinition| and \verb|\shortexample| (same for the inline versions)
\item The descriptors \verb|\fancyY| and \verb|\compactY| (where Y is a type like \texttt{definition}) have been removed
and you can now use an optional argument on the descriptors. See \ref{sec:descriptors}
\item The deprecated \verb|\tc| and \verb|\timecomplexity| commands have been removed.
\item Was not mentioned, but was already possible, is to import code from a source code file. See \ref{sec:minted}
\item \verb|\der|, \verb|\parder|, etc. have been renamed to \verb|\diff|, \verb|\pardiff|, etc
\item \verb|\divides| has been renamed \verb|\divider|
\item \verb|\seq| and \verb|\ser| have been renamed \verb|\sequence| and \verb|\series| resepctively
\end{enumerate}

View File

@@ -1,9 +1,7 @@
\newpage
\subsection{CS-Commands}
These commands have to be executed inside math environment, except \verb|\timecomplexity| and \verb|\tc|.
These commands have to be executed inside 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)
@@ -16,7 +14,7 @@ These commands have to be executed inside math environment, except \verb|\timeco
\item \verb|\alphabetbool| Prints $\alphabetbool$
\end{itemize}
\fhlc{Aquamarine}{Algorithms}
\subsubsection{Algorithms}
\begin{minted}{latex}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
@@ -30,3 +28,41 @@ These commands have to be executed inside math environment, except \verb|\timeco
\State\Return "Hello World"
\EndProcedure
\end{algo}
\subsubsection{Code}
\label{sec:minted}
If you get compilation errors, be sure to enable \texttt{-shell-escape} for your compiler.
\textit{(Note: Some newer versions of LaTeX do no longer require this and it is better to keep it turned off for security reasons, if it works without)}!
\paragraph{Code inlined in tex file}
\begin{minted}{latex}
\begin{code}{language}
//Code goes here
\end{code}
\end{minted}
This is nothing different than a wrapper for a minted environment with a box drawn around it.
Example (in python):
\begin{code}{python}
def hello_world():
print("hello world!")
\end{code}
\paragraph{Code in separate files}
It is also possible to load code from a source file using the provided commands:
\begin{itemize}
\item \verb|\inputcode|\{\textit{language}\}\{\textit{file}\}, where \textit{language} is the programming language
and \textit{file} is the file name of the file to be loaded, relative to the main tex file.
\item \verb|\inputcodewithfilename|\{\textit{language}\}\{\textit{hidden-path}\}\{\textit{shown-path}\}, where \textit{language} is the programming language,
\textit{hidden-path} is the part of the path you want to hide of the file to be loaded, relative to the main tex file
and \textit{shown-path} is the displayed part.
\end{itemize}
\inlineexample
\begin{minted}{latex}
\inputcodewithfilename{python}{/start/of/path}{/shown/path/file.py}
\end{minted}

View File

@@ -1,42 +1,9 @@
\newpage
\subsection{Extras}
\subsubsection{BibTeX}
\textit{Included in \texttt{recommended} and up}
\subsection{BibTeX}
Use \verb|\setupBiber|\{\textit{/path/to/your/bib/sources.bib file}\} in the preamble to prepare, then use \verb|\printbib| to print your bibliography.
To add more sources, simply use bibter's built-in macro \verb|\addbibresource|\textit{\{filepath\}}, which will load your \texttt{.bib} file.
You need to use that inside the preamble as well.
\subsubsection{Glossary}
\textit{Included in \texttt{recommended} and up}
\subsection{Glossary}
Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossary commands to add entries to the glossary. When you want to print it, use \verb|\printGlossary|.
\subsubsection{Minted}
\textit{Included in \texttt{full}}
Be sure to enable \texttt{-shell-escape} for your compiler
\textit{(Note: Some newer versions of LaTeX do no longer require this and it is better to keep it turned off for security reasons, if it works without)}!
When \texttt{minted} is available via these helpers, you will also have access to the \texttt{code} environment:
\begin{minted}{latex}
\begin{code}{language}
//Code goes here
\end{code}
\end{minted}
This is nothing different than a wrapper for a minted environment with a box drawn around it.
Example (in python):
\begin{code}{python}
def hello_world():
print("hello world!")
\end{code}
If you want to print code inline, use \verb|\inlinecode|\textit{\{string\}}, which renders to \inlinecode{code}.
\textit{Caveat: This is not using the \texttt{verbatim} environment due to various limitations of that environment and instead is simply using} \verb|\texttt{}|, so you cannot use this to print \LaTeX-commands

View File

@@ -2,11 +2,10 @@
\section{Full Command Reference}
\subsection{Variables}
\begin{itemize}
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
\item \textit{string}: Any normal text
\item \textit{boolean}: \texttt{true} or \texttt{false}
\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)
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor} or as defined in the color config file
\end{itemize}

View File

@@ -3,37 +3,54 @@
\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
\item \verb|\renewcommand{\<descriptor>NamingDE}|\{\textit{string}\} Configure translations for descriptors on the fly (for DE)
\item \verb|\renewcommand{\<descriptor>NamingEN}|\{\textit{string}\} Configure translations for descriptors on the fly (for EN)
\item \verb|\setnumberingpreset|\{\textit{string}\}
Change the numbering preset of definitions, lemmas, etc for this document.
Value can be \texttt{off}, \texttt{separate}, \texttt{combined}.
\item \verb|\renewcommand{<descriptor>numbering}|\{\textit{string}\}
Change the numbering for an individual descriptor, passed as first argument.
The second value can be \texttt{off}, \texttt{separate}, \texttt{combined} or \texttt{default}.
If set to \texttt{default}, it will follow the \verb|\numberingpreset| setting.
If you do not override it here, it will follow your global config as set in the config directory
and if unset there, it will follow the \verb|\numberingpreset| setting.
\item \verb|\renew|\{\textit{string}\} Change the format of the numbering of definitions, etc.
The value can be set to any of the below
\begin{itemize}[noitemsep]
\item none = $<$section$>$.$<$number$>$
\item section = $<$section$>$.$<$number$>$
\item subsection = $<$section$>$.$<$subsection$>$.$<$number$>$
\item subsubsection = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$
\item paragraph = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$paragraph$>$.$<$number$>$
\end{itemize}
Changing this won't affect all of numbering prior to the command, only after. You can change this setting (and the ones 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|\loadGerman| Load german configuration. Needs to be in preamble and you may only use it once
\item To change the font for the entire document, load the font package using \verb|\usepackage|, with the last occurrence of a font package determining the active one.
Then select the type by using \verb|\setFontType|\textit{\{mono $|$ serif $|$ sans\}}.
A list of fonts is available \color{Cyan}\href{https://www.overleaf.com/learn/latex/Font_typefaces#Reference_guide}{here}\color{black}.
You may change the font only for a specific section, by enclosing \verb|\setFont| and the text that should be written in said typeface in curly braces.
\end{itemize}
\subsubsection{Letters}
\begin{itemize}
\item \verb|\renewcommand{\name}|\{\textit{string}\} Change the name (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{\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|\setNumberingStyle|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 0 = off, 1 = Separately, 2 = Combined (except for definition), 3 = Combined
\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
\item To change the font for the entire document, load the font package using \verb|\usepackage|, with the last occurrence of a font package determining the active one.
Then select the type by using \verb|\setFontType|\textit{\{mono $|$ serif $|$ sans\}}.
A list of fonts is available \color{Cyan}\href{https://www.overleaf.com/learn/latex/Font_typefaces#Reference_guide}{here}\color{black}.
You may change the font only for a specific section, by enclosing \verb|\setFont| and the text that should be written in said typeface in curly braces.
\end{itemize}
\newpage
\subsection{Setup, Loading \& Translation}
\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|\setupCheatSheet|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title
\item \verb|\setupCheatSheet|[\textit{boolean}]\{\textit{string}\} Prepare the document with smaller borders and no headers / footers.
The mandatory argument is the title, the optional argument will, if set to \texttt{true} use a landscape layout (default)
and a horizontal layout if set to \texttt{false}.
\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|
\item \verb|\numberingOn| Turn on the numbering (will set back to config previously set by \verb|\setNumberingStyle|)
\item \verb|\numberingOff| Turn off the numbering (if you want to temporarily not use it. Do not use \verb|\setNumberingStyle| for that)
\item \verb|\numberingOn| Turn on the numbering (if previously turned off using \verb|\numberingOff| or set in the config)
\item \verb|\numberingOff| Turn off the numbering (useful to temporarily turn off numbering)
\end{itemize}

View File

@@ -5,14 +5,13 @@ All these have to be executed in the math environment.
\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|\divider| Divider or divides symbol, e.g. $a \divider b$
\item \verb|\lcm| Least common multiple, $\lcm$
\item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$
\item \verb|\arccosh| Inverse of hyperbolic cosine, $\arccosh$
@@ -21,8 +20,12 @@ All these have to be executed in the math environment.
\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}$
\item \verb|\diff|\{\textit{math}\} Derivative, $\displaystyle \diff{x}$
\item \verb|\diffn|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \diffn{x}{2}$
\item \verb|\pardiff|\{\textit{math}\} Partial derivative, $\displaystyle \pardiff{x}$
\item \verb|\pardiffn|\{\textit{math}\}\{\textit{math}\} Higher partial derivative, $\displaystyle \pardiffn{x}{2}$
\item \verb|\sequence|\{\textit{math}\} Sequence, $\sequence{x}$
\item \verb|\series|\{\textit{math}\}\{\textit{math}\} Series, prints \verb|\series{x}{2x}| as, $\series{x}{2x}$
\item \verb|\elementstack|\{\textit{math}\}\{\textit{math}\} Stack two elements on top of eachother. Uses \verb|\genfrac| under the hood.
Can be used for example in limits as an alternative to \verb|\atop| or \verb|\substack|.
\end{itemize}

View File

@@ -1,13 +1,16 @@
\newpage
\subsubsection{Inline \& Shortened descriptors}
\textit{Included in \texttt{most} and up}
\label{sec:descriptors}
See \ref{sec:counters} for a guide on how to change the current number.
\fhlc{Aquamarine}{Inline}
The signature is \verb|\inlinedefinition|[\textit{description}], where the description is optional (and if you omit it, don't write the square brackets!)
Alternatively, you can use \verb|\inline[desc]{definition}|.
\paragraph{Inline}
\begin{tables}{ll}{Command & Output}
\verb|\inlineex| & \inlineex \\
\verb|\inlinedef| & \inlinedef \\
\verb|\inlineexample| & \inlineexample \\
\verb|\inlinedefinition| & \inlinedefinition \\
\verb|\inlinetheorem| & \inlinetheorem \\
\verb|\inlinelemma| & \inlinelemma \\
\verb|\inlinecorollary| & \inlinecorollary \\
@@ -18,10 +21,10 @@ See \ref{sec:counters} for a guide on how to change the current number.
\verb|\inlineproof| & \inlineproof \\
\end{tables}
\fhlc{Aquamarine}{Shortened}
\paragraph{Shortened}
\begin{tables}{ll}{Command & Output}
\verb|\shortex| & \shortex \\
\verb|\shortdef| & \shortdef \\
\verb|\shortexample| & \shortexample \\
\verb|\shortdefinition| & \shortdefinition \\
\verb|\shorttheorem| & \shorttheorem \\
\verb|\shortlemma| & \shortlemma \\
\verb|\shortcorollary| & \shortcorollary \\
@@ -31,45 +34,14 @@ See \ref{sec:counters} for a guide on how to change the current number.
\verb|\shortremark| & \shortremark \\
\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{Proposition} \\
\verb|\fancyfact|\{\textit{string}\} & \fancyfact{Fact} \\
\verb|\fancyaxiom|\{\textit{string}\} & \fancyaxiom{Axiom} \\
\verb|\fancyremark|\{\textit{string}\} & \fancyremark{Remark} \\
\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{Proposition} \\
\verb|\compactfact|\{\textit{string}\} & \compactfact{Fact} \\
\verb|\compactaxiom|\{\textit{string}\} & \compactaxiom{Axiom} \\
\verb|\compactremark|\{\textit{string}\} & \compactremark{Remark} \\
\verb|\compactproof|\{\textit{string}\} & \compactproof{Proof} \\
\end{tables}
\subsubsection{Changing the counters}
\label{sec:counters}
\textit{Included in \texttt{most} and up}
\textit{Starting from the version of October 18, 2025, you may no longer use \texttt{$\backslash$setcounter} directly}
You may set the current number for the elements by setting their corresponding counter to the selected number.
You can do this using \verb|\setLabelNumber|\{\textit{name of the environment}\}\{\textit{number}\},
You can do this using \verb|\setLabelNumber|\{\textit{name of the environment}\}\{\textit{number}\},
where you replace \textit{name of the environment} with one of the following:
\texttt{definition}, \texttt{lemma}, \texttt{theorem}, \texttt{corollary}, \texttt{proposition}, \texttt{fact},
\texttt{formula}, \texttt{axiom}, \texttt{example}, \texttt{remark}
@@ -81,10 +53,8 @@ You may also use \verb|\stepLabelNumber|\{\textit{name of the environment}\} to
\subsubsection{Referencing counters}
\textit{Included in \texttt{most} and up, introduced on October 18, 2025}
If you wish to reference a counter, you can do so by writing
\verb|\ref{<counter name>:<section>-<subsection>-<subsubsection>-<counter value>}|,
or of course, if you do not label subsections and / or subsubsection, dropping them.
\label{sec:counter-ref}
If you wish to reference a counter, you can do so by using the \verb|\labeledInline| and \verb|\labeledShort|,
which have the following signature
\mint{latex}|\labeledInline[description]{<descriptor name>}{<your label>}|
where you can replace \verb|<your label>| with a label like \texttt{def:your-def-name}

View File

@@ -1,17 +1,9 @@
\newpage
\subsection{Style}
General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope}
\begin{itemize}
\item \verb|\TODO| Print a highlighted \TODO
\item \verb|\background|\{\textit{color}\}\{\textit{number}\}\{\textit{string}\} Print \background{ForestGreen}{50}{shaded text, with colour saturation}
\item \verb|\shade|\{\textit{color}\}\{\textit{string}\} Print \shade{ForestGreen}{shaded text}
\item \verb|\backdrop|\{\textit{string}\} Print \backdrop{text with gray backdrop}
\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
\item \verb|\rmvspace| Removes some of the vertical whitespace printed by environments like \verb|align|
\item \verb|\drmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (double the amount)
\end{itemize}

View File

@@ -0,0 +1,82 @@
\subsubsection{Spacing}
For spacing in math mode, prefer using the methods described \hlhref{https://www.overleaf.com/learn/latex/Spacing_in_math_mode}{here},
for vertical spacing prefer the commands described below
\begin{itemize}
\item \verb|\smallhspace| Prints a 2mm hspace
\item \verb|\mediumhspace| Prints a 5mm hspace
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
\item \verb|\rmvspace|[\textit{number}] Removes an amount of vertical space. Should not be used unless can be avoided with general settings. Defaults to 0.5
\end{itemize}
Vertical spacing config for the entire document. By default, the \LaTeX\ defaults are used.
\begin{itemize}
\item \verb|\noverticalspacing|
\item \verb|\smallverticalspacing|
\item \verb|\mediumverticalspacing| (approximately the same as the \LaTeX defaults)
\item \verb|\largeverticalspacing|
\end{itemize}
You are of course free to redefine commands like \verb|\parskip|, etc to your liking, these commands are just provided for your convenience.
See \hlhref{https://www.overleaf.com/learn/latex/\%5Cabovedisplayskip_and_related_commands}{here}\ for more details
and \hlhref{https://latex-tutorial.com/latex-space/}{here for a good guide on spacing}.
To control paragraph spacing, see \hlhref{https://mirror.ox.ac.uk/sites/ctan.org/macros/latex/contrib/parskip/parskip.pdf}{here}\
and \hlhref{https://www.overleaf.com/learn/latex/Articles/How_to_change_paragraph_spacing_in_LaTeX}{here}.
Do make sure to put the \texttt{usepackage} \textit{before} loading the helpers.
Alternatively, you can use \verb|\PassOptionsToPackage{options}{package}|
To make use of \TeX's automatic wrapping of short alignment environments, use the \texttt{aligned}
(or, if no alignment is needed, use the normal \verb|\[ <math> \]|) instead of the \texttt{align} environment for short equations.
\newpage
Below a demonstration on the effects of the different settings:
\shade{Aquamarine}{No vertical spacing}\noverticalspacing
This is text:
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
This is very long introductory text that exceeds the limit (same applies to long equations)
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
Text following the equation (no paragraph break!)
\shade{Aquamarine}{Small vertical spacing}\smallverticalspacing
This is text:
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
This is very long introductory text that exceeds the limit (same applies to long equations)
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
Text following the equation (no paragraph break!)
\shade{Aquamarine}{Medium vertical spacing}\mediumverticalspacing
This is text:
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
This is very long introductory text that exceeds the limit (same applies to long equations)
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
Text following the equation (no paragraph break!)
\shade{Aquamarine}{Large vertical spacing}\largeverticalspacing
This is text:
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
This is very long introductory text that exceeds the limit (same applies to long equations)
\[
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
\]
Text following the equation (no paragraph break!)

View File

@@ -1,6 +1,5 @@
\newpage
\fhlc{Aquamarine}{Counter-enabled}
\paragraph{Counter-enabled}
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}.
See \ref{sec:counters} for a guide on how to change the current number and how to reference them.

View File

@@ -1,10 +1,8 @@
\newpage
\subsubsection{Tcolorboxes}
\textit{Included in \texttt{most} and up}
\paragraph{General boxes}
These tcolorboxes can be created using the code displayed inside them.
Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|\begin{document}|) if you plan to use them.
\fhlc{Aquamarine}{General}
\begin{terms}[]{Title here}
\begin{minted}{latex}
\begin{terms}[]{Title here}
@@ -29,14 +27,6 @@ Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|
\end{minted}
\end{recall}
\begin{remarks}[]{Title here}
\begin{minted}{latex}
\begin{remarks}[]{Title here}
\end{remarks}
\end{minted}
\end{remarks}
\begin{usage}[]{Title here}
\begin{minted}{latex}
\begin{usage}[]{Title here}
@@ -45,15 +35,6 @@ Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|
\end{minted}
\end{usage}
\begin{guides}[]{Title here}{Tutorial}
\begin{minted}{latex}
\begin{guides}[]{Title here}{Tutorial}
% You can also change the right title on this one
\end{guides}
\end{minted}
\end{guides}
\begin{properties}[]{Title here}
\begin{minted}{latex}
\begin{properties}[]{Title here}

View File

@@ -1,26 +1,9 @@
\vspace{1cm}
\fhlc{Aquamarine}{Language-Specific}
\begin{conjugation}[]{Title here}
\begin{minted}{latex}
\begin{conjugation}[]{Title here}
\end{conjugation}
\end{minted}
\end{conjugation}
\paragraph{Flexible}
This tcolorbox has all the styles applied, but allows configuring the colour and both title boxes
\begin{forms}[]{Title here}
\begin{minted}{latex}
\begin{forms}[]{Title here}
\end{forms}
\end{minted}
\end{forms}
\fhlc{Aquamarine}{Flexible}
\begin{general}[]{title}{second title}{red}
This Tcolorbox is flexible and can take any main and secondary title, as well as any colour.\\
This Tcolorbox is flexible and can take any main and secondary title, as well as any colour.
\begin{minted}{latex}
\begin{general}[]{title}{second title}{red}

View File

@@ -1,7 +1,5 @@
\newpage
\subsection{Tables}
\textit{Included in \texttt{most} and up}
You can set up nice looking tables using the \texttt{booktab} and \texttt{tabulary} environments.
\textit{New as of October 28 2025:} Tables and figures are now also numbered according to your settings
@@ -31,9 +29,8 @@ This outputs as
\end{fullTable}
\subsection{Index}
\textit{Included in \texttt{most} and up}
If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|\addIndexBold|\{\textit{string}\}, you can add entries to the index. They are printed in bold typeface in your document.
Using \verb|\addIndex|\{\textit{string}\}, you can do the same, but the text remains normal and using \verb|\addIndexItalic|\{\textit{string}\}, it is printed in italics
If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|\addIndexBold|\{\textit{string}\}, you can add entries to the index.
They are printed in bold typeface in your document.
Using \verb|\addIndex|\{\textit{string}\}, you can do the same, but the text remains normal and using \verb|\addIndexItalic|\{\textit{string}\}, it is printed in italics,
whereas using \verb|\addIndexBI|\{\textit{string}\}, it is printed in bold and italics

View File

@@ -3,27 +3,13 @@
\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 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{Numbering incorrect after numberingOn}
Check the start of the document and make sure you have used \verb|\setNumberingStyle| to set the numbering style and not
\verb|\setcounter{numberingConfig}|
\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.

View File

@@ -5,9 +5,7 @@ You can type \texttt{latex-prepare} and press tab, if you have installed the VSC
\begin{minted}{latex}
\documentclass{article}
\newcommand{\dir}{~/path/to/helper} % TODO: Change your path here! No trailing slashes!
\input{\dir/include.tex}
\load{recommended} % TODO: Change the inclusion level (if necessary), see below
\input{~/path/to/helpers/janishutz-helpers.tex} % TODO: Change your path here
\setup{Type your title here}
@@ -19,30 +17,26 @@ Type your \LaTeX here
\end{document}
\end{minted}
The \verb|\load| command takes one parameter, which can be one of the following:
\begin{itemize}
\item \texttt{minimal} Just the core styling and core functionality.
\item \texttt{most} Includes Math, CS, Language and all styling.
\item \texttt{recommended} The recommended setup. Includes BibTeX in addition to what is in most
\item \texttt{all} If you want to also include glossaries or code with highlighting
\item \texttt{letter} If you want to typeset a letter (see \ref{sec:letters})
\end{itemize}
\subsection{Configuration}
You can set a global config in config file in helper files directory. The file is located at
You can set a global config in the config files in the helper files directory. They are located at
\texttt{/<path to helpers>/config/}.
All config options are documented there.
After changing them, run \texttt{build.sh} in the main directory.
Each of the options can also be overridden directly on a per-document
(see \ref{sec:perFileConf}) basis using
\mint{latex}|\renewcommand{\<command>}{<value>}|
\texttt{/<path to helpers>/config/config.tex}. All configs are documented there. Simply open that file using any text editor and edit your config.
\subsection{Letters}
\label{sec:letters}
Letters require a different setup compared to a normal \LaTeX document:
\begin{minted}{latex}
\documentclass[12pt,a4paper]{scrlttr2}
\newcommand{\dir}{~/path/to/helper} % TODO: Change your path here! No trailing slashes!
\input{\dir/include.tex}
\load{letter}
\input{~/path/to/helper/letter.tex} % TODO: Change your path here
\setkomavar{subject}{} % type your subject here
\begin{document}\raggedright

Binary file not shown.

View File

@@ -1,17 +0,0 @@
\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,17 +0,0 @@
%░▒█▀▀█░█░░▄▀▀▄░█▀▀░█▀▀░█▀▀▄░█▀▀▄░█░░█
%░▒█░▄▄░█░░█░░█░▀▀▄░▀▀▄░█▄▄█░█▄▄▀░█▄▄█
%░▒█▄▄▀░▀▀░░▀▀░░▀▀▀░▀▀▀░▀░░▀░▀░▀▀░▄▄▄▀
% Add glossaries functionality
\newcommand{\setupGlossary}{
\usepackage[nonumberlist, toc]{glossaries}
\usepackage[nottoc, numbib]{tocbibind}
\makenoidxglossaries
}
\newcommand{\printGlossary}{
\glsaddall
\printnoidxglossaries
}

View File

@@ -1,17 +0,0 @@
\usepackage{minted}
\usepackage{fancyvrb}
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
\newenvironment{code}[1]{
\VerbatimEnvironment
\begin{minted}[
autogobble,
breaklines,
breakindentnchars=2,
frame=lines,
framesep=2mm,
mathescape,
baselinestretch=1.1,
linenos]{#1}}
{\end{minted}}

View File

@@ -1,41 +0,0 @@
% Loader
\newcommand{\load}[1]{
\edef\recommended{recommended}
\edef\minimal{minimal}
\edef\most{most}
\edef\full{full}
\edef\letters{letter}
\edef\temp{#1}
\ifx \temp\recommended
\typeout{[CustomLaTeXHelperLoader]: Loading config recommended}
\input{\dir/scopes/recommended.tex}
\loadRecommended
\else
\ifx \temp\minimal
\typeout{[CustomLaTeXHelperLoader]: Loading config minimal}
\input{\dir/scopes/minimal.tex}
\loadMinimal
\else
\ifx \temp\most
\typeout{[CustomLaTeXHelperLoader]: Loading config most}
\input{\dir/scopes/most.tex}
\loadMost
\else
\ifx \temp\full
\typeout{[CustomLaTeXHelperLoader]: Loading config full}
\input{\dir/scopes/full.tex}
\loadFull
\else
\ifx \temp\letters
\typeout{[CustomLaTeXHelperLoader]: Loading config letter}
\input{\dir/scopes/minimal.tex}
\loadMinimal
\input{\dir/scopes/letter.tex}
\else
\typeout{[CustomLaTeXHelperLoader]: INVALID CONFIG SPECIFIED, NOTHING LOADED!}
\fi
\fi
\fi
\fi
\fi
}

22
install.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
cd build/
python build.py sty
cd ..
loc="l"
read -p "Local (l) or system (s) installation? (Defaults to local) " loc
if [[ "$loc" != "s" ]]; then
if [[ -z "${TEXMFHOME+x}" ]]; then
export TEXMFHOME=~/texmf/
fi
mkdir -p $TEXMFHOME/tex/latex/janishutz-helpers
cp ./janishutz-helpers.sty $TEXMFHOME/tex/latex/janishutz-helpers/
else
sudo mkdir -p /usr/share/texmf/tex/latex/janishutz-helpers
sudo cp ./janishutz-helpers.sty /usr/share/texmf/tex/latex/janishutz-helpers/
echo "Updating file database"
sudo texhash
fi

1079
janishutz-helpers.sty Normal file

File diff suppressed because it is too large Load Diff

1402
janishutz-helpers.tex Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,15 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% ┌ ┐
% │ Configure your address here │
% └ ┘
\newcommand{\name}{Janis Hutz}
\newcommand{\street}{Street}
\newcommand{\city}{City}
\newcommand{\countrycode}{CH}
% ────────────────────────────────────────────────────────────────────
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\setkomavar{date}{\city, \today}
\newkomavar{fromplace} % a few koma vars

View File

@@ -1,149 +0,0 @@
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage[most]{tcolorbox}
\usepackage{cancel}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{lipsum}
\usepackage{ulem}
\usepackage{soul}
\usepackage{parskip}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{tocloft}
\usepackage{wasysym}
\usepackage{wrapfig}
\usepackage{multicol}
\usepackage{ifthen}
\usepackage[hidelinks]{hyperref}
\usepackage{enumitem}
\usepackage{gensymb}
\usepackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\input{\dir/main/lang/de}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\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}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\makeatletter
\makeatother
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
\fancypagestyle{plain}{%
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[1]{
\loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ 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

@@ -1,21 +0,0 @@
% ▄▄
% ▀████▀ ▀███
% ██ ██
% ██ ▀████████▄ ▄█▀▀███ ▄▄█▀██▀██▀ ▀██▀
% ██ ██ ██ ▄██ ██ ▄█▀ ██ ▀██ ▄█▀
% ██ ██ ██ ███ ██ ██▀▀▀▀▀▀ ███
% ██ ██ ██ ▀██ ██ ██▄ ▄ ▄█▀ ██▄
% ▄████▄████ ████▄ ▀████▀███▄ ▀█████▀██▄ ▄██▄
% For using index package
\newcommand{\prepareIndex}{
\usepackage[T1]{fontenc}
\usepackage{imakeidx}
\makeindex
}
\newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}}
\newcommand{\addIndexItalic}[1]{\textit{\index{\MakeLowercase{#1}} #1}}
\newcommand{\addIndex}[1]{\index{\MakeLowercase{#1}} #1}

View File

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

View File

@@ -1,57 +0,0 @@
%▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
%██░▄▄▀█▀▄▄▀█░▄▀▄░█░▄▀▄░█▀▄▄▀█░▄▄▀
%██░████░██░█░█▄█░█░█▄█░█░██░█░██░
%██░▀▀▄██▄▄██▄███▄█▄███▄██▄▄██▄██▄
%▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
\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}
\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}
\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}
\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}
\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}
\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}
\newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1}
\newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}}
% 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}
\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}
\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}
% 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
\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}
% 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}
% Simple
\newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1}

View File

@@ -1,404 +0,0 @@
% ▄▄· ▄• ▄▌ ▐ ▄ ▄▄▄▄▄▄▄▄ .▄▄▄
% ▐█ ▌▪ ▄█▀▄ █▪██▌•█▌▐█•██ ▀▄.▀·▀▄ █·
% ██ ▄▄▐█▌.▐▌█▌▐█▌▐█▐▐▌ ▐█.▪▐▀▀▪▄▐▀▀▄
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\usepackage{xstring}
\usepackage{etoolbox}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemma}[section]
\newcounter{definition}[section]
\newcounter{corollary}[section]
\newcounter{theorem}[section]
\newcounter{axiom}[section]
\newcounter{example}[section]
\newcounter{fact}[section]
\newcounter{proposition}[section]
\newcounter{formula}[section]
\newcounter{remark}[section]
\newcounter{all}[section]
\newcounter{lemmass}[subsection]
\newcounter{definitionss}[subsection]
\newcounter{corollaryss}[subsection]
\newcounter{theoremss}[subsection]
\newcounter{axiomss}[subsection]
\newcounter{exampless}[subsection]
\newcounter{factss}[subsection]
\newcounter{propositionss}[subsection]
\newcounter{formulass}[subsection]
\newcounter{remarkss}[subsection]
\newcounter{allss}[subsection]
\newcounter{lemmasss}[subsubsection]
\newcounter{definitionsss}[subsubsection]
\newcounter{corollarysss}[subsubsection]
\newcounter{theoremsss}[subsubsection]
\newcounter{axiomsss}[subsubsection]
\newcounter{examplesss}[subsubsection]
\newcounter{factsss}[subsubsection]
\newcounter{propositionsss}[subsubsection]
\newcounter{formulasss}[subsubsection]
\newcounter{remarksss}[subsubsection]
\newcounter{allsss}[subsubsection]
% Set the current number of a label
\newcommand{\setLabelNumber}[2]{%
\setcounter{#1}{#2}%
\addtocounter{#1}{-1}%
\setcounter{#1ss}{#2}%
\addtocounter{#1ss}{-1}%
\setcounter{#1sss}{#2}%
\addtocounter{#1sss}{-1}%
}
\newcommand{\stepLabelNumber}[1]{%
\stepcounter{#1}%
\stepcounter{#1ss}%
\stepcounter{#1sss}%
}
\newcommand{\printcounter}[1]{%
\csname the#1\endcsname
}
\newcommand{\suffix}{ss}
\newcommand{\sectionNumbering}{\thesection}
% ┌ ┐
% │ Counter numbering │
% └ ┘
\newcommand{\preTableAndFigHook}[1]{%
\ifnum\value{numberingConfig}>1
\ifnum\value{numberSubsections}=1
\stepcounter{allss}
\else
\ifnum\value{numberSubsections}=2
\stepcounter{allsss}
\else
\stepcounter{all}
\fi
\fi
\fi
}
\AtBeginEnvironment{table}{\preTableAndFigHook{table}}
\AtBeginEnvironment{figure}{\preTableAndFigHook{figure}}
\newcommand{\applyTableAndFigureNumbering}{
% Tables & Figures
\ifnum\value{numberingConfig}=0
\renewcommand{\thetable}{}
\renewcommand{\thefigure}{}
\else
\ifnum\value{numberingConfig}=1
\renewcommand{\thetable}{\sectionNumbering.\arabic{table}}
\renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}}
\else
\ifnum\value{numberSubsections}=1
\renewcommand{\thetable}{\sectionNumbering.\arabic{allss}}
\renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}}
\else
\ifnum\value{numberSubsections}=2
\renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}}
\renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}}
\else
\renewcommand{\thetable}{\sectionNumbering.\arabic{all}}
\renewcommand{\thefigure}{\sectionNumbering.\arabic{all}}
\fi
\fi
\fi
\fi
}
\newcommand{\setSubsectionNumbering}[1]{
\setcounter{numberSubsections}{#1}
\applySubsectionNumbering
}
\newcommand{\applySubsectionNumbering}{
\ifnum\value{numberSubsections}=1
\renewcommand{\sectionNumbering}{\thesubsection}
\renewcommand{\suffix}{ss}
\typeout{Numbering as section.subsection.number}
\else
\ifnum\value{numberSubsections}=2
\renewcommand{\sectionNumbering}{\thesubsubsection}
\renewcommand{\suffix}{sss}
\typeout{Numbering as section.subsection.subsubsection.number}
\else
\renewcommand{\sectionNumbering}{\thesection}
\renewcommand{\suffix}{}
\typeout{Numbering as section.number}
\fi
\fi
\applyTableAndFigureNumbering
\renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}}
\renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}}
\renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}}
\renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}}
\renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}}
\renewcommand{\theexample}{\sectionNumbering.\arabic{example}}
\renewcommand{\thefact}{\sectionNumbering.\arabic{fact}}
\renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}}
\renewcommand{\theformula}{\sectionNumbering.\arabic{formula}}
\renewcommand{\theremark}{\sectionNumbering.\arabic{remark}}
\renewcommand{\theall}{\sectionNumbering.\arabic{all}}
\renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}}
\renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}}
\renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}}
\renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}}
\renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}}
\renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}}
\renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}}
\renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}}
\renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}}
\renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}}
\renewcommand{\theallss}{\sectionNumbering.\arabic{allss}}
\renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}}
\renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}}
\renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}}
\renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}}
\renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}}
\renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}}
\renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}}
\renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}}
\renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}}
\renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}}
\renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}}
}
\applySubsectionNumbering
% ── Label generation ────────────────────────────────────────────────
\newcommand{\labelSectionGeneration}{%
\ifnum\value{numberSubsections}=1
\arabic{section}-\arabic{subsection}%
\else
\ifnum\value{numberSubsections}=2
\arabic{section}-\arabic{subsection}-\arabic{subsubsection}%
\else
\arabic{section}%
\fi
\fi}
\newcommand{\labelIt}[1]{\refstepcounter{#1\suffix}\edef\tempLabel{\genLabel{#1}{\arabic{#1\suffix}}}\label{\tempLabel}}
\newcommand{\genLabel}[2]{#1:\labelSectionGeneration-#2}
% ┌ ┐
% │ Number the counters appropriately │
% └ ┘
\newcommand{\usenumberArabic}[1]{%
\ifnum\value{numberingConfig}=1
\labelIt{#1}
\printcounter{#1\suffix}%
\else
\ifnum\value{numberingConfig}=2
\ifthenelse{\equal{#1}{definitions}}{%
\labelIt{definition}
\printcounter{definition\suffix}%
}{%
\labelIt{all}
\printcounter{all\suffix}%
}%
\else
\ifnum\value{numberingConfig}=3
\labelIt{all}
\printcounter{all\suffix}%
\else
\relax%
\fi
\fi
\fi}
% ────────────────────────────────────────────────────────────────────
% ┌ ┐
% │ Enable or disable numbering │
% └ ┘
% Initialize with config file
\newcounter{numberingConfigStore}
\setcounter{numberingConfigStore}{\value{numberingConfig}}
% For later change
\newcommand{\setNumberingStyle}[1]{
\typeout{Setting NumberingStyle to #1}
\setcounter{numberingConfig}{#1}
\ifthenelse{\equal{#1}{0}}{}{
\setcounter{numberingConfigStore}{#1}
}
\applyTableAndFigureNumbering
}
% Enable / disable numbering
\newcommand{\numberingOff}{
\setcounter{numberingConfig}{0}
\applyTableAndFigureNumbering
}
\newcommand{\numberingOn}{
\setcounter{numberingConfig}{\value{numberingConfigStore}}
\applyTableAndFigureNumbering
}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Reset definition, lemma, etc counters, add a │
% │ new page │
% ╰────────────────────────────────────────────────╯
\newcommand{\newsection}{
\newpage
\newsectionNoPB
}
% ── Reset definitions, lemma, etc counters, do not add new page ─────
\newcommand{\newsectionNoPB}{
\setcounter{lemma}{0}
\setcounter{definition}{0}
\setcounter{corollary}{0}
\setcounter{theorem}{0}
\setcounter{axiom}{0}
\setcounter{example}{0}
\setcounter{fact}{0}
\setcounter{proposition}{0}
\setcounter{formula}{0}
\setcounter{remark}{0}
\setcounter{all}{0}
\setcounter{lemmass}{0}
\setcounter{definitionss}{0}
\setcounter{corollaryss}{0}
\setcounter{theoremss}{0}
\setcounter{axiomss}{0}
\setcounter{exampless}{0}
\setcounter{factss}{0}
\setcounter{propositionss}{0}
\setcounter{formulass}{0}
\setcounter{remarkss}{0}
\setcounter{allss}{0}
\setcounter{lemmasss}{0}
\setcounter{definitionsss}{0}
\setcounter{corollarysss}{0}
\setcounter{theoremsss}{0}
\setcounter{axiomsss}{0}
\setcounter{examplesss}{0}
\setcounter{factsss}{0}
\setcounter{propositionsss}{0}
\setcounter{formulasss}{0}
\setcounter{remarksss}{0}
\setcounter{allsss}{0}
% Tables & Figures
\setcounter{table}{0}
\setcounter{figure}{0}
}
\newsectionNoPB % Initializes
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Tcolorboxes │
% ╰────────────────────────────────────────────────╯
% ────────────────────────────────────────────────────────────────────
% Definitions
\newtcolorbox{definition}[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 Definition\usenumberArabic{definition}};},#1}
% Theorems
\newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#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{lemma}};},#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{corollary}};},#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{axiom}};},#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{fact}};},#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{proposition}};},#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{example}};},#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{formula}};},#1}
% Remark
\newtcolorbox{remark}[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{Remark}{Bemerkung} \usenumberArabic{remark}};},#1}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Inline environments │
% ╰────────────────────────────────────────────────╯
% ────────────────────────────────────────────────────────────────────
% Inline environments (inline)
\newcommand{\inlineex}{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{example}:}}
\newcommand{\inlinedef}{\bg{blue}{Definition\usenumberArabic{definition}:}}
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formula}:}}
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma\usenumberArabic{lemma}:}}
\newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorem}:}}
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom\usenumberArabic{axiom}:}}
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollary}:}}
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{fact}:}}
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition\usenumberArabic{proposition}:}}
\newcommand{\inlineremark}{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remark}:}}
\newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced inline environments
\newcommand{\fancyex}[1]{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{example}:} \textit{(#1)}}
\newcommand{\fancydef}[1]{\bg{blue}{Definition\usenumberArabic{definition}:} \textit{(#1)}}
\newcommand{\fancyformula}[1]{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formula}:} \textit{(#1)}}
\newcommand{\fancylemma}[1]{\bg{Aquamarine}{Lemma\usenumberArabic{lemma}:} \textit{(#1)}}
\newcommand{\fancytheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorem}:} \textit{(#1)}}
\newcommand{\fancyaxiom}[1]{\bg{JungleGreen}{Axiom\usenumberArabic{axiom}:} \textit{(#1)}}
\newcommand{\fancycorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollary}:} \textit{(#1)}}
\newcommand{\fancyfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{fact}:} \textit{(#1)}}
\newcommand{\fancyproposition}[1]{\bg{Cyan}{Proposition\usenumberArabic{proposition}:} \textit{(#1)}}
\newcommand{\fancyremark}[1]{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remark}:} \textit{(#1)}}
\newcommand{\fancyproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
% short environments (abbreviated)
\newcommand{\shortex}{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{example}:}}
\newcommand{\shortdef}{\bg{blue}{D\usenumberArabic{definition}:}}
\newcommand{\short}{\bg{red}{F\usenumberArabic{formula}:}}
\newcommand{\shortlemma}{\bg{Aquamarine}{L\usenumberArabic{lemma}:}}
\newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorem}:}}
\newcommand{\shortaxiom}{\bg{JungleGreen}{A\usenumberArabic{axiom}:}}
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:}}
\newcommand{\shortfact}{\bg{SeaGreen}{F\usenumberArabic{fact}:}}
\newcommand{\shortproposition}{\bg{Cyan}{P\usenumberArabic{proposition}:}}
\newcommand{\shortremark}{\bg{green}{\tr{R}{B}\usenumberArabic{remark}:}}
\newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced short environments (abbreviated)
\newcommand{\compactex}[1]{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{example}:} \textit{(#1)}}
\newcommand{\compactdef}[1]{\bg{blue}{D\usenumberArabic{definition}:} \textit{(#1)}}
\newcommand{\compactformula}[1]{\bg{red}{F\usenumberArabic{formula}:} \textit{(#1)}}
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{L\usenumberArabic{lemma}:} \textit{(#1)}}
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}} \usenumberArabic{theorem}:} \textit{(#1)}}
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{A\usenumberArabic{axiom}:} \textit{(#1)}}
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:} \textit{(#1)}}
\newcommand{\compactfact}[1]{\bg{SeaGreen}{F\usenumberArabic{fact}:} \textit{(#1)}}
\newcommand{\compactproposition}[1]{\bg{Cyan}{P\usenumberArabic{proposition}:} \textit{(#1)}}
\newcommand{\compactremark}[1]{\bg{green}{\tr{R}{B}\usenumberArabic{remark}:} \textit{(#1)}}
\newcommand{\compactproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}

View File

@@ -1,25 +0,0 @@
% ▄▄
% ▄▄█▀▀▀█▄█ ██ ▄█▀▀▀█▄█ ██
% ▄██▀ ▀█ ██ ▄██ ▀█
% ██▀ ▀ ▄██▀██▄▀████████▄█████▄ ▀████████▄▀███ ▀███ ██████ ▄▄█▀██▀███▄███ ▀███▄ ▄██▀██▀███ ▄▄█▀██▀████████▄ ▄██▀██ ▄▄█▀██
% ██ ██▀ ▀██ ██ ██ ██ ██ ▀██ ██ ██ ██ ▄█▀ ██ ██▀ ▀▀ ▀█████▄█▀ ██ ██ ▄█▀ ██ ██ ██ ██▀ ██ ▄█▀ ██
% ██▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀▀▀▀▀ ██ ▄ ▀███ ██ ██▀▀▀▀▀▀ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██ ██ ██ ▄██ ██ ██ ██ ██▄ ▄ ██ ██ ███▄ ▄ ██ ██▄ ▄ ██ ██ ██▄ ▄██▄ ▄
% ▀▀█████▀ ▀█████▀▄████ ████ ████▄ ██████▀ ▀████▀███▄ ▀████ ▀█████▀████▄ █▀█████▀ █████▀▄████▄ ▀█████▀████ ████▄█████▀ ▀█████▀
% ██
% ▄████▄
\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

@@ -1,10 +0,0 @@
% ░█▒░▒▄▀▄░█▄░█░▄▀▒░█▒█▒▄▀▄░▄▀▒▒██▀░░░▄▀▀░▀█▀░▀▄▀░█▒░▒██▀
% ▒█▄▄░█▀█░█▒▀█░▀▄█░▀▄█░█▀█░▀▄█░█▄▄▒░▒▄██░▒█▒░▒█▒▒█▄▄░█▄▄
% 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}
\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}

View File

@@ -1,11 +0,0 @@
% • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ .
% ·██ ▐███▪▐█ ▀█ •██ ██▪▐█ ▐█ ▀. •██ ▐█▪██▌██• ▀▄.▀·
% ▐█ ▌▐▌▐█·▄█▀▀█ ▐█.▪██▀▀█ ▄▀▀▀█▄ ▐█.▪▐█▌▐█▪██ ▪ ▐▀▀▪▄
% ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌
% ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀
% 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

@@ -1,114 +0,0 @@
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
%▒▒ ▒▒▒▒▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒ ▒▒▒▒
%▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓
%▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓ ▓ ▓
%▓ ▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓▓▓▓
%███ ██████ █████ ████ ███ ███
%██████████████████████ ███████████████████
% Global style configs for tcolorbox (to reduce bloat)
\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,
}
}
\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
}
}
}
% -------------------- %
% Small style elements %
% -------------------- %
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
\newcommand{\setFontType}[1]{
\ifthenelse{\equal{#1}{mono}}{
\renewcommand{\familydefault}{\ttdefault}
}{
\ifthenelse{\equal{#1}{serif}}{
\renewcommand{\familydefault}{\rmdefault}
}{
\renewcommand{\familydefault}{\sfdefault}
}
}
}
\newcommand{\rmvspace}{\vspace{-0.5pc}}
\newcommand{\drmvspace}{\vspace{-1pc}}
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
\renewcommand{\quote}[1]{``\textit{#1}''}
% Add a color shade (similar to \fhlc, but nicer boxes)
\newcommand{\background}[3]{\tcbox[on line,
boxsep=2pt,
left=0pt,
right=0pt,
top=0pt,
bottom=0pt,
colframe=white,
frame empty,
colback=#1!#2!white,
highlight math style={enhanced}
] {\textbf{#3}}}
% Abstraction of background, where the brightness is set to 20%
\newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}}
% This command is used for the short and inline descriptors
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
% Add a gray backdrop
\newcommand{\backdrop}[1]{\shade{black}{#1}}
% Fancy highlighting (Bold, underlined, colorbox behind it. Shorthand for \fhlc{white}{#1}
\newcommand{\fhl}[1]{\fhlc{white}{#1}}
% 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 %
% ----------------- %
% Print a table of contents as a tcolorbox
\newcommand{\printtoc}[1]{
\renewcommand{\cfttoctitlefont}{}
\renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}}
\renewcommand{\contentsname}{}
\begin{tcolorbox}[colback=black!5!white,colbacktitle=#1!75!black,coltitle=black,enhanced,attach boxed title to top center={yshift=-2mm},
title={\Large \ifnum\value{lang}<2{Contents}\else {Inhaltsverzeichnis}\fi},fonttitle=\bfseries,breakable]
\hspace{1cm}
\tableofcontents
\end{tcolorbox}
}

1157
old/janishutz-helpers-v1.tex Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
\newcommand{\loadFull}{
\input{\dir/dist/recommended.tex}
\loadRecommended
\input{\dir/extra/minted.tex}
}

View File

@@ -1,5 +0,0 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{janishutz-helpers}
\usepackage{import}
\import{../}{config/config.tex}

View File

@@ -1,7 +0,0 @@
\newcommand{\loadMinimal}{
\typeout{[CustomLaTeXHelperLoader]: Loaded minimal}
\input{\dir/main/core.tex}
\input{\dir/config/config.tex}
\input{\dir/main/style/style.tex}
\input{\dir/main/style/common.tex}
}

View File

@@ -1,13 +0,0 @@
\newcommand{\loadMost}{
\typeout{[CustomLaTeXHelperLoader]: Loaded most}
\input{\dir/dist/minimal.tex}
\loadMinimal
\input{\dir/main/math.tex}
\input{\dir/main/cs.tex}
\input{\dir/main/index.tex}
\input{\dir/main/tables.tex}
\input{\dir/main/style/counters.tex}
\input{\dir/main/style/cs.tex}
\input{\dir/main/style/math.tex}
\input{\dir/main/style/language.tex}
}

View File

@@ -1,7 +0,0 @@
\newcommand{\loadRecommended}{
\typeout{[CustomLaTeXHelperLoader]: Loaded recommended}
\input{\dir/dist/most.tex}
\loadMost
\input{\dir/extra/bib.tex}
\input{\dir/extra/glossary.tex}
}

48
src/core.sty Normal file
View File

@@ -0,0 +1,48 @@
% Package imports
\RequirePackage{tocloft}
\RequirePackage[table, dvipsnames]{xcolor}
\RequirePackage{amsmath}
\RequirePackage{graphicx}
\RequirePackage{subcaption}
\RequirePackage[export]{adjustbox}
\RequirePackage[most]{tcolorbox}
\RequirePackage{cancel}
\RequirePackage{dsfont}
\RequirePackage{amssymb}
\RequirePackage{mathrsfs}
\RequirePackage{lipsum}
\RequirePackage{ulem}
\RequirePackage{soul}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\RequirePackage{wasysym}
\RequirePackage{wrapfig}
\RequirePackage{multicol}
\RequirePackage{ifthen}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{enumitem}
\RequirePackage{gensymb}
\RequirePackage{pifont}
\RequirePackage{xstring}
\RequirePackage{etoolbox}
\RequirePackage{makecell}
\RequirePackage{parskip}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
\newcommand{\currentLanguage}{en}
\setcounter{secnumdepth}{4}
\newcommand{\printTranslationOptionEN}[1]{\csname #1NamingEN\endcsname}
\newcommand{\printTranslationOptionDE}[1]{\csname #1NamingDE\endcsname}
\newcommand{\printShortTranslationOptionEN}[1]{\csname #1ShortNamingEN\endcsname}
\newcommand{\printShortTranslationOptionDE}[1]{\csname #1ShortNamingDE\endcsname}
\newboolean{numberingDisabled}
\setboolean{numberingDisabled}{false}
\newcommand{\loadGerman}{
\usepackage[ngerman]{babel}
\renewcommand{\currentLanguage}{de}
}

View File

@@ -5,11 +5,11 @@
% | (_) ) | |_) ) | | ( ___// /\ \
% (____/(_)_ __/ (_) \____)_) (_)
% Configs if you want to use BibTeX. Not included in any default configs.
% Configs if you want to use BibTeX
\newcommand{\setupBibtex}[1]{
\usepackage{biblatex}
\usepackage[nottoc, numbib]{tocbibind}
\RequirePackage{biblatex}
\RequirePackage[nottoc, numbib]{tocbibind}
\addbibresource{#1}
}

View File

@@ -4,18 +4,16 @@
% ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀
% Extra imports
\usepackage{stmaryrd}
\usepackage{algorithm}
\usepackage{algpseudocodex}
\usepackage{setspace}
\usepackage{verbatim}
\usepackage{turnstile}
\usepackage{forloop}
\RequirePackage{stmaryrd}
\RequirePackage{algorithm}
\RequirePackage{algpseudocodex}
\RequirePackage{setspace}
\RequirePackage{verbatim}
\RequirePackage{turnstile}
\RequirePackage{forloop}
\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\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)}

12
src/core/glossary.sty Normal file
View File

@@ -0,0 +1,12 @@
% Add glossaries functionality
\newcommand{\setupGlossary}{
\RequirePackage[nonumberlist, toc]{glossaries}
\RequirePackage[nottoc, numbib]{tocbibind}
\makenoidxglossaries
}
\newcommand{\printGlossary}{
\glsaddall
\printnoidxglossaries
}

16
src/core/index.sty Normal file
View File

@@ -0,0 +1,16 @@
% ┌ ┐
% │ Index │
% └ ┘
% For using index package
\newcommand{\prepareIndex}{
\RequirePackage[T1]{fontenc}
\RequirePackage{imakeidx}
\makeindex
}
\newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}}
\newcommand{\addIndexBI}[1]{\textbf\textit{{\index{\MakeLowercase{#1}} #1}}}
\newcommand{\addIndexItalic}[1]{\textit{\index{\MakeLowercase{#1}} #1}}
\newcommand{\addIndex}[1]{\index{\MakeLowercase{#1}} #1}

View File

@@ -1,23 +1,33 @@
% ▄▄
% ▀████▄ ▄███▀ ██ ███
% ████ ████ ██ ██
% █ ██ ▄█ ██ ▄█▀██▄ ██████ ███████▄
% █ ██ █▀ ██ ██ ██ ██ ██ ██
% █ ██▄█▀ ██ ▄█████ ██ ██ ██
% █ ▀██▀ ██ ██ ██ ██ ██ ██
% ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄
%
% │ Math │
%
% BB shortcuts (for number spaces, etc)
\newcommand{\A}{\mathbb{A}}
\newcommand{\B}{\mathbb{B}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\D}{\mathbb{D}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\G}{\mathbb{G}}
\renewcommand{\H}{\mathbb{H}}
\newcommand{\I}{\mathbb{I}}
\newcommand{\J}{\mathbb{J}}
\newcommand{\K}{\mathbb{K}}
\renewcommand{\L}{\mathbb{L}}
\newcommand{\M}{\mathbb{M}}
\newcommand{\N}{\mathbb{N}}
\renewcommand{\O}{\mathbb{O}}
\renewcommand{\P}{\mathbb{P}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\renewcommand{\S}{\mathbb{S}}
\newcommand{\T}{\mathbb{T}}
\newcommand{\U}{\mathbb{U}}
\newcommand{\V}{\mathbb{V}}
\newcommand{\W}{\mathbb{W}}
\newcommand{\X}{\mathbb{X}}
\newcommand{\Y}{\mathbb{Y}}
\newcommand{\Z}{\mathbb{Z}}
% Caligraphic
@@ -49,35 +59,36 @@
\newcommand{\cZ}{\mathcal{Z}}
% other useful shortcuts
\newcommand{\elementstack}[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
\newcommand{\8}{\infty}
\newcommand{\cond}{\text{cond}}
\newcommand{\argmin}[1]{\underset{#1}{\text{argmin}}}
\newcommand{\dx}{\text{ d}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
\newcommand{\hastoeq}{\overset{!}{=}}
\newcommand{\Leftrightarrowequiv}{\overset{\cdot}{\Leftrightarrow}}
\newcommand{\Longleftrightarrowequiv}{\overset{\cdot}{\Longleftrightarrow}}
\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{\parder}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pardern}[2]{\frac{\partial^{#2}}{\partial^{#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{\diff}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
\newcommand{\diffn}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
\newcommand{\pardiff}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pardiffn}[2]{\frac{\partial^{#2}}{\partial^{#2} #1}}
\newcommand{\divider}{\hspace{0.25em}|\hspace{0.25em}}
\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{\limit}[2]{\underset{#1 \rightarrow #2}{\lim}}
\newcommand{\limni}{\limit{n}{\infty}}
\newcommand{\limnz}{\limit{n}{0}}
\newcommand{\limxz}{\limit{x_0}{0}}
\newcommand{\limhz}{\limit{h}{0}}
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
\newcommand{\elementstack}[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
\newcommand{\sequence}[1]{(#1_n)_{n \geq 1}}
\newcommand{\series}[2]{\sum_{k = 1}^{#2} #1_k}
\DeclareMathOperator\arctanh{arctanh}
\DeclareMathOperator\arccosh{arccosh}
\DeclareMathOperator\arcsinh{arcsinh}

43
src/core/minted.sty Normal file
View File

@@ -0,0 +1,43 @@
% ┌ ┐
% │ Minted │
% └ ┘
\RequirePackage{minted}
\RequirePackage{fancyvrb}
% Args: Language, Code
\newenvironment{code}[1]{
\VerbatimEnvironment
\begin{minted}[
autogobble,
breaklines,
breakindentnchars=2,
frame=lines,
framesep=2mm,
mathescape,
baselinestretch=1.1,
linenos
]{#1}}
{\end{minted}}
% Args: Language, file relative to root file
\newcommand{\inputcode}[2]{
\inputminted[
autogobble,
breaklines,
breakindentnchars=2,
frame=lines,
framesep=2mm,
mathescape,
baselinestretch=1.1,
linenos
]{#1}{#2}
}
% Args: Language, Base directory (with trailing slash), file (no slash at start)
\newcommand{\inputcodewithfilename}[3]{
\begin{figure}[h!]
\texttt{File: \detokenize{#3}}
\rmvspace
\inputcode{#1}{#2#3}
\end{figure}
}

91
src/core/setup.sty Normal file
View File

@@ -0,0 +1,91 @@
% ┌ ┐
% │ Setup │
% └ ┘
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\RequirePackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\makeatletter
\makeatother
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
\fancypagestyle{plain}{%
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\RequirePackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[2][true]{
\ifthenelse{\equal{#1}{true}}{
\RequirePackage[a4paper,textwidth=28.5cm,textheight=20cm,landscape]{geometry}
\RequirePackage{flowfram}
\ffvadjustfalse
\setlength{\columnsep}{1cm}
\Ncolumn{3}
}{
\RequirePackage[a4paper,textwidth=28.5cm,textheight=20cm]{geometry}
}
\title{\Huge \textbf{#2}}
\author{\authorTitle}
}
% ┌ ┐
% │ Document start │
% └ ┘
% Start document command (required)
\newcommand{\startDocument}{
% TODO: Cheat sheet needs different setup?
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
\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,
}
}
\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
}
}
}

View File

@@ -1,13 +1,9 @@
% _____ _ _
% (_ _) ( ) (_ )
% | | _ _| |_ | | __ ___
% | | / _ ) _ \ | | / __ \ __)
% | | ( (_| | |_) )| |( ___/__ \
% (_) \__ _)_ __/(___)\____)____/
%
% Tables │
%
\usepackage{booktabs}
\usepackage{tabulary}
\RequirePackage{booktabs}
\RequirePackage{tabulary}
% Create new table. #1 Layout, #2 title row
\newenvironment{tables}[2]{

22
src/core/translation.sty Normal file
View File

@@ -0,0 +1,22 @@
% ┌ ┐
% │ Translation │
% └ ┘
\newcommand{\translate}[2]{%
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}%
}
\newcommand{\tr}[2]{\translate{#1}{#2}}
\newcommand{\namingTranslate}[1]{\translate{\printTranslationOptionEN{#1}}{\printTranslationOptionDE{#1}}}
\newcommand{\shortNamingTranslate}[1]{\translate{\printShortTranslationOptionEN{#1}}{\printShortTranslationOptionDE{#1}}}
% 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

@@ -0,0 +1,69 @@
% ┌ ┐
% │ Counter numbering │
% └ ┘
\newcommand{\preEnvHook}[1]{%
\stepLabelNumber{combined}%
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{
\stepLabelNumber{combined}%
}{}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
\stepLabelNumber{combined}%
}{}%
}%
}
% Decides on the numbering to use (combined or not)
\newcommand{\loadNumberingConfiguration}{%
\ifthenelse{\boolean{numberingDisabled}}{%
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\thefigure}{\arabic{figure}}
}{
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\ifthenelse{\equal{\subsectionnumbering}{none}}{
\renewcommand{\thetable}{\arabic{combinednone}}
\renewcommand{\thefigure}{\arabic{combinednone}}
}{%
\renewcommand{\thetable}{\ssprinter.\arabic{combined\subsectionnumbering}}
\renewcommand{\thefigure}{\ssprinter.\arabic{combined\subsectionnumbering}}
}%
}{%
\ifthenelse{\equal{\numberingpreset}{separate}}{
\ifthenelse{\equal{\subsectionnumbering}{none}}{}{
\renewcommand{\thetable}{\ssprinter.\arabic{table}}
\renewcommand{\thefigure}{\ssprinter.\arabic{figure}}
}
}{%
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\thefigure}{\arabic{figure}}
}%
}%
}%
}
% Prints the preceding subsection numbers
\newcommand{\ssprinter}{\thesection}
\newcommand{\generateSubsection}{%
\ifthenelse{\equal{\subsectionnumbering}{section}}{%
\renewcommand{\ssprinter}{\thesection}
}{%
\ifthenelse{\equal{\subsectionnumbering}{subsection}}{%
\renewcommand{\ssprinter}{\thesubsection}
}{%
\ifthenelse{\equal{\subsectionnumbering}{subsubsection}}{%
\renewcommand{\ssprinter}{\thesubsubsection}
}{%
\ifthenelse{\equal{\subsectionnumbering}{paragraph}}{%
\renewcommand{\ssprinter}{\theparagraph}
}{
\renewcommand{\ssprinter}{}
}%
}%
}%
}%
}
\loadNumberingConfiguration
\AtBeginEnvironment{table}{\preEnvHook{table}}
\AtBeginEnvironment{figure}{\preEnvHook{figure}}

View File

@@ -0,0 +1,33 @@
% ── Label generator ─────────────────────────────────────────────────
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
\newcommand{\printCounter}[1]{\refstepcounter{#1}\csname the#1\endcsname}
\newcommand{\printLabel}[1]{%
\ifthenelse{\boolean{numberingDisabled}}{}{%
\ifcsdef{#1numbering}{% Extra config present
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
\labelPrintBackendRoutine{#1}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{%
\printCounter{#1\subsectionnumbering}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
\printCounter{combined\subsectionnumbering}%
}{}%
}%
}%
}{%
\labelPrintBackendRoutine{#1}%
}%
}%
}
\newcommand{\labelPrintBackendRoutine}[1]{%
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\printCounter{combined\subsectionnumbering}%
}{
\ifthenelse{\equal{\numberingpreset}{separate}}{%
\printCounter{#1\subsectionnumbering}%
}{}%
}%
}

View File

@@ -0,0 +1,70 @@
% ── Set the current number of a label ───────────────────────────────
\newcommand{\setLabelNumber}[2]{%
\setcounter{#1none}{#2}%
\addtocounter{#1none}{-1}%
\setcounter{#1section}{#2}%
\addtocounter{#1section}{-1}%
\setcounter{#1subsection}{#2}%
\addtocounter{#1subsection}{-1}%
\setcounter{#1subsubsection}{#2}%
\addtocounter{#1subsubsection}{-1}%
\setcounter{#1paragraph}{#2}%
\addtocounter{#1paragraph}{-1}%
}
\newcommand{\stepLabelNumber}[1]{%
\stepcounter{#1none}%
\stepcounter{#1section}%
\stepcounter{#1subsection}%
\stepcounter{#1subsubsection}%
\stepcounter{#1paragraph}%
}
\newcommand{\newsection}{%
\newpage
\newsectionNoPB
}
\newcommand{\newsectionNoPB}{
\ifthenelse{\equal{\numberingpreset}{off}}{}{%
\resetNumbering%
\resetTableAndFigureNumbering%
}%
}
\newcommand{\resetTableAndFigureNumbering}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{combined}}{
\setcounter{table}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{default}}{
\setcounter{table}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{combined}}{%
\setcounter{figure}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{default}}{
\setcounter{figure}{0}
}{}%
}
% Numbering toggling
\newcommand{\numberingOff}{
\setboolean{numberingDisabled}{true}
\loadNumberingConfig
}
\newcommand{\numberingOn}{
\setboolean{numberingDisabled}{false}
\loadNumberingConfig
}
\newcommand{\setsubsectionnumbering}[1]{
\renewcommand{\subsectionnumbering}{#1}
\loadNumberingConfiguration
}
\newcommand{\setnumberingpreset}[1]{
\renewcommand{\numberingpreset}{#1}
\loadNumberingConfiguration
}

12
src/header.sty Normal file
View File

@@ -0,0 +1,12 @@
%%
%% Copyright (C) 2026 Janis Hutz
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any later
%% version. The latest version of this license is in:
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2008-05-04 or later.
\NeedsTeXFormat{LaTeX2e}

5
src/opts.sty Normal file
View File

@@ -0,0 +1,5 @@
\DeclareOption{de}{
\RequirePackage[ngerman]{babel}
\renewcommand{\currentLanguage}{de}
}
\ProcessOptions

82
src/style.sty Normal file
View File

@@ -0,0 +1,82 @@
% ┌ ┐
% │ STYLE: Globals │
% └ ┘
% ── Fonts ───────────────────────────────────────────────────────────
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
\newcommand{\setFontType}[1]{
\ifthenelse{\equal{#1}{mono}}{
\renewcommand{\familydefault}{\ttdefault}
}{
\ifthenelse{\equal{#1}{serif}}{
\renewcommand{\familydefault}{\rmdefault}
}{
\renewcommand{\familydefault}{\sfdefault}
}
}
}
% ── Small common style elements ─────────────────────────────────────
% Spacing (vertical)
\newcommand{\rmvspace}[1][0.5]{\vspace{-#1pc}}
% Spacing (horizontal)
\newcommand{\smallhspace}{\hspace{2mm}}
\newcommand{\mediumhspace}{\hspace{5mm}}
\newcommand{\largehspace}{\hspace{1cm}}
% other elements
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
\renewcommand{\quote}[1]{``\textit{#1}''}
% Add a color shade (similar to \fhlc, but nicer boxes)
\newcommand{\background}[3]{%
\tcbox[on line,
boxsep=\backgroundPadding,
arc=\backgroundRounding,
left=0pt,
right=0pt,
top=0pt,
bottom=0pt,
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}}
% This command is used for the short and inline descriptors
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
% Add a gray backdrop
\newcommand{\backdrop}[1]{\shade{black}{#1}}
% Print a table of contents as a tcolorbox
\newcommand{\printtoc}[1]{
\renewcommand{\cfttoctitlefont}{}
\renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}}
\renewcommand{\contentsname}{}
\begin{tcolorbox}[
colback=black!5!white,
colbacktitle=#1!75!black,
coltitle=black,
enhanced,
attach boxed title to top center={yshift=-2mm},
title={\Large \tr{Contents}{Inhaltsverzeichnis}},
fonttitle=\bfseries,
breakable
]
\hspace{1cm}
\tableofcontents
\end{tcolorbox}
}
% Draw box around links. First arg link, second arg display
\newcommand{\hlhref}[2]{\color{MidnightBlue}\fbox{\href{#1}{#2}}\color{black}}
% Same for urls (just one arg tho)
\newcommand{\hlurl}[1]{\color{MidnightBlue}\fbox{\url{#1}}\color{black}}

17
src/style/cs.sty Normal file
View File

@@ -0,0 +1,17 @@
% ┌ ┐
% │ STYLE: Computer Science │
% └ ┘
\RequirePackage{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

@@ -0,0 +1,51 @@
% ── Inline environments ─────────────────────────────────────────────
% TODO: ref label generation
\newcommand{\inline}[2][NONAME]{%
\ifthenelse{\equal{NONAME}{#1}}{%
\anonymousInlineDescriptorTemplate{#2}{\printLabel{#2}}%
}{%
\inlineDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
}%
}
\newcommand{\labeledInline}[3][NONAME]{%
\edef{\tempLabel}{#3}
\label{\tempLabel}
\inline[#1]{#2}
}
\newcommand{\unnumberedInline}[2][NONAME]{%
\ifthenelse{\equal{NONAME}{#1}}{%
\anonymousInlineDescriptorTemplate{#2}{}%
}{%
\inlineDescriptorTemplate{#2}{}{#1}%
}%
}
\newcommand{\short}[2][NONAME]{%
\ifthenelse{\equal{NONAME}{#1}}{%
\anonymousShortDescriptorTemplate{#2}{\printLabel{#2}}%
}{%
\shortDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
}%
}
\newcommand{\labeledShort}[3][NONAME]{%
\edef{\tempLabel}{#3}
\label{\tempLabel}
\short[#1]{#2}
}
\newcommand{\unnumberedShort}[2][NONAME]{%
\ifthenelse{\equal{NONAME}{#1}}{%
\anonymousShortDescriptorTemplate{#2}{}%
}{%
\shortDescriptorTemplate{#2}{}{#1}%
}%
}
\newcommand{\inlineproof}[1][NONAME]{\unnumberedInline[#1]{proof}}
\newcommand{\inlineterm}[1][NONAME]{\unnumberedInline[#1]{term}}
\newcommand{\shortproof}[1][NONAME]{\unnumberedShort[#1]{proof}}
\newcommand{\shortterm}[1][NONAME]{\unnumberedShort[#1]{term}}

9
src/style/math.sty Normal file
View File

@@ -0,0 +1,9 @@
% ┌ ┐
% │ STYLE: Math │
% └ ┘
% Add shortcuts to commonly used commands
\newcommand{\vect}[1]{\overrightarrow{#1}}
\renewcommand{\hat}[1]{\widehat{#1}}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\newcommand{\proven}{$\hspace{17cm}\square$}

44
src/style/spacing.sty Normal file
View File

@@ -0,0 +1,44 @@
\newcommand{\noverticalspacing}{
\abovedisplayskip 1pt plus 2pt minus 1pt
\belowdisplayskip 1pt plus 2pt minus 1pt
\abovedisplayshortskip -10pt
\belowdisplayshortskip 1pt plus 2pt minus 1pt
\floatsep 1pt plus 2pt minus 1pt
\intextsep 1pt plus 2pt minus 1pt
\textfloatsep 1pt plus 2pt minus 1pt
\abovecaptionskip 2pt
\setlist{noitemsep,topsep=1pt,partopsep=0pt}
}
\newcommand{\smallverticalspacing}{
\abovedisplayskip 4pt plus 3pt minus 2pt
\belowdisplayskip 5pt plus 5pt minus 2pt
\abovedisplayshortskip -5pt
\belowdisplayshortskip 3pt plus 4pt minus 2pt
\floatsep 4pt plus 3pt minus 2pt
\intextsep 4pt plus 3pt minus 2pt
\textfloatsep 4pt plus 3pt minus 2pt
\abovecaptionskip 4pt
\setlist{itemsep=2pt,topsep=2pt,partopsep=1pt}
}
\newcommand{\mediumverticalspacing}{
\abovedisplayskip 7pt plus 4pt minus 3pt
\belowdisplayskip 9pt plus 6pt minus 3pt
\abovedisplayshortskip 0pt
\belowdisplayshortskip 5pt plus 4pt minus 2pt
\floatsep 7pt plus 4pt minus 3pt
\intextsep 7pt plus 4pt minus 3pt
\textfloatsep 7pt plus 4pt minus 3pt
\abovecaptionskip 7pt
\setlist{itemsep=4pt,topsep=4pt,partopsep=2pt}
}
\newcommand{\largeverticalspacing}{
\abovedisplayskip 13pt plus 5pt minus 4pt
\belowdisplayskip 15pt plus 9pt minus 6pt
\abovedisplayshortskip 5pt plus 2pt minus 3pt
\belowdisplayshortskip 7pt plus 5pt minus 2pt
\floatsep 12pt plus 5pt minus 4pt
\intextsep 12pt plus 5pt minus 4pt
\textfloatsep 12pt plus 5pt minus 4pt
\abovecaptionskip 10pt
\setlist{itemsep=6pt,topsep=6pt,partopsep=2pt}
}

48
src/style/tcb.sty Normal file
View File

@@ -0,0 +1,48 @@
% ┌ ┐
% │ STYLE: Common tcolorboxes │
% └ ┘
\newtcolorbox{recall}[2][]{mainboxstyle,colback=recallcolor!5!white,colframe=recallcolor!75!black,colbacktitle=recallcolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=recallcolor!75!black,fill=recallcolor!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1}
\newtcolorbox{properties}[2][]{mainboxstyle,colback=propertiescolor!5!white,colframe=propertiescolor!75!black,colbacktitle=propertiescolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=propertiescolor!75!black,fill=propertiescolor!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1}
\newtcolorbox{restrictions}[2][]{mainboxstyle,colback=propertiescolor!5!white,colframe=propertiescolor!75!black,colbacktitle=propertiescolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=propertiescolor!75!black,fill=propertiescolor!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1}
\newtcolorbox{limitations}[2][]{mainboxstyle,colback=propertiescolor!5!white,colframe=propertiescolor!75!black,colbacktitle=propertiescolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=propertiescolor!75!black,fill=propertiescolor!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1}
\newtcolorbox{intuition}[2][]{mainboxstyle,colback=intuitioncolor!5!white,colframe=intuitioncolor!75!black,colbacktitle=intuitioncolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=intuitioncolor!75!black,fill=intuitioncolor!75!black] at (frame.north east) {\large Intuition};},#1}
\newcommand{\inlineintuition}{\bg{intuitioncolor}{Intuition:}}
% Terms and notation
\newtcolorbox{terms}[2][]{mainboxstyle,colback=termcolor!5!white,colframe=termcolor!75!black,colbacktitle=termcolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=termcolor!75!black,fill=termcolor!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1}
\newtcolorbox{notation}[2][]{mainboxstyle,colback=notationcolor!5!white,colframe=notationcolor!75!black,colbacktitle=notationcolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=notationcolor!75!black,fill=notationcolor!75!black] at (frame.north east) {\large Notation};},#1}
\newtcolorbox{usage}[2][]{mainboxstyle,colback=usagecolor!5!white,colframe=usagecolor!75!black,colbacktitle=usagecolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=usagecolor!75!black,fill=usagecolor!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1}
% Task
\newtcolorbox{task}[2][]{mainboxstyle,colback=taskcolor!5!white,colframe=taskcolor!75!black,colbacktitle=taskcolor!75!black,title={\large #2},overlay={\node[overlaystyle,draw=taskcolor!75!black,fill=taskcolor!75!black] at (frame.north east) {\large \translate{Task}{Aufgabe}};},#1}
% Proof
\newtcolorbox{proof}[2][]{mainboxstyle,colback=proofcolor!5!white,colframe=proofcolor!75!black,colbacktitle=proofcolor!75!black,title={\large #2},overlay={\node[overlaystyle,draw=proofcolor!75!black,fill=proofcolor!75!black] at (frame.north east) {\large \translate{Proof}{Beweis}};},#1}
% 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}
% Simple
\newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1}

13
uninstall.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
if [[ -z "${TEXMFHOME+x}" ]]; then
export TEXMFHOME=~/texmf/
fi
echo "Removing helper files"
rm -rf $TEXMFHOME/tex/latex/janishutz-helpers
sudo rm -rf /usr/share/texmf/tex/latex/janishutz-helpers/
echo "Updating file database"
sudo texhash

View File

@@ -1,200 +1,198 @@
{
"prepare LaTeX Document": {
"prefix": "latex-prepare",
"body": [
"\\documentclass{article}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{recommended}\n",
"\\setup{$1}\n",
"\\begin{document}",
"\\startDocument",
"\\usetcolorboxes",
"$2\n\n",
"\\end{document}"
],
"description": "Prepares a full LaTeX Document for use and compiling"
},
"Fancy table": {
"prefix": "table",
"body": [
"\\begin{tables}{$1}{$2}\n",
"\t$3\\\\",
"\\end{tables}"
],
"description": "Insert a table (without environment)"
},
"Formula": {
"prefix": "formula",
"body": [
"\\begin{formula}[]{$1}",
"\t$2",
"\\end{formula}"
],
"description": "Inserts a tcolorbox to provide a formula (red)"
},
"Definition": {
"prefix": "definition",
"body": [
"\\begin{definition}[]{$1}",
"\t$2",
"\\end{definition}"
],
"description": "Inserts a tcolorbox to provide a definition (blue)"
},
"Recall": {
"prefix": "recall",
"body": [
"\\begin{recall}[]{$1}",
"\t$2",
"\\end{recall}"
],
"description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)"
},
"Important Remarks": {
"prefix": "remarks",
"body": [
"\\begin{remark}[]{$1}",
"\t$2",
"\\end{remark}"
],
"description": "Inserts a tcolorbox to provide remarks (green), but here numbered"
},
"Remark (numbered)": {
"prefix": "remark",
"body": [
"\\begin{remarks}[]{$1}",
"\t$2",
"\\end{remarks}"
],
"description": "Inserts a tcolorbox to provide remarks (green)"
},
"Guides": {
"prefix": "guides",
"body": [
"\\begin{guides}[]{$1}{${2:Usage}}",
"\t$2",
"\\end{guides}"
],
"description": "Inserts a tcolorbox to provide guides / instructions on how to use (red)"
},
"Properties": {
"prefix": "properties",
"body": [
"\\begin{properties}[]{$1}",
"\t$2",
"\\end{properties}"
],
"description": "Inserts a tcolorbox to inform about properties"
},
"Restrictions": {
"prefix": "restrictions",
"body": [
"\\begin{restrictions}[]{$1}",
"\t$2",
"\\end{restrictions}"
],
"description": "Inserts a tcolorbox to inform about restrictions"
},
"Intuition": {
"prefix": "restrictions",
"body": [
"\\begin{intuition}[]{$1}",
"\t$2",
"\\end{intuition}"
],
"description": "Tcolorbox to highlight sections about intuition"
},
"Limitations": {
"prefix": "limitations",
"body": [
"\\begin{limitations}[]{$1}",
"\t$2",
"\\end{limitations}"
],
"description": "Inserts a tcolorbox to inform about limitations"
},
"Theorem": {
"prefix": "theorem",
"body": [
"\\begin{theorem}[]{$1}",
"\t$2",
"\\end{theorem}"
],
"description": "Inserts a tcolorbox to inform about theorems"
},
"Lemma": {
"prefix": "lemma",
"body": [
"\\begin{lemma}[]{$1}",
"\t$2",
"\\end{lemma}"
],
"description": "Inserts a tcolorbox to inform about lemmas"
},
"Corollary": {
"prefix": "corollary",
"body": [
"\\begin{corollary}[]{$1}",
"\t$2",
"\\end{corollary}"
],
"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": [
"\\begin{terms}[]{$1}",
"\t$2",
"\\end{terms}"
],
"description": "Inserts a tcolorbox to inform about terms"
},
"Proof": {
"prefix": "proof",
"body": [
"\\begin{proof}[]{$1}",
"\t$2",
"\\end{proof}"
],
"description": "Inserts a tcolorbox to show a proof"
},
"Axiom": {
"prefix": "axiom",
"body": [
"\\begin{axiom}[]{$1}",
"\t$2",
"\\end{axiom}"
],
"description": "Inserts a tcolorbox to show an axiom"
},
"Notation": {
"prefix": "notation",
"body": [
"\\begin{notation}[]{$1}",
"\t$2",
"\\end{notation}"
],
"description": "Inserts a tcolorbox to show notation"
},
"prepare LaTeX Document": {
"prefix": "latex-prepare",
"body": [
"\\documentclass{article}\n",
"\\newcommand{\\input}{~/projects/latex/janishutz-helpers.tex}\n",
"\\usepackage{lmodern}",
"\\setFontType{sans}\n",
"\\setup{$1}\n",
"\\begin{document}",
"\\startDocument\n\n",
"\\vspace{2cm}",
"\\begin{center}\n\n",
"\\includegraphics[width=0.6\\linewidth]{~/projects/latex/assets/logo.jpg}",
"\\end{center}\n\n",
"\\vspace{3cm}",
"\\begin{center}",
"\t\\begin{Large}",
"\t\t\\quote{A funny quote by a professor}",
"\t\\end{Large}",
"\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
"\\end{center}\n",
"\\vspace{2cm}",
"\\begin{center}",
"\tSEMESTER, ETHZ\\\\[0.2cm]",
"\t\\begin{Large}",
"\t\tSummary of the Script and Lectures",
"\t\\end{Large}\\\\[0.2cm]",
"\\end{center}",
"\\end{document}"
],
"description": "Prepares a full LaTeX Document for use and compiling"
},
"Fancy table": {
"prefix": "table",
"body": [
"\\begin{tables}{$1}{$2}\n",
"\t$3\\\\",
"\\end{tables}"
],
"description": "Insert a table (without environment)"
},
"Formula": {
"prefix": "formula",
"body": [
"\\begin{formula}[]{$1}",
"\t$2",
"\\end{formula}"
],
"description": "Inserts a tcolorbox to provide a formula (red)"
},
"Definition": {
"prefix": "definition",
"body": [
"\\begin{definition}[]{$1}",
"\t$2",
"\\end{definition}"
],
"description": "Inserts a tcolorbox to provide a definition (blue)"
},
"Recall": {
"prefix": "recall",
"body": [
"\\begin{recall}[]{$1}",
"\t$2",
"\\end{recall}"
],
"description": "Inserts a tcolorbox to point out / revise of previous knowledge (yellow)"
},
"Remark": {
"prefix": "remark",
"body": [
"\\begin{remarks}[]{$1}",
"\t$2",
"\\end{remarks}"
],
"description": "Inserts a tcolorbox to provide remarks (green)"
},
"Properties": {
"prefix": "properties",
"body": [
"\\begin{properties}[]{$1}",
"\t$2",
"\\end{properties}"
],
"description": "Inserts a tcolorbox to inform about properties"
},
"Restrictions": {
"prefix": "restrictions",
"body": [
"\\begin{restrictions}[]{$1}",
"\t$2",
"\\end{restrictions}"
],
"description": "Inserts a tcolorbox to inform about restrictions"
},
"Intuition": {
"prefix": "restrictions",
"body": [
"\\begin{intuition}[]{$1}",
"\t$2",
"\\end{intuition}"
],
"description": "Tcolorbox to highlight sections about intuition"
},
"Limitations": {
"prefix": "limitations",
"body": [
"\\begin{limitations}[]{$1}",
"\t$2",
"\\end{limitations}"
],
"description": "Inserts a tcolorbox to inform about limitations"
},
"Theorem": {
"prefix": "theorem",
"body": [
"\\begin{theorem}[]{$1}",
"\t$2",
"\\end{theorem}"
],
"description": "Inserts a tcolorbox to state a theorem"
},
"Lemma": {
"prefix": "lemma",
"body": [
"\\begin{lemma}[]{$1}",
"\t$2",
"\\end{lemma}"
],
"description": "Inserts a tcolorbox to state a lemma"
},
"Corollary": {
"prefix": "corollary",
"body": [
"\\begin{corollary}[]{$1}",
"\t$2",
"\\end{corollary}"
],
"description": "Inserts a tcolorbox to state a corollary"
},
"Proposition": {
"prefix": "proposition",
"body": [
"\\begin{proposition}[]{$1}",
"\t$2",
"\\end{proposition}"
],
"description": "Inserts a tcolorbox to state a proposition"
},
"Fact": {
"prefix": "fact",
"body": [
"\\begin{fact}[]{$1}",
"\t$2",
"\\end{fact}"
],
"description": "Inserts a tcolorbox to state a fact"
},
"Terms": {
"prefix": "terms",
"body": [
"\\begin{terms}[]{$1}",
"\t$2",
"\\end{terms}"
],
"description": "Inserts a tcolorbox to inform about terms"
},
"Proof": {
"prefix": "proof",
"body": [
"\\begin{proof}[]{$1}",
"\t$2",
"\\end{proof}"
],
"description": "Inserts a tcolorbox to show a proof"
},
"Axiom": {
"prefix": "axiom",
"body": [
"\\begin{axiom}[]{$1}",
"\t$2",
"\\end{axiom}"
],
"description": "Inserts a tcolorbox to show an axiom"
},
"Notation": {
"prefix": "notation",
"body": [
"\\begin{notation}[]{$1}",
"\t$2",
"\\end{notation}"
],
"description": "Inserts a tcolorbox to show notation"
},
"Example": {
"prefix": "example",
"body": [
@@ -213,235 +211,103 @@
],
"description": "Inserts a tcolorbox to show example"
},
"Usage": {
"prefix": "usage",
"body": [
"\\begin{usage}[]{$1}",
"\t$2",
"\\end{usage}"
],
"description": "Inserts a tcolorbox to inform about usage"
},
"Conjugation": {
"prefix": "conjugation",
"body": [
"\\begin{conjugation}[]{$1}",
"\t$2",
"\\end{conjugation}"
],
"description": "Inserts a tcolorbox to inform about conjugation"
},
"Forms": {
"prefix": "forms",
"body": [
"\\begin{forms}[]{$1}",
"\t$2",
"\\end{forms}"
],
"description": "Inserts a tcolorbox to inform about forms of e.g. grammatical structures"
},
"General-Tcolorbox": {
"prefix": "general-tcb",
"body": [
"\\begin{general}[]{${1:title}}{${2:second title}}{${3|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
"\t$4",
"\\end{general}"
],
"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": [
"\\frac{\\mbox{d}}{\\mbox{d}x}$1"
]
},
"Example (inline)": {
"prefix": "example-inline",
"body": [
"\\inlineex"
]
},
"Example (short)": {
"prefix": "example-short",
"body": [
"\\shortex"
]
},
"Definition (inline)": {
"prefix": "definition-inline",
"body": [
"\\inlinedef"
]
},
"Definition (short)": {
"prefix": "definition-short",
"body": [
"\\shortdef"
]
},
"Theorem (inline)": {
"prefix": "theorem-inline",
"body": [
"\\inlinetheorem"
]
},
"Theorem (short)": {
"prefix": "theorem-short",
"body": [
"\\shorttheorem"
]
},
"Lemma (inline)": {
"prefix": "lemma-inline",
"body": [
"\\inlinelemma"
]
},
"Lemma (short)": {
"prefix": "lemma-short",
"body": [
"\\shortlemma"
]
},
"Corollary (inline)": {
"prefix": "corollary-inline",
"body": [
"\\inlinecorollary"
]
},
"Corollary (short)": {
"prefix": "corollary-short",
"body": [
"\\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": [
"\\inlineaxiom"
]
},
"Axiom (short)": {
"prefix": "axiom-short",
"body": [
"\\shortaxiom"
]
},
"Proof (inline)": {
"prefix": "proof-inline",
"body": [
"\\inlineproof"
]
},
"Proof (short)": {
"prefix": "proof-short",
"body": [
"\\shortproof"
]
},
"bold": {
"prefix": "#bold",
"body": [
"\\textbf{$1}"
]
},
"italic": {
"prefix": "#i",
"body": [
"\\textit{$1}"
]
},
"bolditalic": {
"prefix": "#bi",
"body": [
"\\textbf{\\textit{$1}}"
]
},
"underlinie": {
"prefix": "#u",
"body": [
"\\underbar{$1}"
]
},
"angles": {
"prefix": "angles",
"body": [
"\\langle $1 \\rangle"
]
},
"fill-width": {
"prefix": "#fill",
"body": [
"\\hspace{\\fill}$1"
]
},
"Latex-Colour": {
"prefix": "colour",
"body": [
"${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}"
]
},
"Latex-Text-Colour": {
"prefix": "colour-text",
"body": [
"\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}"
]
},
"Set Language": {
"prefix": "setLang",
"body": [
"\\setLang{$1}"
]
},
"Letter": {
"prefix": "latex-letter",
"body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{letter}\n",
"% Subject",
"\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright",
"\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}",
"\t\t\\opening{Intro}\n",
"\t\t$2\n",
"\t\t\\closing{Kind regards}",
"\t\\end{letter}",
"\\end{document}"
]
}
"Usage": {
"prefix": "usage",
"body": [
"\\begin{usage}[]{$1}",
"\t$2",
"\\end{usage}"
],
"description": "Inserts a tcolorbox to inform about usage"
},
"General-Tcolorbox": {
"prefix": "general-tcb",
"body": [
"\\begin{general}[]{${1:title}}{${2:second title}}{${3|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
"\t$4",
"\\end{general}"
],
"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"
},
"bold": {
"prefix": "#bold",
"body": [
"\\textbf{$1}"
]
},
"italic": {
"prefix": "#i",
"body": [
"\\textit{$1}"
]
},
"bolditalic": {
"prefix": "#bi",
"body": [
"\\textbf{\\textit{$1}}"
]
},
"underlinie": {
"prefix": "#u",
"body": [
"\\underbar{$1}"
]
},
"angles": {
"prefix": "angles",
"body": [
"\\langle $1 \\rangle"
]
},
"fill-width": {
"prefix": "#fill",
"body": [
"\\hspace{\\fill}$1"
]
},
"Latex-Colour": {
"prefix": "colour",
"body": [
"${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}"
]
},
"Latex-Text-Colour": {
"prefix": "colour-text",
"body": [
"\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}"
]
},
"Set Language": {
"prefix": "setLang",
"body": [
"\\setLang{$1}"
]
},
"Letter": {
"prefix": "latex-letter",
"body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{letter}\n",
"% Subject",
"\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright",
"\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}",
"\t\t\\opening{Intro}\n",
"\t\t$2\n",
"\t\t\\closing{Kind regards}",
"\t\\end{letter}",
"\\end{document}"
]
}
}