115 Commits
dev ... v1

Author SHA1 Message Date
6f2c05b6eb [Core] add preliminary support for multicols
Some checks failed
Update docs / build_docs (push) Failing after 3m20s
Update helpers / build_helpers (push) Successful in 15s
2026-01-22 14:34:57 +01:00
4577950acc [tables] Fix errors
All checks were successful
Update helpers / build_helpers (push) Successful in 29s
2026-01-10 08:35:09 +01:00
Helpers compiler [bot]
fd7ce878e5 [skip ci] Build helpers on push 2026-01-09 14:11:33 +00:00
457d7ce024 [CI] Trigger
All checks were successful
Update helpers / build_helpers (push) Successful in 29s
2026-01-09 15:11:01 +01:00
Helpers compiler [bot]
8c8cc53a8c [skip ci] Build helpers on push 2026-01-09 14:09:54 +00:00
73b6098463 Remove duplicated indent config
All checks were successful
Update helpers / build_helpers (push) Successful in 13s
2026-01-09 15:09:39 +01:00
Helpers compiler [bot]
635d32d260 [skip ci] Build helpers on push 2026-01-09 14:06:18 +00:00
bda3b92795 [CI] Trigger
All checks were successful
Update helpers / build_helpers (push) Successful in 12s
2026-01-09 15:06:06 +01:00
f2c337eaa9 Revert "[skip ci] Build helpers on push"
This reverts commit e16e4b3e7b.
2026-01-09 15:05:29 +01:00
141cf5d091 Latexfmt corrected 2026-01-09 15:05:08 +01:00
Helpers compiler [bot]
e16e4b3e7b [skip ci] Build helpers on push 2026-01-09 14:03:04 +00:00
566649ecc3 Trigger CI
All checks were successful
Update helpers / build_helpers (push) Successful in 26s
2026-01-09 15:02:36 +01:00
7f8c112556 Revert "[skip ci] Build helpers on push"
This reverts commit aaa6a709fc.
2026-01-09 15:02:04 +01:00
Helpers compiler [bot]
aaa6a709fc [skip ci] Build helpers on push 2026-01-09 13:59:11 +00:00
66aee3d780 Trigger CI
All checks were successful
Update helpers / build_helpers (push) Successful in 27s
2026-01-09 14:58:44 +01:00
da4eeebc6d Add indentconfig 2026-01-09 14:54:59 +01:00
ab3abb113c Revert "[skip ci] Build helpers on push"
This reverts commit 951458a867.
2026-01-09 14:53:39 +01:00
Helpers compiler [bot]
951458a867 [skip ci] Build helpers on push 2026-01-09 13:52:14 +00:00
4f03b8eebc [CI] Trigger
All checks were successful
Update helpers / build_helpers (push) Successful in 29s
2026-01-09 14:50:19 +01:00
3a67a42535 [CI] Trigger
Some checks failed
Update helpers / build_helpers (push) Failing after 27s
2026-01-09 14:25:56 +01:00
bcd7ed17d0 [Core] Improve layout
Some checks failed
Update helpers / build_helpers (push) Failing after 13s
2026-01-09 14:17:27 +01:00
2c0db60c7d [CI] Update to also format 2026-01-09 14:15:34 +01:00
Helpers compiler [bot]
90ce264992 [skip ci] Build helpers on push 2026-01-05 15:08:49 +00:00
579cbd96ca [Tables] Remove labeledTable again
All checks were successful
Build docs / build_docs (push) Successful in 19s
Build helpers / build_helpers (push) Successful in 6s
2026-01-05 16:08:22 +01:00
Helpers compiler [bot]
88e2dc1a70 [skip ci] Build helpers on push 2026-01-05 15:05:43 +00:00
b9d9f6772c [Tables] Add env for labeled table
All checks were successful
Build docs / build_docs (push) Successful in 21s
Build helpers / build_helpers (push) Successful in 5s
2026-01-05 16:05:14 +01:00
Helpers compiler [bot]
b0e161e133 [skip ci] Build helpers on push 2026-01-05 10:29:09 +00:00
676bbd9306 Update vector command
All checks were successful
Build docs / build_docs (push) Successful in 23s
Build helpers / build_helpers (push) Successful in 5s
2026-01-05 11:28:39 +01:00
Helpers compiler [bot]
5f691d9372 [skip ci] Build helpers on push 2026-01-05 09:17:39 +00:00
fd66333f7a Fix spacing compact theorems
All checks were successful
Build helpers / build_helpers (push) Successful in 5s
2026-01-05 10:17:31 +01:00
Helpers compiler [bot]
db2fbc4c70 [skip ci] Build helpers on push 2026-01-05 08:05:12 +00:00
dcb077e116 Remove unnecessary commands
All checks were successful
Build helpers / build_helpers (push) Successful in 5s
2026-01-05 09:05:03 +01:00
LaTeX compiler [bot]
be655d2387 [skip ci] Build docs on push 2026-01-04 11:01:13 +00:00
cb173908b4 Add better code support
All checks were successful
Build docs / build_docs (push) Successful in 47s
Build helpers / build_helpers (push) Successful in 5s
2026-01-04 11:58:10 +01:00
Helpers compiler [bot]
6803d1f62d [skip ci] Build helpers on push 2026-01-02 06:28:59 +00:00
4eff956d53 New changes
All checks were successful
Build docs / build_docs (push) Successful in 21s
Build helpers / build_helpers (push) Successful in 5s
2026-01-02 07:28:26 +01:00
f622e2be55 [CI] Update 2026-01-02 07:21:59 +01:00
LaTeX compiler [bot]
9a19639d10 [skip ci] Build docs on push 2026-01-02 06:20:18 +00:00
bfc62a37eb Add new commands for vspace removal
Some checks failed
Build docs / build_docs (push) Successful in 21s
Build helpers / build_helpers (push) Failing after 5s
2026-01-02 07:19:58 +01:00
01e20cef5d [CI] Try to fix breaking on both workflow run 2026-01-02 07:16:56 +01:00
Helpers compiler [bot]
eda396d617 [skip ci] Build helpers on push 2026-01-02 06:11:50 +00:00
4522e88c92 Fix CI
All checks were successful
Build helpers / build_helpers (push) Successful in 5s
2026-01-02 07:11:43 +01:00
LaTeX compiler [bot]
04b388c382 [skip ci] Build docs on push 2026-01-02 06:10:00 +00:00
3d6d6234de Add new space remove commands
Some checks failed
Build docs / build_docs (push) Successful in 31s
Build helpers / build_helpers (push) Failing after 4s
2026-01-02 07:09:25 +01:00
Helpers compiler [bot]
4344f8f09d [skip ci] Build helpers on push 2025-12-24 06:22:30 +00:00
b1d81bdd06 Improve limit command
All checks were successful
Build helpers / build_helpers (push) Successful in 7s
2025-12-24 07:22:18 +01:00
LaTeX compiler [bot]
1e766b8133 [skip ci] Build docs on push 2025-12-23 15:26:44 +00:00
c5fccabba9 CI working?
All checks were successful
Build docs / build_docs (push) Successful in 1m6s
2025-12-23 16:25:37 +01:00
LaTeX compiler [bot]
e2a725bc51 [skip ci] Build docs on push 2025-12-23 13:57:37 +00:00
cc3144b170 Trigger build
Some checks failed
Build docs / build_docs (push) Failing after 3m32s
2025-12-23 14:55:05 +01:00
b908ae3b29 Better link docs 2025-12-23 14:32:31 +01:00
0ea3d9245c [CI] update author 2025-12-23 14:29:36 +01:00
janishutz
27c96d26a0 [skip ci] Build helpers on push 2025-12-23 13:23:28 +00:00
c6aa4c8d80 [CI] Update
All checks were successful
Build helpers / build_helpers (push) Successful in 4s
2025-12-23 14:23:21 +01:00
f1b64e8ddb [CI] More debugging
All checks were successful
Build helpers / build_helpers (push) Successful in 5s
2025-12-23 14:21:47 +01:00
a5cb9bb54d [CI] More debugging
All checks were successful
Build helpers / build_helpers (push) Successful in 5s
2025-12-23 14:21:04 +01:00
432fcb4153 Trigger build
All checks were successful
Build helpers / build_helpers (push) Successful in 4s
2025-12-23 14:19:03 +01:00
159b37a3d3 [CI] Debug helpers build
All checks were successful
Build helpers / build_helpers (push) Successful in 7s
2025-12-23 14:17:30 +01:00
baf964792a Better logging
All checks were successful
Build helpers / build_helpers (push) Successful in 5s
2025-12-23 14:11:01 +01:00
01047ba385 Add badge 2025-12-23 14:09:13 +01:00
c321acd063 [CI] Only update on push to docs 2025-12-23 14:06:04 +01:00
janishutz
1462cc0198 [skip ci] Build docs on push 2025-12-23 13:02:52 +00:00
6dbcd64ed4 [CI] Fix upload action
All checks were successful
Build docs / build_docs (push) Successful in 21s
2025-12-23 14:02:30 +01:00
8346a558c7 [CI] Debugging
All checks were successful
Build docs / build_docs (push) Successful in 20s
2025-12-23 14:01:41 +01:00
91cfc52ec8 [CI] Download helpers
All checks were successful
Build docs / build_docs (push) Successful in 26s
2025-12-23 13:59:34 +01:00
dba7f93d0d Trigger CI
Some checks failed
Build docs / build_docs (push) Failing after 2m20s
2025-12-23 13:56:06 +01:00
098ffcc618 [CI] Use full container
Some checks failed
Build docs / build_docs (push) Failing after 2m33s
2025-12-23 09:11:21 +01:00
4102cafa6e Revert "[CI] Remove docs build"
This reverts commit bdb72b2e2a.
2025-12-23 09:00:15 +01:00
bdb72b2e2a [CI] Remove docs build 2025-12-23 08:40:37 +01:00
5169d20bed [CI] Update workflow
Some checks failed
Build docs / build_docs (push) Failing after 15s
2025-12-23 07:20:58 +01:00
86f080a705 [CI] Try fix
Some checks failed
Build docs / build_docs (push) Failing after 7s
2025-12-23 07:09:40 +01:00
23037f11f6 [CI] Use upstream action
Some checks failed
Build docs / build_docs (push) Failing after 10s
2025-12-23 07:01:47 +01:00
8b4d775d1a [CI] Add back login
Some checks failed
Build docs / build_docs (push) Failing after 2s
2025-12-22 21:49:37 +01:00
3406ad8951 [CI] Remove login
Some checks failed
Build docs / build_docs (push) Failing after 5s
2025-12-22 21:48:18 +01:00
495f3a8503 [CI] Try to fix
Some checks failed
Build docs / build_docs (push) Failing after 6s
2025-12-22 21:41:00 +01:00
7101d5f017 [CI] Update
Some checks failed
Build docs / build_docs (push) Failing after 8s
2025-12-22 21:08:07 +01:00
d3ebc929a0 [CI] Move to newer latex action
Some checks failed
Build docs / build_docs (push) Failing after 8s
2025-12-22 21:04:53 +01:00
284d957a92 [CI] Debugging
Some checks failed
Build docs / build_docs (push) Failing after 7s
2025-12-22 20:57:53 +01:00
dc62654e42 [CI] Try another fix
Some checks failed
Build docs / build_docs (push) Failing after 7s
2025-12-22 20:54:45 +01:00
6b052b8152 [CI] Use updated latex workflow
Some checks failed
Build docs / build_docs (push) Failing after 8s
2025-12-22 20:52:19 +01:00
100f16afda [CI] Fix syntax error
Some checks failed
Build docs / build_docs (push) Failing after 8s
2025-12-22 18:31:19 +01:00
491cdd9441 [CI] Fix syntax
Some checks failed
Build docs / build_docs (push) Failing after 3s
2025-12-22 18:30:30 +01:00
ca9fd7a66f [CI] Sign into registry 2025-12-22 18:29:49 +01:00
7bf361ccd4 [CI] Fix more syntax errors
Some checks failed
Build docs / build_docs (push) Failing after 6s
2025-12-22 18:23:12 +01:00
c0134e47c2 [CI] Fix syntax error
Some checks failed
Build docs / build_docs (push) Failing after 3s
2025-12-22 18:22:02 +01:00
e2974cea74 [CI] Trigger
Some checks failed
Build docs / build_docs (push) Failing after 0s
2025-12-22 18:21:24 +01:00
6394ce2591 [CI] Try fix 2025-12-22 18:21:08 +01:00
4db6733865 Trigger
Some checks failed
Build docs / build_docs (push) Failing after 0s
2025-12-22 18:19:56 +01:00
7a73c73687 [CI] Add docs auto-build 2025-12-22 18:19:27 +01:00
24b4fe0959 [CI] Trigger
All checks were successful
Build helpers / build_docs (push) Successful in 4s
2025-12-22 17:49:56 +01:00
43819d942c [CI] Remove latex compile action 2025-12-22 15:49:27 +01:00
7ee9152f41 [CI] Debug docs
Some checks failed
Build Docs / build_docs (push) Failing after 7s
2025-12-22 15:34:37 +01:00
1518007fe2 [CI] Debug docs
Some checks failed
Build Docs / build_docs (push) Failing after 6s
2025-12-22 15:14:22 +01:00
3864d838d6 [CI] Debug docs
Some checks failed
Build Docs / build_docs (push) Failing after 8s
2025-12-22 15:13:00 +01:00
98b3e7ee66 [CI] Do not build helpers if no corresponding files changed
Some checks failed
Build Docs / build_docs (push) Failing after 6s
2025-12-22 15:12:16 +01:00
dca911c00b [CI] Debug docs build
Some checks failed
Build Docs / build_docs (push) Failing after 6s
Build helpers / build_docs (push) Successful in 5s
2025-12-22 15:10:18 +01:00
bb42a2e803 [CI] Fix helpers auto-build
All checks were successful
Build helpers / build_docs (push) Successful in 5s
2025-12-22 15:04:35 +01:00
8a238d1a8c [CI] Debugging
Some checks failed
Build helpers / build_docs (push) Failing after 5s
2025-12-22 15:03:47 +01:00
e64a76745a [CI] Build fixes
Some checks failed
Build helpers / build_docs (push) Failing after 8s
2025-12-22 15:01:19 +01:00
978039b0d0 [CI] Add
Some checks failed
Build helpers / build_docs (push) Failing after 1m9s
Build Docs / build_docs (push) Failing after 2m44s
2025-12-22 14:54:57 +01:00
cc78cee14f [Math] Add conditioning shortcut 2025-12-22 08:20:10 +01:00
962989468b [Math] Improve argmin command 2025-12-22 07:46:03 +01:00
b05be21b92 [Math] Add argmin command 2025-12-22 07:38:10 +01:00
2be8109e90 [Build] Run build 2025-12-04 11:28:06 +01:00
a0893a9887 [Core] Add smaller loader 2025-12-04 11:27:57 +01:00
73b33777e3 [Math] Fix conflicts 2025-11-11 13:05:38 +01:00
54f58f0b3a [Math] Add more shortcuts for mathbb 2025-11-11 12:16:25 +01:00
5a696f57c4 [Style] Remove shortcut, conflicted 2025-11-11 09:12:59 +01:00
cf5879b9a4 [Style] Actually add shortcut & build 2025-11-11 09:11:29 +01:00
d600d6d8f3 [Style] Add shortcut for italic and bold 2025-11-11 09:10:20 +01:00
6e6bdba382 [Core] Remove unneeded packages 2025-11-11 09:05:26 +01:00
66725558bb [Include] Add deprecation warning and fix loading through old method 2025-11-10 11:49:57 +01:00
491adc1744 [Style] Add url and href highlighting 2025-11-10 09:15:13 +01:00
47ed047c7e [Docs] Update for new import scheme 2025-11-03 16:16:32 +01:00
b8473c5f68 [Build] Improve helper import 2025-11-03 16:07:03 +01:00
80 changed files with 4617 additions and 4066 deletions

