Compare commits

..

2 Commits

Author SHA1 Message Date
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
24 changed files with 1797 additions and 635 deletions

View File

@@ -8,51 +8,61 @@ echo "
█ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █ █ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
█ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
█▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█ █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
==> Building <==
" "
mkdir dist/ mkdir dist/
cat ./janishutz-helpers.sty >./dist/janishutz-helpers-minimal.sty echo "
% ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
% █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
% █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
% █ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
% █ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
% █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
% █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
" > ./dist/minimal.tex
# Build minimal scope # Build minimal scope
echo "" >>./dist/janishutz-helpers-minimal.sty cat ./main/core.tex >>./dist/minimal.tex
cat ./config/config.tex >>./dist/janishutz-helpers-minimal.sty echo "" >>./dist/minimal.tex
echo "" >>./dist/janishutz-helpers-minimal.sty cat ./config/config.tex >>./dist/minimal.tex
cat ./main/core.tex >>./dist/janishutz-helpers-minimal.sty echo "" >>./dist/minimal.tex
echo "" >>./dist/janishutz-helpers-minimal.sty cat ./main/style/style.tex >>./dist/minimal.tex
cat ./main/style/style.tex >>./dist/janishutz-helpers-minimal.sty echo "" >>./dist/minimal.tex
echo "" >>./dist/janishutz-helpers-minimal.sty cat ./main/style/common.tex >>./dist/minimal.tex
cat ./main/style/common.tex >>./dist/janishutz-helpers-minimal.sty
# 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 # Build recommended
cat ./dist/janishutz-helpers-minimal.sty >./dist/janishutz-helpers-recommended.sty cat ./dist/most.tex >./dist/recommended.tex
echo "" >>./dist/janishutz-helpers-recommended.sty echo "" >>./dist/recommended.tex
cat ./main/math.tex >>./dist/janishutz-helpers-recommended.sty cat ./extra/bib.tex >>./dist/recommended.tex
echo "" >>./dist/janishutz-helpers-recommended.sty echo "" >>./dist/recommended.tex
cat ./main/cs.tex >>./dist/janishutz-helpers-recommended.sty cat ./extra/glossary.tex >>./dist/recommended.tex
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./main/index.tex >>./dist/janishutz-helpers-recommended.sty
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./main/style/counters.tex >>./dist/janishutz-helpers-recommended.sty
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./main/style/cs.tex >>./dist/janishutz-helpers-recommended.sty
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./main/style/math.tex >>./dist/janishutz-helpers-recommended.sty
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./main/style/language.tex >>./dist/janishutz-helpers-recommended.sty
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./extra/bib.tex >>./dist/janishutz-helpers-recommended.sty
echo "" >>./dist/janishutz-helpers-recommended.sty
cat ./extra/glossary.tex >>./dist/janishutz-helpers-recommended.sty
# Build full # Build full
cat ./dist/janishutz-helpers-recommended.sty >./dist/janishutz-helpers-full.sty cat ./dist/recommended.tex >./dist/full.tex
echo "" >>./dist/janishutz-helpers-full.sty echo "" >>./dist/full.tex
cat ./extra/minted.tex >>./dist/janishutz-helpers-full.sty cat ./extra/minted.tex >>./dist/full.tex
# Copy letter # Copy letter
cp ./scopes/letter.tex ./dist/janishutz-helpers-letters.sty cp ./scopes/letter.tex ./dist/letter.tex
echo "==> Done" echo "==> Done"

