Compare commits
148 Commits
1b9f0e516f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d1638eeef | |||
|
|
2ca478cf27 | ||
| 03ee657e1f | |||
|
|
96a8806ba1 | ||
| 591ee520fa | |||
| 39dac1bdc3 | |||
| 5870830fb4 | |||
|
|
c1fc735c52 | ||
| 52b4b2916a | |||
|
|
7a7c744344 | ||
| 4edab93a9f | |||
| 449ad7d31f | |||
| add7e1d934 | |||
|
|
7790593c78 | ||
| 1e516d78cc | |||
| 375e944772 | |||
| c2784afb08 | |||
|
|
fa7a858350 | ||
| 28ffcbd117 | |||
| 8a6c139589 | |||
| 69a7fd2971 | |||
| a0c104e092 | |||
| f84df4eb3a | |||
|
|
3a766d5158 | ||
| 7d9581735d | |||
| e873355550 | |||
| 94c4cd8537 | |||
| b26699a887 | |||
|
|
9856f13f76 | ||
| 6c8f20336c | |||
| d03c9b9f4c | |||
| 1cb3f47217 | |||
| e1ab62ab1b | |||
| 6f2c05b6eb | |||
| 4577950acc | |||
|
|
fd7ce878e5 | ||
| 457d7ce024 | |||
|
|
8c8cc53a8c | ||
| 73b6098463 | |||
|
|
635d32d260 | ||
| bda3b92795 | |||
| f2c337eaa9 | |||
| 141cf5d091 | |||
|
|
e16e4b3e7b | ||
| 566649ecc3 | |||
| 7f8c112556 | |||
|
|
aaa6a709fc | ||
| 66aee3d780 | |||
| da4eeebc6d | |||
| ab3abb113c | |||
|
|
951458a867 | ||
| 4f03b8eebc | |||
| 3a67a42535 | |||
| bcd7ed17d0 | |||
| 2c0db60c7d | |||
|
|
90ce264992 | ||
| 579cbd96ca | |||
|
|
88e2dc1a70 | ||
| b9d9f6772c | |||
|
|
b0e161e133 | ||
| 676bbd9306 | |||
|
|
5f691d9372 | ||
| fd66333f7a | |||
|
|
db2fbc4c70 | ||
| dcb077e116 | |||
|
|
be655d2387 | ||
| cb173908b4 | |||
|
|
6803d1f62d | ||
| 4eff956d53 | |||
| f622e2be55 | |||
|
|
9a19639d10 | ||
| bfc62a37eb | |||
| 01e20cef5d | |||
|
|
eda396d617 | ||
| 4522e88c92 | |||
|
|
04b388c382 | ||
| 3d6d6234de | |||
|
|
4344f8f09d | ||
| b1d81bdd06 | |||
|
|
1e766b8133 | ||
| c5fccabba9 | |||
|
|
e2a725bc51 | ||
| cc3144b170 | |||
| b908ae3b29 | |||
| 0ea3d9245c | |||
|
|
27c96d26a0 | ||
| c6aa4c8d80 | |||
| f1b64e8ddb | |||
| a5cb9bb54d | |||
| 432fcb4153 | |||
| 159b37a3d3 | |||
| baf964792a | |||
| 01047ba385 | |||
| c321acd063 | |||
|
|
1462cc0198 | ||
| 6dbcd64ed4 | |||
| 8346a558c7 | |||
| 91cfc52ec8 | |||
| dba7f93d0d | |||
| 098ffcc618 | |||
| 4102cafa6e | |||
| bdb72b2e2a | |||
| 5169d20bed | |||
| 86f080a705 | |||
| 23037f11f6 | |||
| 8b4d775d1a | |||
| 3406ad8951 | |||
| 495f3a8503 | |||
| 7101d5f017 | |||
| d3ebc929a0 | |||
| 284d957a92 | |||
| dc62654e42 | |||
| 6b052b8152 | |||
| 100f16afda | |||
| 491cdd9441 | |||
| ca9fd7a66f | |||
| 7bf361ccd4 | |||
| c0134e47c2 | |||
| e2974cea74 | |||
| 6394ce2591 | |||
| 4db6733865 | |||
| 7a73c73687 | |||
| 24b4fe0959 | |||
| 43819d942c | |||
| 7ee9152f41 | |||
| 1518007fe2 | |||
| 3864d838d6 | |||
| 98b3e7ee66 | |||
| dca911c00b | |||
| bb42a2e803 | |||
| 8a238d1a8c | |||
| e64a76745a | |||
| 978039b0d0 | |||
| cc78cee14f | |||
| 962989468b | |||
| b05be21b92 | |||
| 2be8109e90 | |||
| a0893a9887 | |||
| 73b33777e3 | |||
| 54f58f0b3a | |||
| 5a696f57c4 | |||
| cf5879b9a4 | |||
| d600d6d8f3 | |||
| 6e6bdba382 | |||
| 66725558bb | |||
| 491adc1744 | |||
| 47ed047c7e | |||
| b8473c5f68 |
35
.gitea/workflows/update-docs.yml
Normal file
35
.gitea/workflows/update-docs.yml
Normal 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"
|
||||
36
.gitea/workflows/update-helpers.yml
Normal file
36
.gitea/workflows/update-helpers.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Update helpers
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'config/**'
|
||||
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"
|
||||
11
README.md
11
README.md
@@ -3,15 +3,14 @@
|
||||
<h1>LaTeX Helper files</h1>
|
||||
</div>
|
||||
|
||||