View File

@@ -0,0 +1,35 @@
name: Update docs
on:
push:
paths:
- 'docs/**'
jobs:
build_docs:
runs_on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v6
- name: Sign into gitea registry
uses: https://github.com/docker/login-action@v3
with:
username: ${{ vars.REGISTRY_USER_USERNAME }}
password: ${{ secrets.REGISTRY_USER_PASSWORD }}
registry: ${{ vars.REGISTRY_BASE_URL }}
- name: Run format of docs
uses: actions/latex-format@main
with:
workdir: docs
- name: Run build
uses: actions/latex-full@main
with:
workdir: docs
include_helpers: true
- name: Upload compiled docs
uses: actions/git-auto-commit-action@v7
with:
commit_message: "[skip ci] Build docs on push"
file_pattern: '*.pdf'
commit_user_name: LaTeX compiler [bot]
commit_user_email: actions@janishutz.com
commit_author: LaTeX compiler [bot] <actions@janishutz.com>
push_options: "--force"

View File

@@ -0,0 +1,36 @@
name: Update helpers
on:
push:
paths:
- 'main/**'
- 'extra/**'
jobs:
build_helpers:
runs_on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v6
- name: Sign into gitea registry
uses: https://github.com/docker/login-action@v3
with:
username: ${{ vars.REGISTRY_USER_USERNAME }}
password: ${{ secrets.REGISTRY_USER_PASSWORD }}
registry: ${{ vars.REGISTRY_BASE_URL }}
- name: Run format of main
uses: actions/latex-format@main
with:
workdir: main
- name: Run format of extra
uses: actions/latex-format@main
with:
workdir: extra
- name: Run build
run: ./build.sh
- name: Upload compiled helpers
uses: actions/git-auto-commit-action@v7
with:
commit_message: "[skip ci] Build helpers on push"
commit_user_name: Helpers compiler [bot]
commit_user_email: actions@janishutz.com
commit_author: Helpers compiler [bot] <actions@janishutz.com>
push_options: "--force"