1063
dist/full.tex vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,161 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{janishutz-helpers}[2.0.0] % ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
% █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
% █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
% █ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
% █ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
% █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
% █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage[most]{tcolorbox}
\usepackage{cancel}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{lipsum}
\usepackage{ulem}
\usepackage{soul}
\usepackage{parskip}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{tocloft}
\usepackage{wasysym}
\usepackage{wrapfig}
\usepackage{multicol}
\usepackage{ifthen}
\usepackage[hidelinks]{hyperref}
\usepackage{enumitem}
\usepackage{gensymb}
\usepackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\usepackage[ngerman]{babel}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\makeatletter
\makeatother
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
\fancypagestyle{plain}{%
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[1]{
\loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
\newcommand{\tr}[2]{\translate{#1}{#2}}
% ┌ ┐
% │ Translation aids (commonly used) │
% └ ┘
\newcommand{\trif}{\translate{if }{falls }}
\newcommand{\trIf}{\translate{If }{Falls }}
\newcommand{\trLet}{\translate{Let }{Sei }}
\newcommand{\trLets}{\translate{Let }{Seien }}
\newcommand{\trFor}{\translate{For }{Für }}
\newcommand{\trfor}{\translate{for }{für }}
\newcommand{\trand}{\translate{and }{und }}
\newcommand{\tror}{\translate{or }{oder }}
\newcommand{\trst}{\translate{s.t. }{s.d. }}
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
\newcommand{\trwith}{\translate{with }{mit }}
% ___ ___ % ___ ___
% ( _ \ / ___)_ % ( _ \ / ___)_
@@ -46,158 +202,6 @@
% The colour-saturation of the shade command (default = 20) % The colour-saturation of the shade command (default = 20)
\setcounter{shadeStrength}{20} \setcounter{shadeStrength}{20}
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\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{parskip}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\RequirePackage{tocloft}
\RequirePackage{wasysym}
\RequirePackage{wrapfig}
\RequirePackage{multicol}
\RequirePackage{ifthen}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{enumitem}
\RequirePackage{gensymb}
\RequirePackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\typeout{Loading helpers}
% TODO: Fix this up
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\input{\dir/main/lang/de}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\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}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\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}[1]{
\loadLang
\RequirePackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
\newcommand{\tr}[2]{\translate{#1}{#2}}
% ┌ ┐
% │ Translation aids (commonly used) │
% └ ┘
\newcommand{\trif}{\translate{if }{falls }}
\newcommand{\trIf}{\translate{If }{Falls }}
\newcommand{\trLet}{\translate{Let }{Sei }}
\newcommand{\trLets}{\translate{Let }{Seien }}
\newcommand{\trFor}{\translate{For }{Für }}
\newcommand{\trfor}{\translate{for }{für }}
\newcommand{\trand}{\translate{and }{und }}
\newcommand{\tror}{\translate{or }{oder }}
\newcommand{\trst}{\translate{s.t. }{s.d. }}
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
\newcommand{\trwith}{\translate{with }{mit }}
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ %░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░ %░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ %▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒

View File

@@ -1,5 +1,161 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{janishutz-helpers}[2.0.0] % ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
% █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
% █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
% █ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
% █ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
% █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
% █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage[most]{tcolorbox}
\usepackage{cancel}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{lipsum}
\usepackage{ulem}
\usepackage{soul}
\usepackage{parskip}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{tocloft}
\usepackage{wasysym}
\usepackage{wrapfig}
\usepackage{multicol}
\usepackage{ifthen}
\usepackage[hidelinks]{hyperref}
\usepackage{enumitem}
\usepackage{gensymb}
\usepackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\usepackage[ngerman]{babel}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\makeatletter
\makeatother
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
\fancypagestyle{plain}{%
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[1]{
\loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
\newcommand{\tr}[2]{\translate{#1}{#2}}
% ┌ ┐
% │ Translation aids (commonly used) │
% └ ┘
\newcommand{\trif}{\translate{if }{falls }}
\newcommand{\trIf}{\translate{If }{Falls }}
\newcommand{\trLet}{\translate{Let }{Sei }}
\newcommand{\trLets}{\translate{Let }{Seien }}
\newcommand{\trFor}{\translate{For }{Für }}
\newcommand{\trfor}{\translate{for }{für }}
\newcommand{\trand}{\translate{and }{und }}
\newcommand{\tror}{\translate{or }{oder }}
\newcommand{\trst}{\translate{s.t. }{s.d. }}
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
\newcommand{\trwith}{\translate{with }{mit }}
% ___ ___ % ___ ___
% ( _ \ / ___)_ % ( _ \ / ___)_
@@ -46,158 +202,6 @@
% The colour-saturation of the shade command (default = 20) % The colour-saturation of the shade command (default = 20)
\setcounter{shadeStrength}{20} \setcounter{shadeStrength}{20}
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\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{parskip}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\RequirePackage{tocloft}
\RequirePackage{wasysym}
\RequirePackage{wrapfig}
\RequirePackage{multicol}
\RequirePackage{ifthen}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{enumitem}
\RequirePackage{gensymb}
\RequirePackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\typeout{Loading helpers}
% TODO: Fix this up
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\input{\dir/main/lang/de}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\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}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\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}[1]{
\loadLang
\RequirePackage[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 }}
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ %░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░ %░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ %▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
@@ -461,13 +465,13 @@
% ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀ % ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀
% 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}}
@@ -500,8 +504,8 @@
% For using index package % For using index package
\newcommand{\prepareIndex}{ \newcommand{\prepareIndex}{
\RequirePackage[T1]{fontenc} \usepackage[T1]{fontenc}
\RequirePackage{imakeidx} \usepackage{imakeidx}
\makeindex \makeindex
} }
@@ -517,8 +521,8 @@
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌ % ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀ % ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\RequirePackage{xstring} \usepackage{xstring}
\RequirePackage{etoolbox} \usepackage{etoolbox}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters % tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemma}[section] \newcounter{lemma}[section]
\newcounter{definition}[section] \newcounter{definition}[section]
@@ -964,40 +968,37 @@
\newtcolorbox{forms}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2}, \newtcolorbox{forms}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1}
% ___ _ _____ _ _ % _____ _ _
% ( _ \ _( ) (_ _) ( ) ( ) % (_ _) ( ) (_ )
% | (_) )_) |_ | | __ \ \/ / % | | _ _| |_ | | __ ___
% | _ (| | _ \ | | / __ \ ) ( % | | / _ ) _ \ | | / __ \ __)
% | (_) ) | |_) ) | | ( ___// /\ \ % | | ( (_| | |_) )| |( ___/__ \
% (____/(_)_ __/ (_) \____)_) (_) % (_) \__ _)_ __/(___)\____)____/
% Configs if you want to use BibTeX. Not included in any default configs.
\newcommand{\setupBibtex}[1]{ \usepackage{booktabs}
\usepackage{biblatex} \usepackage{tabulary}
\usepackage[nottoc, numbib]{tocbibind}
\addbibresource{#1} % Create new table. #1 Layout, #2 title row
\newenvironment{tables}[2]{
\begin{center}
\begin{tabular}{#1}
\toprule
#2 \\
\midrule
}{
\bottomrule
\end{tabular}
\end{center}
} }
\newcommand{\printbib}{ % Create new table in table env. #1 layout, #2 title row, #3 caption
\addcontentsline{toc}{section}{\translate{Sources}{Quellen}} \newenvironment{fullTable}[3]{
\printbibliography[title=\translate{Sources}{Quellen}] \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
} }

View File

@@ -1,5 +1,161 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{janishutz-helpers}[2.0.0] % ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
% █ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
% █ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
% █ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
% █ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
% █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
% █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage[most]{tcolorbox}
\usepackage{cancel}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{lipsum}
\usepackage{ulem}
\usepackage{soul}
\usepackage{parskip}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{tocloft}
\usepackage{wasysym}
\usepackage{wrapfig}
\usepackage{multicol}
\usepackage{ifthen}
\usepackage[hidelinks]{hyperref}
\usepackage{enumitem}
\usepackage{gensymb}
\usepackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\usepackage[ngerman]{babel}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
\makeatletter
\makeatother
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
\fancypagestyle{plain}{%
\fancyhead{}
\fancyhead[L]{#1}
\fancyhead[R]{\authorHeaders}
\fancyfoot{}
\fancyfoot[L]{\today}
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[1]{
\loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
\newcommand{\tr}[2]{\translate{#1}{#2}}
% ┌ ┐
% │ Translation aids (commonly used) │
% └ ┘
\newcommand{\trif}{\translate{if }{falls }}
\newcommand{\trIf}{\translate{If }{Falls }}
\newcommand{\trLet}{\translate{Let }{Sei }}
\newcommand{\trLets}{\translate{Let }{Seien }}
\newcommand{\trFor}{\translate{For }{Für }}
\newcommand{\trfor}{\translate{for }{für }}
\newcommand{\trand}{\translate{and }{und }}
\newcommand{\tror}{\translate{or }{oder }}
\newcommand{\trst}{\translate{s.t. }{s.d. }}
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
\newcommand{\trwith}{\translate{with }{mit }}
% ___ ___ % ___ ___
% ( _ \ / ___)_ % ( _ \ / ___)_
@@ -46,158 +202,6 @@
% The colour-saturation of the shade command (default = 20) % The colour-saturation of the shade command (default = 20)
\setcounter{shadeStrength}{20} \setcounter{shadeStrength}{20}
% ▄▄█▀▀▀█▄█
% ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\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{parskip}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\RequirePackage{tocloft}
\RequirePackage{wasysym}
\RequirePackage{wrapfig}
\RequirePackage{multicol}
\RequirePackage{ifthen}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{enumitem}
\RequirePackage{gensymb}
\RequirePackage{pifont}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\typeout{Loading helpers}
% TODO: Fix this up
\newcommand{\setLang}[1]{
\edef\lang{#1}
\edef\en{en}
\edef\de{de}
\ifx\lang\en
\typeout{[Lang Switcher] Loading English}
\setcounter{lang}{1}
\else
\ifx\lang\de
\typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2}
\input{\dir/main/lang/de}
\else
\typeout{[Lang Switcher] No such language!}
\fi
\fi
}
\newcommand{\loadLang}{
\ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English}
}\else {
\typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\newcounter{numberSubsections}
\newcounter{descriptorShadeStrength}
\newcounter{shadeStrength}
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
\newcommand{\setup}[1]{
\typeout{[Setup] Setting up...}
\loadLang
\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}}
}
}
% Start document command (required)
\newcommand{\startDocument}{
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{
\loadLang
\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}[1]{
\loadLang
\RequirePackage[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 }}
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ %░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░ %░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ %▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
@@ -461,13 +465,13 @@
% ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀ % ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀
% 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}}
@@ -500,8 +504,8 @@
% For using index package % For using index package
\newcommand{\prepareIndex}{ \newcommand{\prepareIndex}{
\RequirePackage[T1]{fontenc} \usepackage[T1]{fontenc}
\RequirePackage{imakeidx} \usepackage{imakeidx}
\makeindex \makeindex
} }
@@ -517,8 +521,8 @@
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌ % ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀ % ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\RequirePackage{xstring} \usepackage{xstring}
\RequirePackage{etoolbox} \usepackage{etoolbox}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters % tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemma}[section] \newcounter{lemma}[section]
\newcounter{definition}[section] \newcounter{definition}[section]
@@ -964,6 +968,41 @@
\newtcolorbox{forms}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2}, \newtcolorbox{forms}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1}
% _____ _ _
% (_ _) ( ) (_ )
% | | _ _| |_ | | __ ___
% | | / _ ) _ \ | | / __ \ __)
% | | ( (_| | |_) )| |( ___/__ \
% (_) \__ _)_ __/(___)\____)____/
\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}
}
% ___ _ _____ _ _ % ___ _ _____ _ _
% ( _ \ _( ) (_ _) ( ) ( ) % ( _ \ _( ) (_ _) ( ) ( )
% | (_) )_) |_ | | __ \ \/ / % | (_) )_) |_ | | __ \ \/ /
@@ -1001,21 +1040,3 @@
\glsaddall \glsaddall
\printnoidxglossaries \printnoidxglossaries
} }
\usepackage{minted}
\usepackage{fancyvrb}
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
\newenvironment{code}[1]{
\VerbatimEnvironment
\begin{minted}[
autogobble,
breaklines,
breakindentnchars=2,
frame=lines,
framesep=2mm,
mathescape,
baselinestretch=1.1,
linenos]{#1}}
{\end{minted}}

Binary file not shown.

View File

@@ -1,8 +1,6 @@
\documentclass{article} \documentclass{article}
\newcommand{\dir}{~/projects/latex} \input{~/projects/latex/dist/full.tex}
\input{\dir/include.tex}
\load{full}
\setup{Docs - \LaTeX \hspace{0mm} helpers} \setup{Docs - \LaTeX \hspace{0mm} helpers}
\setLang{en} \setLang{en}
@@ -35,9 +33,9 @@ The timecomplexity commands have been updated to require math environment. You c
and \verb|/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g| and \verb|/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g|
\subsection{Labels \& Environments} \subsection{Labels \& Environments}
The counter environments can now be referenced (see \ref{sec:counters}). 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 Due to the new requirements set out by that addition, it is now no longer possible to manually update the counters using
\verb|\setcounter|. \verb|\setcounter|.
Use the below regex to replace all occurrences of \verb|\setcounter| with the new format. 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|: Please note that this will overwrite \textit{all} occurrences of \verb|\setcounter| with the specific old format with \verb|\setLabelNumber|:

View File

@@ -5,9 +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}
\newcommand{\dir}{~/path/to/helper} % TODO: Change your path here! No trailing slashes! \input{~/projects/latex/dist/recommended.tex} % TODO: Change here your inclusion level and path
\input{\dir/include.tex}
\load{recommended} % TODO: Change the inclusion level (if necessary), see below
\setup{Type your title here} \setup{Type your title here}
@@ -19,15 +17,19 @@ Type your \LaTeX here
\end{document} \end{document}
\end{minted} \end{minted}
The \verb|\load| command takes one parameter, which can be one of the following: 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} \begin{itemize}
\item \texttt{minimal} Just the core styling and core functionality. \item \texttt{minimal} Just the core styling and core functionality.
\item \texttt{most} Includes Math, CS, Language and all styling. \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{recommended} The recommended setup. Includes BibTeX in addition to what is in most
\item \texttt{all} If you want to also include glossaries or code with highlighting \item \texttt{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}) \item \texttt{letter} If you want to typeset a letter (see \ref{sec:letters})
\end{itemize} \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 config file in helper files directory. The file is located at You can set a global config in config file in helper files directory. The file is located at