|
||||

|
||||
|
||||
This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly.
|
||||
|
||||
|
||||
# New import scheme
|
||||
I have done some tweaks to support a new import scheme, making imports much more flexible
|
||||
|
||||
|
||||
# Getting started
|
||||
See the docs [here](https://git.janishutz.com/janishutz/latex/src/branch/main/docs/docs.pdf) to get started.
|
||||
See the docs [here](https://git.janishutz.com/janishutz/latex/raw/branch/main/docs/docs.pdf) to get started.
|
||||
|
||||
|
||||
# Recommended LaTeX editors
|
||||
@@ -26,4 +25,4 @@ The editors are ordered in terms of ease of use and my personal preference list
|
||||
<a href="https://store.janishutz.com/donate" target="_blank"><img src="https://store-cdn.janishutz.com/static/support-me.jpg" width="150px"></a>
|
||||
</div>
|
||||
|
||||
[LaTeX helper files](https://git.janishutz.com/janishutz/latex) © 2025 by [Janis Hutz](https://janishutz.com) is licensed under [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/)
|
||||
[LaTeX helper files](https://git.janishutz.com/janishutz/latex) © 2026 by [Janis Hutz](https://janishutz.com) is licensed under [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
% - #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)}}
|
||||
\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}\ }
|
||||
|
||||
BIN
docs/docs.pdf
BIN
docs/docs.pdf
Binary file not shown.
@@ -7,6 +7,7 @@
|
||||
\begin{document}
|
||||
\startDocument
|
||||
|
||||
|
||||
% ── Title page ──────────────────────────────────────────────────────
|
||||
|
||||
\vspace{2cm}
|
||||
@@ -36,6 +37,7 @@
|
||||
% └ ┘
|
||||
\input{./parts/intro.tex}
|
||||
\input{./parts/usage.tex}
|
||||
\input{./parts/beamer.tex}
|
||||
\input{./parts/migration.tex}
|
||||
|
||||
|
||||
|
||||
7
docs/parts/beamer.tex
Normal file
7
docs/parts/beamer.tex
Normal file
@@ -0,0 +1,7 @@
|
||||
\section{Beamer}
|
||||
\LaTeX Beamer can be used to create presentations. The official user guide can be found \hlhref{https://mirrors.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf}{here}
|
||||
and a simple introduction by overleaf can be found \hlhref{https://www.overleaf.com/learn/latex/Beamer}{here}.
|
||||
|
||||
These helpers should mostly work in conjunction with beamer, you should however \bi{absolutely not} use the setup commands, as they are specifically meant for the \textit{article} class.
|
||||
|
||||
If you use the snippets, a basic setup for beamer is provided that also includes the helpers.
|
||||
@@ -6,6 +6,9 @@ There are quite a lot of configuration options, but it is likely that more are t
|
||||
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.
|
||||
@@ -17,4 +20,3 @@ The docs contain a section (section \ref{sec:migration}) on migrating from V1.X
|
||||
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.
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
\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}
|
||||
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}
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
\item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}|
|
||||
\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|\safetr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate|, safe to use in section titles
|
||||
\item \verb|\numberingOn| Turn on the numbering (if previously turned off using \verb|\numberingOff| or set in the config)
|
||||
\item \verb|\numberingOff| Turn off the numbering (useful to temporarily turn off numbering)
|
||||
\end{itemize}
|
||||
|
||||
@@ -20,5 +20,11 @@ You have set the \textit{scope} to \texttt{full}, which loads the \texttt{minted
|
||||
\subsubsection{You must have pygmentize installed}
|
||||
Your host system is lacking the \texttt{pygmentize} package or you have not added the \texttt{pip} path to your \$PATH. This is also the reason as to why the \texttt{-shell-escape} flag has to be set, as minted needs to access external libraries (namely \texttt{pygmentize}) to do the syntax highlighting.
|
||||
|
||||
\subsection{Undefined command equal}
|
||||
If you see an error like this, you likely are using either \verb|\translate| or \verb|\tr| in a \verb|\section| or similar command.
|
||||
Due to the way \LaTeX\ code is evaluated, you should prefer using \verb|\safetr| instead,
|
||||
which uses \texttt{etoolbox}'s \verb|\protecting| command to stop this issue from occurring
|
||||
|
||||
\subsection{Any other error}
|
||||
Ensure that you are not missing any closing brackets or a math environment is still open. If nothing helps, contact support at \url{https://support.janishutz.com}
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ Each of the options can also be overridden directly on a per-document
|
||||
|
||||
|
||||
\subsection{Letters}
|
||||
Letters require a different setup compared to a normal \LaTeX document:
|
||||
Letters require a different setup compared to a normal \LaTeX document.
|
||||
Be also aware that the usual commands featured by the helpers are \textit{not} available when using the letter helpers.
|
||||
|
||||
\begin{minted}{latex}
|
||||
\documentclass[12pt,a4paper]{scrlttr2}
|
||||
|
||||
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
\documentclass[12pt,a4paper]{scrlttr2}
|
||||
|
||||
\input{~/projects/latex/letter.tex}
|
||||
|
||||
% Subject
|
||||
\setkomavar{subject}{Test}
|
||||
\begin{document}\raggedright
|
||||
\begin{letter}{Company \\ Name \\ Address \\ CH-Place}
|
||||
\opening{Intro}
|
||||
|
||||
Test
|
||||
|
||||
\closing{Kind regards}
|
||||
\end{letter}
|
||||
\end{document}
|
||||
@@ -41,6 +41,7 @@
|
||||
\usepackage{etoolbox}
|
||||
\usepackage{makecell}
|
||||
\usepackage{parskip}
|
||||
\usepackage{titlesec}
|
||||
|
||||
\newcounter{descriptorShadeStrength}
|
||||
\newcounter{shadeStrength}
|
||||
@@ -93,72 +94,6 @@
|
||||
\colorlet{propertiescolor}{purple}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Naming │
|
||||
% └ ┘
|
||||
@@ -242,6 +177,72 @@
|
||||
\newcommand{\propertiesShortNamingDE}{E}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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}
|
||||
|
||||
|
||||
\newcounter{definitionnone}
|
||||
\newcounter{definitionsection}[section]
|
||||
\renewcommand{\thedefinitionsection}{\thesection.\arabic{definitionsection}}
|
||||
@@ -666,6 +667,14 @@
|
||||
% Same for urls (just one arg tho)
|
||||
\newcommand{\hlurl}[1]{\color{MidnightBlue}\fbox{\url{#1}}\color{black}}
|
||||
|
||||
\makeatletter
|
||||
\renewcommand\paragraph{%
|
||||
\@startsection{paragraph}{4}{0mm}%
|
||||
{-\baselineskip}%
|
||||
{.5\baselineskip}%
|
||||
{\normalfont\normalsize\bfseries}}
|
||||
\makeatother
|
||||
|
||||
|
||||
% ___ _ _____ _ _
|
||||
% ( _ \ _( ) (_ _) ( ) ( )
|
||||
@@ -688,6 +697,20 @@
|
||||
}
|
||||
|
||||
|
||||
% Add glossaries functionality
|
||||
|
||||
\newcommand{\setupGlossary}{
|
||||
\usepackage[nonumberlist, toc]{glossaries}
|
||||
\usepackage[nottoc, numbib]{tocbibind}
|
||||
\makenoidxglossaries
|
||||
}
|
||||
|
||||
\newcommand{\printGlossary}{
|
||||
\glsaddall
|
||||
\printnoidxglossaries
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Math │
|
||||
% └ ┘
|
||||
@@ -829,94 +852,6 @@
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Index │
|
||||
% └ ┘
|
||||
|
||||
% For using index package
|
||||
\newcommand{\prepareIndex}{
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{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}
|
||||
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Tables │
|
||||
% └ ┘
|
||||
|
||||
\usepackage{booktabs}
|
||||
\usepackage{tabulary}
|
||||
|
||||
% Create new table. #1 Layout, #2 title row
|
||||
\newenvironment{tables}[2]{
|
||||
\begin{center}
|
||||
\begin{tabular}{#1}
|
||||
\toprule
|
||||
#2 \\
|
||||
\midrule
|
||||
}{
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
}
|
||||
|
||||
% Create new table in table env. #1 layout, #2 title row, #3 caption
|
||||
\newenvironment{fullTable}[3]{
|
||||
\edef\tableCaption{#3}
|
||||
\begin{table}[h!]
|
||||
\begin{tables}{#1}{#2}
|
||||
}{
|
||||
\end{tables}
|
||||
\caption{\tableCaption}
|
||||
\end{table}
|
||||
}
|
||||
|
||||
|
||||
% Add glossaries functionality
|
||||
|
||||
\newcommand{\setupGlossary}{
|
||||
\usepackage[nonumberlist, toc]{glossaries}
|
||||
\usepackage[nottoc, numbib]{tocbibind}
|
||||
\makenoidxglossaries
|
||||
}
|
||||
|
||||
\newcommand{\printGlossary}{
|
||||
\glsaddall
|
||||
\printnoidxglossaries
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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 }}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Setup │
|
||||
% └ ┘
|
||||
@@ -1010,6 +945,49 @@
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Translation │
|
||||
% └ ┘
|
||||
\newcommand{\translate}[2]{%
|
||||
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}%
|
||||
}
|
||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||
\newcommand{\safetr}[2]{\protecting{\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 }}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Index │
|
||||
% └ ┘
|
||||
|
||||
% For using index package
|
||||
\newcommand{\prepareIndex}{
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{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}
|
||||
|
||||
|
||||
|
||||
|
||||
% ░▒█▀▀▄░▄▀▀▄░█▀▄▀█░▄▀▀▄░█░▒█░▀█▀░█▀▀░█▀▀▄░░░▒█▀▀▀█░█▀▄░░▀░░█▀▀░█▀▀▄░█▀▄░█▀▀
|
||||
% ░▒█░░░░█░░█░█░▀░█░█▄▄█░█░▒█░░█░░█▀▀░█▄▄▀░░░░▀▀▀▄▄░█░░░░█▀░█▀▀░█░▒█░█░░░█▀▀
|
||||
@@ -1042,6 +1020,109 @@
|
||||
\newcommand{\class}{\text{\tr{Cl}{Kl}}}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Tables │
|
||||
% └ ┘
|
||||
|
||||
\usepackage{booktabs}
|
||||
\usepackage{tabulary}
|
||||
|
||||
% Create new table. #1 Layout, #2 title row
|
||||
\newenvironment{tables}[2]{
|
||||
\begin{center}
|
||||
\begin{tabular}{#1}
|
||||
\toprule
|
||||
#2 \\
|
||||
\midrule
|
||||
}{
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
}
|
||||
|
||||
% Create new table in table env. #1 layout, #2 title row, #3 caption
|
||||
\newenvironment{fullTable}[3]{
|
||||
\edef\tableCaption{#3}
|
||||
\begin{table}[h!]
|
||||
\begin{tables}{#1}{#2}
|
||||
}{
|
||||
\end{tables}
|
||||
\caption{\tableCaption}
|
||||
\end{table}
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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}}
|
||||
|
||||
|
||||
% ── Set the current number of a label ───────────────────────────────
|
||||
\newcommand{\setLabelNumber}[2]{%
|
||||
\setcounter{#1none}{#2}%
|
||||
@@ -1149,89 +1230,11 @@
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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}}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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$}
|
||||
|
||||
|
||||
\newcommand{\noverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{2pt plus 2pt minus 1pt}{2pt plus 2pt minus 2pt}
|
||||
\titlespacing*{\subsection}{0pt}{1pt plus 2pt minus 1pt}{1pt plus 2pt minus 1pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{1pt plus 1pt minus 1pt}{1pt plus 1pt minus 1pt}
|
||||
\titlespacing*{\paragraph}{0pt}{0pt plus 1pt minus 0pt}{1pt plus 0pt minus 1pt}
|
||||
\abovedisplayskip 1pt plus 2pt minus 1pt
|
||||
\belowdisplayskip 1pt plus 2pt minus 1pt
|
||||
\abovedisplayshortskip -10pt
|
||||
@@ -1239,10 +1242,15 @@
|
||||
\floatsep 1pt plus 2pt minus 1pt
|
||||
\intextsep 1pt plus 2pt minus 1pt
|
||||
\textfloatsep 1pt plus 2pt minus 1pt
|
||||
\multicolsep 1pt plus 2pt minus 1pt
|
||||
\abovecaptionskip 2pt
|
||||
\setlist{noitemsep,topsep=1pt,partopsep=0pt}
|
||||
}
|
||||
\newcommand{\smallverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{4pt plus 3pt minus 2pt}{3pt plus 2pt minus 1pt}
|
||||
\titlespacing*{\subsection}{0pt}{3pt plus 2pt minus 1pt}{2pt plus 2pt minus 0pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{2pt plus 2pt minus 1pt}{2pt plus 1pt minus 0pt}
|
||||
\titlespacing*{\paragraph}{0pt}{1pt plus 1pt minus 1pt}{1pt plus 0pt minus 0pt}
|
||||
\abovedisplayskip 4pt plus 3pt minus 2pt
|
||||
\belowdisplayskip 5pt plus 5pt minus 2pt
|
||||
\abovedisplayshortskip -5pt
|
||||
@@ -1250,10 +1258,15 @@
|
||||
\floatsep 4pt plus 3pt minus 2pt
|
||||
\intextsep 4pt plus 3pt minus 2pt
|
||||
\textfloatsep 4pt plus 3pt minus 2pt
|
||||
\multicolsep 4pt plus 3pt minus 2pt
|
||||
\abovecaptionskip 4pt
|
||||
\setlist{itemsep=2pt,topsep=2pt,partopsep=1pt}
|
||||
}
|
||||
\newcommand{\mediumverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{6pt plus 2pt minus 2pt}{4pt plus 2pt minus 2pt}
|
||||
\titlespacing*{\subsection}{0pt}{4pt plus 2pt minus 2pt}{3pt plus 2pt minus 1pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{3pt plus 1pt minus 1pt}{2pt plus 1pt minus 0pt}
|
||||
\titlespacing*{\paragraph}{0pt}{2pt plus 1pt minus 1pt}{1pt plus 0pt minus 0pt}
|
||||
\abovedisplayskip 7pt plus 4pt minus 3pt
|
||||
\belowdisplayskip 9pt plus 6pt minus 3pt
|
||||
\abovedisplayshortskip 0pt
|
||||
@@ -1261,10 +1274,15 @@
|
||||
\floatsep 7pt plus 4pt minus 3pt
|
||||
\intextsep 7pt plus 4pt minus 3pt
|
||||
\textfloatsep 7pt plus 4pt minus 3pt
|
||||
\multicolsep 7pt plus 4pt minus 3pt
|
||||
\abovecaptionskip 7pt
|
||||
\setlist{itemsep=4pt,topsep=4pt,partopsep=2pt}
|
||||
}
|
||||
\newcommand{\largeverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{8pt plus 2pt minus 4pt}{5pt plus 2pt minus 3pt}
|
||||
\titlespacing*{\subsection}{0pt}{6pt plus 2pt minus 3pt}{4pt plus 2pt minus 2pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{4pt plus 1pt minus 2pt}{3pt plus 1pt minus 1pt}
|
||||
\titlespacing*{\paragraph}{0pt}{3pt plus 1pt minus 1pt}{2pt plus 1pt minus 1pt}
|
||||
\abovedisplayskip 13pt plus 5pt minus 4pt
|
||||
\belowdisplayskip 15pt plus 9pt minus 6pt
|
||||
\abovedisplayshortskip 5pt plus 2pt minus 3pt
|
||||
@@ -1272,64 +1290,12 @@
|
||||
\floatsep 12pt plus 5pt minus 4pt
|
||||
\intextsep 12pt plus 5pt minus 4pt
|
||||
\textfloatsep 12pt plus 5pt minus 4pt
|
||||
\multicolsep 12pt plus 5pt minus 4pt
|
||||
\abovecaptionskip 10pt
|
||||
\setlist{itemsep=6pt,topsep=6pt,partopsep=2pt}
|
||||
}
|
||||
|
||||
|
||||
% ── 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}}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ STYLE: Common tcolorboxes │
|
||||
% └ ┘
|
||||
@@ -1380,6 +1346,72 @@
|
||||
\newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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$}
|
||||
|
||||
|
||||
% ── 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{\inlinenotation}[1][NONAME]{\unnumberedInline[#1]{notation}}
|
||||
|
||||
\newcommand{\shortproof}[1][NONAME]{\unnumberedShort[#1]{proof}}
|
||||
\newcommand{\shortterm}[1][NONAME]{\unnumberedShort[#1]{term}}
|
||||
\newcommand{\shortnotation}[1][NONAME]{\unnumberedShort[#1]{notation}}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ STYLE: Computer Science │
|
||||
% └ ┘
|
||||
|
||||
1157
old/janishutz-helpers-v1.tex
Normal file
1157
old/janishutz-helpers-v1.tex
Normal file
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{makecell}
|
||||
\RequirePackage{parskip}
|
||||
\RequirePackage{titlesec}
|
||||
|
||||
\newcounter{descriptorShadeStrength}
|
||||
\newcounter{shadeStrength}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}%
|
||||
}
|
||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||
\newcommand{\safetr}[2]{\protecting{\translate{#1}{#2}}}
|
||||
\newcommand{\namingTranslate}[1]{\translate{\printTranslationOptionEN{#1}}{\printTranslationOptionDE{#1}}}
|
||||
\newcommand{\shortNamingTranslate}[1]{\translate{\printShortTranslationOptionEN{#1}}{\printShortTranslationOptionDE{#1}}}
|
||||
|
||||
|
||||
@@ -80,3 +80,11 @@
|
||||
|
||||
% Same for urls (just one arg tho)
|
||||
\newcommand{\hlurl}[1]{\color{MidnightBlue}\fbox{\url{#1}}\color{black}}
|
||||
|
||||
\makeatletter
|
||||
\renewcommand\paragraph{%
|
||||
\@startsection{paragraph}{4}{0mm}%
|
||||
{-\baselineskip}%
|
||||
{.5\baselineskip}%
|
||||
{\normalfont\normalsize\bfseries}}
|
||||
\makeatother
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
|
||||
\newcommand{\inlineproof}[1][NONAME]{\unnumberedInline[#1]{proof}}
|
||||
\newcommand{\inlineterm}[1][NONAME]{\unnumberedInline[#1]{term}}
|
||||
\newcommand{\inlinenotation}[1][NONAME]{\unnumberedInline[#1]{notation}}
|
||||
|
||||
\newcommand{\shortproof}[1][NONAME]{\unnumberedShort[#1]{proof}}
|
||||
\newcommand{\shortterm}[1][NONAME]{\unnumberedShort[#1]{term}}
|
||||
\newcommand{\shortnotation}[1][NONAME]{\unnumberedShort[#1]{notation}}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
\newcommand{\noverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{2pt plus 2pt minus 1pt}{2pt plus 2pt minus 2pt}
|
||||
\titlespacing*{\subsection}{0pt}{1pt plus 2pt minus 1pt}{1pt plus 2pt minus 1pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{1pt plus 1pt minus 1pt}{1pt plus 1pt minus 1pt}
|
||||
\titlespacing*{\paragraph}{0pt}{0pt plus 1pt minus 0pt}{1pt plus 0pt minus 1pt}
|
||||
\abovedisplayskip 1pt plus 2pt minus 1pt
|
||||
\belowdisplayskip 1pt plus 2pt minus 1pt
|
||||
\abovedisplayshortskip -10pt
|
||||
@@ -6,10 +10,15 @@
|
||||
\floatsep 1pt plus 2pt minus 1pt
|
||||
\intextsep 1pt plus 2pt minus 1pt
|
||||
\textfloatsep 1pt plus 2pt minus 1pt
|
||||
\multicolsep 1pt plus 2pt minus 1pt
|
||||
\abovecaptionskip 2pt
|
||||
\setlist{noitemsep,topsep=1pt,partopsep=0pt}
|
||||
}
|
||||
\newcommand{\smallverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{4pt plus 3pt minus 2pt}{3pt plus 2pt minus 1pt}
|
||||
\titlespacing*{\subsection}{0pt}{3pt plus 2pt minus 1pt}{2pt plus 2pt minus 0pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{2pt plus 2pt minus 1pt}{2pt plus 1pt minus 0pt}
|
||||
\titlespacing*{\paragraph}{0pt}{1pt plus 1pt minus 1pt}{1pt plus 0pt minus 0pt}
|
||||
\abovedisplayskip 4pt plus 3pt minus 2pt
|
||||
\belowdisplayskip 5pt plus 5pt minus 2pt
|
||||
\abovedisplayshortskip -5pt
|
||||
@@ -17,10 +26,15 @@
|
||||
\floatsep 4pt plus 3pt minus 2pt
|
||||
\intextsep 4pt plus 3pt minus 2pt
|
||||
\textfloatsep 4pt plus 3pt minus 2pt
|
||||
\multicolsep 4pt plus 3pt minus 2pt
|
||||
\abovecaptionskip 4pt
|
||||
\setlist{itemsep=2pt,topsep=2pt,partopsep=1pt}
|
||||
}
|
||||
\newcommand{\mediumverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{6pt plus 2pt minus 2pt}{4pt plus 2pt minus 2pt}
|
||||
\titlespacing*{\subsection}{0pt}{4pt plus 2pt minus 2pt}{3pt plus 2pt minus 1pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{3pt plus 1pt minus 1pt}{2pt plus 1pt minus 0pt}
|
||||
\titlespacing*{\paragraph}{0pt}{2pt plus 1pt minus 1pt}{1pt plus 0pt minus 0pt}
|
||||
\abovedisplayskip 7pt plus 4pt minus 3pt
|
||||
\belowdisplayskip 9pt plus 6pt minus 3pt
|
||||
\abovedisplayshortskip 0pt
|
||||
@@ -28,10 +42,15 @@
|
||||
\floatsep 7pt plus 4pt minus 3pt
|
||||
\intextsep 7pt plus 4pt minus 3pt
|
||||
\textfloatsep 7pt plus 4pt minus 3pt
|
||||
\multicolsep 7pt plus 4pt minus 3pt
|
||||
\abovecaptionskip 7pt
|
||||
\setlist{itemsep=4pt,topsep=4pt,partopsep=2pt}
|
||||
}
|
||||
\newcommand{\largeverticalspacing}{
|
||||
\titlespacing*{\section}{0pt}{8pt plus 2pt minus 4pt}{5pt plus 2pt minus 3pt}
|
||||
\titlespacing*{\subsection}{0pt}{6pt plus 2pt minus 3pt}{4pt plus 2pt minus 2pt}
|
||||
\titlespacing*{\subsubsection}{0pt}{4pt plus 1pt minus 2pt}{3pt plus 1pt minus 1pt}
|
||||
\titlespacing*{\paragraph}{0pt}{3pt plus 1pt minus 1pt}{2pt plus 1pt minus 1pt}
|
||||
\abovedisplayskip 13pt plus 5pt minus 4pt
|
||||
\belowdisplayskip 15pt plus 9pt minus 6pt
|
||||
\abovedisplayshortskip 5pt plus 2pt minus 3pt
|
||||
@@ -39,6 +58,7 @@
|
||||
\floatsep 12pt plus 5pt minus 4pt
|
||||
\intextsep 12pt plus 5pt minus 4pt
|
||||
\textfloatsep 12pt plus 5pt minus 4pt
|
||||
\multicolsep 12pt plus 5pt minus 4pt
|
||||
\abovecaptionskip 10pt
|
||||
\setlist{itemsep=6pt,topsep=6pt,partopsep=2pt}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,97 @@
|
||||
"prefix": "latex-prepare",
|
||||
"body": [
|
||||
"\\documentclass{article}\n",
|
||||
"\\newcommand{\\input}{~/projects/latex/janishutz-helpers.tex}\n",
|
||||
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
|
||||
"\\usepackage{lmodern}",
|
||||
"\\setFontType{sans}\n",
|
||||
"\\setup{$1}\n",
|
||||
"\\begin{document}",
|
||||
"\\startDocument\n\n",
|
||||
"\\vspace{2cm}",
|
||||
"\\begin{center}\n\n",
|
||||
"\\includegraphics[width=0.6\\linewidth]{~/projects/latex/assets/logo.jpg}",
|
||||
"$2\n\n",
|
||||
"\\end{document}"
|
||||
],
|
||||
"description": "Prepares a simple LaTeX Document"
|
||||
},
|
||||
"LaTeX CheatSheet Setup": {
|
||||
"prefix": "latex-cheatsheet",
|
||||
"body": [
|
||||
"\\documentclass{article}\n",
|
||||
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
|
||||
"\\usepackage{lmodern}",
|
||||
"\\setFontType{sans}\n",
|
||||
"\\setupCheatSheet{$1}\n",
|
||||
"\\begin{document}",
|
||||
"\\startDocument\n\n",
|
||||
"$2\n\n",
|
||||
"\\end{document}"
|
||||
],
|
||||
"description": "Prepares to write a LaTeX CheatSheet"
|
||||
},
|
||||
"Full Summary LaTeX Setup": {
|
||||
"prefix": "latex-summary",
|
||||
"body": [
|
||||
"\\documentclass{article}\n",
|
||||
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
|
||||
"\\usepackage{lmodern}",
|
||||
"\\setFontType{sans}\n",
|
||||
"\\setup{$1}\n",
|
||||
"\\begin{document}",
|
||||
"\\startDocument\n",
|
||||
"\\vspace{1cm}",
|
||||
"\\begin{center}",
|
||||
"\t\\includegraphics[width=0.5\\linewidth]{~/projects/latex/assets/logo.jpg}",
|
||||
"\\end{center}\n\n",
|
||||
"\\vspace{3cm}",
|
||||
"\\vspace{2cm}",
|
||||
"\\begin{center}",
|
||||
"\t\\begin{Large}",
|
||||
"\t\t\\quote{A funny quote by a professor}",
|
||||
"\t\\end{Large}",
|
||||
"\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
|
||||
"\t\\end{Large}\n",
|
||||
"\t\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
|
||||
"\\end{center}\n",
|
||||
"\\vspace{2cm}",
|
||||
"\\vspace{1.5cm}",
|
||||
"\\begin{center}",
|
||||
"\tSEMESTER, ETHZ\\\\[0.2cm]",
|
||||
"\tSEMESTER, ETHZ\n",
|
||||
"\t\\begin{Large}",
|
||||
"\t\tSummary of the Script and Lectures",
|
||||
"\t\\end{Large}\\\\[0.2cm]",
|
||||
"\\end{center}",
|
||||
"\t\\end{Large}",
|
||||
"\\end{center}\n\n",
|
||||
"\\newpage",
|
||||
"\\printtoc{Aquamarine}\n\n",
|
||||
"$2\n\n",
|
||||
"\\end{document}"
|
||||
],
|
||||
"description": "Prepares a full LaTeX Document for use and compiling"
|
||||
"description": "Prepares a full LaTeX Summary"
|
||||
},
|
||||
"LaTeX Beamer Setup": {
|
||||
"prefix": "latex-beamer",
|
||||
"body": [
|
||||
"\\documentclass{beamer}\n",
|
||||
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
|
||||
"\\usepackage{lmodern}",
|
||||
"\\setFontType{sans}\n",
|
||||
"\\title{$1}",
|
||||
"\\author{\\authorTitle}\n",
|
||||
"\\usetheme{default}",
|
||||
"\\usecolortheme{beaver}\n",
|
||||
"\\AtBeginSection[]{",
|
||||
"\t\\begin{frame}",
|
||||
"\t\\frametitle{Table of Contents}",
|
||||
"\t\\tableofcontents[currentsection]",
|
||||
"\t\\end{frame}",
|
||||
"}\n",
|
||||
"\\begin{document}\n",
|
||||
"\\frame{\\titlepage}\n\n",
|
||||
"\\begin{frame}\n",
|
||||
"\t\\frametitle{Table of Contents}",
|
||||
"\t\\tableofcontents",
|
||||
"\\end{frame}\n\n",
|
||||
"\\begin{frame}\n",
|
||||
"\t\\frametitle{$2}",
|
||||
"\t$3",
|
||||
"\\end{frame}\n\n",
|
||||
"\\end{document}"
|
||||
],
|
||||
"description": "Prepares to write a LaTeX CheatSheet"
|
||||
},
|
||||
"Fancy table": {
|
||||
"prefix": "table",
|
||||
|
||||
Reference in New Issue
Block a user