1
.gitignore vendored
View File

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

82
.latexindent.yaml Normal file
View File

@@ -0,0 +1,82 @@
# Use spaces for indent (because f*k tabs)
defaultIndent: " "
# Limit Number of backups
maxNumberOfBackups: 3
verbatimEnvironments:
verbatim: 1
lstlisting: 1
minted: 1
code: 1
indentRules:
recall: " "
remarks: " "
remark: " "
guides: " "
properties: " "
restrictions: " "
limitations: " "
terms: " "
notation: " "
usage: " "
task: " "
proof: " "
general: " "
simplebox: " "
definition: " "
theorem: " "
lemma: " "
corollary: " "
axiom: " "
fact: " "
proposition: " "
example: " "
formula: " "
conjugation: " "
forms: " "
lookForAlignDelims:
tables:
delims: 1
alignDoubleBackSlash: 1
spacesBeforeDoubleBackSlash: 1
multiColumnGrouping: 0
alignRowsWithoutMaxDelims: 1
spacesBeforeAmpersand: 1
spacesAfterAmpersand: 1
justification: left
alignFinalDoubleBackSlash: 0
dontMeasure: 0
delimiterRegEx: (?<!\\)(&)
delimiterJustification: left
lookForChildCodeBlocks: 1
alignContentAfterDoubleBackSlash: 0
spacesAfterDoubleBackSlash: 1
specialBeginEnd:
If:
begin: '\\If'
middle:
- '\\ElsIf'
- '\\Else'
end: '\\EndIf'
lookForThis: 1
For:
begin: '\\For'
end: '\\EndFor'
lookForThis: 1
Procedure:
begin: '\\Procedure'
end: '\\EndProcedure'
lookForThis: 1
Function:
begin: '\\Function'
end: '\\EndFunction'
lookForThis: 1
While:
begin: '\\While'
end: '\\EndWhile'
lookForThis: 1
specialBeforeCommand: 1

View File

@@ -3,15 +3,18 @@
<h1>LaTeX Helper files</h1> <h1>LaTeX Helper files</h1>
</div> </div>
This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly. ![Docs build](https://git.janishutz.com/janishutz/latex/actions/workflows/build-docs.yml/badge.svg?branch=main&event=push)
![Dist build](https://git.janishutz.com/janishutz/latex/actions/workflows/build-helpers.yml/badge.svg?branch=main&event=push)
This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly.
# New import scheme # New import scheme
I have done some tweaks to support a new import scheme, making imports much more flexible I have done some tweaks to support a new import scheme, making imports much more flexible
# Getting started # Getting started
See the docs [here](https://git.janishutz.com/janishutz/latex/src/branch/main/docs/docs.pdf) to get started. See the docs [here](https://git.janishutz.com/janishutz/latex/raw/branch/main/docs/docs.pdf) to get started.
# Recommended LaTeX editors # Recommended LaTeX editors

View File

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

View File

@@ -1,61 +0,0 @@
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")

View File

@@ -1,63 +0,0 @@
# 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

View File

@@ -1,29 +0,0 @@
% ┌ ┐
% │ 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}

50
config/config.tex Normal file
View File

@@ -0,0 +1,50 @@
% ___ ___
% ( _ \ / ___)_
% | ( (_) _ ___ | (__ (_) __
% | | _ / _ \/ _ \ __)| |/ _ \
% | (_( ) (_) ) ( ) | | | | (_) |
% (____/ \___/(_) (_)_) (_)\__ |
% ( )_) |
% \___/
% 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}
% Whether or not to use landscape orientation for the cheat sheet
\boolfalse{cheatSheetLandscape}
% Set the number of columns to use (only affects the CheatSheet style and only if cheatSheetLandscape is set to true)
\setcounter{colCount}{3}

View File

@@ -1,25 +0,0 @@
% ┌ ┐
% │ 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}

View File

@@ -1,81 +0,0 @@
% ┌ ┐
% │ 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}

View File

@@ -1,37 +0,0 @@
% ┌ ┐
% │ 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}

View File

@@ -1,3 +1,4 @@
% ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ % ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
% █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █ % █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
% █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█ % █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
@@ -21,7 +22,6 @@
% ── Imports ───────────────────────────────────────────────────────── % ── Imports ─────────────────────────────────────────────────────────
\typeout{[Core] Importing!} \typeout{[Core] Importing!}
\ClassWarning{janishutz-helpers}{Using legacy (v1) helpers. Please consider updating to the new version}
\usepackage[table, dvipsnames]{xcolor} \usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath} \usepackage{amsmath}

View File

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

424
dist/minimal.tex vendored Normal file
View File