View File

@@ -1,3 +1,6 @@
% ┌ ┐
% │ Minted │
% └ ┘
\usepackage{minted} \usepackage{minted}
\usepackage{fancyvrb} \usepackage{fancyvrb}

View File

@@ -1,3 +1,41 @@
% Loader % Loader
\usepackage{currfile} \newcommand{\load}[1]{
\usepackage{\currfileabsdir janishutz-helpers} \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,2 +0,0 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{janishutz-helpers}[2.0.0]

View File

@@ -11,39 +11,37 @@
% Imports % % Imports %
\typeout{[Core] Importing!} \typeout{[Core] Importing!}
\RequirePackage[table, dvipsnames]{xcolor} \usepackage[table, dvipsnames]{xcolor}
\RequirePackage{amsmath} \usepackage{amsmath}
\RequirePackage{graphicx} \usepackage{graphicx}
\RequirePackage{subcaption} \usepackage{subcaption}
\RequirePackage[export]{adjustbox} \usepackage[export]{adjustbox}
\RequirePackage[most]{tcolorbox} \usepackage[most]{tcolorbox}
\RequirePackage{cancel} \usepackage{cancel}
\RequirePackage{dsfont} \usepackage{dsfont}
\RequirePackage{amssymb} \usepackage{amssymb}
\RequirePackage{mathrsfs} \usepackage{mathrsfs}
\RequirePackage{lipsum} \usepackage{lipsum}
\RequirePackage{ulem} \usepackage{ulem}
\RequirePackage{soul} \usepackage{soul}
\RequirePackage{parskip} \usepackage{parskip}
\RequirePackage{fancyhdr} \usepackage{fancyhdr}
\RequirePackage{lastpage} \usepackage{lastpage}
\RequirePackage{tocloft} \usepackage{tocloft}
\RequirePackage{wasysym} \usepackage{wasysym}
\RequirePackage{wrapfig} \usepackage{wrapfig}
\RequirePackage{multicol} \usepackage{multicol}
\RequirePackage{ifthen} \usepackage{ifthen}
\RequirePackage[hidelinks]{hyperref} \usepackage[hidelinks]{hyperref}
\RequirePackage{enumitem} \usepackage{enumitem}
\RequirePackage{gensymb} \usepackage{gensymb}
\RequirePackage{pifont} \usepackage{pifont}
% Language Switching. Currently only English and German are supported % Language Switching. Currently only English and German are supported
% See docs for how to use % See docs for how to use
\newcounter{lang} \newcounter{lang}
\typeout{Loading helpers}
% TODO: Fix this up
\newcommand{\setLang}[1]{ \newcommand{\setLang}[1]{
\edef\lang{#1} \edef\lang{#1}
\edef\en{en} \edef\en{en}
@@ -55,7 +53,7 @@
\ifx\lang\de \ifx\lang\de
\typeout{[Lang Switcher] Loading German} \typeout{[Lang Switcher] Loading German}
\setcounter{lang}{2} \setcounter{lang}{2}
\input{\dir/main/lang/de} \usepackage[ngerman]{babel}
\else \else
\typeout{[Lang Switcher] No such language!} \typeout{[Lang Switcher] No such language!}
\fi \fi
@@ -83,7 +81,7 @@
\newcommand{\setup}[1]{ \newcommand{\setup}[1]{
\typeout{[Setup] Setting up...} \typeout{[Setup] Setting up...}
\loadLang \loadLang
\RequirePackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}} \title{\Huge \textbf{#1}}
\author{\authorTitle} \author{\authorTitle}
\makeatletter \makeatletter
@@ -114,7 +112,7 @@
% Set up the latex document, only configuring the author, title and page size % Set up the latex document, only configuring the author, title and page size
\newcommand{\setupBarebones}[1]{ \newcommand{\setupBarebones}[1]{
\loadLang \loadLang
\RequirePackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}} \title{\Huge \textbf{#1}}
\author{\authorTitle} \author{\authorTitle}
} }
@@ -122,7 +120,7 @@
% Set up the latex document for exam summaries (Extra wide body, small margins, no header) % Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[1]{ \newcommand{\setupCheatSheet}[1]{
\loadLang \loadLang
\RequirePackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}} \title{\Huge \textbf{#1}}
\author{\authorTitle} \author{\authorTitle}
} }

View File

@@ -4,13 +4,13 @@
% ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀ % ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀
% 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}}

View File

@@ -10,8 +10,8 @@
% For using index package % For using index package
\newcommand{\prepareIndex}{ \newcommand{\prepareIndex}{
\RequirePackage[T1]{fontenc} \usepackage[T1]{fontenc}
\RequirePackage{imakeidx} \usepackage{imakeidx}
\makeindex \makeindex
} }

View File

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

View File

@@ -5,8 +5,8 @@
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌ % ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀ % ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\RequirePackage{xstring} \usepackage{xstring}
\RequirePackage{etoolbox} \usepackage{etoolbox}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters % tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemma}[section] \newcounter{lemma}[section]
\newcounter{definition}[section] \newcounter{definition}[section]

View File

@@ -6,8 +6,8 @@
% (_) \__ _)_ __/(___)\____)____/ % (_) \__ _)_ __/(___)\____)____/
\RequirePackage{booktabs} \usepackage{booktabs}
\RequirePackage{tabulary} \usepackage{tabulary}
% 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/dist/recommended.tex}
\loadRecommended
\input{\dir/extra/minted.tex}
}

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/dist/minimal.tex}
\loadMinimal
\input{\dir/main/math.tex}
\input{\dir/main/cs.tex}
\input{\dir/main/index.tex}
\input{\dir/main/tables.tex}
\input{\dir/main/style/counters.tex}
\input{\dir/main/style/cs.tex}
\input{\dir/main/style/math.tex}
\input{\dir/main/style/language.tex}
}

7
scopes/recommended.tex Normal file
View File

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

View File

@@ -1 +0,0 @@
# TODO: Make this script extend tex path

View File

@@ -3,9 +3,7 @@
"prefix": "latex-prepare", "prefix": "latex-prepare",
"body": [ "body": [
"\\documentclass{article}\n", "\\documentclass{article}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!", "\\input{~/projects/latex/dist/recommended.tex}\n",
"\\input{\\dir/include.tex}",
"\\load{recommended}\n",
"\\setup{$1}\n", "\\setup{$1}\n",
"\\begin{document}", "\\begin{document}",
"\\startDocument", "\\startDocument",
@@ -430,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",