@@ -0,0 +1,424 @@
% ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
% █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
% █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
% █ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
% █ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
% █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
% █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
%
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Load this before the config file
% ── Imports ─────────────────────────────────────────────────────────
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage[most]{tcolorbox}
\usepackage{cancel}
\usepackage{etoolbox}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{mathrsfs}
\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}
\usepackage[ngerman]{babel}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
% Deprecated, as not useful
\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}
\newcounter{colCount}
\newbool{cheatSheetLandscape}
% ── 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...}
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\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}}
}
\typeout{[Setup] Complete}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\startDocumentNoTitle
}
% Or this one, if you don't want a title
\newcommand{\startDocumentNoTitle}{
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\typeout{[Setup] Using barebones setup}
\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]{
\typeout{[Setup] Using CheatSheet setup}
\loadLang
\edef\valtrue{true}
\ifbool{cheatSheetLandscape}{
\typeout{[Setup] Using landscape with \arabic{colCount} columns}
\usepackage[landscape,a4paper,textwidth=28.5cm,textheight=20cm]{geometry}
\usepackage{flowfram}
\allowdisplaybreaks
\ffvadjustfalse
\setlength{\columnsep}{1cm}
\Ncolumn{\arabic{colCount}}
}{
\typeout{[Setup] Using portrait}
\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 }}
% ___ ___
% ( _ \ / ___)_
% | ( (_) _ ___ | (__ (_) __
% | | _ / _ \/ _ \ __)| |/ _ \
% | (_( ) (_) ) ( ) | | | | (_) |
% (____/ \___/(_) (_)_) (_)\__ |
% ( )_) |
% \___/
% 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}
% Whether or not to use landscape orientation for the cheat sheet
\boolfalse{cheatSheetLandscape}
% Set the number of columns to use (only affects the CheatSheet style and only if cheatSheetLandscape is set to true)
\setcounter{colCount}{3}
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
%▒▒ ▒▒▒▒▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒ ▒▒▒▒
%▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓
%▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓ ▓ ▓
%▓ ▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓▓▓▓
%███ ██████ █████ ████ ███ ███
%██████████████████████ ███████████████████
% 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{\hrmvspace}{\vspace{-0.25pc}}
\newcommand{\rmvspace}{\vspace{-0.5pc}}
\newcommand{\mrmvspace}{\vspace{-0.75pc}}
\newcommand{\drmvspace}{\vspace{-1pc}}
\newcommand{\dhrmvspace}{\vspace{-1.25pc}}
\newcommand{\dnrmvspace}{\vspace{-1.5pc}}
\newcommand{\dmrmvspace}{\vspace{-1.75pc}}
\newcommand{\ddrmvspace}{\vspace{-2pc}}
\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}}}}
% 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}}
% 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}
}
%▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
%██░▄▄▀█▀▄▄▀█░▄▀▄░█░▄▀▄░█▀▄▄▀█░▄▄▀
%██░████░██░█░█▄█░█░█▄█░█░██░█░██░
%██░▀▀▄██▄▄██▄███▄█▄███▄██▄▄██▄██▄
%▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
% General tcolorboxes
\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}

1071
dist/most.tex vendored Normal file

File diff suppressed because it is too large Load Diff

1109
dist/recommended.tex vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,57 +1,83 @@
\documentclass{article} \documentclass{article}
\input{../janishutz-helpers.tex} \input{~/projects/latex/dist/full.tex}
\setup{Docs - \LaTeX \hspace{0mm} helpers} \setup{Docs - \LaTeX \hspace{0mm} helpers}
\setLang{en}
\begin{document} \begin{document}
\startDocument \startDocument
\usetcolorboxes
% ── Title page ────────────────────────────────────────────────────── \vspace{4cm}
\vspace{2cm}
\begin{center} \begin{center}
\includegraphics[width=0.5\linewidth]{../assets/logo.jpg} \includegraphics[width=0.5\linewidth]{../assets/logo.jpg}
\end{center} \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 \newpage
\printtoc{Aquamarine} \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}.
This document is automatically compiled on push from the files in the docs directory. If there are issues with the doc, please contact me at \url{https://support.janishutz.com?a=add}
\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}/g| and \verb|/\\stepcounter{all}/\\stepLabelNumber{all}/g|.
Additionally, to use auto-expanding vector arrows, we have migrated to using \verb|\vect{x}| to allow for the built-in \verb|\vec{x}| to be accessible.
Thus, any documents that used the \verb|\vec| command, you can migrate them to the new format using the regex \verb|/\\vec/\\vect/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}
% ┌ ┐ % ┌ ┐
% │ Imports % │ Reference
% └ ┘ % └ ┘
\input{./parts/intro.tex}
\input{./parts/usage.tex}
\input{./parts/migration.tex}
% ── Reference ───────────────────────────────────────────────────────
\input{./parts/reference/intro.tex} \input{./parts/reference/intro.tex}
\input{./parts/reference/loading.tex} \input{./parts/reference/loading.tex}
\input{./parts/reference/math.tex} \input{./parts/reference/math.tex}
\input{./parts/reference/cs.tex} \input{./parts/reference/cs.tex}
\input{./parts/reference/style/intro.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/default.tex}
\input{./parts/reference/style/tcolorbox/counter.tex} \input{./parts/reference/style/tcolorbox/counter.tex}
\input{./parts/reference/style/tcolorbox/other.tex} \input{./parts/reference/style/tcolorbox/other.tex}
\input{./parts/reference/style/descriptors.tex} \input{./parts/reference/style/descriptors.tex}
\input{./parts/reference/tables-index.tex} \input{./parts/reference/tables-index.tex}
\input{./parts/reference/extras.tex} \input{./parts/reference/extras.tex}
\input{./parts/troubleshooting.tex} \input{./parts/troubleshooting.tex}
\end{document} \end{document}

View File

@@ -0,0 +1,6 @@
\newsection
\section{Custom Loader}
You can create a custom loader by defining a \verb|load|\{\textit{string}\} macro (or any other, if you are aware you need to change that in your main file for it to work) that uses the \verb|\dir| command to resolve the custom parts.
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.

View File

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

View File

@@ -1,30 +0,0 @@
\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,7 +1,9 @@
\newpage \newpage
\subsection{CS-Commands} \subsection{CS-Commands}
These commands have to be executed inside math environment These commands have to be executed inside math environment, except \verb|\timecomplexity| and \verb|\tc|.
\begin{itemize} \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|\tct| Time complexity in $\tct{}$-notation (average case)
\item \verb|\tco| Time complexity in $\tco{}$-notation (worst case / upper bound) \item \verb|\tco| Time complexity in $\tco{}$-notation (worst case / upper bound)
\item \verb|\tcl| Time complexity in $\tcl{}$-notation (best case / lower bound) \item \verb|\tcl| Time complexity in $\tcl{}$-notation (best case / lower bound)
@@ -14,7 +16,7 @@ These commands have to be executed inside math environment
\item \verb|\alphabetbool| Prints $\alphabetbool$ \item \verb|\alphabetbool| Prints $\alphabetbool$
\end{itemize} \end{itemize}
\subsubsection{Algorithms} \fhlc{Aquamarine}{Algorithms}
\begin{minted}{latex} \begin{minted}{latex}
\begin{algo}{functionName(A)} \begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$} \Procedure{functionName}{$(A)$}
@@ -28,41 +30,3 @@ These commands have to be executed inside math environment
\State\Return "Hello World" \State\Return "Hello World"
\EndProcedure \EndProcedure
\end{algo} \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,9 +1,67 @@
\subsection{BibTeX} \newpage
\subsection{Extras}
\subsubsection{BibTeX}
\textit{Included in \texttt{recommended} and up}
Use \verb|\setupBiber|\{\textit{/path/to/your/bib/sources.bib file}\} in the preamble to prepare, then use \verb|\printbib| to print your bibliography. 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. 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. You need to use that inside the preamble as well.
\subsection{Glossary} % ────────────────────────────────────────────────────────────────────
\subsubsection{Glossary}
\textit{Included in \texttt{recommended} and up}
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|. 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 instead, you want to have the code in separate source files, you can use (relative to root file)
\begin{minted}{latex}
\inputcode{<language>}{path/to/source/file}
\end{minted}
The helpers also provide a wrapper for this, which also prints the filename:
\begin{minted}{latex}
\inputcodewithfilename{<language>}{<base dir>}{<file>}
\end{minted}
where the base dir is relative to the root file of the latex document and is not displayed (and should end in \texttt{/}), and the file is relative to the base dir and is displayed.
Example (assume file at \texttt{./code/lib/demo.py} and you want the file name to be \texttt{lib/demo.py}):
\begin{minted}{latex}
\inputcodewithfilename{python}{code/}{lib/demo.py}
\end{minted}
You may of course leave the base dir argument empty as well.
\fhlc{Cyan}{Inline 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
Alternatively, to get code highlighting, you can use \verb|\mint{<language>}|\texttt{|code|}

View File

@@ -2,10 +2,11 @@
\section{Full Command Reference} \section{Full Command Reference}
\subsection{Variables} \subsection{Variables}
\begin{itemize} \begin{itemize}
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
\item \textit{string}: Any normal text \item \textit{string}: Any normal text
\item \textit{boolean}: \texttt{true} or \texttt{false}
\item \textit{math}: Any math input \item \textit{math}: Any math input
\item \textit{number}: Any non-negative integer, i.e. no commas \item \textit{number}: Any non-negative integer, i.e. no commas
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor} or as defined in the color config file \item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor}
\item \textit{langauge}: 2-character country code (currently only \texttt{de} and \texttt{en} supported)
\end{itemize} \end{itemize}

View File

@@ -3,54 +3,38 @@
\begin{itemize} \begin{itemize}
\item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only \item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only
\item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only \item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only
\item \verb|\renewcommand{\<descriptor>NamingDE}|\{\textit{string}\} Configure translations for descriptors on the fly (for DE) \item \verb|\renewcommand{\name}|\{\textit{string}\} Change the name (for letters) for this document only
\item \verb|\renewcommand{\<descriptor>NamingEN}|\{\textit{string}\} Configure translations for descriptors on the fly (for EN) \item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only
\item \verb|\setnumberingpreset|\{\textit{string}\} \item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only
Change the numbering preset of definitions, lemmas, etc for this document. \item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only
Value can be \texttt{off}, \texttt{separate}, \texttt{combined}. \item \verb|\renewcommand{\theoremde}|\{\textit{string}\} Change the translation for theorem in German (usually either ``Satz'' or ``Theorem'')
\item \verb|\renewcommand{<descriptor>numbering}|\{\textit{string}\} \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
Change the numbering for an individual descriptor, passed as first argument. \item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc.
The second value can be \texttt{off}, \texttt{separate}, \texttt{combined} or \texttt{default}. 0 = $<$section$>$.$<$number$>$,\\
If set to \texttt{default}, it will follow the \verb|\numberingpreset| setting. 1 = $<$section$>$.$<$subsection$>$.$<$number$>$,\\
If you do not override it here, it will follow your global config as set in the config directory 2 = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$\\
and if unset there, it will follow the \verb|\numberingpreset| setting. 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|\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{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors
\item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command \item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command
\item \verb|\loadGerman| Load german configuration. Needs to be in preamble and you may only use it once \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. \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\}}. 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}. 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. 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} \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
\end{itemize}
\newpage \newpage
\subsection{Setup, Loading \& Translation} \subsection{Setup, Loading \& Translation}
\begin{itemize} \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|\setup|\{\textit{string}\} Prepare the document with the \textit{string} being the title
\item \verb|\setupCheatSheet|[\textit{boolean}]\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \item \verb|\setupCheatSheet|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title
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|\setupBarebones|\{\textit{string}\} Minimal setup, only borders and title set
\item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}| \item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}|
\item \verb|\startDocumentNoTile| Initialize the document without printing the title. 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|\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|\tr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate|
\item \verb|\numberingOn| Turn on the numbering (if previously turned off using \verb|\numberingOff| or set in the config) \item \verb|\numberingOn| Turn on the numbering (will set back to config previously set by \verb|\setNumberingStyle|)
\item \verb|\numberingOff| Turn off the numbering (useful to temporarily turn off numbering) \item \verb|\numberingOff| Turn off the numbering (if you want to temporarily not use it. Do not use \verb|\setNumberingStyle| for that)
\end{itemize} \end{itemize}

View File

@@ -5,13 +5,14 @@ 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|\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|\floor|\{\textit{math}\} Round down symbol, e.g. $\floor{n}$
\item \verb|\ceil|\{\textit{math}\} Round up symbol, e.g. $\ceil{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|\Leftrightarrowequiv| Equivalence transformation symbol, $\Leftrightarrowequiv$.
\item \verb|\Rightarrowequiv| Equivalence transformation symbol, $\Rightarrowequiv$. \item \verb|\Rightarrowequiv| Equivalence transformation symbol, $\Rightarrowequiv$.
\item \verb|\Leftarrowequiv| Equivalence transformation symbol, $\Leftarrowequiv$. \item \verb|\Leftarrowequiv| Equivalence transformation symbol, $\Leftarrowequiv$.
\item \verb|\defAs| Define as, i.e. $\defAs$ \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|\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|\defImplies| Define as, but with one-sided implication, i.e. $\defImplies$
\item \verb|\divider| Divider or divides symbol, e.g. $a \divider b$ \item \verb|\divides| Divider or divides symbol, e.g. $a \divides b$
\item \verb|\lcm| Least common multiple, $\lcm$ \item \verb|\lcm| Least common multiple, $\lcm$
\item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$ \item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$
\item \verb|\arccosh| Inverse of hyperbolic cosine, $\arccosh$ \item \verb|\arccosh| Inverse of hyperbolic cosine, $\arccosh$
@@ -20,12 +21,8 @@ All these have to be executed in the math environment.
\item \verb|\limni| Shortened limit notation for $n \rightarrow \infty$, $\displaystyle \limni$ \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|\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|\limsupni| Shortened limit superior notation for $n \rightarrow \infty$, $\displaystyle \limsupni$
\item \verb|\diff|\{\textit{math}\} Derivative, $\displaystyle \diff{x}$ \item \verb|\der|\{\textit{math}\} Derivative, $\displaystyle \der{x}$
\item \verb|\diffn|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \diffn{x}{2}$ \item \verb|\dern|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \dern{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. \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|. Can be used for example in limits as an alternative to \verb|\atop| or \verb|\substack|.
\end{itemize} \end{itemize}

View File

@@ -1,16 +1,13 @@
\newpage \newpage
\subsubsection{Inline \& Shortened descriptors} \subsubsection{Inline \& Shortened descriptors}
\label{sec:descriptors} \textit{Included in \texttt{most} and up}
See \ref{sec:counters} for a guide on how to change the current number. See \ref{sec:counters} for a guide on how to change the current number.
The signature is \verb|\inlinedefinition|[\textit{description}], where the description is optional (and if you omit it, don't write the square brackets!) \fhlc{Aquamarine}{Inline}
Alternatively, you can use \verb|\inline[desc]{definition}|.
\paragraph{Inline}
\begin{tables}{ll}{Command & Output} \begin{tables}{ll}{Command & Output}
\verb|\inlineexample| & \inlineexample \\ \verb|\inlineex| & \inlineex \\
\verb|\inlinedefinition| & \inlinedefinition \\ \verb|\inlinedef| & \inlinedef \\
\verb|\inlinetheorem| & \inlinetheorem \\ \verb|\inlinetheorem| & \inlinetheorem \\
\verb|\inlinelemma| & \inlinelemma \\ \verb|\inlinelemma| & \inlinelemma \\
\verb|\inlinecorollary| & \inlinecorollary \\ \verb|\inlinecorollary| & \inlinecorollary \\
@@ -21,10 +18,10 @@ Alternatively, you can use \verb|\inline[desc]{definition}|.
\verb|\inlineproof| & \inlineproof \\ \verb|\inlineproof| & \inlineproof \\
\end{tables} \end{tables}
\paragraph{Shortened} \fhlc{Aquamarine}{Shortened}
\begin{tables}{ll}{Command & Output} \begin{tables}{ll}{Command & Output}
\verb|\shortexample| & \shortexample \\ \verb|\shortex| & \shortex \\
\verb|\shortdefinition| & \shortdefinition \\ \verb|\shortdef| & \shortdef \\
\verb|\shorttheorem| & \shorttheorem \\ \verb|\shorttheorem| & \shorttheorem \\
\verb|\shortlemma| & \shortlemma \\ \verb|\shortlemma| & \shortlemma \\
\verb|\shortcorollary| & \shortcorollary \\ \verb|\shortcorollary| & \shortcorollary \\
@@ -34,11 +31,42 @@ Alternatively, you can use \verb|\inline[desc]{definition}|.
\verb|\shortremark| & \shortremark \\ \verb|\shortremark| & \shortremark \\
\verb|\shortproof| & \shortproof \\ \verb|\shortproof| & \shortproof \\
\end{tables} \end{tables}
\newpage \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} \subsubsection{Changing the counters}
\label{sec: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 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}\},
@@ -53,8 +81,10 @@ You may also use \verb|\stepLabelNumber|\{\textit{name of the environment}\} to
\subsubsection{Referencing counters} \subsubsection{Referencing counters}
\label{sec:counter-ref} \textit{Included in \texttt{most} and up, introduced on October 18, 2025}
If you wish to reference a counter, you can do so by using the \verb|\labeledInline| and \verb|\labeledShort|,
which have the following signature If you wish to reference a counter, you can do so by writing
\mint{latex}|\labeledInline[description]{<descriptor name>}{<your label>}|
where you can replace \verb|<your label>| with a label like \texttt{def:your-def-name} \verb|\ref{<counter name>:<section>-<subsection>-<subsubsection>-<counter value>}|,
or of course, if you do not label subsections and / or subsubsection, dropping them.

View File

@@ -1,9 +1,23 @@
\newpage \newpage
\subsection{Style} \subsection{Style}
General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope}
\begin{itemize} \begin{itemize}
\item \verb|\TODO| Print a highlighted \TODO \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|\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|\shade|\{\textit{color}\}\{\textit{string}\} Print \shade{ForestGreen}{shaded text}
\item \verb|\backdrop|\{\textit{string}\} Print \backdrop{text with gray backdrop} \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|\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|\hrmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (0.5x compared to \verb|\rmvspace|)
\item \verb|\rmvspace| Removes some of the vertical whitespace printed by environments like \verb|align|
\item \verb|\mrmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (1.5x compared to \verb|\rmvspace|)
\item \verb|\drmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (2x compared to \verb|\rmvspace|)
\item \verb|\dhrmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (2.5x compared to \verb|\rmvspace|)
\item \verb|\dnrmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (3x compared to \verb|\rmvspace|)
\item \verb|\dmrmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (3.5x compared to \verb|\rmvspace|)
\item \verb|\ddrmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (4x compared to \verb|\rmvspace|)
\end{itemize} \end{itemize}

View File

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

View File

@@ -1,8 +1,10 @@
\newpage \newpage
\subsubsection{Tcolorboxes} \subsubsection{Tcolorboxes}
\paragraph{General boxes} \textit{Included in \texttt{most} and up}
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{terms}[]{Title here}
\begin{minted}{latex} \begin{minted}{latex}
\begin{terms}[]{Title here} \begin{terms}[]{Title here}
@@ -27,6 +29,14 @@ These tcolorboxes can be created using the code displayed inside them.
\end{minted} \end{minted}
\end{recall} \end{recall}
\begin{remarks}[]{Title here}
\begin{minted}{latex}
\begin{remarks}[]{Title here}
\end{remarks}
\end{minted}
\end{remarks}
\begin{usage}[]{Title here} \begin{usage}[]{Title here}
\begin{minted}{latex} \begin{minted}{latex}
\begin{usage}[]{Title here} \begin{usage}[]{Title here}
@@ -35,6 +45,15 @@ These tcolorboxes can be created using the code displayed inside them.
\end{minted} \end{minted}
\end{usage} \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{properties}[]{Title here}
\begin{minted}{latex} \begin{minted}{latex}
\begin{properties}[]{Title here} \begin{properties}[]{Title here}

View File

@@ -1,9 +1,26 @@
\paragraph{Flexible} \vspace{1cm}
This tcolorbox has all the styles applied, but allows configuring the colour and both title boxes \fhlc{Aquamarine}{Language-Specific}
\begin{conjugation}[]{Title here}
\begin{minted}{latex}
\begin{conjugation}[]{Title here}
\end{conjugation}
\end{minted}
\end{conjugation}
\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} \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{minted}{latex}
\begin{general}[]{title}{second title}{red} \begin{general}[]{title}{second title}{red}

View File

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

View File

@@ -3,13 +3,27 @@
\subsection{Visual Errors} \subsection{Visual Errors}
\subsubsection{Missing headers \& footers} \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. 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} \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. 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} \subsection{Minted}
\texttt{minted} is a syntax highlighting library. It can cause issues when running, as it needs extra configuration for the compiler. \texttt{minted} is a syntax highlighting library. It can cause issues when running, as it needs extra configuration for the compiler.

View File

@@ -5,7 +5,7 @@ You can type \texttt{latex-prepare} and press tab, if you have installed the VSC
\begin{minted}{latex} \begin{minted}{latex}
\documentclass{article} \documentclass{article}
\input{~/path/to/helpers/janishutz-helpers.tex} % TODO: Change your path here \input{~/projects/latex/dist/recommended.tex} % TODO: Change here your inclusion level and path
\setup{Type your title here} \setup{Type your title here}
@@ -17,26 +17,34 @@ Type your \LaTeX here
\end{document} \end{document}
\end{minted} \end{minted}
On the line with the TODO, you can change the import path, as well as scope.
Simply replace the ``recommended'' with any of the below.
\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{full} 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}
If you are using the old import style, you can use the \verb|\load| command with these options
\subsection{Configuration} \subsection{Configuration}
You can set a global config in the config files in the helper files directory. They are located at You can set a global config in config file in helper files directory. The file is 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} \subsection{Letters}
\label{sec:letters}
Letters require a different setup compared to a normal \LaTeX document: Letters require a different setup compared to a normal \LaTeX document:
\begin{minted}{latex} \begin{minted}{latex}
\documentclass[12pt,a4paper]{scrlttr2} \documentclass[12pt,a4paper]{scrlttr2}
\input{~/path/to/helper/letter.tex} % TODO: Change your path here \newcommand{\dir}{~/path/to/helper} % TODO: Change your path here! No trailing slashes!
\input{\dir/include.tex}
\load{letter}
\setkomavar{subject}{} % type your subject here \setkomavar{subject}{} % type your subject here
\begin{document}\raggedright \begin{document}\raggedright

BIN
examples/letter/letter.pdf Normal file

Binary file not shown.

View File

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

View File

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

17
extra/glossary.tex Normal file
View File

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

View File

@@ -1,8 +1,12 @@
% ┌ ┐ % ┌ ┐
% │ Minted │ % │ Minted │
% └ ┘ % └ ┘
\RequirePackage{minted} \usepackage{minted}
\RequirePackage{fancyvrb} \usepackage{fancyvrb}
% Args: Code.
% Alternative: Use \mint{<language>}|code|
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
% Args: Language, Code % Args: Language, Code
\newenvironment{code}[1]{ \newenvironment{code}[1]{

42
include.tex Normal file
View File

@@ -0,0 +1,42 @@
% Loader
\ClassWarning{janishutz-helpers}{Using legacy loading method. Please see the docs for updating}
\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
}

View File

@@ -1,22 +0,0 @@
#!/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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

177
main/core.tex Normal file
View File

@@ -0,0 +1,177 @@
%
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Load this before the config file
% ── Imports ─────────────────────────────────────────────────────────
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage[most]{tcolorbox}
\usepackage{cancel}
\usepackage{etoolbox}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{mathrsfs}
\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}
\usepackage[ngerman]{babel}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
% Deprecated, as not useful
\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}
\newcounter{colCount}
\newbool{cheatSheetLandscape}
% ── 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...}
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\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}}
}
\typeout{[Setup] Complete}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\startDocumentNoTitle
}
% Or this one, if you don't want a title
\newcommand{\startDocumentNoTitle}{
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\typeout{[Setup] Using barebones setup}
\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]{
\typeout{[Setup] Using CheatSheet setup}
\loadLang
\edef\valtrue{true}
\ifbool{cheatSheetLandscape}{
\typeout{[Setup] Using landscape with \arabic{colCount} columns}
\usepackage[landscape,a4paper,textwidth=28.5cm,textheight=20cm]{geometry}
\usepackage{flowfram}
\allowdisplaybreaks
\ffvadjustfalse
\setlength{\columnsep}{1cm}
\Ncolumn{\arabic{colCount}}
}{
\typeout{[Setup] Using portrait}
\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

@@ -3,17 +3,21 @@
% ░▒█░░░░█░░█░█░▀░█░█▄▄█░█░▒█░░█░░█▀▀░█▄▄▀░░░░▀▀▀▄▄░█░░░░█▀░█▀▀░█░▒█░█░░░█▀▀ % ░▒█░░░░█░░█░█░▀░█░█▄▄█░█░▒█░░█░░█▀▀░█▄▄▀░░░░▀▀▀▄▄░█░░░░█▀░█▀▀░█░▒█░█░░░█▀▀
% ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀ % ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀
% Extra imports % Extra imports
\RequirePackage{stmaryrd} \usepackage{stmaryrd}
\RequirePackage{algorithm} \usepackage{algorithm}
\RequirePackage{algpseudocodex} \usepackage{algpseudocodex}
\RequirePackage{setspace} \usepackage{setspace}
\RequirePackage{verbatim} \usepackage{verbatim}
\RequirePackage{turnstile} \usepackage{turnstile}
\RequirePackage{forloop} \usepackage{forloop}
\newcommand{\Indent}{\hspace{\algorithmicindent}} \newcommand{\Indent}{\hspace{\algorithmicindent}}
% Extra commands
\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{\tct}[1]{\Theta\left(#1\right)}
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)} \newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
\newcommand{\tcl}[1]{\Omega\left(#1\right)} \newcommand{\tcl}[1]{\Omega\left(#1\right)}

21
main/index.tex Normal file
View File

@@ -0,0 +1,21 @@
% ▄▄
% ▀████▀ ▀███
% ██ ██
% ██ ▀████████▄ ▄█▀▀███ ▄▄█▀██▀██▀ ▀██▀
% ██ ██ ██ ▄██ ██ ▄█▀ ██ ▀██ ▄█▀
% ██ ██ ██ ███ ██ ██▀▀▀▀▀▀ ███
% ██ ██ ██ ▀██ ██ ██▄ ▄ ▄█▀ ██▄
% ▄████▄████ ████▄ ▀████▀███▄ ▀█████▀██▄ ▄██▄
% 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,6 +1,12 @@
% % ▄▄
% │ Math % ▀████▄ ▄███▀ ██ ███
% % ████ ████ ██ ██
% █ ██ ▄█ ██ ▄█▀██▄ ██████ ███████▄
% █ ██ █▀ ██ ██ ██ ██ ██ ██
% █ ██▄█▀ ██ ▄█████ ██ ██ ██
% █ ▀██▀ ██ ██ ██ ██ ██ ██
% ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄
% BB shortcuts (for number spaces, etc) % BB shortcuts (for number spaces, etc)
\newcommand{\A}{\mathbb{A}} \newcommand{\A}{\mathbb{A}}
@@ -66,29 +72,30 @@
\newcommand{\dx}{\text{ d}} \newcommand{\dx}{\text{ d}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil} \newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
\newcommand{\hastoeq}{\overset{!}{=}}
\newcommand{\Leftrightarrowequiv}{\overset{\cdot}{\Leftrightarrow}} \newcommand{\Leftrightarrowequiv}{\overset{\cdot}{\Leftrightarrow}}
\newcommand{\Longleftrightarrowequiv}{\overset{\cdot}{\Longleftrightarrow}} \newcommand{\Longleftrightarrowequiv}{\overset{\cdot}{\Longleftrightarrow}}
\newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}} \newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}}
\newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}} \newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}}
\newcommand{\defAs}{\overset{\text{def}}{=}} \newcommand{\defAs}{\overset{\text{def}}{=}}
\newcommand{\der}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
\newcommand{\dern}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
\newcommand{\parder}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pardern}[2]{\frac{\partial^{#2}}{\partial^{#2} #1}}
\newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}} \newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}}
\newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}} \newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}}
\newcommand{\diff}[1]{\frac{\mbox{d}}{\mbox{d}#1}} \newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
\newcommand{\diffn}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}} \newcommand{\mbeq}{\overset{!}{=}}
\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{\lcm}{\text{lcm}}
\newcommand{\limit}[2]{\underset{#1 \rightarrow #2}{\lim}} \newcommand{\limit}[2]{\underset{#1 \rightarrow #2}{\lim}}
\newcommand{\seq}[1]{(#1_n)_{n \geq 1}}
\newcommand{\ser}[2]{\sum_{k = 1}^{#2} #1_k}
\newcommand{\limni}{\limit{n}{\infty}} \newcommand{\limni}{\limit{n}{\infty}}
\newcommand{\limnz}{\limit{n}{0}} \newcommand{\limnz}{\limit{n}{0}}
\newcommand{\limxz}{\limit{x_0}{0}} \newcommand{\limxz}{\limit{x_0}{0}}
\newcommand{\limhz}{\limit{h}{0}} \newcommand{\limhz}{\limit{h}{0}}
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}} \newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}} \newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
\newcommand{\sequence}[1]{(#1_n)_{n \geq 1}}
\newcommand{\series}[2]{\sum_{k = 1}^{#2} #1_k}
\DeclareMathOperator\arctanh{arctanh} \DeclareMathOperator\arctanh{arctanh}
\DeclareMathOperator\arccosh{arccosh} \DeclareMathOperator\arccosh{arccosh}
\DeclareMathOperator\arcsinh{arcsinh} \DeclareMathOperator\arcsinh{arcsinh}

58
main/style/common.tex Normal file
View File

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

404
main/style/counters.tex Normal file
View File

@@ -0,0 +1,404 @@
% ▄▄· ▄• ▄▌ ▐ ▄ ▄▄▄▄▄▄▄▄ .▄▄▄
% ▐█ ▌▪ ▄█▀▄ █▪██▌•█▌▐█•██ ▀▄.▀·▀▄ █·
% ██ ▄▄▐█▌.▐▌█▌▐█▌▐█▐▐▌ ▐█.▪▐▀▀▪▄▐▀▀▄
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\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}{\arabic{table}}
\renewcommand{\thefigure}{\arabic{figure}}
\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)}}}

25
main/style/cs.tex Normal file
View File

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

10
main/style/language.tex Normal file
View File

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

11
main/style/math.tex Normal file
View File

@@ -0,0 +1,11 @@
% • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ .
% ·██ ▐███▪▐█ ▀█ •██ ██▪▐█ ▐█ ▀. •██ ▐█▪██▌██• ▀▄.▀·
% ▐█ ▌▐▌▐█·▄█▀▀█ ▐█.▪██▀▀█ ▄▀▀▀█▄ ▐█.▪▐█▌▐█▪██ ▪ ▐▀▀▪▄
% ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌
% ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀
% Replace some commonly used commands with better ones
\newcommand{\vect}[1]{\overrightarrow{#1}}
\renewcommand{\hat}[1]{\widehat{#1}}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\newcommand{\proven}{$\hspace{17cm}\square$}

127
main/style/style.tex Normal file
View File

@@ -0,0 +1,127 @@
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
%▒▒ ▒▒▒▒▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒ ▒▒▒▒
%▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓
%▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓ ▓ ▓
%▓ ▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓▓▓▓
%███ ██████ █████ ████ ███ ███
%██████████████████████ ███████████████████
% 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{\hrmvspace}{\vspace{-0.25pc}}
\newcommand{\rmvspace}{\vspace{-0.5pc}}
\newcommand{\mrmvspace}{\vspace{-0.75pc}}
\newcommand{\drmvspace}{\vspace{-1pc}}
\newcommand{\dhrmvspace}{\vspace{-1.25pc}}
\newcommand{\dnrmvspace}{\vspace{-1.5pc}}
\newcommand{\dmrmvspace}{\vspace{-1.75pc}}
\newcommand{\ddrmvspace}{\vspace{-2pc}}
\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}}}}
% 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}}
% 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}
}

View File

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

5
scopes/full.tex Normal file
View File

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

32
scopes/letter.tex Normal file
View File

@@ -0,0 +1,32 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\setkomavar{date}{\city, \today}
\newkomavar{fromplace} % a few koma vars
\setkomavar{fromname}{\name}
\setkomavar{fromaddress}{\street}
\setkomavar{fromplace}{\countrycode -\city}
\KOMAoptions{foldmarks=off,fromrule=false}
\setkomavar{backaddress}{}
\makeatletter % indention of the address fields
\setplength{toaddrhpos}{27mm}
\setplength{toaddrwidth}{92mm}
\setplength{sigindent}{0mm}
\makeatother
\renewcommand*{\raggedsignature}{\raggedright}
% Define new letter header
\setkomavar{firsthead}{
\null\hfill
\parbox[t][\headheight][t]{4cm}{%
\vspace*{2cm}
\usekomavar{fromname} \newline
\usekomavar{fromaddress} \newline
\usekomavar{fromplace}
}
}%

7
scopes/minimal.tex Normal file
View File

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

13
scopes/most.tex Normal file
View File

@@ -0,0 +1,13 @@
\newcommand{\loadMost}{
\typeout{[CustomLaTeXHelperLoader]: Loaded most}
\input{\dir/scopes/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}
}

7
scopes/recommended.tex Normal file
View File

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

View File

@@ -1,48 +0,0 @@
% 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

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

View File

@@ -1,16 +0,0 @@
% ┌ ┐
% │ 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,91 +0,0 @@
% ┌ ┐
% │ 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,22 +0,0 @@
% ┌ ┐
% │ 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

@@ -1,69 +0,0 @@
% ┌ ┐
% │ 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

@@ -1,33 +0,0 @@
% ── 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

@@ -1,70 +0,0 @@
% ── 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
}

View File

@@ -1,12 +0,0 @@
%%
%% 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}

View File

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

View File

@@ -1,82 +0,0 @@
% ┌ ┐
% │ 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}}

View File

@@ -1,17 +0,0 @@
% ┌ ┐
% │ 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

@@ -1,51 +0,0 @@
% ── 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}}

View File

@@ -1,9 +0,0 @@
% ┌ ┐
% │ 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$}

View File

@@ -1,44 +0,0 @@
\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}
}

View File

@@ -1,48 +0,0 @@
% ┌ ┐
% │ 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}

View File

@@ -1,13 +0,0 @@
#!/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

@@ -3,30 +3,12 @@
"prefix": "latex-prepare", "prefix": "latex-prepare",
"body": [ "body": [
"\\documentclass{article}\n", "\\documentclass{article}\n",
"\\newcommand{\\input}{~/projects/latex/janishutz-helpers.tex}\n", "\\input{~/projects/latex/dist/recommended.tex}\n",
"\\usepackage{lmodern}",
"\\setFontType{sans}\n",
"\\setup{$1}\n", "\\setup{$1}\n",
"\\begin{document}", "\\begin{document}",
"\\startDocument\n\n", "\\startDocument",
"\\vspace{2cm}", "\\usetcolorboxes",
"\\begin{center}\n\n", "$2\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}" "\\end{document}"
], ],
"description": "Prepares a full LaTeX Document for use and compiling" "description": "Prepares a full LaTeX Document for use and compiling"
@@ -65,9 +47,18 @@
"\t$2", "\t$2",
"\\end{recall}" "\\end{recall}"
], ],
"description": "Inserts a tcolorbox to point out / revise of previous knowledge (yellow)" "description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)"
}, },
"Remark": { "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", "prefix": "remark",
"body": [ "body": [
"\\begin{remarks}[]{$1}", "\\begin{remarks}[]{$1}",
@@ -76,6 +67,15 @@
], ],
"description": "Inserts a tcolorbox to provide remarks (green)" "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": { "Properties": {
"prefix": "properties", "prefix": "properties",
"body": [ "body": [
@@ -119,7 +119,7 @@
"\t$2", "\t$2",
"\\end{theorem}" "\\end{theorem}"
], ],
"description": "Inserts a tcolorbox to state a theorem" "description": "Inserts a tcolorbox to inform about theorems"
}, },
"Lemma": { "Lemma": {
"prefix": "lemma", "prefix": "lemma",
@@ -128,7 +128,7 @@
"\t$2", "\t$2",
"\\end{lemma}" "\\end{lemma}"
], ],
"description": "Inserts a tcolorbox to state a lemma" "description": "Inserts a tcolorbox to inform about lemmas"
}, },
"Corollary": { "Corollary": {
"prefix": "corollary", "prefix": "corollary",
@@ -137,7 +137,7 @@
"\t$2", "\t$2",
"\\end{corollary}" "\\end{corollary}"
], ],
"description": "Inserts a tcolorbox to state a corollary" "description": "Inserts a tcolorbox to inform about corollaries"
}, },
"Proposition": { "Proposition": {
"prefix": "proposition", "prefix": "proposition",
@@ -146,7 +146,7 @@
"\t$2", "\t$2",
"\\end{proposition}" "\\end{proposition}"
], ],
"description": "Inserts a tcolorbox to state a proposition" "description": "Inserts a tcolorbox to inform about propositions"
}, },
"Fact": { "Fact": {
"prefix": "fact", "prefix": "fact",
@@ -155,7 +155,7 @@
"\t$2", "\t$2",
"\\end{fact}" "\\end{fact}"
], ],
"description": "Inserts a tcolorbox to state a fact" "description": "Inserts a tcolorbox to inform about facts"
}, },
"Terms": { "Terms": {
"prefix": "terms", "prefix": "terms",
@@ -220,6 +220,24 @@
], ],
"description": "Inserts a tcolorbox to inform about 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": { "General-Tcolorbox": {
"prefix": "general-tcb", "prefix": "general-tcb",
"body": [ "body": [
@@ -238,6 +256,120 @@
], ],
"description": "Inserts a simple tcolorbox. No title, first argument the colour colour" "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": { "bold": {
"prefix": "#bold", "prefix": "#bold",
"body": [ "body": [
@@ -296,9 +428,7 @@
"prefix": "latex-letter", "prefix": "latex-letter",
"body": [ "body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n", "\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!", "\\input{~/projects/latex/dist/letter.tex}\n",
"\\input{\\dir/include.tex}",
"\\load{letter}\n",
"% Subject", "% Subject",
"\\setkomavar{subject}{$1}", "\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright", "\\begin{document}\\raggedright",