Compare commits
13 commits
master
...
galois-coh
Author | SHA1 | Date | |
---|---|---|---|
|
84861677ae | ||
|
222faf184e | ||
|
394cbce902 | ||
|
52d634d9d2 | ||
|
5146969d91 | ||
|
58524d68ad | ||
|
20c6ce0805 | ||
|
4f73631c1e | ||
|
1362b08cb9 | ||
|
605e90446d | ||
|
816863e814 | ||
|
f6ed553230 | ||
|
667b8e9f46 |
181 changed files with 1882 additions and 11412 deletions
|
@ -1,11 +0,0 @@
|
|||
This LaTeX {latex_file_type} is free software and is dual-licensed
|
||||
under the LPPLv1.3c and the GPLv3 licenses.
|
||||
You may use it freely for your purposes.
|
||||
The latest version of the {latex_file_type} sources can be obtained
|
||||
via GitLab under
|
||||
https://gitlab.com/latexci/packages/LatexPackages
|
||||
The latest version of the built packages can be obtained via GitLab under
|
||||
https://gitlab.com/latexci/packages/LatexPackagesBuild
|
||||
For further information see the urls above.
|
||||
Reportings of bugs, suggestions and improvements are welcome, see the README
|
||||
at the Git repository for further information.
|
|
@ -1,17 +0,0 @@
|
|||
set -e
|
||||
|
||||
# Set up ssh private key
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
|
||||
echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
# Set up remote host key fingerprint
|
||||
echo "git.abstractnonsen.se ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAufJTq206GOv0D8gHs2o3eDusLNWaB0U7JRhUYnux9B" >> ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
git config --global user.email "git@maximilian-kessler.de"
|
||||
git config --global user.name "Maximilian Keßler (via gitlab runner)"
|
||||
|
||||
echo "Successfully added ssh deploy keys"
|
|
@ -1,19 +0,0 @@
|
|||
import os
|
||||
|
||||
|
||||
def get_latest_commit(repo):
|
||||
if repo.head.is_detached:
|
||||
return repo.head.commit
|
||||
else:
|
||||
return repo.head.ref.commit
|
||||
|
||||
|
||||
def get_deploy_message(repo):
|
||||
old_msg = get_latest_commit(repo).message
|
||||
return "{old_msg}\n" \
|
||||
"\n" \
|
||||
"Build branch {branch} ({hexsha}) from {repo_name}" \
|
||||
.format(old_msg=old_msg,
|
||||
branch=os.environ['REF_NAME'],
|
||||
hexsha=get_latest_commit(repo).hexsha[0:7],
|
||||
repo_name='latex/latex-packages')
|
|
@ -1,14 +0,0 @@
|
|||
set -e
|
||||
|
||||
# set up deploy message
|
||||
cd .ci
|
||||
export COMMIT_MSG=$(python3 print_deploy_message.py)
|
||||
cd ..
|
||||
|
||||
# push pages to build repository
|
||||
cd build/packages
|
||||
git add .
|
||||
git commit -m "${COMMIT_MSG}" || echo "Nothing new to commit"
|
||||
git remote set-url origin --push git@git.abstractnonsen.se:latex/latex-packages-build
|
||||
git push --set-upstream origin ${REF_NAME}-build
|
||||
cd ../..
|
|
@ -1,7 +0,0 @@
|
|||
from deploy.deploy_message import get_deploy_message
|
||||
import git
|
||||
|
||||
if __name__ == "__main__":
|
||||
repo = git.Repo(search_parent_directories=True)
|
||||
msg = get_deploy_message(repo)
|
||||
print(msg)
|
|
@ -1,19 +0,0 @@
|
|||
# ! /bin/sh
|
||||
set -e
|
||||
|
||||
cd build/packages
|
||||
|
||||
REMOTE_BRANCH=$(git branch -a | sed -n '/remotes\/origin\/.*-build/p' | sed 's/remotes\/origin\///g' | sed 's/-build//g' | sed 's/[[:space:]]//g' | sed -n "/^${REF_NAME}$/p")
|
||||
|
||||
echo ${REMOTE_BRANCH}
|
||||
|
||||
if [ "$REMOTE_BRANCH" = "" ]; then
|
||||
echo "This is the first build on this branch, creating new branch in build repository to push to"
|
||||
git checkout --orphan ${CI_COMMIT_REF_NAME}-build
|
||||
ls -ra | sed '/^\.git$/d' | sed '/^\.\.$/d' | sed '/^\.$/d' | xargs -r git rm --cached
|
||||
ls -ra | sed '/^\.git$/d' | sed '/^\.\.$/d' | sed '/^\.$/d' | xargs -r rm -rf
|
||||
else
|
||||
echo "Checking out remote branch from last build"
|
||||
git checkout -b ${REMOTE_BRANCH}-build origin/${REMOTE_BRANCH}-build
|
||||
fi
|
||||
cd ../..
|
|
@ -1,81 +0,0 @@
|
|||
name: Build LaTeX packages
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: latex-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0 # We need all history to correctly parse tag names
|
||||
fetch-tags: true
|
||||
- name: Setup git credentials and committer
|
||||
run: .ci/configure_git.sh
|
||||
env:
|
||||
DEPLOY_SSH_KEY: ${{ secrets.deploy_ssh_key }}
|
||||
- name: Clone build repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: latex/latex-packages-build
|
||||
path: build/packages
|
||||
ref: master
|
||||
- name: Checkout correct branch in build repository
|
||||
run: |
|
||||
.ci/setup_build_repo_branch.sh
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
- name: Build packages incrementally
|
||||
run: make
|
||||
- name: Push packages to build repo
|
||||
run: |
|
||||
.ci/deploy_to_build_repo.sh
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
- name: Clean up git files from build repo
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: rm -rf build/packages/.git
|
||||
- name: Save built packages to cache
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: build/packages/
|
||||
key: ${{ github.ref }}-packages
|
||||
|
||||
pages:
|
||||
runs-on: latex-latest
|
||||
needs: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Load package cache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: build/packages/
|
||||
key: ${{ github.ref }}-packages
|
||||
- name: Load compilation cache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: .compile
|
||||
key: ${{ github.ref }}-doc
|
||||
- name: Compile documentation
|
||||
run: make doc
|
||||
env:
|
||||
TEXINPUTS: '${{ github.workspace }}/build/packages//:'
|
||||
- name: Prepage pages
|
||||
run: |
|
||||
cd build
|
||||
rm -rf packages/.git # Don't deploy the git files
|
||||
zip -r latex-packages.zip packages/ -x '*.git*'
|
||||
zip -r latex-packages-doc.zip doc/
|
||||
- name: Deploy to pages
|
||||
uses: actions/pages@v1
|
||||
with:
|
||||
directory: build/
|
||||
- name: Upload compilation cache
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: .compile
|
||||
key: ${{ github.ref }}-doc
|
21
.gitignore
vendored
21
.gitignore
vendored
|
@ -1,22 +1 @@
|
|||
*.swp
|
||||
build/*
|
||||
.gitconfiglock
|
||||
.initsubmodulelock
|
||||
.idea/
|
||||
*.synctex.gz
|
||||
__pycache__
|
||||
*.aux
|
||||
*.fdb_latexmk
|
||||
*.fls
|
||||
*.log
|
||||
*.pdf
|
||||
wip/proof/.skip
|
||||
*.out
|
||||
*.idx
|
||||
*.ilg
|
||||
*.ind
|
||||
*.cnt
|
||||
*.glo
|
||||
*.hd
|
||||
*.toc
|
||||
*.sty
|
||||
|
|
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -1,4 +0,0 @@
|
|||
[submodule "PyTeX"]
|
||||
path = PyTeX
|
||||
url = ../PyTeX.git
|
||||
branch = latex-packages
|
32
LICENSE.md
32
LICENSE.md
|
@ -1,32 +0,0 @@
|
|||
Copyright (c) 2021-2022 Maximilian Keßler
|
||||
|
||||
## Available Licenses
|
||||
This work is dual-licensed. It may be distributed and/or modified
|
||||
|
||||
1. under the LaTeX Project Public License, version 1.3c or (at your opinion) any later version and/or,
|
||||
2. under the GNU General Public License, Version 3 or (at your opinion) any later version
|
||||
|
||||
## LaTeX Project Public License
|
||||
- The latest version of the LaTeX Project Public License license is in
|
||||
http://www.latex-project.org/lppl.txt
|
||||
and version 1.3 or later is part of all distributions of LaTeX
|
||||
version 2005/12/01 or later.
|
||||
- This work consists of all source files, availabe in directory `src/`,
|
||||
as well as all derived files obtained from these by formatting them
|
||||
with [PyTeX](https://gitlab.com/latexci/packages/PyTeX)
|
||||
- This work has the LPPL maintenance status 'maintained'.
|
||||
The Current Maintainer of this work is Maximilian Keßler.
|
||||
- The license is also available in `licenses/LPPL.txt`
|
||||
|
||||
## Gnu General Public License
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
- You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
- The license is also available in `licenses/GPLv3.txt`
|
53
Makefile
53
Makefile
|
@ -1,53 +0,0 @@
|
|||
# Makefile for latex-packages
|
||||
|
||||
BUILD_DIR=build
|
||||
DOC_SUBDIR=doc
|
||||
PACKAGES_SUBDIR=packages
|
||||
COMPILE_SUBDIR=.compile
|
||||
BUILD_FLAGS=--recursive --git-version --pytex-version --license --author "Maximilian Keßler" --pytex-info-text --extra-header ".build/header_info.txt" --name "prepend-author" --clean-old-files
|
||||
|
||||
ROOT=$(shell pwd)
|
||||
BUILD_ROOT=${ROOT}/${BUILD_DIR}
|
||||
|
||||
|
||||
# Build packages
|
||||
build: .initsubmodulelock
|
||||
python3 build.py --source-dir src --build-dir ${BUILD_ROOT}/${PACKAGES_SUBDIR} ${BUILD_FLAGS}
|
||||
|
||||
# Build packages and allow repo to be dirty (use with caution and only when developing)
|
||||
dirty: .initsubmodulelock
|
||||
python3 build.py --source-dir src --build-dir ${BUILD_ROOT}/${PACKAGES_SUBDIR} ${BUILD_FLAGS} --allow-dirty
|
||||
|
||||
# generate documentation files from /doc
|
||||
doc:
|
||||
@scripts/compile_doc.sh
|
||||
@mkdir -p ${BUILD_ROOT}/${DOC_SUBDIR}
|
||||
@cp .compile/*.pdf ${BUILD_ROOT}/${DOC_SUBDIR}
|
||||
@echo Documentation files written to ${BUILD_ROOT}/${DOC_SUBDIR}
|
||||
|
||||
init: .initsubmodulelock .gitconfiglock
|
||||
|
||||
config: .gitconfiglock
|
||||
|
||||
.initsubmodulelock:
|
||||
@git submodule update --init
|
||||
@touch .initsubmodulelock
|
||||
|
||||
.gitconfiglock:
|
||||
@echo "[Make config] Setting git configs to prevent wrong pushes"
|
||||
@git config push.recurseSubmodules check
|
||||
@git config status.submodulesummary 1
|
||||
@echo "[Push annotated tags by default]"
|
||||
@git config push.followTags true
|
||||
@touch .gitconfiglock
|
||||
|
||||
all: clean build
|
||||
|
||||
clean:
|
||||
@-rm -r build/
|
||||
@-rm -r .compile/
|
||||
|
||||
.PHONY: build doc
|
||||
#!/bin/bash
|
||||
# Compiles all correspondence letters in repository
|
||||
|
1
PyTeX
1
PyTeX
|
@ -1 +0,0 @@
|
|||
Subproject commit c9bb0e87c91beae3e17a829603e4459cf804ec51
|
37
README.md
37
README.md
|
@ -1,35 +1,6 @@
|
|||
# Latex Packages
|
||||
# LatexPackages
|
||||
|
||||
This is a collection of some packages I regularly use. Feel free to use them as well, if you want to.
|
||||
packages with mkessler- name are up to date
|
||||
package sheet is also usable
|
||||
|
||||
However, some of them (especially `mkessler-math`) might be heavily customized for myself and do not form a real package in the Unix philosophy sense and are more of my preamble, that everyone gets to copy around that I bundled up in a central place. Some others (especially `mkessler-fancythm`) follow (or at least try to) this philosophy, so they should be designed to work with your documents and online provide specific functionality.
|
||||
|
||||
Mostly, they are available as a repository so that
|
||||
- People that I work on the same documents with have access to all the source code I used, without having to send them package files each time
|
||||
- I can use these as a submodule in various other projects, e.g. the write-up of my lecture notes. This bundles re-usability and easy modifiability at a central place whilst also allowing project-specific (small) adaptations
|
||||
- I like sharing things that could help others, as I profit from others way too often
|
||||
- This motivates me to keep things organized
|
||||
|
||||
## Usage
|
||||
If you want to use these, just clone [latex-packages-build][lp-build] into your `~/texmf/tex/latex` directory, and you are ready to go.
|
||||
The builds are also available as single files or as zip at the [pages][pages].
|
||||
|
||||
## Documentation
|
||||
See the `documentation` folder (or zip file) at [pages][pages] for documentation to most of the packages.
|
||||
|
||||
## Bugs
|
||||
As already mentioned, not all of these are intended for generic use. If you however feel like this should be the case, feel free to point out bugs or troubles when using these here at GitHub or to me directly.
|
||||
|
||||
## Contribute
|
||||
Feel free to send pull requests if you have suggestions for improvements.
|
||||
|
||||
## License
|
||||
This is free software.
|
||||
Prior to version 2.6 this has been MIT-licensed. Starting with version 1.6 this is licensed under the LPPL and/or the GPLv3.
|
||||
See `LICENSE.md` for further details.
|
||||
|
||||
The `quiver.sty` package here is taken from [varkor/quiver][quiver] and licensed under the MIT License. It is redistributed unchanged for dependency reasons of my projects.
|
||||
|
||||
[pages]: https://latex.users.abstractnonsen.se/latex-packages
|
||||
[lp-build]: https://git.abstractnonsen.se/latex/latex-packages-build
|
||||
[quiver]: https://github.com/varkor/quiver
|
||||
other packages are deprecated
|
||||
|
|
7
build.py
7
build.py
|
@ -1,7 +0,0 @@
|
|||
#! /usr/bin/python3
|
||||
import sys
|
||||
|
||||
from PyTeX.build import parse_and_build
|
||||
|
||||
if __name__ == "__main__":
|
||||
parse_and_build(sys.argv[1:])
|
|
@ -1,14 +0,0 @@
|
|||
# This is the .latexmkrc file that needs to be used for compiling the documentation
|
||||
# Note that the makeindex command is non-standard and follows the LaTeX3 architecture
|
||||
# Without this, generating the indexes properly will not work and leads to compiling
|
||||
# errors.
|
||||
# When adding new packages, this should be symlinked to in each new directory,
|
||||
# so that a call to latexmk will automatically use these options
|
||||
|
||||
$makeindex = 'makeindex -s gind.ist %O -o %D %S';
|
||||
$clean_ext .= ' glo';
|
||||
$clean_ext .= ' hd';
|
||||
$clean_ext .= ' ins';
|
||||
$pdf_mode = 1;
|
||||
$print='pdf';
|
||||
$pdflatex = 'pdflatex --shell-escape %O %S';
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,5 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
\usepackage{mkessler-todo}
|
||||
\begin{document}
|
||||
\DocInput{../../../src/environments/fancythm/fancythm.dtx}
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,5 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
\usepackage{mkessler-todo}
|
||||
\begin{document}
|
||||
\DocInput{../../../src/environments/groupthm/groupthm.dtx}
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,165 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{refproof} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This package aims to at consistently numbering claims within proofs.
|
||||
For this purpose, take a valid \meta{label} when starting a proof,
|
||||
associating it with a theorem/lemma etc.~and enabling us to subnumber
|
||||
claims within this proof.
|
||||
We also provide some customizations for proofs.
|
||||
\end{abstract}
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
|
||||
\section{Proofs}
|
||||
\subsection{Old proofs}
|
||||
\begin{environment}{oldproof}
|
||||
Behaves like \env{proof} from \pkg{amsmath}.
|
||||
\end{environment}
|
||||
|
||||
\begin{environment}{oldsubproof}
|
||||
Behaves like \env{subproof} from \pkg{mkessler-subproof}.
|
||||
|
||||
That is, behaves like the \pkg{amsmath} proof environment except that
|
||||
the shown keyword is \enquote{subproof} and we end the proof
|
||||
with a black instead of a white square.
|
||||
\end{environment}
|
||||
|
||||
It is not recommended to use \env{oldproof} or \env{oldsubproof},
|
||||
since these have no support for the \texttt{claim} management this
|
||||
package provides.
|
||||
They only exist for legacy reasons.
|
||||
|
||||
\subsection{Basic proofs}
|
||||
|
||||
Both of these have \texttt{claim} support,
|
||||
which is explained later in \autoref{sec:claim-support}.
|
||||
|
||||
\begin{environment}{proof}
|
||||
\begin{syntax}
|
||||
\cs{begin}\{proof\}*\oarg{description}
|
||||
\end{syntax}
|
||||
The old \env{proof} environment has been modified slightly.
|
||||
We still accept a \meta{description}, but this will be given
|
||||
in parantheses after the usual \enquote{proof} keyword.
|
||||
|
||||
Additionally, we accept an optional \enquote{star}, that will be visually
|
||||
displayed behind the \enquote{proof} keyword.
|
||||
|
||||
When nested, that is, when inside a \env{proof} or \env{subproof} environment,
|
||||
the name will automatically change to \enquote{subproof}.
|
||||
Nesting works to an arbitrary depth.
|
||||
\end{environment}
|
||||
|
||||
\begin{environment}{subproof}
|
||||
\begin{syntax}
|
||||
\cs{begin}\{subproof\}*\oarg{description}
|
||||
\end{syntax}
|
||||
|
||||
Works like the \env{proof} environment, but will always be named
|
||||
\enquote{subproof} and finish with a black square.
|
||||
|
||||
You will probably rarely need this.
|
||||
\end{environment}
|
||||
|
||||
\subsection{Refproofs}
|
||||
|
||||
\begin{environment}{refproof}
|
||||
\begin{syntax}
|
||||
\cs{begin}\{refproof\}*\marg{label}\oarg{description}
|
||||
\end{syntax}
|
||||
For the optional \enquote{*} or the \meta{description}
|
||||
see the \env{proof} environment.
|
||||
|
||||
The \meta{label} has to be a valid \LaTeX-known label that \cs{ref} would
|
||||
accept.
|
||||
This \env{refproof} is then associated with the corresponding
|
||||
theorem that \meta{label} refers to.
|
||||
It will state \enquote{Proof of \meta{reference}} at the beginning of
|
||||
the environment to indicate that this proof is associated with some
|
||||
specific environment.
|
||||
|
||||
When the \pkg{hyperref} package is loaded, this is automatically
|
||||
detected and an \cs{autoref} command is used to also indicate
|
||||
the environment name in the reference.
|
||||
|
||||
When \env{refproof} has been called with the same label before,
|
||||
the name will be adjusted to
|
||||
\enquote{Continuation of proof of \meta{reference}}
|
||||
automatically.
|
||||
|
||||
Claim support is explained in \autoref{sec:claim-support}.
|
||||
\end{environment}
|
||||
|
||||
|
||||
\section{Claim support}
|
||||
\label{sec:claim-support}
|
||||
|
||||
\begin{environment}{claim}
|
||||
\begin{environment}{claim*}
|
||||
\begin{syntax}
|
||||
\cs{begin}\{claim*\}
|
||||
\end{syntax}
|
||||
The star in the environment name makes the claim not to be numbered.
|
||||
\end{environment}
|
||||
\end{environment}
|
||||
|
||||
The \env{proof}, \env{subproof} and \env{refproof} environment alter the
|
||||
behavior of the claim numbering as follows:
|
||||
|
||||
\begin{itemize}
|
||||
\item The \env{proof} and \env{subproof} environment will reset the
|
||||
\texttt{claim} counter at their beginning.
|
||||
Claims will appear as \enquote{Claim 1}, \enquote{Claim 2},\ldots
|
||||
|
||||
At the end of the environment, the previous counter is restored.
|
||||
\item The \env{refproof} environment will number claims within the
|
||||
proof and \emph{all of its continuations}.
|
||||
Additionally, claims will be numbered as
|
||||
\enquote{\meta{reference}.C1}, \enquote{\meta{reference}.C2}
|
||||
where \meta{reference} is the numbering style of the \meta{label}
|
||||
that this proof is associated to.
|
||||
|
||||
At the end of the environment, the previous counter is restored.
|
||||
\end{itemize}
|
||||
|
||||
\section{Language support}
|
||||
|
||||
This package makes use of the \pkg{translator} package to provide
|
||||
\pkg{babel}-sensitive translations dynamically throughout the document.
|
||||
You need the
|
||||
\texttt{%
|
||||
translator\allowbreak-proof\allowbreak-dictionary%
|
||||
\allowbreak-\meta{language}.dict
|
||||
}
|
||||
dictionary somewhere where \LaTeX can find it.
|
||||
It should have shipped with this documentation and the package source.
|
||||
|
||||
Currently, only German and English are supported.
|
||||
\end{documentation}
|
||||
|
||||
|
||||
\section{\pkg{groupthm} integration}
|
||||
|
||||
This has not been implemented yet, but future features include:
|
||||
|
||||
\begin{itemize}
|
||||
\item Integrate the claim environment into the \texttt{star} and \texttt{starred}
|
||||
groups of \pkg{groupthm}.
|
||||
\item Integrate the optional stars of the \env{proof} etc into \pkg{groupthm},
|
||||
i.e.~let them behave like \texttt{star} environments to toggle
|
||||
these in a unified way.
|
||||
\end{itemize}
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,5 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
\usepackage{mkessler-todo}
|
||||
\begin{document}
|
||||
\DocInput{../../../src/environments/thmstyle/thmstyle.dtx}
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,105 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-symbindex} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\usepackage{mkessler-symbindex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This package aims at indexing mathematical symbols properly.
|
||||
It provides a key-value interface for declaring such symbols
|
||||
and indexes them automatically when used.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
We base our index on the \pkg{imakeidx} package.
|
||||
|
||||
We will also only index each symbol only for its first appearance in the
|
||||
document, not congesting the index unnecessarily.
|
||||
|
||||
\begin{function}{\DeclareSymbol}
|
||||
\begin{syntax}
|
||||
\cs{DeclareSymbol}\oarg{key=value list}\marg{symbol name}
|
||||
\end{syntax}
|
||||
This declares the command \cs{\meta{symbol name}}.
|
||||
The behavior is controlled by the key-value list,
|
||||
which accepts the following keys:
|
||||
|
||||
\begin{description}
|
||||
\item[group = \meta{index name}]
|
||||
Declares that this symbol will appear
|
||||
in the \meta{index name} given.
|
||||
If not present, the default index of the document will be used.
|
||||
|
||||
The index is assumed to exist.
|
||||
|
||||
\item[formula = \meta{formula}]
|
||||
Controls to what formula the control sequence expands in the document
|
||||
when called.
|
||||
This can be any valid macro that is callable in math mode.
|
||||
It is allowed that this macro captures additional arguments following
|
||||
the command invocation, this will not interfere with indexing.
|
||||
|
||||
When not given, the \meta{formula} will just be the \meta{symbol name}
|
||||
itself.
|
||||
|
||||
\item[ordered = \meta{word}]
|
||||
|
||||
Denotes that the symbol will be ordered alphabetically like \meta{word}
|
||||
in the index.
|
||||
|
||||
When not given, the \meta{symbol name} will be used.
|
||||
|
||||
\item[description = \meta{text}]
|
||||
|
||||
Sets the description that appears in the index behind the symbol.
|
||||
|
||||
If not given, no description is present.
|
||||
|
||||
\item[operator = \meta{function}]
|
||||
|
||||
When \cs{\meta{symbol name}} is called,
|
||||
this expands to the control sequence
|
||||
\enquote{\meta{function}\{\meta{formula}\}}
|
||||
so that the \meta{function} receives the \meta{formula}
|
||||
as its first argument.
|
||||
|
||||
This can e.g.~be set to \cs{operatorname}, \cs{textbf}
|
||||
or similar, adjusting the spacing or layouting of
|
||||
the formula, while not influencing the ordering in the index.
|
||||
|
||||
When \meta{ordered = } is given yet, this is equivalent to
|
||||
not using the \meta{operator = } and just putting this in the
|
||||
\meta{formula = } key together.
|
||||
|
||||
When no \meta{operator} is given, \cs{use:n} is inserted,
|
||||
which strips the braces around \meta{formula} and just
|
||||
leaves formula in the input stream,
|
||||
resulting in no effect.
|
||||
|
||||
\item[defaultargs = \meta{token list}]
|
||||
|
||||
This sets a list of tokens that will be inserted directly
|
||||
after the invocation of \cs{\meta{symbol name}} when listing
|
||||
the symbol in the index.
|
||||
|
||||
This makes it possible e.g.~to define \cs{Mod} as a formula
|
||||
that stands for \enquote{$R$-modules} and is used as
|
||||
\enquote{\texttt{\cs{Mod}\_R}} in the document
|
||||
(or any other symbol that \texttt{R}, of course)
|
||||
and list it as $\text{Mod}_R$ in the index,
|
||||
by setting \enquote{defaultargs = \_R}.
|
||||
|
||||
\end{description}
|
||||
\end{function}
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,55 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-vocab} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\usepackage{mkessler-vocab}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
When defining lots of new notions in a document,
|
||||
it is useful to index these at the point of their definition,
|
||||
to let users easily look up the spots where notions are
|
||||
introduced in a document.
|
||||
|
||||
Also, one often wants to highlight these when defining a new notion.
|
||||
|
||||
We combined both approaches.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\section{Macros}
|
||||
\begin{function}{\vocab}
|
||||
\begin{syntax}
|
||||
\cs{vocab}\oarg{index entry}\marg{vocab}
|
||||
\end{syntax}
|
||||
|
||||
Highlights \meta{vocab} in the text (bold blue).
|
||||
Also indexes this under \oarg{index entry}.
|
||||
|
||||
If \oarg{index entry} is empty, \meta{vocab} itself will appear in the index.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\printvocabindex, \PrintVocabIndex}
|
||||
Prints the index of vocabs.
|
||||
|
||||
The \cs{printvocabindex} is deprecated,
|
||||
use the better named \cs{PrintVocabIndex}.
|
||||
\end{function}
|
||||
|
||||
\section{Package options}
|
||||
|
||||
You can specify the two options \texttt{index} and \texttt{noindex}.
|
||||
The default is \texttt{noindex}.
|
||||
|
||||
Index entries are only generated if \texttt{index} has been specified.
|
||||
Of course, \cs{PrintVocabIndex} results in an error if the package
|
||||
has been loaded with \texttt{noindex}.
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,119 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-categories} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\usepackage{mkessler-categories}
|
||||
|
||||
|
||||
\NewDocumentCommand{\ShowCategory}{m}
|
||||
{
|
||||
\cs{#1} & $\csname #1\endcsname$ \\
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This is a ready-to-use package providing symbols of mathematical
|
||||
categories with automatic indexing.
|
||||
|
||||
It is certainly plausible that you prefer to name your categories slightly
|
||||
differently that the author.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\section{General notice}
|
||||
|
||||
This package is based on the \pkg{mkessler-symbindex} package.
|
||||
We thus use \pkg{imakeindex} to generate the index file.
|
||||
|
||||
\section{Functionality}
|
||||
|
||||
\begin{function}{\category}
|
||||
\begin{syntax}
|
||||
\cs{category}\marg{category}
|
||||
\end{syntax}
|
||||
|
||||
Makes the given argument \meta{category} behave like a math operator
|
||||
and prints its name in bold.
|
||||
|
||||
This is just to ensure a unified style for printing categories,
|
||||
if you don't like it, redefine this macro.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\DeclareCategory}
|
||||
\begin{syntax}
|
||||
\cs{DeclareCategory}\oarg{key=value list}\marg{category}
|
||||
\end{syntax}
|
||||
|
||||
Has the same syntax as \cs{DeclareSymbol} from the \pkg{mkessler-symbindex} package,
|
||||
but adds the key \texttt{group = categories}.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\DeclareSimpleCategory}
|
||||
\begin{syntax}
|
||||
\cs{DeclareSimpleCategory}\oarg{key=value list}\marg{category}\oarg{description}
|
||||
\end{syntax}
|
||||
|
||||
Declares a \enquote{simple} category, i.e.~the category \cs{\meta{category}}
|
||||
is declared and will expand to \enquote{\cs{category}\marg{category}}
|
||||
when expanded.
|
||||
|
||||
The optional \meta{description} is shown in the index when present.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\MakeCategoryIndex}
|
||||
Prints the index of categories.
|
||||
\end{function}
|
||||
|
||||
\section{Language integration}
|
||||
|
||||
This package uses \pkg{translator} to translate the package descriptions.
|
||||
Currently, only English and German are supported.
|
||||
|
||||
\section{Default categories}
|
||||
|
||||
The package also provides default categories.
|
||||
These are shown in \autoref{tab:provided-categories}.
|
||||
|
||||
You can view their appearance in the index and their descriptions in the
|
||||
index of this documentation.
|
||||
Unfortunately, the index is not (yet) compatible with the \texttt{l3doc} class
|
||||
which is used for this documentation, so ignore everything before the
|
||||
\enquote{@} characters.
|
||||
|
||||
\begin{table}[htpb]
|
||||
\centering
|
||||
\begin{tabular}{c | c}
|
||||
Macro & Result \\
|
||||
\hline
|
||||
\ShowCategory{Top}
|
||||
\ShowCategory{hTop}
|
||||
\ShowCategory{Set}
|
||||
\ShowCategory{CHaus}
|
||||
\ShowCategory{Grp}
|
||||
\ShowCategory{Ab}
|
||||
\ShowCategory{CRing}
|
||||
\ShowCategory{Ring}
|
||||
\ShowCategory{Vect}
|
||||
\ShowCategory{Cat}
|
||||
\ShowCategory{Mod}
|
||||
\ShowCategory{Alg}
|
||||
\ShowCategory{Field}
|
||||
\ShowCategory{AffVar}
|
||||
\ShowCategory{Sch}
|
||||
\ShowCategory{GrAb}
|
||||
\ShowCategory{OrdCat}
|
||||
\end{tabular}
|
||||
\caption{caption}
|
||||
\label{tab:provided-categories}
|
||||
\end{table}
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,59 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-faktor} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\usepackage{mkessler-faktor}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
The \pkg{faktor} package provides a mechanism to produce fractions
|
||||
for mathematical factors.
|
||||
Its mechanism is, however, quite limited.
|
||||
Inspired by the
|
||||
\href{https://tex.stackexchange.com/}{Tex StackExchange}
|
||||
answer of user
|
||||
\href{https://tex.stackexchange.com/users/5764/werner}{Werner},
|
||||
that was given on
|
||||
\href{https://tex.stackexchange.com/questions/27591/extending-the-faktor-package}
|
||||
{https://tex.stackexchange.com/\allowbreak questions/\allowbreak 27591/extending-the-faktor-package}
|
||||
we provide a simple package that wraps (and slightly modifies)
|
||||
the given answer into a more general \cs{faktor} command.
|
||||
\end{abstract}
|
||||
|
||||
\begin{function}{\faktor}
|
||||
\begin{function}{\faktor*}
|
||||
\begin{syntax}
|
||||
\cs{faktor}*\oarg{shift enumerator}\marg{enumerator}\oarg{shift denominator}\marg{denominator}
|
||||
\end{syntax}
|
||||
Produces a fraction with tilted \enquote{$\diagup$} symbol and the corresponding
|
||||
\meta{enumerator} and \meta{denominator}.
|
||||
The \enquote{$\diagup$} symbol is automatically scaled.
|
||||
|
||||
The \meta{shift} parameters can be controlled to fine tune the vertical
|
||||
placement of \meta{enumerator} and \meta{denominator}.
|
||||
Their default values when not given are \texttt{0.5} and \texttt{-0.5},
|
||||
respectively.
|
||||
|
||||
The \enquote{*} can be optionally given. This will make the \cs{faktor}
|
||||
behave like the old \cs{faktor} command from the \cs{faktor} package,
|
||||
that is, the \enquote{$\diagup$} won't scale.
|
||||
\end{function}
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\cofaktor}
|
||||
\begin{function}{\cofaktor*}
|
||||
\begin{syntax}
|
||||
\cs{faktor}*\oarg{shift denominator}\marg{denominator}\oarg{shift enumerator}\marg{enumerator}
|
||||
\end{syntax}
|
||||
Behaves the same as \cs{faktor}, but produces a \cs{cofaktor}.
|
||||
\end{function}
|
||||
\end{function}
|
||||
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,102 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-mathalias} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\usepackage{mkessler-mathalias}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
Lazy people prefer to write stuff like \cs{Z}, \cs{Q} to get the integers
|
||||
$\mathbb{Z}$ and rationals $\mathbb{Q}$.
|
||||
They also often use shortcuts like \cs{bA} for \cs{mathbb}\{A\} to get $\mathbb{A}$.
|
||||
|
||||
While the author does not encourage such usage,
|
||||
this package provide a general syntax to generate such aliases.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\section{(Don't) be lazy}
|
||||
|
||||
You actually should \emph{not} use this package.
|
||||
This is poor \LaTeX style.
|
||||
In case you don't care, or you must, because your co-workers do so,
|
||||
this package is for you.
|
||||
|
||||
The author personally uses
|
||||
\href{https://www.vim.org/}{Vim}
|
||||
and the
|
||||
\href{https://github.com/sirver/UltiSnips}{UltiSnips}
|
||||
plugin to facilitate \LaTeX writing whilst producing a clean document
|
||||
without those poor shortcut styles.
|
||||
So in fact, \emph{be} lazy, but do it the proper way.
|
||||
|
||||
If you are, however, lazy, then put
|
||||
|
||||
\begin{verbatim}
|
||||
\usepackage[extended]{mkessler-mathalias}
|
||||
\end{verbatim}
|
||||
in your preamble.
|
||||
|
||||
\section{Aliases}
|
||||
|
||||
\begin{function}{\MakeAliasesForWith}
|
||||
\begin{syntax}
|
||||
\cs{MakeAliasesForwith}\marg{macro}\marg{shortcut}\marg{token list}
|
||||
\end{syntax}
|
||||
|
||||
For each \meta{token} in the \meta{token list},
|
||||
this declares
|
||||
\enquote{\cs{shortcut\meta{token}}}
|
||||
as an abbreviation for
|
||||
\enquote{\meta{macro}\marg{token}}.
|
||||
|
||||
\begin{texnote}
|
||||
In \LaTeX3 syntax, this function would have signature \texttt{Nnn},
|
||||
so give the \meta{macro} as a single token directly.
|
||||
\end{texnote}
|
||||
|
||||
\begin{texnote}
|
||||
Technically, the \meta{token list} can contain any tokens that
|
||||
are fully expandable and thus accepted by \cs{csname} \ldots \cs{endcsname}.
|
||||
However, as you want \emph{shortcuts}, you would typically invoke this
|
||||
with tokens of category code 12.
|
||||
\end{texnote}
|
||||
\end{function}
|
||||
|
||||
As an example,
|
||||
\begin{verbatim}
|
||||
\MakeAliasesForWith\mathcal{c}{ABC}
|
||||
\end{verbatim}
|
||||
would define the three macros \cs{cA}, \cs{cB} and \cs{cC} to expand to
|
||||
\cs{mathcal}\{A\},
|
||||
\cs{mathcal}\{B\}
|
||||
and
|
||||
\cs{mathcal}\{c\},
|
||||
respectively.
|
||||
|
||||
\section{Options for default aliases}
|
||||
|
||||
There are two options:
|
||||
|
||||
\begin{description}
|
||||
\item[basic]
|
||||
This declares \cs{C}, \cs{F}, \cs{K}, \cs{N}, \cs{Q}, \cs{R} and \cs{Z}
|
||||
to expand to the \cs{mathbb} variants of these letters.
|
||||
\item[extended]
|
||||
Implies option \textbf{basic}.
|
||||
Also defines shortcuts for \cs{mathbb}, \cs{mathfrak} and \cs{mathcal}
|
||||
for each capital arabic letter with the prefixes \enquote{b},
|
||||
\enquote{f} and \enquote{c}, respectively.
|
||||
\end{description}
|
||||
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,70 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-mathfig} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\usepackage{mkessler-mathfig}
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This is just some small wrapper package for drawing mathematical figures.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\section{Loaded packages}
|
||||
We load \pkg{pgfplots}, \pkg{tikz}, \pkg{tikz-cd} and \pkg{xy}.
|
||||
|
||||
\section{Additional macros}
|
||||
|
||||
\begin{function}{\pushoutsymbol}
|
||||
Denotes a pushoutsymbol used in category theory diagrams.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\pullbacksymbol}
|
||||
Denotes a pullbacksymbol used in category theory diagrams.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\pushout}
|
||||
\begin{syntax}
|
||||
\cs{pushout}\oarg{path to bottom right corner}
|
||||
\end{syntax}
|
||||
Invoked inside a \env{tikzcd} environment.
|
||||
This assumes being called in the top left corner of some
|
||||
commutative square and marks this square as a pushout.
|
||||
|
||||
The \meta{path} consists of symbols \texttt{d}, \texttt{u}, \texttt{r}
|
||||
and \texttt{l}, as in \pkg{tikz-cd}.
|
||||
By default, it is \texttt{dr}, being usable for default squares.
|
||||
|
||||
A phantom arrow is drawn in the given direction that
|
||||
gets a \cs{pushoutsymbol}.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\pullback}
|
||||
\begin{syntax}
|
||||
\cs{pullback}\oarg{path to bottom right corner}
|
||||
\end{syntax}
|
||||
Invoked inside a \env{tikzcd} environment.
|
||||
This assumes being called in the top left corner of some
|
||||
commutative square and marks this square as a pullback.
|
||||
|
||||
The \meta{path} consists of symbols \texttt{d}, \texttt{u}, \texttt{r}
|
||||
and \texttt{l}, as in \pkg{tikz-cd}.
|
||||
By default, it is \texttt{dr}, being usable for default squares.
|
||||
|
||||
A phantom arrow is drawn in the given direction that
|
||||
gets a \cs{pullbacksymbol}.
|
||||
\end{function}
|
||||
|
||||
|
||||
\end{documentation}
|
||||
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,93 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\usepackage{mkessler-mathfixes}
|
||||
|
||||
\title{The \pkg{mkessler-mathfixes} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
|
||||
\NewDocumentCommand{\ShowMacro}{m}
|
||||
{
|
||||
\cs{#1} & $ \csname #1\endcsname $
|
||||
\\
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\begin{abstract}
|
||||
This package includes some hacky \LaTeX (re)-definitions to fix common
|
||||
misbehavior of built-in macros.
|
||||
|
||||
For sure, this is personal view-dependent.
|
||||
If you don't like these definitions, don't use this package.
|
||||
\end{abstract}
|
||||
|
||||
\section{Provided macros}
|
||||
\autoref{tab:label} shows the behavior of macros with the
|
||||
\pkg{mkessler-mathfixes} behavior.
|
||||
|
||||
\begin{function}{\degree}
|
||||
Prints a visual degree symbol, as in $37\degree$.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\oldlim}
|
||||
Behaves like the built-in \cs{lim} from \LaTeX.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\lim}
|
||||
Defined as \cs{oldlim}\cs{limits}, always puts the limits below the symbol,
|
||||
also in inline math mode.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\subset, \supset}
|
||||
Redefined to \cs{subseteq} and \cs{supseteq} to avoid ambiguities.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\oldphi, \uglyphi, \goldenratio}
|
||||
Synonyms for the built-in \cs{phi} symbol.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\phi, \varphi}
|
||||
Synonyms for the built-in \cs{varphi} symbol.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\oldespilon, \uglyepsilon}
|
||||
Synonyms for the built-in \cs{epsilon} symbol.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\epsilon, \varepsilon}
|
||||
Synonyms for the built-in \cs{varepsilon} symbol.
|
||||
\end{function}
|
||||
|
||||
\begin{table}[htpb]
|
||||
\centering
|
||||
\begin{tabular}{c | c}
|
||||
Command & Shown by \LaTeX \\
|
||||
\ShowMacro{degree}
|
||||
\ShowMacro{subset}
|
||||
\ShowMacro{supset}
|
||||
\ShowMacro{oldphi}
|
||||
\ShowMacro{uglyphi}
|
||||
\ShowMacro{goldenratio}
|
||||
\ShowMacro{phi}
|
||||
\ShowMacro{varphi}
|
||||
\ShowMacro{oldepsilon}
|
||||
\ShowMacro{uglyepsilon}
|
||||
\ShowMacro{epsilon}
|
||||
\ShowMacro{varepsilon}
|
||||
\texttt{\$\cs{oldlim}\_\{n \cs{to} \cs{infty}\}\$} & $\oldlim_{n \to \infty}$ \\
|
||||
\texttt{\$\cs{lim}\_\{n \cs{to} \cs{infty}\}\$} & $\lim_{n \to \infty}$ \\
|
||||
\end{tabular}
|
||||
\caption{Symbols when loaded with the \pkg{mkessler-mathfixes} package.}
|
||||
\label{tab:label}
|
||||
\end{table}
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,60 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\usepackage{mkessler-mathfont}
|
||||
|
||||
\title{The \pkg{mkessler-mathfont} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
There are various math alphabets available by different packages.
|
||||
We load several of these and make these available in a consistent way.
|
||||
\end{abstract}
|
||||
|
||||
\section{Usage}
|
||||
|
||||
Load this package before \pkg{eucal}, \pkg{amsfonts} and \pkg{mathrsfs}
|
||||
to ensure proper font loading.
|
||||
|
||||
\section{Loaded alphabets}
|
||||
|
||||
\begin{function}{\mathcal,\mathfrak,\mathscr,\mathcat,\mathcalo}
|
||||
|
||||
\autoref{tab:provided-fonts} shows the fonts loaded from different packages.
|
||||
\autoref{tab:font-samples} shows samples of these fonts when the
|
||||
\pkg{mkessler-mathfont} packages has been loaded.
|
||||
\end{function}
|
||||
|
||||
\begin{table}[htpb]
|
||||
\centering
|
||||
\caption{Fonts provided}
|
||||
\label{tab:provided-fonts}
|
||||
\begin{tabular}{c | c | c }
|
||||
Command & Font \\
|
||||
\hline
|
||||
\cs{mathcal} & default \cs{mathcal} \\
|
||||
\cs{mathfrak} & \cs{mathfrak} from \pkg{amsfonts} \\
|
||||
\cs{mathscr} & \cs{mathscr} from \pkg{mathrsfs} \\
|
||||
\cs{mathcat} & \cs{mathscr} from \pkg{mathrsfs} \\
|
||||
\cs{mathcalo} & \cs{mathscr} from \pkg{eucal} with \texttt{mathscr} option \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\begin{table}[htpb]
|
||||
\centering
|
||||
\caption{Font samples}
|
||||
\label{tab:font-samples}
|
||||
\begin{tabular}{c | c }
|
||||
Command & sample \\
|
||||
\hline
|
||||
\cs{mathcal} & $\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \\
|
||||
\cs{mathfrak} & $\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \\
|
||||
\cs{mathscr} & $\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \\
|
||||
\cs{mathcalo} & $\mathcalo{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,140 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-mathop} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\usepackage{mkessler-mathop}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This package provides common math operators.
|
||||
|
||||
It is certainly based on the authors opinion and use cases and might not
|
||||
fulfill your personal needs.
|
||||
It is, however, still aimed to be reasonably general to a broader userbase.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\section{General macros}
|
||||
|
||||
\begin{function}{\DeclareSimpleMathOperator}
|
||||
\begin{syntax}
|
||||
\cs{DeclareSimpleMathOperator}\marg{operator}
|
||||
\end{syntax}
|
||||
This is similar to the \cs{DeclareMathOperator} macro of \pkg{mathtools},
|
||||
but only accepts one argument.
|
||||
The operator expansion is the operator name itself.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\DeclareDistribution}
|
||||
Currently same as \cs{DeclareSimpleMathOperator},
|
||||
existent for semantical reasons and possible future change of
|
||||
layouting of stochastical distributions.
|
||||
\end{function}
|
||||
|
||||
\section{Special symbols}
|
||||
|
||||
In this section we describe all math operators that are not of textual nature.
|
||||
|
||||
\begin{function}{\tensor}
|
||||
Alias for \cs{otimes}.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\twedge, \tsmash}
|
||||
The \enquote{t} stands for \enquote{topological}.
|
||||
These are to avoid confusion between the standard latex \cs{wedge},
|
||||
which gives $\wedge$,
|
||||
although in topology,
|
||||
the symbol $\twedge$ is called a \enquote{wedge}
|
||||
and $\tsmash$ denotes the \enquote{smash product}.
|
||||
\end{function}
|
||||
|
||||
|
||||
\begin{function}{\cfun, \One}
|
||||
Characteristic function symbol.
|
||||
Comes from \pkg{bbm} and denotes \enquote{\cs{mathbbm}\{1\}}.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\suchthat}
|
||||
gives a scaling \enquote{$\left.\suchthat\right.$} symbol used in set-definitions.
|
||||
Has to be in a \enquote{\cs{left} \ldots\cs{right}} block to
|
||||
scale properly.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\ceil, \floor}
|
||||
\begin{syntax}
|
||||
\cs{ceil}\marg{args}
|
||||
\end{syntax}
|
||||
Denotes the standard mathematical ceil and floor functions.
|
||||
\end{function}
|
||||
|
||||
|
||||
\begin{function}{\abs, \abs*}
|
||||
\begin{syntax}
|
||||
\cs{abs}*\marg{args}
|
||||
\end{syntax}
|
||||
Denotes the absolute value of an expression.
|
||||
The bars scale by default, the starred variant does not scale.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\norm}
|
||||
\begin{syntax}
|
||||
\cs{norm}*\marg{args}
|
||||
\end{syntax}
|
||||
Norm of an expression. The starred variant does not scale.
|
||||
\end{function}
|
||||
|
||||
|
||||
\begin{function}{\amalgprod}
|
||||
Denotes an amalgamatic product.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\ab, \op}
|
||||
Give a textual representation of themselves.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\opposite}
|
||||
\begin{syntax}
|
||||
\meta{structure}\cs{opposite}
|
||||
\end{syntax}
|
||||
Denotes the opposite of some mathematical object.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\abelianization}
|
||||
Denotes the abelianization of a group object.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\directlimit, \inverselimit}
|
||||
Semantical synonyms for \cs{varinjlim} and \cs{varprojlim}.
|
||||
\end{function}
|
||||
|
||||
|
||||
\begin{function}{\frestriction}
|
||||
\begin{syntax}
|
||||
\cs{frestriction}\marg{function}\marg{domain}
|
||||
\end{syntax}
|
||||
Properly denotes function restriction with adequate spacing.
|
||||
\end{function}
|
||||
|
||||
|
||||
|
||||
\section{Simple operators}
|
||||
|
||||
The vast majority of this package is simple operators such as \cs{id},
|
||||
which expands to $\id$.
|
||||
These are for now not documented, search the source code for
|
||||
\cs{DeclareSimpleMath\allowbreak Operator} if you need to know.
|
||||
|
||||
|
||||
\section{TODO}
|
||||
proper language support with \pkg{translator}
|
||||
|
||||
|
||||
\end{documentation}
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,76 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-mathsymb} package}
|
||||
\author{Maximilian Keßler}
|
||||
|
||||
\usepackage{mkessler-mathsymb}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
Provides some selected symbols related to mathematics.
|
||||
|
||||
This is certainly a very specific, non-generic package,
|
||||
heavily based on the authors use-cases.
|
||||
|
||||
Feel free to use this as well if you like the symbols.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\begin{function}{\noloc}
|
||||
An inverse \cs{colon} with the correct spacing.
|
||||
|
||||
The implementation is by user
|
||||
\href{https://tex.stackexchange.com/users/4427/egreg}
|
||||
on
|
||||
\href{https://tex.stackexchange.com/}{Tex StackExchange}
|
||||
question
|
||||
\href{https://tex.stackexchange.com/questions/546713/spacing-in-colon}
|
||||
{https://\allowbreak tex\allowbreak .stack\allowbreak exchange\allowbreak .com/\allowbreak questions/546713/spacing-in-colon}
|
||||
\end{function}
|
||||
|
||||
|
||||
\begin{function}{\contra}
|
||||
Prints a contradiction symbol
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\Warning}
|
||||
Prints a warning symbol
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\circled}
|
||||
\begin{syntax}
|
||||
\cs{circled}\marg{stuff}
|
||||
\end{syntax}
|
||||
Dynamically circles the \meta{stuff}.
|
||||
The circle is adjusted in size.
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\chainbullet}
|
||||
Synonym for \cs{bullet}.
|
||||
Only existent for semantic reasons.
|
||||
\end{function}
|
||||
|
||||
\begin{table}[htpb]
|
||||
\centering
|
||||
\caption{Symbol table}
|
||||
\label{tab:symbols}
|
||||
\begin{tabular}{c | c}
|
||||
Macro & Result \\
|
||||
\texttt{Y \cs{leftarrow} X \cs{noloc} f} & $Y \leftarrow X \noloc f$ \\
|
||||
\cs{contra} & \contra \\
|
||||
\cs{Warning} & \Warning \\
|
||||
\cs{circled}\{1\} & \circled{1} \\
|
||||
\cs{chainbullet} & $\chainbullet$
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\PrintIndex
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,69 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-enumerate} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\begin{abstract}
|
||||
This is some small wrapper around the package \pkg{enumerate}
|
||||
that provides some additional tweaks.
|
||||
\end{abstract}
|
||||
|
||||
We load \pkg{enumitem} with the \texttt{shortlabels} option.
|
||||
|
||||
|
||||
\begin{function}{\setItemnumber, \SetItemNumber}
|
||||
\begin{syntax}
|
||||
\cs{SetItemNumber}\marg{numeric expression}
|
||||
\end{syntax}
|
||||
|
||||
Sets the item number in the current enumeration.
|
||||
|
||||
The \cs{setItemnumber} is deprecated, use \cs{SetItemNumber}
|
||||
instead if you can.
|
||||
\end{function}
|
||||
|
||||
|
||||
We now provide for standard variants for enumerations:
|
||||
\begin{function}{circled, propery, equivalent, holds}
|
||||
\begin{description}
|
||||
\item[circled]
|
||||
This circles the (arabic) item numbers
|
||||
|
||||
\item[property]
|
||||
This numbers as \enquote{(\cs{roman}*)},
|
||||
i.e.~\enquote{i)}, \enquote{ii)},\ldots
|
||||
|
||||
\item[equivalent]
|
||||
This numbers as \enquote{(\cs{arabic}*)},
|
||||
i.e.~\enquote{(1)},\enquote{(2)},\ldots
|
||||
|
||||
\item[holds]
|
||||
This numbers as \enquote{\cs{arabic}*)}.,
|
||||
i.e.~\enquote{1)},\enquote{2)},\ldots
|
||||
\end{description}
|
||||
\end{function}
|
||||
|
||||
All of these are available as
|
||||
\begin{description}
|
||||
\item[ShortLabel]
|
||||
Specify \texttt{c}, \texttt{p}, \texttt{e} or \texttt{h}
|
||||
as the first option to \env{enumerate}.
|
||||
|
||||
\item[Label Value]
|
||||
Specify \texttt{label = circled } and similar.
|
||||
|
||||
\item[Key]
|
||||
|
||||
Just specify \texttt{circled} as an option directly and similar.
|
||||
\end{description}
|
||||
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,52 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\usepackage{mkessler-hypersetup}
|
||||
|
||||
\title{The \pkg{mkessler-hypersetup} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This is just a quick wrapper around the \pkg{hyperref} package
|
||||
and - optionally - the cleveref package.
|
||||
\end{abstract}
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\section{Usage}
|
||||
|
||||
The package provides one option: \texttt{cleveref}.
|
||||
When given, \pkg{cleveref} is also loaded.
|
||||
|
||||
The package loads \pkg{hyperref} at the end of the preamble,
|
||||
and (optionally), \pkg{cleveref} afterwards.
|
||||
This ensures proper loading order of these packages.
|
||||
|
||||
Additionally, we provide some default settings
|
||||
that are shown in \autoref{tab:hyperref-values}.
|
||||
|
||||
\begin{table}[htpb]
|
||||
\centering
|
||||
\begin{tabular}{c | c}
|
||||
Key & Value \\
|
||||
\hline
|
||||
colorlinks & none \\
|
||||
citecolor & violet \\
|
||||
urlcolor & blue!80!black \\
|
||||
linkcolor & red!50!black \\
|
||||
pdftitle & \cs{@course} if defined, else \cs{@title} \\
|
||||
pdfauthor & \cs{@author}
|
||||
\end{tabular}
|
||||
\caption{Hyperref values set by \pkg{mkessler-hypersetup}}
|
||||
\label{tab:hyperref-values}
|
||||
\end{table}
|
||||
|
||||
|
||||
|
||||
\end{documentation}
|
||||
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,31 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-incfig} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\begin{abstract}
|
||||
This is some small wrapper around incfigures,
|
||||
based on
|
||||
\href{https://castel.dev/post/lecture-notes-2/}
|
||||
{https://castel.dev/\allowbreak post/\allowbreak lecture-notes-2/}
|
||||
\end{abstract}
|
||||
|
||||
\begin{function}{\incfig}
|
||||
\begin{syntax}
|
||||
\cs{incfig}{filename}
|
||||
\end{syntax}
|
||||
|
||||
Inserts an incfigure.
|
||||
The figures is assumed to be in the \texttt{figures/} folder.
|
||||
The extension \texttt{pdf_tex} has \emph{not} to be given.
|
||||
\end{function}
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,46 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\title{The \pkg{mkessler-math} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\begin{abstract}
|
||||
A ready-to-use math package that just glues lots of other packages together.
|
||||
\end{abstract}
|
||||
|
||||
\section{Usage}
|
||||
\begin{verbatim}
|
||||
\usepackage{mkessler-math}
|
||||
\end{verbatim}
|
||||
|
||||
\section{Loaded packages}
|
||||
|
||||
We load the following:
|
||||
|
||||
\pkg{IEEEtrantools},
|
||||
\pkg{algorithm2e},
|
||||
\pkg{amsmath},
|
||||
\pkg{amssymb},
|
||||
\pkg{amsthm},
|
||||
\pkg{esint},
|
||||
\pkg{latexsym},
|
||||
\pkg{mathabx},
|
||||
\pkg{mathtools},
|
||||
\pkg{mkessler-categories},
|
||||
\pkg{mkessler-faktor},
|
||||
\pkg{mkessler-mathalias},
|
||||
\pkg{mkessler-mathfig},
|
||||
\pkg{mkessler-mathfixes}
|
||||
\pkg{mkessler-mathfont},
|
||||
\pkg{mkessler-mathop},
|
||||
\pkg{mkessler-mathsymb},
|
||||
\pkg{mkessler-unicodechar},
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,54 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\usepackage{mkessler-todo}
|
||||
|
||||
\title{The \pkg{mkessler-todo} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{documentation}
|
||||
|
||||
\begin{abstract}
|
||||
A simple wrapper around the \pkg{todonotes} package
|
||||
with some shortcut todos that the author uses often.
|
||||
\end{abstract}
|
||||
|
||||
\section{Usage}
|
||||
|
||||
We load the \pkg{todonotes} package and the \pkg{marginnote} package.
|
||||
|
||||
By redefining \cs{marginpar} to \cs{marginnote} we ensure
|
||||
that the \cs{todo} macro will also be usable inside minipages properly.
|
||||
|
||||
\begin{function}{\todoref}
|
||||
Marks a missing reference.
|
||||
Does \emph{not} require additional arguments.
|
||||
\todoref
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\todoquestion}
|
||||
Used for questions that arise during lectures.
|
||||
Same syntax as \cs{todo}.
|
||||
\todoquestion{Is this useful?}
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\todotex}
|
||||
Used for marking tex-related todos.
|
||||
Same syntax as \cs{todo}.
|
||||
\todotex{Fix spacing}
|
||||
\end{function}
|
||||
|
||||
\begin{function}{\todotypo}
|
||||
Used for marking (possible) typos of the lecturer for later inspection.
|
||||
Same syntax as \cs{todo}.
|
||||
\todotypo{Was this misspelled?}
|
||||
\end{function}
|
||||
|
||||
|
||||
|
||||
\end{documentation}
|
||||
|
||||
\end{document}
|
|
@ -1 +0,0 @@
|
|||
../../LATEXMKRC
|
|
@ -1,48 +0,0 @@
|
|||
\documentclass[full]{l3doc}
|
||||
|
||||
\usepackage{mkessler-unicodechar}
|
||||
|
||||
\title{The \pkg{mkessler-unicodechar} package}
|
||||
\author{Maximilian Ke\ss ler}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
This is just a quick wrapper around the \pkg{unicodechar} package
|
||||
that defines the Unicode symbols for greek letters to be available
|
||||
in \LaTeX directly.
|
||||
\end{abstract}
|
||||
|
||||
\section{Provided symbols}
|
||||
We just provide the greek (lowercase) alphabet:
|
||||
|
||||
\[
|
||||
α
|
||||
β
|
||||
γ
|
||||
δ
|
||||
ε
|
||||
ζ
|
||||
η
|
||||
θ
|
||||
ι
|
||||
κ
|
||||
λ
|
||||
μ
|
||||
ν
|
||||
ξ
|
||||
ο
|
||||
π
|
||||
ρ
|
||||
σ
|
||||
τ
|
||||
υ
|
||||
φ
|
||||
χ
|
||||
ψ
|
||||
ω
|
||||
\]
|
||||
|
||||
\end{document}
|
112
fancythm.sty
Normal file
112
fancythm.sty
Normal file
|
@ -0,0 +1,112 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{fancythm}[2021/03/31 - Theorem-Environment Package by Maximilian Kessler (private use)]
|
||||
\newif\ifenglish\englishtrue
|
||||
\DeclareOption{english}{\englishtrue}
|
||||
\DeclareOption{german}{\englishfalse}
|
||||
\DeclareOption*{\PackageWarning{fancythm}{Unknown '\CurrentOption'}}
|
||||
|
||||
\ProcessOptions\relax
|
||||
%Theorem-environments
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{mdframed}
|
||||
\RequirePackage[skins]{tcolorbox}
|
||||
\mdfsetup{skipabove=\topskip,skipbelow=\topskip}
|
||||
|
||||
%%%Define styles
|
||||
\newtheoremstyle{own}%〈name〉
|
||||
{3pt}%〈Space above〉1
|
||||
{3pt}%〈Space below〉1
|
||||
{}%〈Body font〉
|
||||
{}%〈Indent amount〉2
|
||||
{\bfseries}%〈Theorem head font〉
|
||||
{.}%〈Punctuation after theorem head〉
|
||||
{.5em}%〈Space after theorem head〉3
|
||||
{}%〈Theorem head spec(can be left empty, meaning ‘normal’)〉
|
||||
|
||||
\theoremstyle{own}
|
||||
|
||||
%%%Define styles for mdframed
|
||||
\global\mdfdefinestyle{thm}{linecolor=red,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, backgroundcolor=red!8, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
\global\mdfdefinestyle{lemma}{linecolor=orange,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, backgroundcolor=orange!10, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
\global\mdfdefinestyle{definition}{linecolor=blue,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, backgroundcolor=blue!7, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
\global\mdfdefinestyle{example}{linecolor=green!70!black,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
\global\mdfdefinestyle{remark}{linecolor=yellow!80!orange,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
|
||||
\global\mdfdefinestyle{notation}{linecolor=violet,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, backgroundcolor=violet!7, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
\global\mdfdefinestyle{theoremdef}{linecolor=red,linewidth=2pt,leftmargin=0cm,rightmargin=0cm, backgroundcolor=blue!7, rightline=false, topline=false, bottomline=false}
|
||||
|
||||
|
||||
%Theorem
|
||||
\newtheorem{protothm}{\ifenglish Theorem\else Satz\fi}[section]
|
||||
\newenvironment{theorem}{\begin{mdframed}[style=thm] \begin{protothm}}{\end{protothm}\end{mdframed}}
|
||||
|
||||
%Unnumbered Theorem
|
||||
\newtheorem*{protothm*}{\ifenglish Theorem\else Satz\fi}
|
||||
\newenvironment{theorem*}{\begin{mdframed}[style=thm] \begin{protothm*}}{\end{protothm*}\end{mdframed}}
|
||||
|
||||
%Proposition
|
||||
\newtheorem{protoprop}[protothm]{Proposition}
|
||||
\newenvironment{proposition}{\begin{mdframed}[style=thm] \begin{protoprop}}{\end{protoprop}\end{mdframed}}
|
||||
|
||||
%Unnumbered Proposition
|
||||
\newtheorem{protoprop*}[protothm]{Proposition}
|
||||
\newenvironment{proposition*}{\begin{mdframed}[style=thm] \begin{protoprop*}}{\end{protoprop*}\end{mdframed}}
|
||||
|
||||
%Corollary
|
||||
\newtheorem{protocor}[protothm]{\ifenglish Corollary\else Korollar\fi}
|
||||
\newenvironment{corollary}{\begin{mdframed}[style=thm] \begin{protocor}}{\end{protocor}\end{mdframed}}
|
||||
|
||||
%Unnumbered Corollary
|
||||
\newtheorem{protocor*}[protothm]{\ifenglish Corollary\else Korollar\fi}
|
||||
\newenvironment{corollary*}{\begin{mdframed}[style=thm] \begin{protocor*}}{\end{protocor*}\end{mdframed}}
|
||||
|
||||
%Lemma
|
||||
\newtheorem{protolemma}[protothm]{Lemma}
|
||||
\newenvironment{lemma}{\begin{mdframed}[style=lemma] \begin{protolemma}}{\end{protolemma}\end{mdframed}}
|
||||
|
||||
%Unnumbered Lemma
|
||||
\newtheorem*{protlemma*}{Lemma}
|
||||
\newenvironment{lemma*}{\begin{mdframed}[style=lemma] \begin{protolemma*}}{\end{protolemma*}\end{mdframed}}
|
||||
|
||||
%Definition
|
||||
\newtheorem{protodefinition}[protothm]{Definition}
|
||||
\newenvironment{definition}{\begin{mdframed}[style=definition] \begin{protodefinition}}{\end{protodefinition}\end{mdframed}}
|
||||
|
||||
%unnumbered Definition
|
||||
\newtheorem*{protodefinition*}{Definition}
|
||||
\newenvironment{definition*}{\begin{mdframed}[style=definition] \begin{protodefinition*}}{\end{protodefinition*}\end{mdframed}}
|
||||
|
||||
%Theorem + Definition
|
||||
\newtheorem{prototheoremdef}[protothm]{\ifenglish Theorem and Definition\else Satz und Definition\fi}
|
||||
\newenvironment{theoremdef}{\begin{mdframed}[style=theoremdef] \begin{prototheoremdef}}{\end{prototheoremdef}\end{mdframed}}
|
||||
|
||||
%Notation
|
||||
\newtheorem*{protonotation}{Notation}
|
||||
\newenvironment{notation}{\begin{mdframed}[style=notation] \begin{protonotation}}{\end{protonotation}\end{mdframed}}
|
||||
|
||||
%Example
|
||||
\newtheorem*{protoexample}{\ifenglish Example\else Beispiel\fi}
|
||||
\newenvironment{example}{\begin{mdframed}[style=example] \begin{protoexample}}{\end{protoexample}\end{mdframed}}
|
||||
|
||||
%Remark
|
||||
\newtheorem*{protoremark}{\ifenglish Remark\else Bemerkung\fi}
|
||||
\newenvironment{remark}{\begin{mdframed}[style=remark] \begin{protoremark}}{\end{protoremark}\end{mdframed}}
|
||||
|
||||
|
||||
|
||||
\newtcolorbox{recap}{before skip = 0.5cm, after skip = 0.5cm, enhanced, sharp corners = all, colback = white, colframe = gray, toprule=0pt, bottomrule=0pt, leftrule=0pt,rightrule=0pt, overlay = {
|
||||
\draw[gray, line width = 2pt] (frame.north west) -- ++(0.5cm, 0pt);
|
||||
\draw[gray, line width=2pt] (frame.south east) -- ++(-0.5cm, 0pt);
|
||||
\draw[gray, line width=2pt] (frame.north west) -- ++ (0pt, -0.5cm);
|
||||
\draw[gray, line width=2pt] (frame.south east) -- ++(0pt, 0.5cm);
|
||||
}}
|
||||
|
||||
\newtheorem*{reminder}{\ifenglish Reminder\else Erinnerung\fi}
|
||||
|
||||
|
|
@ -1,415 +0,0 @@
|
|||
The LaTeX Project Public License
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
LPPL Version 1.3c 2008-05-04
|
||||
|
||||
Copyright 1999 2002-2008 LaTeX3 Project
|
||||
Everyone is allowed to distribute verbatim copies of this
|
||||
license document, but modification of it is not allowed.
|
||||
|
||||
|
||||
PREAMBLE
|
||||
========
|
||||
|
||||
The LaTeX Project Public License (LPPL) is the primary license under
|
||||
which the LaTeX kernel and the base LaTeX packages are distributed.
|
||||
|
||||
You may use this license for any work of which you hold the copyright
|
||||
and which you wish to distribute. This license may be particularly
|
||||
suitable if your work is TeX-related (such as a LaTeX package), but
|
||||
it is written in such a way that you can use it even if your work is
|
||||
unrelated to TeX.
|
||||
|
||||
The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
|
||||
below, gives instructions, examples, and recommendations for authors
|
||||
who are considering distributing their works under this license.
|
||||
|
||||
This license gives conditions under which a work may be distributed
|
||||
and modified, as well as conditions under which modified versions of
|
||||
that work may be distributed.
|
||||
|
||||
We, the LaTeX3 Project, believe that the conditions below give you
|
||||
the freedom to make and distribute modified versions of your work
|
||||
that conform with whatever technical specifications you wish while
|
||||
maintaining the availability, integrity, and reliability of
|
||||
that work. If you do not see how to achieve your goal while
|
||||
meeting these conditions, then read the document `cfgguide.tex'
|
||||
and `modguide.tex' in the base LaTeX distribution for suggestions.
|
||||
|
||||
|
||||
DEFINITIONS
|
||||
===========
|
||||
|
||||
In this license document the following terms are used:
|
||||
|
||||
`Work'
|
||||
Any work being distributed under this License.
|
||||
|
||||
`Derived Work'
|
||||
Any work that under any applicable law is derived from the Work.
|
||||
|
||||
`Modification'
|
||||
Any procedure that produces a Derived Work under any applicable
|
||||
law -- for example, the production of a file containing an
|
||||
original file associated with the Work or a significant portion of
|
||||
such a file, either verbatim or with modifications and/or
|
||||
translated into another language.
|
||||
|
||||
`Modify'
|
||||
To apply any procedure that produces a Derived Work under any
|
||||
applicable law.
|
||||
|
||||
`Distribution'
|
||||
Making copies of the Work available from one person to another, in
|
||||
whole or in part. Distribution includes (but is not limited to)
|
||||
making any electronic components of the Work accessible by
|
||||
file transfer protocols such as FTP or HTTP or by shared file
|
||||
systems such as Sun's Network File System (NFS).
|
||||
|
||||
`Compiled Work'
|
||||
A version of the Work that has been processed into a form where it
|
||||
is directly usable on a computer system. This processing may
|
||||
include using installation facilities provided by the Work,
|
||||
transformations of the Work, copying of components of the Work, or
|
||||
other activities. Note that modification of any installation
|
||||
facilities provided by the Work constitutes modification of the Work.
|
||||
|
||||
`Current Maintainer'
|
||||
A person or persons nominated as such within the Work. If there is
|
||||
no such explicit nomination then it is the `Copyright Holder' under
|
||||
any applicable law.
|
||||
|
||||
`Base Interpreter'
|
||||
A program or process that is normally needed for running or
|
||||
interpreting a part or the whole of the Work.
|
||||
|
||||
A Base Interpreter may depend on external components but these
|
||||
are not considered part of the Base Interpreter provided that each
|
||||
external component clearly identifies itself whenever it is used
|
||||
interactively. Unless explicitly specified when applying the
|
||||
license to the Work, the only applicable Base Interpreter is a
|
||||
`LaTeX-Format' or in the case of files belonging to the
|
||||
`LaTeX-format' a program implementing the `TeX language'.
|
||||
|
||||
|
||||
|
||||
CONDITIONS ON DISTRIBUTION AND MODIFICATION
|
||||
===========================================
|
||||
|
||||
1. Activities other than distribution and/or modification of the Work
|
||||
are not covered by this license; they are outside its scope. In
|
||||
particular, the act of running the Work is not restricted and no
|
||||
requirements are made concerning any offers of support for the Work.
|
||||
|
||||
2. You may distribute a complete, unmodified copy of the Work as you
|
||||
received it. Distribution of only part of the Work is considered
|
||||
modification of the Work, and no right to distribute such a Derived
|
||||
Work may be assumed under the terms of this clause.
|
||||
|
||||
3. You may distribute a Compiled Work that has been generated from a
|
||||
complete, unmodified copy of the Work as distributed under Clause 2
|
||||
above, as long as that Compiled Work is distributed in such a way that
|
||||
the recipients may install the Compiled Work on their system exactly
|
||||
as it would have been installed if they generated a Compiled Work
|
||||
directly from the Work.
|
||||
|
||||
4. If you are the Current Maintainer of the Work, you may, without
|
||||
restriction, modify the Work, thus creating a Derived Work. You may
|
||||
also distribute the Derived Work without restriction, including
|
||||
Compiled Works generated from the Derived Work. Derived Works
|
||||
distributed in this manner by the Current Maintainer are considered to
|
||||
be updated versions of the Work.
|
||||
|
||||
5. If you are not the Current Maintainer of the Work, you may modify
|
||||
your copy of the Work, thus creating a Derived Work based on the Work,
|
||||
and compile this Derived Work, thus creating a Compiled Work based on
|
||||
the Derived Work.
|
||||
|
||||
6. If you are not the Current Maintainer of the Work, you may
|
||||
distribute a Derived Work provided the following conditions are met
|
||||
for every component of the Work unless that component clearly states
|
||||
in the copyright notice that it is exempt from that condition. Only
|
||||
the Current Maintainer is allowed to add such statements of exemption
|
||||
to a component of the Work.
|
||||
|
||||
a. If a component of this Derived Work can be a direct replacement
|
||||
for a component of the Work when that component is used with the
|
||||
Base Interpreter, then, wherever this component of the Work
|
||||
identifies itself to the user when used interactively with that
|
||||
Base Interpreter, the replacement component of this Derived Work
|
||||
clearly and unambiguously identifies itself as a modified version
|
||||
of this component to the user when used interactively with that
|
||||
Base Interpreter.
|
||||
|
||||
b. Every component of the Derived Work contains prominent notices
|
||||
detailing the nature of the changes to that component, or a
|
||||
prominent reference to another file that is distributed as part
|
||||
of the Derived Work and that contains a complete and accurate log
|
||||
of the changes.
|
||||
|
||||
c. No information in the Derived Work implies that any persons,
|
||||
including (but not limited to) the authors of the original version
|
||||
of the Work, provide any support, including (but not limited to)
|
||||
the reporting and handling of errors, to recipients of the
|
||||
Derived Work unless those persons have stated explicitly that
|
||||
they do provide such support for the Derived Work.
|
||||
|
||||
d. You distribute at least one of the following with the Derived Work:
|
||||
|
||||
1. A complete, unmodified copy of the Work;
|
||||
if your distribution of a modified component is made by
|
||||
offering access to copy the modified component from a
|
||||
designated place, then offering equivalent access to copy
|
||||
the Work from the same or some similar place meets this
|
||||
condition, even though third parties are not compelled to
|
||||
copy the Work along with the modified component;
|
||||
|
||||
2. Information that is sufficient to obtain a complete,
|
||||
unmodified copy of the Work.
|
||||
|
||||
7. If you are not the Current Maintainer of the Work, you may
|
||||
distribute a Compiled Work generated from a Derived Work, as long as
|
||||
the Derived Work is distributed to all recipients of the Compiled
|
||||
Work, and as long as the conditions of Clause 6, above, are met with
|
||||
regard to the Derived Work.
|
||||
|
||||
8. The conditions above are not intended to prohibit, and hence do not
|
||||
apply to, the modification, by any method, of any component so that it
|
||||
becomes identical to an updated version of that component of the Work as
|
||||
it is distributed by the Current Maintainer under Clause 4, above.
|
||||
|
||||
9. Distribution of the Work or any Derived Work in an alternative
|
||||
format, where the Work or that Derived Work (in whole or in part) is
|
||||
then produced by applying some process to that format, does not relax or
|
||||
nullify any sections of this license as they pertain to the results of
|
||||
applying that process.
|
||||
|
||||
10. a. A Derived Work may be distributed under a different license
|
||||
provided that license itself honors the conditions listed in
|
||||
Clause 6 above, in regard to the Work, though it does not have
|
||||
to honor the rest of the conditions in this license.
|
||||
|
||||
b. If a Derived Work is distributed under a different license, that
|
||||
Derived Work must provide sufficient documentation as part of
|
||||
itself to allow each recipient of that Derived Work to honor the
|
||||
restrictions in Clause 6 above, concerning changes from the Work.
|
||||
|
||||
11. This license places no restrictions on works that are unrelated to
|
||||
the Work, nor does this license place any restrictions on aggregating
|
||||
such works with the Work by any means.
|
||||
|
||||
12. Nothing in this license is intended to, or may be used to, prevent
|
||||
complete compliance by all parties with all applicable laws.
|
||||
|
||||
|
||||
NO WARRANTY
|
||||
===========
|
||||
|
||||
There is no warranty for the Work. Except when otherwise stated in
|
||||
writing, the Copyright Holder provides the Work `as is', without
|
||||
warranty of any kind, either expressed or implied, including, but not
|
||||
limited to, the implied warranties of merchantability and fitness for a
|
||||
particular purpose. The entire risk as to the quality and performance
|
||||
of the Work is with you. Should the Work prove defective, you assume
|
||||
the cost of all necessary servicing, repair, or correction.
|
||||
|
||||
In no event unless required by applicable law or agreed to in writing
|
||||
will The Copyright Holder, or any author named in the components of the
|
||||
Work, or any other party who may distribute and/or modify the Work as
|
||||
permitted above, be liable to you for damages, including any general,
|
||||
special, incidental or consequential damages arising out of any use of
|
||||
the Work or out of inability to use the Work (including, but not limited
|
||||
to, loss of data, data being rendered inaccurate, or losses sustained by
|
||||
anyone as a result of any failure of the Work to operate with any other
|
||||
programs), even if the Copyright Holder or said author or said other
|
||||
party has been advised of the possibility of such damages.
|
||||
|
||||
|
||||
MAINTENANCE OF THE WORK
|
||||
=======================
|
||||
|
||||
The Work has the status `author-maintained' if the Copyright Holder
|
||||
explicitly and prominently states near the primary copyright notice in
|
||||
the Work that the Work can only be maintained by the Copyright Holder
|
||||
or simply that it is `author-maintained'.
|
||||
|
||||
The Work has the status `maintained' if there is a Current Maintainer
|
||||
who has indicated in the Work that they are willing to receive error
|
||||
reports for the Work (for example, by supplying a valid e-mail
|
||||
address). It is not required for the Current Maintainer to acknowledge
|
||||
or act upon these error reports.
|
||||
|
||||
The Work changes from status `maintained' to `unmaintained' if there
|
||||
is no Current Maintainer, or the person stated to be Current
|
||||
Maintainer of the work cannot be reached through the indicated means
|
||||
of communication for a period of six months, and there are no other
|
||||
significant signs of active maintenance.
|
||||
|
||||
You can become the Current Maintainer of the Work by agreement with
|
||||
any existing Current Maintainer to take over this role.
|
||||
|
||||
If the Work is unmaintained, you can become the Current Maintainer of
|
||||
the Work through the following steps:
|
||||
|
||||
1. Make a reasonable attempt to trace the Current Maintainer (and
|
||||
the Copyright Holder, if the two differ) through the means of
|
||||
an Internet or similar search.
|
||||
|
||||
2. If this search is successful, then enquire whether the Work
|
||||
is still maintained.
|
||||
|
||||
a. If it is being maintained, then ask the Current Maintainer
|
||||
to update their communication data within one month.
|
||||
|
||||
b. If the search is unsuccessful or no action to resume active
|
||||
maintenance is taken by the Current Maintainer, then announce
|
||||
within the pertinent community your intention to take over
|
||||
maintenance. (If the Work is a LaTeX work, this could be
|
||||
done, for example, by posting to comp.text.tex.)
|
||||
|
||||
3a. If the Current Maintainer is reachable and agrees to pass
|
||||
maintenance of the Work to you, then this takes effect
|
||||
immediately upon announcement.
|
||||
|
||||
b. If the Current Maintainer is not reachable and the Copyright
|
||||
Holder agrees that maintenance of the Work be passed to you,
|
||||
then this takes effect immediately upon announcement.
|
||||
|
||||
4. If you make an `intention announcement' as described in 2b. above
|
||||
and after three months your intention is challenged neither by
|
||||
the Current Maintainer nor by the Copyright Holder nor by other
|
||||
people, then you may arrange for the Work to be changed so as
|
||||
to name you as the (new) Current Maintainer.
|
||||
|
||||
5. If the previously unreachable Current Maintainer becomes
|
||||
reachable once more within three months of a change completed
|
||||
under the terms of 3b) or 4), then that Current Maintainer must
|
||||
become or remain the Current Maintainer upon request provided
|
||||
they then update their communication data within one month.
|
||||
|
||||
A change in the Current Maintainer does not, of itself, alter the fact
|
||||
that the Work is distributed under the LPPL license.
|
||||
|
||||
If you become the Current Maintainer of the Work, you should
|
||||
immediately provide, within the Work, a prominent and unambiguous
|
||||
statement of your status as Current Maintainer. You should also
|
||||
announce your new status to the same pertinent community as
|
||||
in 2b) above.
|
||||
|
||||
|
||||
WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
|
||||
======================================================
|
||||
|
||||
This section contains important instructions, examples, and
|
||||
recommendations for authors who are considering distributing their
|
||||
works under this license. These authors are addressed as `you' in
|
||||
this section.
|
||||
|
||||
Choosing This License or Another License
|
||||
----------------------------------------
|
||||
|
||||
If for any part of your work you want or need to use *distribution*
|
||||
conditions that differ significantly from those in this license, then
|
||||
do not refer to this license anywhere in your work but, instead,
|
||||
distribute your work under a different license. You may use the text
|
||||
of this license as a model for your own license, but your license
|
||||
should not refer to the LPPL or otherwise give the impression that
|
||||
your work is distributed under the LPPL.
|
||||
|
||||
The document `modguide.tex' in the base LaTeX distribution explains
|
||||
the motivation behind the conditions of this license. It explains,
|
||||
for example, why distributing LaTeX under the GNU General Public
|
||||
License (GPL) was considered inappropriate. Even if your work is
|
||||
unrelated to LaTeX, the discussion in `modguide.tex' may still be
|
||||
relevant, and authors intending to distribute their works under any
|
||||
license are encouraged to read it.
|
||||
|
||||
A Recommendation on Modification Without Distribution
|
||||
-----------------------------------------------------
|
||||
|
||||
It is wise never to modify a component of the Work, even for your own
|
||||
personal use, without also meeting the above conditions for
|
||||
distributing the modified component. While you might intend that such
|
||||
modifications will never be distributed, often this will happen by
|
||||
accident -- you may forget that you have modified that component; or
|
||||
it may not occur to you when allowing others to access the modified
|
||||
version that you are thus distributing it and violating the conditions
|
||||
of this license in ways that could have legal implications and, worse,
|
||||
cause problems for the community. It is therefore usually in your
|
||||
best interest to keep your copy of the Work identical with the public
|
||||
one. Many works provide ways to control the behavior of that work
|
||||
without altering any of its licensed components.
|
||||
|
||||
How to Use This License
|
||||
-----------------------
|
||||
|
||||
To use this license, place in each of the components of your work both
|
||||
an explicit copyright notice including your name and the year the work
|
||||
was authored and/or last substantially modified. Include also a
|
||||
statement that the distribution and/or modification of that
|
||||
component is constrained by the conditions in this license.
|
||||
|
||||
Here is an example of such a notice and statement:
|
||||
|
||||
%% pig.dtx
|
||||
%% Copyright 2005 M. Y. Name
|
||||
%
|
||||
% This work may be distributed and/or modified under the
|
||||
% conditions of the LaTeX Project Public License, either version 1.3
|
||||
% of this license or (at your option) any later version.
|
||||
% The latest version of this license is in
|
||||
% http://www.latex-project.org/lppl.txt
|
||||
% and version 1.3 or later is part of all distributions of LaTeX
|
||||
% version 2005/12/01 or later.
|
||||
%
|
||||
% This work has the LPPL maintenance status `maintained'.
|
||||
%
|
||||
% The Current Maintainer of this work is M. Y. Name.
|
||||
%
|
||||
% This work consists of the files pig.dtx and pig.ins
|
||||
% and the derived file pig.sty.
|
||||
|
||||
Given such a notice and statement in a file, the conditions
|
||||
given in this license document would apply, with the `Work' referring
|
||||
to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
|
||||
generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
|
||||
referring to any `LaTeX-Format', and both `Copyright Holder' and
|
||||
`Current Maintainer' referring to the person `M. Y. Name'.
|
||||
|
||||
If you do not want the Maintenance section of LPPL to apply to your
|
||||
Work, change `maintained' above into `author-maintained'.
|
||||
However, we recommend that you use `maintained', as the Maintenance
|
||||
section was added in order to ensure that your Work remains useful to
|
||||
the community even when you can no longer maintain and support it
|
||||
yourself.
|
||||
|
||||
Derived Works That Are Not Replacements
|
||||
---------------------------------------
|
||||
|
||||
Several clauses of the LPPL specify means to provide reliability and
|
||||
stability for the user community. They therefore concern themselves
|
||||
with the case that a Derived Work is intended to be used as a
|
||||
(compatible or incompatible) replacement of the original Work. If
|
||||
this is not the case (e.g., if a few lines of code are reused for a
|
||||
completely different task), then clauses 6b and 6d shall not apply.
|
||||
|
||||
|
||||
Important Recommendations
|
||||
-------------------------
|
||||
|
||||
Defining What Constitutes the Work
|
||||
|
||||
The LPPL requires that distributions of the Work contain all the
|
||||
files of the Work. It is therefore important that you provide a
|
||||
way for the licensee to determine which files constitute the Work.
|
||||
This could, for example, be achieved by explicitly listing all the
|
||||
files of the Work near the copyright notice of each file or by
|
||||
using a line such as:
|
||||
|
||||
% This work consists of all files listed in manifest.txt.
|
||||
|
||||
in that place. In the absence of an unequivocal list it might be
|
||||
impossible for the licensee to determine what is considered by you
|
||||
to comprise the Work and, in such a case, the licensee would be
|
||||
entitled to make reasonable conjectures as to which files comprise
|
||||
the Work.
|
|
@ -1,674 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
624
mkessler-fancythm.sty
Normal file
624
mkessler-fancythm.sty
Normal file
|
@ -0,0 +1,624 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{mkessler-fancythm}[2021/09/04 - Theorem-Environment Package]
|
||||
%%%%%%%%m
|
||||
%Provides fancy theorem-like-environments usedd in the write-ups of my lecture nots
|
||||
|
||||
\newif\ifenglish\englishtrue
|
||||
\newif\ifshowstars\showstarstrue
|
||||
\newif\ifshowdaggers\showdaggerstrue
|
||||
\newif\ifincludestars\includestarstrue
|
||||
\newif\ifincludeoral\includeoraltrue
|
||||
\newif\ifmarkoral\markoraltrue
|
||||
|
||||
\newif\iflecturenumbers\lecturenumberstrue
|
||||
\newif\ifnumbersmallenvironmentswiththeorem\numbersmallenvironmentswiththeoremfalse
|
||||
\newif\ifnumbersmallenvironments\numbersmallenvironmentsfalse
|
||||
|
||||
\newif\ifbeamer\beamerfalse
|
||||
|
||||
\newcommand{\fancythmlinewidth}{2pt}
|
||||
\newcommand{\fancythmskipabove}{8pt}
|
||||
|
||||
|
||||
|
||||
%Sometimes lecturers don't number environments for no particular reason. For compatibility reasons, i also don't number these environments so that the numbers are the same as in the lecture to make them better referencable, but if you want to number all (theorem, lemma, corollary, definition), then use the 'truenumber' option (true because in my opinion they really should be numbered)
|
||||
|
||||
%Option to number ALL environments. This numbers examples, remarks, etc as well. I usually don't do that, but if you prefer it that way, use option 'numbersmallenvironments'
|
||||
%Note also that if you put this option on, it does not matter wheter option 'lecturenumbers' ore 'truenumbers' was chosen, as anyway everything will be numbered. (ALL only applys to the environments that have colored boxes)
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
%%These are two options to adjust the skipabove and the width of the left margin of theorem-like environments. Default values are 2pt and 8pt, but feel free to change them as you like.
|
||||
\DeclareOptionX{linewidth}{\renewcommand\fancythmlinewidth{#1}}
|
||||
\DeclareOptionX{fancythmskipabove}{\renewcommand{\fancythmskipabove}{#1}}
|
||||
|
||||
\define@choicekey*{mkesslerfancythm}{numbersmallenvironments}[\val\nr]{no,section,theorem}{%
|
||||
\ifcase\nr\relax
|
||||
\numbersmallenvironmentsfalse
|
||||
\or
|
||||
\numbersmallenvironmentstrue
|
||||
%numbering small environments within sections is forbidden whilst using lecturenumbes
|
||||
\iflecturenumbers
|
||||
\numbersmallenvironmentswiththeoremtrue
|
||||
\else
|
||||
\numbersmallenvironmentswiththeoremfalse
|
||||
\fi
|
||||
\or
|
||||
\numbersmallenvironmentstrue
|
||||
\numbersmallenvironmentswiththeoremtrue
|
||||
\fi
|
||||
}
|
||||
|
||||
\define@choicekey*{mkesslerfancythm}{lecturenumbers}[\val\nr]{true,false}{%
|
||||
\ifcase\nr\relax
|
||||
\lecturenumberstrue
|
||||
\else
|
||||
\lecturenumbersfalse
|
||||
\fi
|
||||
}
|
||||
|
||||
\define@choicekey*{mkesslerfancythm}{showdaggers}[\val\nr]{true,false}{%
|
||||
\ifcase\nr\relax
|
||||
\showdaggerstrue
|
||||
\else
|
||||
\showdaggersfalse
|
||||
\fi
|
||||
}
|
||||
|
||||
\define@choicekey*{mkesslerfancythm}{ownenvironments}[\val\nr]{on, natural, off}{%
|
||||
\ifcase\nr\relax
|
||||
\includestarstrue
|
||||
\showstarstrue
|
||||
\or
|
||||
\includestarstrue
|
||||
\showstarsfalse
|
||||
\or
|
||||
\includestarsfalse
|
||||
\showstarsfalse
|
||||
\fi
|
||||
}
|
||||
|
||||
\define@choicekey*{mkesslerfancythm}{oralremarks}[\val\nr]{on,natural,off}{%
|
||||
\ifcase\nr\relax
|
||||
\includeoraltrue
|
||||
\markoraltrue
|
||||
\or
|
||||
\includeoraltrue
|
||||
\markoralfalse
|
||||
\or
|
||||
\includeoralfalse
|
||||
\fi
|
||||
}
|
||||
|
||||
\DeclareOptionX{english}{\englishtrue}
|
||||
\DeclareOptionX{german}{\englishfalse}
|
||||
\DeclareOptionX{beamer}{\beamertrue}
|
||||
|
||||
\DeclareOptionX{showdaggers}{\setkeys{mkesslerfancythm}{showdaggers=#1}}
|
||||
\DeclareOptionX{ownenvironments}{\setkeys{mkesslerfancythm}{ownenvironments=#1}}
|
||||
\DeclareOptionX{oralremarks}{\setkeys{mkesslerfancythm}{oralremarks=#1}}
|
||||
|
||||
\DeclareOptionX{lecturenumbers}{\setkeys{mkesslerfancythm}{lecturenumbers=#1}}
|
||||
\DeclareOptionX{numbersmallenvironments}{\setkeys{mkesslerfancythm}{numbersmallenvironments=#1}}
|
||||
|
||||
\DeclareOptionX*{\PackageWarning{mkesslerfancythm}{Unknown X \CurrentOption}}% For unknown options
|
||||
\ProcessOptionsX*\relax
|
||||
|
||||
\RequirePackage{comment}
|
||||
\begin{comment}
|
||||
\DeclareOption{numbersmallenvironments}{\numbersmallenvironmentstrue\lecturenumbersfalse}
|
||||
\end{comment}
|
||||
|
||||
%Required Packages
|
||||
\RequirePackage{amsmath}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{mdframed}
|
||||
\RequirePackage{thmtools}
|
||||
\RequirePackage{hyperref}
|
||||
\RequirePackage[skins]{tcolorbox}
|
||||
\RequirePackage{xcolor}
|
||||
\definecolor{gold}{RGB}{218,165,32}
|
||||
|
||||
|
||||
\mdfsetup{skipabove=\topskip,skipbelow=\topskip}
|
||||
|
||||
%%mdframed styles
|
||||
\mdfdefinestyle{mdredmarginandfill}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=red,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=red!8,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdorangemarginandfill}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=orange,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=orange!10,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdbluemarginandfill}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=blue,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=blue!7,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdgreenmargin}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=green!70!black,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdgoldmargin}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=gold,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
|
||||
\mdfdefinestyle{mdyellowmargin}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=yellow!80!orange,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdgraymargin}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=gray,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdvioletmarginandfill}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=violet,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=violet!7,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdvioletmargin}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=violet,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdredmarginbluefill}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=red,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=blue!7,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdredmargin}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=red,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdorangemarginbluefill}{%
|
||||
skipabove =\fancythmskipabove,
|
||||
linecolor=orange,
|
||||
linewidth = \fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=blue!7,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdblackmarginandfill}{%
|
||||
skipabove=\fancythmskipabove,
|
||||
linecolor=black,
|
||||
linewidth=\fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
backgroundcolor=violet!20!gray!20,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\mdfdefinestyle{mdblackmargin}{%
|
||||
skipabove=\fancythmskipabove,
|
||||
linecolor=black,
|
||||
linewidth=\fancythmlinewidth,
|
||||
leftmargin = 0cm,
|
||||
rightmargin=0cm,
|
||||
rightline=false,
|
||||
topline=false,
|
||||
bottomline=false
|
||||
}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdredmarginandfill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmredmarginandfill}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdorangemarginbluefill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmorangemarginbluefill}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdorangemarginandfill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmorangemarginandfill}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdbluemarginandfill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmbluemarginandfill}
|
||||
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdgreenmargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmgreenmargin}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdgoldmargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmgoldmargin}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdyellowmargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmyellowmargin}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdgraymargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmgraymargin}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdvioletmarginandfill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmvioletmarginandfill}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdredmargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmredmargin}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdvioletmargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmvioletmargin}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdredmarginbluefill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmredmarginbluefill}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdblackmarginandfill},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmblackmarginandfill}
|
||||
|
||||
\declaretheoremstyle[
|
||||
mdframed={style=mdblackmargin},
|
||||
postheadspace={0.3em},
|
||||
notefont=\mdseries
|
||||
]{thmblackmargin}
|
||||
|
||||
%%Environments that are numbered by default have 3 versions:
|
||||
% - the standard one, for numbering
|
||||
% - one asterisk, to exclude them from numbering (because they were not numbered in the lecture) -> they will be numbered if 'truenmubers' option is set
|
||||
% - two asterisks, for marking them as self-added, so they will not be numbered, but will receive a visual asterisk. -> They will be numbered if 'truenumbers' option is set
|
||||
|
||||
%Theorem
|
||||
|
||||
\RequirePackage{mfirstuc}
|
||||
\RequirePackage{xifthen}
|
||||
|
||||
|
||||
%%\makenumberedtheorem[german Name]{style}{Name}
|
||||
\RequirePackage{xparse}
|
||||
|
||||
|
||||
\declaretheorem[numberwithin=section]{dummy}
|
||||
\declaretheorem[numberwithin=dummy]{smalldummy}
|
||||
|
||||
%\newcounter{dummy}
|
||||
%\counterwithin{dummy}{section}
|
||||
%\newcounter{smalldummy}
|
||||
%\counterwithin{smalldummy}{dummy} % Make belowtheorem reset each time theorem resets
|
||||
|
||||
\NewDocumentCommand{\declarebigtheorem}{O{} O{} m m O{}}{
|
||||
%First, store the name of the theorem in \theoremname
|
||||
\ifenglish
|
||||
\ifthenelse{\isempty{#2}}{\def\theoremname{#4}}{\def\theoremname{#2}}
|
||||
\else
|
||||
\ifthenelse{\isempty{#1}}{\def\theoremname{#4}}{\def\theoremname{#1}}
|
||||
\fi
|
||||
|
||||
%Define the mane version of the theorem
|
||||
\ifthenelse{\isempty{#5}}{\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, sibling = dummy]{#4}}{}
|
||||
|
||||
%Define the versions theorem*, theorem**, dtheorem
|
||||
|
||||
\iflecturenumbers
|
||||
\ifnumbersmallenvironments
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, sibling=smalldummy]{#4*}
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifshowstars *\else\fi, sibling=smalldummy]{#4**}
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifshowdaggers $^{\dagger}$\else\fi, sibling=smalldummy]{d#4}
|
||||
\else
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, numbered=no]{#4*}
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifshowstars *\else\fi, numbered = no]{#4**}
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifshowdaggers $^{\dagger}$\else\fi, numbered = no]{d#4}
|
||||
\fi
|
||||
\else
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, sibling=dummy]{#4*}
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifshowstars *\else\fi, sibling=dummy]{#4**}
|
||||
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifshowdaggers $^{\dagger}$\else\fi, sibling=dummy]{d#4}
|
||||
\fi
|
||||
\ifincludestars\else\renewenvironment{#4**}{\comment}{\endcomment}\fi
|
||||
}
|
||||
|
||||
\NewDocumentCommand{\declaresmalltheorem}{O{} O{} m m}{
|
||||
%Get the name of the theorem and store it in \theoremname
|
||||
\ifenglish
|
||||
\ifthenelse{\isempty{#2}}{\def\theoremname{#4}}{\def\theoremname{#2}}
|
||||
\else
|
||||
\ifthenelse{\isempty{#1}}{\def\theoremname{#4}}{\def\theoremname{#1}}
|
||||
\fi
|
||||
\ifnumbersmallenvironments
|
||||
\ifnumbersmallenvironmentswiththeorem
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, sibling = smalldummy]{#4}
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifshowstars *\else\fi, sibling=smalldummy]{#4*}
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifshowdaggers $^{\dagger}$\else\fi, sibling=smalldummy]{d#4}
|
||||
\else
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, sibling=dummy]{#4}
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifshowstars *\else\fi, sibling=dummy]{#4*}
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifshowdaggers $^{\dagger}$\else\fi, sibling=dummy]{d#4}
|
||||
\fi
|
||||
\else
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, numbered = no]{#4}
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifshowstars *\else\fi, numbered = no]{#4*}
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifshowdaggers $^{\dagger}$\else\fi, numbered = no]{d#4}
|
||||
\fi
|
||||
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, sibling=dummy]{n#4}
|
||||
\ifincludestars\else\renewenvironment{#4*}{\comment}{\endcomment}\fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
%Theorem
|
||||
\declaretheorem[style=thmredmarginandfill,name=\ifenglish Theorem\else Satz\fi, sibling=dummy, refname = {Satz,Sätze}, Refname = {Satz,Sätze}]{theorem}
|
||||
\AtBeginDocument{\def\theoremautorefname{\ifenglish Theorem \else Satz\fi}} %Make referencing of theorems work properly (in german) with \autoref
|
||||
\declarebigtheorem[Satz][Theorem]{thmredmarginandfill}{theorem}[nomain]
|
||||
%Other
|
||||
\declarebigtheorem{thmredmarginandfill}{proposition}
|
||||
\declarebigtheorem[Korollar]{thmredmarginandfill}{corollary}
|
||||
\declarebigtheorem{thmorangemarginandfill}{lemma}
|
||||
\declarebigtheorem[Lemma und Definition][Lemma and Definition]{thmorangemarginbluefill}{lemmadef}
|
||||
\declarebigtheorem{thmbluemarginandfill}{definition}
|
||||
\declarebigtheorem[Satz und Definition][Theorem and Definition]{thmredmarginbluefill}{theoremdef}
|
||||
\declarebigtheorem[Proposition und Definition][Proposition and Definition]{thmredmarginbluefill}{propositiondef}
|
||||
\declarebigtheorem{thmvioletmarginandfill}{notation}
|
||||
\declarebigtheorem[zuSatz][Addition to Theorem]{thmredmarginandfill}{additiontheorem}
|
||||
\declarebigtheorem[Hilfssatz(?)][Helper Theorem(?)]{thmredmarginandfill}{helpertheorem}
|
||||
\declarebigtheorem[Not so serious theorem][Not so serious theorem]{thmredmarginandfill}{notsoserioustheorem}
|
||||
\declarebigtheorem[Hochgestochener Satz][Highbrow theorem]{thmredmarginandfill}{highbrowtheorem}
|
||||
|
||||
%%%Environments that are not numbered by default (notation, question, example, remark etc) have two forms:
|
||||
% - normal form: won't be numbered unless 'numbersmallenvironments' is set
|
||||
% - having an asterisk: will be displayed with an asterisk, will be numbered if 'numbersmallenvironments' is set
|
||||
%Notation
|
||||
|
||||
\declaresmalltheorem[Notationsmissbrauch][Abuse of Notation]{thmvioletmargin}{abuse}
|
||||
\declaresmalltheorem[Beispiel]{thmgreenmargin}{example}
|
||||
\declaresmalltheorem[Bemerkung]{thmyellowmargin}{remark}
|
||||
\declaresmalltheorem[Lob]{thmgoldmargin}{praise}
|
||||
\declaresmalltheorem[Trivial Nonsense][Trivial Nonsense]{thmyellowmargin}{trivial}
|
||||
\declaresmalltheorem[Frage]{thmblackmarginandfill}{question}
|
||||
\declaresmalltheorem[Organisatorisches][Organisational stuff]{thmblackmargin}{orga}
|
||||
\declaresmalltheorem[Fakt]{thmredmargin}{fact}
|
||||
\declaresmalltheorem[Random Fakt][Random fact]{thmredmargin}{randfact}
|
||||
\newcounter{blatt}
|
||||
%\RequirePackage{savesym}
|
||||
%\savesymbol{aside}
|
||||
%\declaresmalltheorem[Nebenbemerkung]{thmgraymargin}{aside}
|
||||
%\restoresymbol{Color}{aside}
|
||||
|
||||
%%Aufgaben environment to include exercises at the end of the documnt
|
||||
%%%This is really a UGLY hack, since autoref actlly does not work properly, so we overwrite the autoref-name of itmes (!)
|
||||
\declaretheorem[style = thmgreenmargin, numberwithin = blatt, name =Aufgabe]{aufgabe}
|
||||
\newcommand\blatt{\refstepcounter{blatt}\subsection*{\theblatt. Übungsblatt}\addcontentsline{toc}{subsection}{\theblatt. Übungsblatt}}
|
||||
\AtEndEnvironment{aufgabe}{\label{aufgabe-\theaufgabe}}
|
||||
\AtBeginDocument{\def\itemautorefname{Aufgabe}}
|
||||
|
||||
|
||||
%Oral remarks receive their own environment
|
||||
\declaresmalltheorem[\ifmarkoral Mündliche Anmerkung\else Bemerkung\fi][\ifmarkoral Oral remark\else remark\fi]{thmyellowmargin}{oral}
|
||||
|
||||
\ifincludeoral\else
|
||||
\renewenvironment{oral}{\comment}{\endcomment}
|
||||
\renewenvironment{oral*}{\comment}{\endcomment}
|
||||
\renewenvironment{doral}{\comment}{\endcomment}
|
||||
\fi
|
||||
|
||||
|
||||
%Proof (with asterisk)
|
||||
\newenvironment{proof*}[1][\ifenglish Proof\else Beweis\fi]{\begin{proof}[#1\emph{*}]}{\end{proof}}
|
||||
|
||||
\newtcolorbox{recap}{before skip = 0.5cm, after skip = 0.5cm, enhanced, sharp corners = all, colback = white, colframe = gray, toprule=0pt, bottomrule=0pt, leftrule=0pt,rightrule=0pt, overlay = {
|
||||
\draw[gray, line width = 2pt] (frame.north west) -- ++(0.5cm, 0pt);
|
||||
\draw[gray, line width=2pt] (frame.south east) -- ++(-0.5cm, 0pt);
|
||||
\draw[gray, line width=2pt] (frame.north west) -- ++ (0pt, -0.5cm);
|
||||
\draw[gray, line width=2pt] (frame.south east) -- ++(0pt, 0.5cm);
|
||||
}}
|
||||
|
||||
\def\restatableplaceholder{
|
||||
\begin{recap}
|
||||
Platzhalter, um einen anderen Satz zu wiederholen, der momentan nicht kompiliert wurde
|
||||
\end{recap}
|
||||
}
|
||||
|
||||
\theoremstyle{plain}
|
||||
\ifbeamer\else\newtheorem{variant}{\ifenglish Variant\else Variante\fi}
|
||||
\newtheorem{assumption}{\ifenglish Assumption\else Annahme\fi}
|
||||
\fi
|
||||
|
||||
%%Give claim an own counter and let it reset at each proof
|
||||
%See also at:
|
||||
%https://tex.stackexchange.com/questions/283502/reset-counter-at-beginning-of-proof
|
||||
\ifbeamer\else
|
||||
\newtheorem{claim}{\ifenglish Claim\else Behauptung\fi}
|
||||
\AtBeginEnvironment{proof}{\setcounter{claim}{0}}
|
||||
\newtheorem*{claim*}{\ifenglish Claim\else Behauptung\fi}
|
||||
\fi
|
||||
|
||||
\theoremstyle{definition}
|
||||
\ifbeamer\else\newtheorem*{note}{\ifenglish Note\else Anmerkung\fi}\fi
|
||||
\newtheorem*{warning}{\color{red}\ifenglish Warning \else Warnung\fi}
|
||||
\ifbeamer\else\newtheorem*{goal}{\ifenglish Goal \else Ziel\fi}\fi
|
||||
\newtheorem*{strategy}{\ifenglish Proof Strategy \else Beweisstrategie\fi}
|
||||
\newtheorem*{goal*}{\ifenglish Goal* \else Ziel*\fi}
|
||||
\newtheorem*{problem}{Problem}
|
||||
\ifbeamer\else\newtheorem*{info}{Information}\fi
|
||||
\newenvironment{moral}{%
|
||||
\begin{mdframed}[linecolor=green!70!black]%
|
||||
\bfseries\color{green!50!black}}%
|
||||
{\end{mdframed}}
|
||||
\newenvironment{antimoral}{%
|
||||
\begin{mdframed}[linecolor=red!70!black]%
|
||||
\bfseries\color{red!50!black}}%
|
||||
{\end{mdframed}}
|
||||
|
||||
\ifbeamer\else\newtheorem*{answer}{\ifenglish Answer\else Antwort\fi}\fi
|
||||
\ifbeamer\else\newtheorem*{trick}{Trick}\fi
|
||||
\newtheorem{observe}[theorem]{\ifenglish Observe\else Beobachte\fi}
|
||||
\ifbeamer\else\newtheorem*{property}{\ifenglish Property\else Eigenschaft\fi}\fi
|
||||
\ifbeamer\else\newtheorem*{intuition}{Intuition}\fi
|
||||
\ifbeamer\else\newtheorem*{recall}{\ifenglish Recall\else Erinnerung\fi}\fi
|
||||
\newtheorem*{idea}{\ifenglish Idea\else Idee\fi}
|
||||
\ifbeamer\else\newtheorem{exercise}{\ifenglish Exercise\else Aufgabe\fi}[section]\fi
|
||||
\newtheorem{reminder}{\ifenglish Reminder\else Erinnerung\fi}
|
||||
|
||||
%Numbering of environments with a fractional environment number, see
|
||||
% https://tex.stackexchange.com/questions/598076/how-to-have-a-fractional-environment-number/598080?noredirect=1#comment1499689_598080
|
||||
%However, for a reason i don't understand the posted answer does not work for me, but i had to replace theorem with definition in the definition of the gag environment (so apparently, i have to do this for each environment separately). It seems that the definitions of this document do use \thedefinition and not \thetheorem, although by default this is not the case.
|
||||
\newcounter{gag}
|
||||
\makeatletter
|
||||
\newenvironment{gag}[1]{%
|
||||
\let\savedthedefinition\thedefinition
|
||||
\thm@headfont{\bfseries\boldmath}%
|
||||
\stepcounter{gag}%
|
||||
\renewcommand{\thedefinition}{\savedthedefinition#1}%
|
||||
\renewcommand{\theHdefinition}{gag\thegag}%
|
||||
\addtocounter{definition}{-1}\ignorespaces
|
||||
}{\ignorespacesafterend}
|
||||
\makeatother
|
||||
|
||||
|
||||
|
||||
|
||||
%%subproof environment - essentially copied proof environment from amsthm and modified its name + symbol
|
||||
\makeatletter
|
||||
\DeclareRobustCommand{\blackqed}{%
|
||||
\ifmmode \mathqed
|
||||
\else
|
||||
\leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill
|
||||
\quad\hbox{$\blacksquare$}%
|
||||
\fi
|
||||
}
|
||||
\newenvironment{subproof}[1][\ifenglish Subproof\else Unterbeweis\fi]{\par
|
||||
\pushQED{\blackqed}%
|
||||
\normalfont \topsep6\p@\@plus6\p@\relax
|
||||
\trivlist
|
||||
\item[\hskip\labelsep
|
||||
\itshape
|
||||
#1\@addpunct{.}]\ignorespaces
|
||||
}{%
|
||||
\popQED\endtrivlist\@endpefalse
|
||||
}
|
||||
\makeatother
|
||||
|
||||
%%Solution (for exercises)
|
||||
\newenvironment{solution}[1][]{\begin{proof}[\ifenglish{}Solution\else{}Lösung\fi{}#1]}{\end{proof}}
|
||||
\newenvironment{additionproof}[1][]{\begin{proof}[\ifenglish{}Additional proof\else{}zuBeweis\fi{}#1]}{\end{proof}}
|
||||
|
||||
|
||||
\RequirePackage[ngerman, ruled, vlined]{algorithm2e}
|
||||
%Make algorithm2e numbering alike with theorems
|
||||
\usepackage{aliascnt}
|
||||
\makeatletter
|
||||
\let\c@algocf\relax
|
||||
\makeatother
|
||||
\newaliascnt{algocf}{theorem}
|
||||
|
||||
%Taken from
|
||||
% https://github.com/gillescastel/university-setup/blob/master/preamble.tex
|
||||
% Make boxes breakable
|
||||
\tcbuselibrary{breakable}
|
||||
|
191
mkessler-math.sty
Normal file
191
mkessler-math.sty
Normal file
|
@ -0,0 +1,191 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{mkessler-math}[2021/09/04 - Math package]
|
||||
%%%%%%Provides the basic math packages used for my lecture-note write-ups
|
||||
|
||||
%The language to pass to babel
|
||||
\newif\ifenglish\englishtrue
|
||||
\DeclareOption{german}{\englishfalse}
|
||||
\DeclareOption{english}{\englishtrue}
|
||||
|
||||
%If beamer shall be activated
|
||||
\newif\ifbeamer\beamerfalse
|
||||
\DeclareOption{beamer}{\beamertrue}
|
||||
\DeclareOption{nobeamer}{\beamerfalse}
|
||||
|
||||
%Options for onehalf-spacing of lines
|
||||
\newif\ifonehalfspacing\onehalfspacingfalse %default is normalspace
|
||||
\DeclareOption{onehalfspacing}{\onehalfspacingtrue}
|
||||
\DeclareOption{normalspacing}{\onehalfspacingfalse}
|
||||
|
||||
%Options for utf8 or utf8x - encoding
|
||||
\newif\ifutf\utftrue %by default, utf8 is not enabled
|
||||
\DeclareOption{utf8x}{\utffalse}
|
||||
\DeclareOption{utf8}{\utftrue}
|
||||
|
||||
\DeclareOption*{\PackageWarning{mkessler-math}{Unknown '\CurrentOption'}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
|
||||
\RequirePackage[\ifenglish english \else ngerman\fi]{babel}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
|
||||
% When using utf8x, we have to load ucs and inputenc with utf8x option and must exclude bibtex
|
||||
% When not using utf8x (plan utf8), we must NOT load ucs, and then load inputenc with utf8-option as well as bibtex
|
||||
% also, when using plain utf8, we want to load the newunicodechar package
|
||||
\RequirePackage[\ifutf utf8\else utf8x\fi]{inputenc}
|
||||
\ifutf
|
||||
\RequirePackage{newunicodechar}
|
||||
\newunicodechar{α}{\ensuremath\alpha}
|
||||
\newunicodechar{β}{\ensuremath\beta}
|
||||
\newunicodechar{γ}{\ensuremath\gamma}
|
||||
\newunicodechar{δ}{\ensuremath\delta}
|
||||
\newunicodechar{ε}{\ensuremath\epsilon}
|
||||
\newunicodechar{ζ}{\ensuremath\zeta}
|
||||
\newunicodechar{η}{\ensuremath\eta}
|
||||
\newunicodechar{θ}{\ensuremath\theta}
|
||||
\newunicodechar{ι}{\ensuremath\iota}
|
||||
\newunicodechar{κ}{\ensuremath\kappa}
|
||||
\newunicodechar{λ}{\ensuremath\lambda}
|
||||
\newunicodechar{μ}{\ensuremath\mu}
|
||||
\newunicodechar{ν}{\ensuremath\nu}
|
||||
\newunicodechar{ξ}{\ensuremath\xi}
|
||||
\newunicodechar{π}{\ensuremath\pi}
|
||||
\newunicodechar{ρ}{\ensuremath\rho}
|
||||
\newunicodechar{σ}{\ensuremath\sigma}
|
||||
\newunicodechar{τ}{\ensuremath\tau}
|
||||
\newunicodechar{υ}{\ensuremath\upsilon}
|
||||
\newunicodechar{φ}{\ensuremath\phi}
|
||||
\newunicodechar{χ}{\ensuremath\chi}
|
||||
\newunicodechar{ψ}{\ensuremath\psi}
|
||||
\newunicodechar{ω}{\ensuremath\omega}
|
||||
|
||||
\RequirePackage[backend=biber,style=alphabetic]{biblatex}
|
||||
\RequirePackage{csquotes}
|
||||
\else
|
||||
\RequirePackage[mathletters]{ucs}
|
||||
\fi
|
||||
|
||||
\RequirePackage{anyfontsize}
|
||||
\RequirePackage{lmodern}
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{amsmath}
|
||||
\RequirePackage{mathtools}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{amssymb}
|
||||
\RequirePackage{comment}
|
||||
\RequirePackage{soul}
|
||||
\RequirePackage{caption}
|
||||
\RequirePackage{subcaption}
|
||||
\RequirePackage{latexsym}
|
||||
\RequirePackage{mathrsfs}
|
||||
\ifbeamer\else
|
||||
\RequirePackage[shortlabels]{enumitem}
|
||||
\fi
|
||||
\RequirePackage{wrapfig}
|
||||
|
||||
%Pgfplots
|
||||
\RequirePackage{pgfplots}
|
||||
\pgfplotsset{compat=1.7}
|
||||
|
||||
% TIKZ
|
||||
\RequirePackage{tikz}
|
||||
\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes}
|
||||
%\RequirePackage{tkz-euclide}
|
||||
\RequirePackage[export]{adjustbox}
|
||||
%Commutative diagrams
|
||||
\RequirePackage{tikz-cd}
|
||||
|
||||
%%for small diagrams, similar to tikz-cd
|
||||
\usepackage{xy} % for small diagrams, e.g. arrows
|
||||
\xyoption{all}
|
||||
|
||||
%%Theorems needed in any case (fancy or not fancy theorems)
|
||||
|
||||
% Für Formeln
|
||||
\RequirePackage{mathabx}
|
||||
\RequirePackage{faktor}
|
||||
\RequirePackage[mathscr]{eucal}
|
||||
|
||||
\RequirePackage{blindtext}
|
||||
\RequirePackage{tabto}
|
||||
\RequirePackage{lastpage} %\pageref{LastPage} for reference on the last page
|
||||
|
||||
% Für Tabulatoren
|
||||
|
||||
\RequirePackage{pdfpages} % PDF-Dateien einbinden
|
||||
|
||||
% Für Zeilenumbruch
|
||||
\RequirePackage{microtype}
|
||||
\RequirePackage{changepage}
|
||||
|
||||
|
||||
%Für Zeilenabstand 1,5
|
||||
\ifonehalfspacing
|
||||
\RequirePackage[onehalfspacing]{setspace} \else
|
||||
\fi
|
||||
|
||||
%For setting counters of itemns in \enemerate
|
||||
\makeatletter
|
||||
\newcommand\setItemnumber[1]{\setcounter{enum\romannumeral\@enumdepth}{\numexpr#1-1\relax}}
|
||||
\makeatother
|
||||
|
||||
%Make circled symbols
|
||||
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
||||
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
|
||||
|
||||
%Print a warning sign
|
||||
\newcommand\Warning{%
|
||||
\makebox[1.4em][c]{%
|
||||
\makebox[0pt][c]{\raisebox{.1em}{\small!}}%
|
||||
\makebox[0pt][c]{\color{red}\Large$\bigtriangleup$}}}%
|
||||
|
||||
% Add \contra symbol to denote contradiction (from Gilles Castell)
|
||||
\usepackage{stmaryrd} % for \lightning
|
||||
\newcommand\contra{\scalebox{1.5}{$\lightning$}}
|
||||
|
||||
%\def\thevocab{}
|
||||
%\newcommand{\vocab}[2][\thevocab]{\renewcommand\thevocab{#2}\textbf{\color{blue} #2}\index{#1}}
|
||||
|
||||
\newcommand{\emphasize}[1]{{\color{red} #1}}
|
||||
|
||||
|
||||
%Short commands for \mathbb{}
|
||||
\newcommand{\C}{\ensuremath{\mathbb{C}}}
|
||||
\newcommand{\F}{\ensuremath{\mathbb{F}}}
|
||||
\newcommand{\K}{\ensuremath{\mathbb{K}}}
|
||||
\newcommand{\N}{\ensuremath{\mathbb{N}}}
|
||||
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
|
||||
\newcommand{\R}{\ensuremath{\mathbb{R}}}
|
||||
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
|
||||
|
||||
%Paired Delimiters
|
||||
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
|
||||
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
|
||||
|
||||
%Norm and absolute value
|
||||
%Make them scaling by default and have \abs*{} as the non-scaling version of the command
|
||||
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
|
||||
\makeatletter
|
||||
\let\oldabs\abs
|
||||
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
|
||||
|
||||
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
|
||||
\let\oldnorm\norm
|
||||
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
|
||||
\makeatother
|
||||
|
||||
%Fixes of common misbehaviour
|
||||
\renewcommand{\degree}{^\circ}
|
||||
|
||||
%Used to start an exercise and resetting the equation number
|
||||
%\newcommand{\nr}[1]{\setcounter{equation}{0}\section*{\ifenglish Exercise \else Aufgabe \fi #1}~}
|
||||
|
||||
|
||||
\RequirePackage{esint}
|
||||
|
||||
\RequirePackage{IEEEtrantools}
|
||||
|
||||
\RequirePackage[ngerman,ruled,vlined]{algorithm2e}
|
||||
|
||||
|
||||
\RequirePackage{mkessler-operators}
|
147
mkessler-operators.sty
Normal file
147
mkessler-operators.sty
Normal file
|
@ -0,0 +1,147 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{mkessler-operators}[2021-09-05 - Operator Package]
|
||||
%%%%%%%%%%%%%%%%%%mmmm
|
||||
%Provides some commonly used Operators used in the write-ups of my lecture notes
|
||||
|
||||
|
||||
\newif\ifenglish\englishtrue
|
||||
\DeclareOption{german}{\englishfalse}
|
||||
\DeclareOption{english}{\englishtrue}
|
||||
\DeclareOption*{\PackageWarning{mkessler-operators}{Unknown '\CurrentOption'}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
%Packages
|
||||
\RequirePackage{amsmath}
|
||||
|
||||
%%%%%%%%%%% Operators
|
||||
%Basic commands
|
||||
\renewcommand\subset\subseteq
|
||||
\renewcommand\supset\supseteq
|
||||
\DeclareMathOperator{\id}{id}
|
||||
\DeclareMathOperator{\im}{im}
|
||||
\DeclareMathOperator{\Bild}{Bild}
|
||||
\DeclareMathOperator{\dom}{dom}
|
||||
\DeclareMathOperator{\Span}{Span}
|
||||
\DeclareMathOperator{\Aut}{Aut}
|
||||
\let\ggT\relax\DeclareMathOperator{\ggT}{\ifenglish gcd \else ggT\fi}
|
||||
\let\kgV\relax\DeclareMathOperator{\kgV}{\ifenglish lcm \elese kgV\fi}
|
||||
\DeclareMathOperator{\rhs}{RHS} %Right hand side
|
||||
\DeclareMathOperator{\lhs}{LHS} %Left hand side
|
||||
|
||||
%Complex numbers
|
||||
\DeclareMathOperator{\Impart}{Im}
|
||||
\renewcommand\Im\Impart
|
||||
\DeclareMathOperator{\Repart}{Re}
|
||||
\renewcommand\Re\Repart
|
||||
|
||||
%Linear Algebra
|
||||
\DeclareMathOperator{\Sym}{Sym}
|
||||
\DeclareMathOperator{\supp}{supp}
|
||||
\DeclareMathOperator{\sgn}{sgn}
|
||||
\DeclareMathOperator{\coker}{coker}
|
||||
\DeclareMathOperator{\rank}{rank}
|
||||
\DeclareMathOperator{\Mat}{Mat}
|
||||
\DeclareMathOperator{\ev}{ev}
|
||||
|
||||
%Algebra
|
||||
\DeclareMathOperator{\Quot}{Quot}
|
||||
\DeclareMathOperator{\Gal}{Gal}
|
||||
\DeclareMathOperator{\Ext}{Ext}
|
||||
\DeclareMathOperator{\Tor}{Tor}
|
||||
\DeclareMathOperator{\Mspec}{MaxSpec}
|
||||
\DeclareMathOperator{\Sh}{Sh}
|
||||
\DeclareMathOperator{\Proj}{Proj}
|
||||
\DeclareMathOperator{\QCoh}{QCoh}
|
||||
\DeclareMathOperator{\MaxSpec}{MaxSpec}
|
||||
\DeclareMathOperator{\Presh}{Pre-Sh}
|
||||
\DeclareMathOperator{\Fun}{Fun}
|
||||
\newcommand{\tensor}{\otimes}
|
||||
|
||||
%Analysis
|
||||
\DeclareMathOperator{\dx}{dx}
|
||||
\DeclareMathOperator{\dy}{dy}
|
||||
\DeclareMathOperator{\dz}{dz}
|
||||
\DeclareMathOperator{\dt}{dt}
|
||||
|
||||
%Sets
|
||||
\DeclareMathOperator{\conv}{conv}
|
||||
\DeclareMathOperator{\dist}{dist}
|
||||
\DeclareMathOperator{\diam}{diam}
|
||||
|
||||
%%Stochastic (Algorithmische Mathematik II)
|
||||
\newcommand\distribution[1]{\operatorname{#1}}
|
||||
\newcommand\DeclareDistribution[1]{\expandafter\def\csname #1\endcsname{\distribution{#1}}}
|
||||
\DeclareDistribution{Bin}
|
||||
\DeclareDistribution{Ber}
|
||||
\DeclareDistribution{Geo}
|
||||
\DeclareDistribution{Poi}
|
||||
\DeclareDistribution{Unif}
|
||||
\DeclareMathOperator{\Var}{Var}
|
||||
\DeclareMathOperator{\Cov}{Cov}
|
||||
|
||||
%Topology
|
||||
\DeclareMathOperator\pr{pr}
|
||||
\def\twedge{\vee}
|
||||
\def\tsmash{\wedge}
|
||||
|
||||
%Category Theory
|
||||
\DeclareMathOperator{\Ob}{Ob}
|
||||
\newcommand{\cat}[1]{ \mathscr{#1} }
|
||||
\DeclareMathOperator{\Hom}{Hom}
|
||||
\DeclareMathOperator{\Mor}{Mor}
|
||||
\DeclareMathOperator{\End}{End}
|
||||
\DeclareMathOperator{\opposite}{\textbf{opp}}
|
||||
\DeclareMathOperator{\abelian}{\textbf{ab}}
|
||||
\newcommand{\ab}{^{\abelian}}
|
||||
\newcommand\opp{^{\opposite}}
|
||||
\newcommand\op{^{\opposite}}
|
||||
|
||||
%Categories
|
||||
\newcommand\category[1]{\operatorname{\textbf{#1}}}
|
||||
\newcommand\DeclareCategory[1]{\expandafter\def\csname #1\endcsname{\category{#1}}}
|
||||
\DeclareCategory{Top}
|
||||
\DeclareCategory{hTop}
|
||||
\DeclareCategory{Set}
|
||||
\DeclareCategory{CHaus}
|
||||
\DeclareCategory{Grp}
|
||||
\DeclareCategory{Ab}
|
||||
\DeclareCategory{CRing}
|
||||
\DeclareCategory{Vect}
|
||||
\DeclareCategory{Fin}
|
||||
\DeclareCategory{Ab}
|
||||
\DeclareCategory{Cat}
|
||||
\DeclareMathOperator{\colim}{colim}
|
||||
|
||||
|
||||
|
||||
% Characteristic function
|
||||
\newcommand*{\cfun}{\ensuremath{\mathbbm{1}}}
|
||||
\newcommand*{\One}{\ensuremath{\mathbbm{1}}}
|
||||
|
||||
|
||||
%Set theory
|
||||
\DeclareMathOperator\card{card}
|
||||
\DeclareMathOperator\Cd{Cd}
|
||||
\DeclareMathOperator\Ord{Ord}
|
||||
\DeclareMathOperator\otp{otp}
|
||||
\DeclareMathOperator\Card{Card}
|
||||
|
||||
|
||||
|
||||
|
||||
%%Galoiskohomologie
|
||||
\DeclareMathOperator{\Br}{Br}
|
||||
\newcommand{\del}{\partial}
|
||||
\DeclareMathOperator{\EXT}{EXT}
|
||||
\DeclareMathOperator{\Ind}{Ind}
|
||||
\DeclareMathOperator{\Char}{char}
|
||||
\DeclareMathOperator{\res}{res}
|
||||
\DeclareMathOperator{\infl}{inf}
|
||||
\DeclareMathOperator{\cov}{cov}
|
||||
\DeclareMathOperator{\cor}{cor}
|
||||
\DeclareMathOperator{\ord}{ord}
|
||||
\DeclareMathOperator{\tg}{tg}
|
||||
\DeclareMathOperator{\Ver}{Ver}
|
||||
\DeclareMathOperator{\inv}{inv}
|
||||
|
||||
|
282
mkessler-script.cls
Normal file
282
mkessler-script.cls
Normal file
|
@ -0,0 +1,282 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{mkessler-script}[2021/03/31 Write up lecture notes as script]
|
||||
|
||||
%%%%Options of the package
|
||||
\newif\ifenglish\englishtrue
|
||||
\DeclareOption{english}{\englishtrue}
|
||||
\DeclareOption{german}{\englishfalse}
|
||||
|
||||
\newif\ifshowversion\showversiontrue
|
||||
\DeclareOption{show version}{\showversiontrue}
|
||||
\DeclareOption{hideversion}{\showversionfalse}
|
||||
|
||||
\ProcessOptions\relax
|
||||
|
||||
|
||||
%%%%Define command to set metainformation of document
|
||||
%Set the course
|
||||
\def\@course{\ClassError{mkessler-script}{No \noexpand\course given}{See documentation for details}}%
|
||||
\DeclareRobustCommand*{\course}[1]{\gdef\@course{#1}}
|
||||
|
||||
\def\@lecturer{\ClassError{mkessler-script}{No \noexpand\lecturer given}{See documentation for details}}%
|
||||
\def\@lecturertitle{}
|
||||
\DeclareRobustCommand*{\lecturer}[2][]{
|
||||
\gdef\@lecturer{#2}
|
||||
\gdef\@lecturertitle{\ifenglish Lecturer\else\ifthenelse{\isempty{#1}}{Dozent}{Dozentin}\fi}{}
|
||||
}
|
||||
|
||||
%Set the assistant
|
||||
\newif\ifprintassistant\printassistantfalse
|
||||
\def\@assistant{}%
|
||||
\def\@assistantitle{}
|
||||
\DeclareRobustCommand*{\assistant}[2][]{
|
||||
\printassistanttrue
|
||||
\gdef\@assistant{#2}
|
||||
\gdef\@assistanttitle{\ifenglish Assistant\else\ifthenelse{\isempty{#1}}{Assistent}{Assistentin}\fi}
|
||||
}
|
||||
|
||||
%%%%Load base class article
|
||||
\LoadClass{article}
|
||||
|
||||
%%%%Title
|
||||
%Define layout of title using course, lecturer, assistant and author, and optionally the current time
|
||||
\RequirePackage{xparse}
|
||||
\RequirePackage{datetime}
|
||||
\renewcommand\@maketitle{%
|
||||
\newpage
|
||||
\null
|
||||
\vskip 2em%
|
||||
\begin{center}%
|
||||
\let \footnote \thanks
|
||||
{\LARGE \@course \par}%
|
||||
\vskip 1.5em%
|
||||
{\large
|
||||
\lineskip .5em%
|
||||
\begin{tabular}[t]{c}%
|
||||
\@lecturertitle \\
|
||||
{\sc \@lecturer} \\
|
||||
\end{tabular}\par
|
||||
\ifprintassistant
|
||||
\vskip 1em%
|
||||
\begin{tabular}[t]{c}%
|
||||
\@assistanttitle \\
|
||||
{\sc \@assistant} \\
|
||||
\end{tabular}\par
|
||||
\fi
|
||||
\vskip 1em%
|
||||
\begin{tabular}[t]{c}%
|
||||
\ifenglish Notes\else Mitschrift\fi \\
|
||||
{\sc \@author} \\
|
||||
\end{tabular}
|
||||
\par}%
|
||||
\ifshowversion
|
||||
\vskip 3em%
|
||||
\begin{tabular}[t]{c}%
|
||||
{\small Version} \\
|
||||
\today\,\currenttime
|
||||
\end{tabular}\par
|
||||
\fi
|
||||
\vskip 4em%
|
||||
\end{center}%
|
||||
\par
|
||||
\vskip 1.5em
|
||||
}
|
||||
|
||||
|
||||
%%%Document-specific features that are provided
|
||||
|
||||
%%%%Management of vocabulary and corresponding index
|
||||
\RequirePackage{imakeidx}
|
||||
\makeindex[columns=2, title=\ifenglish Index\else Stichwortverzeichnis\fi, intoc]
|
||||
|
||||
%Emphasize \vocabulary
|
||||
\RequirePackage{xparse}
|
||||
\RequirePackage{expl3}
|
||||
\ExplSyntaxOn
|
||||
\NewDocumentCommand{\vocab}{O{} m}{
|
||||
\textbf{\color{blue} #2}
|
||||
\ifthenelse{\isempty{#1}}{\index{\text_titlecase_first:n{#2}}}{\index{#1}}
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
|
||||
%%%%Bibliography management
|
||||
\RequirePackage[backend=biber,style=alphabetic]{biblatex}
|
||||
\addbibresource{bibliography.bib}
|
||||
\addbibresource{images.bib}
|
||||
|
||||
%Provide simpler commands to properly print image attributions and literature
|
||||
\DeclareRobustCommand*{\printimageattributions}{
|
||||
\def\imageattributionstitle{\ifenglish Image attributions \else Bildquellen\fi}
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{section}{\imageattributionstitle}
|
||||
\printbibliography[title={\imageattributionstitle}, type=image]
|
||||
}
|
||||
|
||||
\DeclareRobustCommand*{\printliterature}{
|
||||
\def\literaturetitle{\ifenglish Literature\else Literatur\fi}
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{section}{\literaturetitle}
|
||||
\printbibliography[title={\literaturetitle}, nottype=image]
|
||||
|
||||
}
|
||||
|
||||
%%%Hyperref and setup
|
||||
\RequirePackage{hyperref} % Hyperlinks
|
||||
\RequirePackage{amsmath} % Cleveref needs this
|
||||
\RequirePackage{cleveref} % Better referencing
|
||||
\hypersetup{colorlinks, citecolor=violet, urlcolor=blue!80!black, linkcolor=red!50!black, pdfauthor=\@author, pdftitle=\@course}
|
||||
|
||||
%%%The following is based on the repository
|
||||
% https://github.com/gillescastel/university-setup
|
||||
% but has been modified for own purposes. The original content is distributed under the following license:
|
||||
|
||||
%MIT License
|
||||
|
||||
%Copyright (c) 2019 Gilles Castel
|
||||
|
||||
%Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
%of this software and associated documentation files (the "Software"), to deal
|
||||
%in the Software without restriction, including without limitation the rights
|
||||
%to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
%copies of the Software, and to permit persons to whom the Software is
|
||||
%furnished to do so, subject to the following conditions:
|
||||
%
|
||||
%The above copyright notice and this permission notice shall be included in all
|
||||
%copies or substantial portions of the Software.
|
||||
%
|
||||
%THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
%IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
%FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
%AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
%LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
%OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
%SOFTWARE.
|
||||
|
||||
|
||||
% Some basic packages
|
||||
\RequirePackage{url}
|
||||
\RequirePackage{graphicx}
|
||||
\RequirePackage{float}
|
||||
|
||||
% for wrapping text around figures
|
||||
\RequirePackage{wrapfig}
|
||||
|
||||
%%This option is for now commented out, not sure what it does, but causes errors
|
||||
%\pdfminorversion=7
|
||||
|
||||
|
||||
% Don't indent paragraphs, leave some space between them
|
||||
\RequirePackage{parskip}
|
||||
|
||||
% Hide page number when page is empty
|
||||
\RequirePackage{emptypage}
|
||||
|
||||
% Put x \to \infty below \lim
|
||||
\let\svlim\lim\def\lim{\svlim\limits}
|
||||
|
||||
%Make implies and impliedby shorter
|
||||
\let\implies\Rightarrow
|
||||
\let\impliedby\Leftarrow
|
||||
\let\iff\Leftrightarrow
|
||||
\let\epsilon\varepsilon
|
||||
|
||||
% Fix some spacing
|
||||
% http://tex.stackexchange.com/questions/22119/how-can-i-change-the-spacing-before-theorems-with-amsthm
|
||||
\def\thm@space@setup{%
|
||||
\thm@preskip=\parskip \thm@postskip=0pt
|
||||
}
|
||||
|
||||
%%%%%%%Setup of lectures and their summary
|
||||
|
||||
%Tocloft package for making a list of lectures
|
||||
\RequirePackage{tocloft}
|
||||
%Store name of the summary in a command to use it multiple times
|
||||
\newcommand\listlecturename{\ifenglish Summary of lectures\else Übersicht der Vorlesungen\fi}
|
||||
\newlistof{lecture}{lec}{\listlecturename} % Declare new list of lectures
|
||||
%Settings how to print the summary
|
||||
\renewcommand{\cftdot}{}
|
||||
\renewcommand\cftlecturefont{\normalfont\bfseries}
|
||||
\renewcommand\cftlecturepagefont{\normalfont\bfseries}
|
||||
\renewcommand\cftlectitlefont{\Large\bfseries}
|
||||
\renewcommand\cftbeforelectureskip{1em}
|
||||
|
||||
%Command to parse the date
|
||||
\RequirePackage{xifthen}
|
||||
\def\testdateparts#1{\dateparts#1\relax}
|
||||
\def\dateparts#1 #2 #3 #4 #5\relax{
|
||||
\marginpar{\small\textsf{\mbox{#1 #2 #3 #5}}}
|
||||
}
|
||||
|
||||
%Define the main lecture command to start a new lecture
|
||||
\def\@lectureprefix{\ifenglish Lecture\else Vorlesung\fi}
|
||||
\def\@lecture{}%
|
||||
\newcommand{\lecture}[3][]{
|
||||
\refstepcounter{lecture}
|
||||
%Store lecture name in the macro \@lecture
|
||||
\ifthenelse{\isempty{#3}}{%
|
||||
\def\@lecture{\@lectureprefix\, \thelecture}%
|
||||
}{%
|
||||
\def\@lecture{\@lectureprefix\, \thelecture: #3}%
|
||||
}%
|
||||
\marginpar{\small\textsf{\parbox{10em}{\@lectureprefix\, \thelecture \\#2}}}
|
||||
%Add lecture as an entry to the lectures file
|
||||
\addcontentsline{lec}{lecture}{\@lectureprefix\,\thelecture\,(#2)}
|
||||
%If key words are provided, add the key words of the lecture below the entry
|
||||
\ifthenelse{\isempty{#1}}{}{\addtocontents{lec}{\smallskip\hspace{1.5em}\protect\parbox{\dimexpr\textwidth-\@pnumwidth - 2em}{#1}}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
%Provide a command to show the summary of lectures
|
||||
\DeclareRobustCommand*{\summaryoflectures}{
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{section}{\listlecturename}
|
||||
\thispagestyle{plain}
|
||||
\listoflecture
|
||||
}
|
||||
|
||||
%%%% These are the fancy headers
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
|
||||
% LE: left even
|
||||
% RO: right odd
|
||||
% CE, CO: center even, center odd
|
||||
% My name for when I print my lecture notes to use for an open book exam.
|
||||
% \fancyhead[LE,RO]{Gilles Castel}
|
||||
|
||||
\fancyhead[RO,LE]{\@lecture} % Right odd, Left even
|
||||
\fancyhead[RE,LO]{} % Right even, Left odd
|
||||
|
||||
\fancyfoot[RO,LE]{\thepage} % Right odd, Left even
|
||||
\fancyfoot[RE,LO]{} % Right even, Left odd
|
||||
\fancyfoot[C]{\leftmark} % Center
|
||||
|
||||
\makeatother
|
||||
|
||||
|
||||
%%No fancy headers in the appendix (as there is no lecture)
|
||||
\let\oldappendix\appendix
|
||||
\renewcommand\appendix{
|
||||
\oldappendix
|
||||
\fancyhead[RO,LE]{}
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
}
|
||||
|
||||
% Todonotes and inline notes in fancy boxes
|
||||
\RequirePackage{todonotes}
|
||||
|
||||
% Figure support as explained in my blog post.
|
||||
\RequirePackage{import}
|
||||
\RequirePackage{xifthen}
|
||||
\RequirePackage{pdfpages}
|
||||
\RequirePackage{transparent}
|
||||
\newcommand{\incfig}[1]{%
|
||||
\def\svgwidth{\columnwidth}
|
||||
\import{./figures/}{#1.pdf_tex}
|
||||
}
|
||||
|
||||
% Fix some stuff
|
||||
% %http://tex.stackexchange.com/questions/76273/multiple-pdfs-with-page-group-included-in-a-single-page-warning
|
||||
\pdfsuppresswarningpagegroup=1
|
||||
|
320
mymath.sty
Normal file
320
mymath.sty
Normal file
|
@ -0,0 +1,320 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{mymath}[2021/03/31 - Math package by Maximilian Keßler (private use)]
|
||||
%%%%%%Provides the basic math packages used for my lecture-note write-ups
|
||||
|
||||
%The language to pass to babel
|
||||
\newif\ifenglish\englishtrue
|
||||
\DeclareOption{german}{\englishfalse}
|
||||
\DeclareOption{english}{\englishtrue}
|
||||
% When working with beamer some things have to be done differently
|
||||
\newif\ifbeamer\beamerfalse
|
||||
\DeclareOption{nobeamer}{\beamerfalse}
|
||||
\DeclareOption{beamer}{\beamertrue}
|
||||
|
||||
\newif\ifsubfig\subfigtrue
|
||||
\DeclareOption{nosubfig}{\subfigfalse}
|
||||
|
||||
|
||||
%Options for onehalf-spacing of lines
|
||||
\newif\ifonehalfspacing\onehalfspacingfalse %default is normalspace
|
||||
\DeclareOption{onehalfspacing}{\onehalfspacingtrue}
|
||||
\DeclareOption{normalspacing}{\onehalfspacingfalse}
|
||||
|
||||
%Options for utf8 or utf8x - encoding
|
||||
\newif\ifutf\utftrue %by default, utf8 is not enabled
|
||||
\DeclareOption{utf8x}{\utffalse}
|
||||
\DeclareOption{utf8}{\utftrue}
|
||||
|
||||
%Options for lukas
|
||||
\newif\iflukas\lukasfalse
|
||||
\DeclareOption{lukas}{\lukastrue}
|
||||
|
||||
%Options for including theorem-environments or not.
|
||||
\newif\iffancythm\fancythmfalse
|
||||
\DeclareOption{fancythm}{\fancythmtrue}
|
||||
|
||||
|
||||
\DeclareOption*{\PackageWarning{mymath}{Unknown '\CurrentOption'}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
|
||||
\RequirePackage[\ifenglish english \else ngerman\fi]{babel}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
|
||||
% When using utf8x, we have to load ucs and inputenc with utf8x option and must exclude bibtex
|
||||
% When not using utf8x (plan utf8), we must NOT load ucs, and then load inputenc with utf8-option as well as bibtex
|
||||
% also, when using plain utf8, we want to load the newunicodechar package
|
||||
\ifutf
|
||||
\RequirePackage{newunicodechar}
|
||||
\newunicodechar{α}{\ensuremath\alpha}
|
||||
\newunicodechar{β}{\ensuremath\beta}
|
||||
\newunicodechar{γ}{\ensuremath\gamma}
|
||||
\newunicodechar{δ}{\ensuremath\delta}
|
||||
\newunicodechar{ε}{\ensuremath\epsilon}
|
||||
\newunicodechar{ζ}{\ensuremath\zeta}
|
||||
\newunicodechar{η}{\ensuremath\eta}
|
||||
\newunicodechar{θ}{\ensuremath\theta}
|
||||
\newunicodechar{ι}{\ensuremath\iota}
|
||||
\newunicodechar{κ}{\ensuremath\kappa}
|
||||
\newunicodechar{λ}{\ensuremath\lambda}
|
||||
\newunicodechar{μ}{\ensuremath\mu}
|
||||
\newunicodechar{ν}{\ensuremath\nu}
|
||||
\newunicodechar{ξ}{\ensuremath\xi}
|
||||
\newunicodechar{π}{\ensuremath\pi}
|
||||
\newunicodechar{ρ}{\ensuremath\rho}
|
||||
\newunicodechar{σ}{\ensuremath\sigma}
|
||||
\newunicodechar{τ}{\ensuremath\tau}
|
||||
\newunicodechar{υ}{\ensuremath\upsilon}
|
||||
\newunicodechar{φ}{\ensuremath\phi}
|
||||
\newunicodechar{χ}{\ensuremath\chi}
|
||||
\newunicodechar{ψ}{\ensuremath\psi}
|
||||
\newunicodechar{ω}{\ensuremath\omega}
|
||||
\ifbeamer\else
|
||||
\RequirePackage[backend=biber,style=alphabetic]{biblatex}
|
||||
\fi
|
||||
\else
|
||||
\RequirePackage[mathletters]{ucs}
|
||||
\fi
|
||||
\RequirePackage[\ifutf utf8\else utf8x\fi]{inputenc}
|
||||
|
||||
\RequirePackage{anyfontsize}
|
||||
\RequirePackage{lmodern}
|
||||
\RequirePackage{amsmath}
|
||||
\RequirePackage{mathtools}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{amssymb}
|
||||
\ifbeamer\else
|
||||
\RequirePackage{bm} % bold math symbols
|
||||
\fi
|
||||
\RequirePackage{comment}
|
||||
\RequirePackage{soul}
|
||||
\ifsubfig
|
||||
\RequirePackage{subfig}\else\fi
|
||||
\RequirePackage{mathrsfs}
|
||||
\RequirePackage{bbm}
|
||||
\ifbeamer
|
||||
\else \RequirePackage[shortlabels]{enumitem}\fi
|
||||
\ifbeamer\else
|
||||
\RequirePackage[colorlinks=true]{hyperref} % Hyperlinks
|
||||
\fi
|
||||
|
||||
% TIKZ
|
||||
\RequirePackage{tikz}
|
||||
\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning}
|
||||
\RequirePackage{tkz-euclide}
|
||||
\RequirePackage[export]{adjustbox}
|
||||
%Commutative diagrams
|
||||
\RequirePackage{tikz-cd}
|
||||
|
||||
%%for small diagrams, similar to tikz-cd
|
||||
\usepackage{xy} % for small diagrams, e.g. arrows
|
||||
\xyoption{all}
|
||||
|
||||
%%% AMSTHM
|
||||
\iffancythm
|
||||
\RequirePackage{mkessler-fancythm}
|
||||
\else
|
||||
\theoremstyle{plain}
|
||||
\ifbeamer\else
|
||||
\newtheorem{theorem}{\ifenglish Theorem\else Satz\fi}
|
||||
\newtheorem{corollary}{\ifenglish Corollary\else Korollar\fi}
|
||||
\newtheorem*{lemma}{Lemma}
|
||||
\newtheorem{proposition}{Proposition}
|
||||
\fi
|
||||
|
||||
|
||||
\theoremstyle{definition}
|
||||
\ifbeamer\else
|
||||
\newtheorem{definition}{Definition}
|
||||
\newtheorem{example}{\ifenglish Example\else Beispiel\fi}
|
||||
\newtheorem*{remark}{\ifenglish Remark\else Bemerkung\fi}
|
||||
\newtheorem*{notation}{Notation}
|
||||
\fi
|
||||
|
||||
|
||||
|
||||
%%Theorems needed in any case (fancy or not fancy theorems)
|
||||
|
||||
\theoremstyle{plain}
|
||||
\newtheorem{claim}{\ifenglish Claim\else Behauptung\fi}
|
||||
\newtheorem{variant}{\ifenglish Variant\else Variante\fi}
|
||||
\newtheorem{assumption}{\ifenglish Assumption\else Annahme\fi}
|
||||
|
||||
\theoremstyle{definition}
|
||||
\ifbeamer\else
|
||||
\newtheorem*{fact}{\ifenglish Fact\else Fakt\fi}
|
||||
\newtheorem*{note}{\ifenglish Note\else Anmerkung\fi}
|
||||
\newtheorem*{problem}{Problem}
|
||||
\fi
|
||||
\newtheorem*{warning}{\color{red}\ifenglish Warning \else Warnung\fi}
|
||||
\newtheorem*{goal}{\ifenglish Goal \else Ziel\fi}
|
||||
\newtheorem*{question}{\ifenglish Question \else Frage \fi}
|
||||
\newtheorem*{info}{Information}
|
||||
\newtheorem*{moral}{Moral}
|
||||
\newtheorem*{answer}{\ifenglish Answer\else Antwort\fi}
|
||||
\newtheorem*{observe}{\ifenglish Observe\else Beobachte\fi}
|
||||
\newtheorem*{property}{\ifenglish Property\else Eigenschaft\fi}
|
||||
\newtheorem*{intuition}{Intuition}
|
||||
\newtheorem*{recall}{\ifenglish Recall\else Erinnerung\fi}
|
||||
\newtheorem*{idea}{\ifenglish Idea\else Idee\fi}
|
||||
\newtheorem{exercise}{\ifenglish Exercise\else Aufgabe\fi}
|
||||
\ifbeamer\else\newenvironment{solution}[1][]{\begin{proof}[\ifenglish{}Solution\else{}Lösung\fi{}#1]}{\end{proof}}\fi
|
||||
\fi %end of theorem definitions
|
||||
|
||||
|
||||
|
||||
|
||||
% Für Formeln
|
||||
\RequirePackage{mathabx}
|
||||
\RequirePackage{faktor}
|
||||
\RequirePackage[mathscr]{eucal}
|
||||
|
||||
\RequirePackage{blindtext}
|
||||
\RequirePackage{tabto}
|
||||
\ifbeamer\else
|
||||
\RequirePackage{lastpage} %\pageref{LastPage} for reference on the last page
|
||||
\fi
|
||||
|
||||
% Für Tabulatoren
|
||||
|
||||
\RequirePackage{pdfpages} % PDF-Dateien einbinden
|
||||
|
||||
% Für Zeilenumbruch
|
||||
\RequirePackage{microtype}
|
||||
\RequirePackage{changepage}
|
||||
|
||||
|
||||
%Für Zeilenabstand 1,5
|
||||
\ifonehalfspacing
|
||||
\RequirePackage[onehalfspacing]{setspace} \else
|
||||
\fi
|
||||
|
||||
%For setting counters of itemns in \enemerate
|
||||
\makeatletter
|
||||
\newcommand\setItemnumber[1]{\setcounter{enum\romannumeral\@enumdepth}{\numexpr#1-1\relax}}
|
||||
\makeatother
|
||||
|
||||
%Make circled symbols
|
||||
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
||||
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
|
||||
|
||||
%Print a warning sign
|
||||
\newcommand\Warning{%
|
||||
\makebox[1.4em][c]{%
|
||||
\makebox[0pt][c]{\raisebox{.1em}{\small!}}%
|
||||
\makebox[0pt][c]{\color{red}\Large$\bigtriangleup$}}}%
|
||||
|
||||
% Add \contra symbol to denote contradiction
|
||||
\usepackage{stmaryrd} % for \lightning
|
||||
\newcommand\contra{\scalebox{1.5}{$\lightning$}}
|
||||
|
||||
|
||||
%Emphasize \vocabulary
|
||||
\newcommand{\vocab}[1]{\textbf{\color{blue} #1}}
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%math operators
|
||||
\usepackage{operators}
|
||||
|
||||
%Short commands for \mathbb{}
|
||||
|
||||
\newcommand{\C}{\ensuremath{\mathbb{C}}}
|
||||
\newcommand{\F}{\ensuremath{\mathbb{F}}}
|
||||
\newcommand{\K}{\ensuremath{\mathbb{K}}}
|
||||
\newcommand{\N}{\ensuremath{\mathbb{N}}}
|
||||
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
|
||||
\newcommand{\R}{\ensuremath{\mathbb{R}}}
|
||||
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
|
||||
|
||||
|
||||
%Paired Delimiters
|
||||
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
|
||||
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
|
||||
|
||||
%Norm and absolute value
|
||||
%Make them scaling by default and have \abs*{} as the non-scaling version of the command
|
||||
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
|
||||
\makeatletter
|
||||
\let\oldabs\abs
|
||||
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
|
||||
|
||||
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
|
||||
\let\oldnorm\norm
|
||||
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
|
||||
\makeatother
|
||||
|
||||
|
||||
%Fixes of common misbehaviour
|
||||
\renewcommand{\degree}{^\circ}
|
||||
|
||||
%Used to start an exercise and resetting the equation number
|
||||
\newcommand{\nr}[1]{\setcounter{equation}{0}\section*{\ifenglish Exercise \else Aufgabe \fi #1}~}
|
||||
|
||||
|
||||
\ifbeamer\else\RequirePackage{esint}\fi
|
||||
|
||||
\RequirePackage{IEEEtrantools}
|
||||
|
||||
\RequirePackage[ngerman,ruled,vlined]{algorithm2e}
|
||||
|
||||
\iflukas
|
||||
\newcommand{\RrClA}{\begin{IEEEeqnarray*}{RrCl}}
|
||||
\newcommand{\RrClZ}{\end{IEEEeqnarray*}}
|
||||
\newcommand{\RrCla}{\begin{IEEEeqnarray}{RrCl}}
|
||||
\newcommand{\RrClz}{\end{IEEEeqnarray}}
|
||||
\newcommand{\ud}{\,\mathrm{d}}
|
||||
\newcommand{\dLx}[1]{\;\ud\mathcal{L}^{#1}(x)}
|
||||
\setenumerate[1]{label=(\alph*)}
|
||||
|
||||
%%%%%%%%%%%%% INDUKTION %%%%%%%%%%%%%%%%%
|
||||
\newcommand{\its}{Das gilt offentsichtlich.}
|
||||
\newcommand\induktion[6][\its]{
|
||||
\def\n{#2}
|
||||
\def\kn{#2}
|
||||
Es sei $P(\n)$ die Aussage, dass:
|
||||
\RrClA
|
||||
P(\n) : \equiv \qquad \left(#5 \right)
|
||||
\RrClZ
|
||||
Diese soll nun per Induktion über $#3$ gezeigt werden.
|
||||
\begin{enumerate}
|
||||
\item [\underline{IA:}]Für den Induktionsanfang muss $P(#4)$ gezeigt werden, d.h.:
|
||||
\def\n{#4}
|
||||
\def\kn{#4}
|
||||
\RrClA
|
||||
P(#4) \equiv \qquad \left(#5\right)
|
||||
\RrClZ
|
||||
#1\ Also ist der Induktionsanfang gezeigt.
|
||||
\def\n{#2}
|
||||
\def\kn{#2}
|
||||
\item [\underline{IV:}] Angenommen $P(\n)$ gilt für ein $\n \in #3$, d.h. es gilt:
|
||||
\RrClA
|
||||
P(\n) \equiv \qquad \left(#5\right)
|
||||
\RrClZ
|
||||
\item [\underline{IS:}]
|
||||
Im Induktionsschritt von $\n$ auf $\n+1$ muss gezeigt werden, dass unter Annahme der Induktionsvoraussetzung auch die Induktionsbehauptung gilt:
|
||||
\def\n{#2+1}
|
||||
\def\kn{(#2+1)}
|
||||
\RrClA
|
||||
P(\n) \equiv \qquad \left(#5\right)
|
||||
\RrClZ
|
||||
#6
|
||||
|
||||
\def\n{#2}
|
||||
\def\kn{#2}
|
||||
Damit ist der Induktionsschritt erbracht und es gilt für alle $#2$ in $#3$:
|
||||
\RrClA
|
||||
\forall \n \in #3 : #5
|
||||
\RrClZ
|
||||
\end{enumerate}
|
||||
}
|
||||
%[Begründung IA]{$Variablenname$}{$Ursprungsmenge$}{$Startwert$}{$Aussage (variable ist \n, \kn)$}{Begründung IS}
|
||||
%\n ist n oder n+1, \kn ist n oder (n+1)
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\else
|
||||
\fi
|
||||
|
||||
|
||||
|
||||
|
125
operators.sty
Normal file
125
operators.sty
Normal file
|
@ -0,0 +1,125 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{operators}[2021-04-27 - Operator Package]
|
||||
%%%%%%%%%%%%%%%%%%mmmm
|
||||
%Provides some commonly used Operators used in the write-ups of my lecture notes
|
||||
|
||||
\newif\ifenglish\englishtrue
|
||||
\DeclareOption{german}{\englishfalse}
|
||||
\DeclareOption{english}{\englishtrue}
|
||||
\DeclareOption*{\PackageWarning{operators}{Unknown '\CurrentOption'}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
%Packages
|
||||
\RequirePackage{amsmath}
|
||||
|
||||
%%%%%%%%%%% Operators
|
||||
%Basic commands
|
||||
\renewcommand\subset\subseteq
|
||||
\renewcommand\supset\supseteq
|
||||
\DeclareMathOperator{\id}{id}
|
||||
\DeclareMathOperator{\im}{im}
|
||||
\DeclareMathOperator{\Bild}{Bild}
|
||||
\DeclareMathOperator{\Span}{Span}
|
||||
\let\ggT\relax\DeclareMathOperator{\ggT}{\ifenglish gcd \else ggT\fi}
|
||||
\let\kgV\relax\DeclareMathOperator{\kgV}{\ifenglish lcm \elese kgV\fi}
|
||||
\DeclareMathOperator{\rhs}{RHS} %Right hand side
|
||||
\DeclareMathOperator{\lhs}{LHS} %Left hand side
|
||||
|
||||
%Complex numbers
|
||||
\DeclareMathOperator{\Impart}{Im}
|
||||
\renewcommand\Im\Impart
|
||||
\DeclareMathOperator{\Repart}{Re}
|
||||
\renewcommand\Re\Repart
|
||||
|
||||
%Linear Algebra
|
||||
\DeclareMathOperator{\Sym}{Sym}
|
||||
\DeclareMathOperator{\supp}{supp}
|
||||
\DeclareMathOperator{\sgn}{sgn}
|
||||
\DeclareMathOperator{\coker}{coker}
|
||||
\DeclareMathOperator{\rank}{rank}
|
||||
\DeclareMathOperator{\Mat}{Mat}
|
||||
\DeclareMathOperator{\ev}{ev}
|
||||
|
||||
%Algebra
|
||||
\DeclareMathOperator{\Gal}{Gal}
|
||||
\DeclareMathOperator{\Ext}{Ext}
|
||||
\DeclareMathOperator{\Tor}{Tor}
|
||||
\DeclareMathOperator{\Mspec}{MaxSpec}
|
||||
\DeclareMathOperator{\Sh}{Sh}
|
||||
\DeclareMathOperator{\Proj}{Proj}
|
||||
\DeclareMathOperator{\QCoh}{QCoh}
|
||||
\DeclareMathOperator{\MaxSpec}{MaxSpec}
|
||||
\DeclareMathOperator{\Presh}{Pre-Sh}
|
||||
\DeclareMathOperator{\Fun}{Fun}
|
||||
\newcommand{\tensor}{\otimes}
|
||||
|
||||
%Analysis
|
||||
\DeclareMathOperator{\dx}{dx}
|
||||
\DeclareMathOperator{\dy}{dy}
|
||||
\DeclareMathOperator{\dz}{dz}
|
||||
\DeclareMathOperator{\dt}{dt}
|
||||
|
||||
%Sets
|
||||
\DeclareMathOperator{\conv}{conv}
|
||||
\DeclareMathOperator{\dist}{dist}
|
||||
\DeclareMathOperator{\diam}{diam}
|
||||
|
||||
%%Stochastic (Algorithmische Mathematik II)
|
||||
\newcommand\distribution[1]{\operatorname{#1}}
|
||||
\newcommand\DeclareDistribution[1]{\expandafter\def\csname #1\endcsname{\distribution{#1}}}
|
||||
\DeclareDistribution{Bin}
|
||||
\DeclareDistribution{Ber}
|
||||
\DeclareDistribution{Geo}
|
||||
\DeclareDistribution{Poi}
|
||||
\DeclareDistribution{Unif}
|
||||
\DeclareMathOperator{\Var}{Var}
|
||||
\DeclareMathOperator{\Cov}{Cov}
|
||||
|
||||
%Topology
|
||||
\DeclareMathOperator\pr{pr}
|
||||
\def\twedge{\vee}
|
||||
\def\tsmash{\wedge}
|
||||
|
||||
%Category Theory
|
||||
\DeclareMathOperator{\Ob}{Ob}
|
||||
\newcommand{\cat}[1]{ \mathscr{#1} }
|
||||
\DeclareMathOperator{\Hom}{Hom}
|
||||
\DeclareMathOperator{\Mor}{Mor}
|
||||
\DeclareMathOperator{\End}{End}
|
||||
\DeclareMathOperator{\opposite}{\textbf{opp}}
|
||||
\newcommand\opp{^{\opposite}}
|
||||
\newcommand\op{^{\opposite}}
|
||||
|
||||
%Categories
|
||||
\newcommand\category[1]{\operatorname{\textbf{#1}}}
|
||||
\newcommand\DeclareCategory[1]{\expandafter\def\csname #1\endcsname{\category{#1}}}
|
||||
\DeclareCategory{Top}
|
||||
\DeclareCategory{hTop}
|
||||
\DeclareCategory{Set}
|
||||
\DeclareCategory{CHaus}
|
||||
\DeclareCategory{Grp}
|
||||
\DeclareCategory{Ab}
|
||||
\DeclareCategory{CRing}
|
||||
\DeclareCategory{Vect}
|
||||
\DeclareCategory{Fin}
|
||||
\DeclareCategory{Ab}
|
||||
\DeclareCategory{Cat}
|
||||
\DeclareMathOperator{\colim}{colim}
|
||||
|
||||
|
||||
|
||||
% Characteristic function
|
||||
\newcommand*{\cfun}{\ensuremath{\mathbbm{1}}}
|
||||
\newcommand*{\One}{\ensuremath{\mathbbm{1}}}
|
||||
|
||||
|
||||
%Set theory
|
||||
\DeclareMathOperator\card{card}
|
||||
\DeclareMathOperator\Cd{Cd}
|
||||
\DeclareMathOperator\Ord{Ord}
|
||||
\DeclareMathOperator\otp{otp}
|
||||
\DeclareMathOperator\Card{Card}
|
||||
|
||||
|
||||
\def\daniel{Daniel Harrer}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#! /bin/bash
|
||||
# Compiles all documentation files in repository
|
||||
|
||||
set -e
|
||||
|
||||
BUILD_COMMAND="latexmk -output-directory=$(pwd)/.compile $1"
|
||||
|
||||
find doc -type f -name "*.tex" -execdir sh -c "$BUILD_COMMAND" -- {} \;
|
77
sheet.cls
Normal file
77
sheet.cls
Normal file
|
@ -0,0 +1,77 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{sheet}[2021/03/31 Exercise-Sheet-Class by Maximilian Kessler (private use)]
|
||||
|
||||
\RequirePackage{scrbase}
|
||||
|
||||
\newif\iflargename\largenamefalse
|
||||
\DeclareOption{large-name}{\largenametrue}
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
\LoadClass{scrartcl}
|
||||
|
||||
\KOMAoption{fontsize}{12pt}
|
||||
\KOMAoption{parskip}{half-}
|
||||
\KOMAoption{DIV}{12}
|
||||
\KOMAoption{headings}{normal}
|
||||
|
||||
\RequirePackage{mymath}
|
||||
\RequirePackage{scrlayer-scrpage}
|
||||
\RequirePackage{subfig}
|
||||
\RequirePackage[shortlabels]{enumitem}
|
||||
%\RequirePackage[hidelinks]{hyperref}
|
||||
\RequirePackage{graphicx}
|
||||
\RequirePackage{ifplatform}
|
||||
\graphicspath{{./out/graphics/}}
|
||||
|
||||
\KOMAoption{headsepline}{:}
|
||||
|
||||
\AtBeginDocument{\maketitle}
|
||||
|
||||
\def\@course{}%
|
||||
\DeclareRobustCommand*{\course}[1]{\gdef\@course{#1}}
|
||||
\def\@sheetnumber{}%
|
||||
\DeclareRobustCommand*{\sheetnumber}[1]{\gdef\@sheetnumber{\ifenglish Sheet #1 \else Übungsblatt #1\fi}}
|
||||
|
||||
\renewcommand*{\@date}{\today}
|
||||
|
||||
\renewcommand*{\maketitle}{
|
||||
\thispagestyle{plain}
|
||||
{\makebox[0pt][l]{\usekomafont{myauthor}\@author}\hfill\makebox[0pt][r]{\usekomafont{date}\@date}\par}
|
||||
\vspace{0.5em}
|
||||
{\centering\usekomafont{title}\@course\par}
|
||||
{\centering\usekomafont{subtitle}\@sheetnumber \par}
|
||||
\vspace{2em}
|
||||
\hrule
|
||||
\addvspace{2em}
|
||||
}
|
||||
|
||||
\setkomafont{title}{\LARGE\bfseries}
|
||||
\setkomafont{subtitle}{}
|
||||
\newkomafont{myauthor}{}
|
||||
\setkomafont{date}{}
|
||||
\newkomafont{headtitle}{\itshape}
|
||||
\setkomafont{pageheadfoot}{\footnotesize}
|
||||
\setkomafont{descriptionlabel}{\bfseries}
|
||||
\setkomafont{pagenumber}{\normalsize}
|
||||
|
||||
\pagestyle{scrheadings}
|
||||
\ihead[]{\iflargename \usekomafont{myauthor}\@author \\ \@course\;- \@sheetnumber\else \usekomafont{myauthor}\@author\fi }
|
||||
\chead[]{\iflargename \else \usekomafont{subtitle}\@course\;- \@sheetnumber\fi}
|
||||
\ohead[]{\usekomafont{date}\@date}
|
||||
|
||||
\allowdisplaybreaks[1]
|
||||
|
||||
% Page layout
|
||||
\setlength{\parindent}{0pt}
|
||||
|
||||
\RequirePackage{geometry}
|
||||
\geometry{a4paper, left=2cm, right=2cm, top=3cm-15pt, bottom=3cm-15pt, head=15.0pt, headsep=10pt}
|
||||
|
||||
\setlength{\skip\footins}{15pt}
|
||||
|
||||
\setlength{\abovecaptionskip}{0cm}
|
||||
\setlength{\belowcaptionskip}{0cm}
|
||||
|
||||
%Für Zeilenabstand 1,5
|
||||
\RequirePackage[onehalfspacing]{setspace}
|
|
@ -1,7 +0,0 @@
|
|||
@default_files = ("fancythm.dtx");
|
||||
$makeindex = "makeindex -s gind.ist %O -o %D %S";
|
||||
$clean_ext .= ' glo';
|
||||
$clean_ext .= ' hd';
|
||||
$clean_ext .= ' ins';
|
||||
$clean_full_ext .= ' sty';
|
||||
$emulate_aux = 1;
|
|
@ -1,922 +0,0 @@
|
|||
% \iffalse meta-comment
|
||||
%<*internal>
|
||||
\begingroup
|
||||
\input docstrip.tex
|
||||
\keepsilent
|
||||
\usedir{tex/latex/mkessler/fancythm}
|
||||
\askforoverwritefalse
|
||||
\generate{\file{fancythm.sty}{\from{fancythm.dtx}{package}}}
|
||||
\def\tmpa{plain}
|
||||
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
|
||||
\endgroup
|
||||
%</internal>
|
||||
%% File: fancytm.dtx
|
||||
%
|
||||
% Copyright (C) 2022 Maximilian Keßler
|
||||
%
|
||||
% It may be distributed and/or modified under the conditions of the
|
||||
% LaTeX Project Public License (LPPL), either version 1.3c of this
|
||||
% license or (at your option) any later version. The latest version
|
||||
% of this license is in the file
|
||||
%
|
||||
% https://www.latex-project.org/lppl.txt
|
||||
%
|
||||
% -----------------------------------------------------------------------
|
||||
%<package>\ProvidesExplPackage{fancythm}{2022/01/30}{0.0.2}{Grouped theorems.}
|
||||
%
|
||||
%<*driver>
|
||||
\documentclass[full,kernel]{l3doc}
|
||||
\begin{document}
|
||||
\DocInput{\jobname.dtx}
|
||||
\end{document}
|
||||
%</driver>
|
||||
% \fi
|
||||
%
|
||||
% \title{^^A
|
||||
% The \pkg{fancythm} package^^A
|
||||
% }
|
||||
%
|
||||
% \author{^^A
|
||||
% Maximilian Keßler
|
||||
% }
|
||||
%
|
||||
% \date{Released 2022-01-12}
|
||||
%
|
||||
% \maketitle
|
||||
%
|
||||
% \begin{documentation}
|
||||
% \end{documentation}
|
||||
%
|
||||
%
|
||||
% \begin{implementation}
|
||||
%
|
||||
% \section{\pkg{fancythm} implementation}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
%<*package>
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
%<@@=fancythm>
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% \subsection{Dependencies}
|
||||
% \begin{macrocode}
|
||||
\RequirePackage{l3keys2e}
|
||||
\RequirePackage[default styles]{thmstyle}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \subsection{Counter management}
|
||||
%
|
||||
%
|
||||
% Wrappers for \LaTeX2e counter manipulation
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\arabic:n, \counter_new:n, \counter_within:nn,\counter_new:nn}
|
||||
%
|
||||
% Obvious meanings.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_set_eq:NN \arabic:n \arabic
|
||||
\cs_set_eq:NN \counter_new:n \newcounter
|
||||
\cs_set_eq:NN \counter_within:nn \counterwithin
|
||||
\cs_new:Npn \counter_new:nn #1 #2
|
||||
{
|
||||
\counter_new:n { #1 }
|
||||
\counter_within:nn { #1 } { #2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}
|
||||
% {
|
||||
% \counter_if_exist_p:n,
|
||||
% \counter_if_exist:nT,
|
||||
% \counter_if_exist:F,
|
||||
% \counter_if_exist:nTF,
|
||||
% }
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \counter_if_exist_p:n #1
|
||||
{
|
||||
\cs_if_exist_p:c { c@ #1 }
|
||||
}
|
||||
\cs_new:Npn \counter_if_exist:nT #1
|
||||
{
|
||||
\cs_if_exist:cT { c@ #1 }
|
||||
}
|
||||
\cs_new:Npn \counter_if_exist:nF #1
|
||||
{
|
||||
\cs_if_exist:cF { c@ #1 }
|
||||
}
|
||||
\cs_new:Npn \counter_if_exist:nTF #1
|
||||
{
|
||||
\cs_if_exist:cTF { c@ #1 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\counter_undefined_error:n}
|
||||
%
|
||||
% Standard counter error message.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_set_eq:Nc \counter_undefined_error:n { @nocounterr }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\counter_ensure_exist:n}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \counter_ensure_exist:n #1
|
||||
{
|
||||
\counter_if_exist:nF { #1 }
|
||||
{
|
||||
\counter_undefined_error:n { #1 }
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\counter_the:n, \counter_set_the:nn}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \counter_the:n #1
|
||||
{
|
||||
\use:c { the #1 }
|
||||
}
|
||||
\cs_new:Npn \counter_set_the:nn #1 #2
|
||||
{
|
||||
\counter_ensure_exist:n { #1 }
|
||||
\exp_args:Nc \renewcommand { the #1 } { #2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\counter_sub:nn}
|
||||
% \begin{syntax}
|
||||
% \cs{counter_sub:nn}\marg{counter_1}\marg{counter_2}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \counter_sub:nn #1 #2
|
||||
{
|
||||
\counter_within:nn { #1 } { #2 }
|
||||
\counter_set_the:nn { #1 }
|
||||
{
|
||||
\counter_the:n { #2 } . \arabic:n { #1 }
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\counter_new_sub:nn #1 #2}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \counter_new_sub:nn #1 #2
|
||||
{
|
||||
\counter_new:n { #1 }
|
||||
\counter_sub:nn { #1 } { #2 }
|
||||
}
|
||||
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \subsection{Counter management}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_counter_sub_if_exist:n}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_counter_sub_if_exist:n #1
|
||||
{
|
||||
\counter_if_exist:nT { #1 }
|
||||
{
|
||||
\counter_new_sub:nn { in #1 } { #1 }
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\counter_alias:nn, \counter_alias:nx}
|
||||
% \begin{syntax}
|
||||
% \cs{counter_alias:nn}\marg{counter_1}\marg{counter_2}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Note that since 2022-06-02, the implementation of \cs{@counteralias}
|
||||
% in \pkg{thmtools} has changed.
|
||||
% Before, aliasing an already existing counter did not throw an error,
|
||||
% which is considered a bug now
|
||||
% (\href{https://github.com/muzimuzhi/thmtools/issues/28}{https://github.com/muzimuzhi/thmtools/issues/28}).
|
||||
% Since \pkg{!!} relies on the old functionality,
|
||||
% we adapt this here by undefining \cs{c@\meta{countername}} before calling
|
||||
% \cs{@counteralias}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \counter_alias:nn #1 % trailing #2
|
||||
{
|
||||
\cs_undefine:c { c@ #1 }
|
||||
\use:c { @counteralias } { #1 } % implicit #2
|
||||
}
|
||||
\cs_generate_variant:Nn \counter_alias:nn { n x }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Initialization}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{variable}{indocument, insection, insubsection, inchapter, inpart}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\counter_new:n { indocument }
|
||||
\@@_counter_sub_if_exist:n { section }
|
||||
\@@_counter_sub_if_exist:n { subsection }
|
||||
\@@_counter_sub_if_exist:n { chapter }
|
||||
\@@_counter_sub_if_exist:n { part }
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
% \begin{variable}{toplevel, sublevel, subsublevel, subsubsublevel}
|
||||
%
|
||||
% Note that the \texttt{toplevel} counter will be potentially redefined
|
||||
% by the given package options.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\counter_alias:nn { toplevel } { indocument }
|
||||
\counter_new_sub:nn { sublevel } { toplevel }
|
||||
\counter_new_sub:nn { subsublevel } { sublevel }
|
||||
\counter_new_sub:nn { subsubsublevel } { subsublevel }
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
% \begin{variable}{\g_@@_style_str}
|
||||
%
|
||||
% This will hold the style information of the package.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\str_new:N \g_@@_style_str
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
% \begin{variable}{\g_@@_translator_bool}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\bool_new:N \g_@@_translator_bool
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
% \begin{variable}{\g_@@_generate_defaults_bool}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\bool_new:N \g_@@_generate_defaults_bool
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{variable}
|
||||
% {
|
||||
% \l_@@_key_name_tl,
|
||||
% \l_@@_key_mdframed_tl,
|
||||
% \l_@@_key_style_tl,
|
||||
% \l_@@_key_group_clist,
|
||||
% \l_@@_key_thmtools_clist,
|
||||
% }
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\tl_new:N \l_@@_key_name_tl
|
||||
\tl_new:N \l_@@_key_mdframed_tl
|
||||
\tl_new:N \l_@@_key_style_tl
|
||||
\clist_new:N \l_@@_key_group_clist
|
||||
\clist_new:N \l_@@_key_thmtools_clist
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{variable}
|
||||
% {
|
||||
% \l_@@_name_tl,
|
||||
% \l_@@_thmtools_clist,
|
||||
% \l_@@_group_clist,
|
||||
% }
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\tl_new:N \l_@@_name_tl
|
||||
\clist_new:N \l_@@_thmtools_clist
|
||||
\clist_new:N \l_@@_group_clist
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{variable}{\g_@@_groupthm_option_clist}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\clist_new:N \g_@@_groupthm_option_clist
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Key interface}
|
||||
%
|
||||
% \begin{texnote}
|
||||
% Note that unfortunately, none of the keynames really containes a space.
|
||||
% \LaTeX2e strips spaces before loading a package, so introducing them here
|
||||
% would make them inaccessible.
|
||||
% Here they are ignored by \LaTeX3 and are present for readability.
|
||||
% \end{texnote}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\keys_define:nn { fancythm }
|
||||
{
|
||||
translator .bool_set:N = \g_@@_translator_bool ,
|
||||
translator .default:n = { true } ,
|
||||
generate defaults .bool_set:N = \g_@@_generate_defaults_bool ,
|
||||
generate defaults .default:n = { true } ,
|
||||
number in .choices:nn =
|
||||
{ document, section, subsection, chapter, part }
|
||||
{
|
||||
\counter_alias:nx { toplevel } { in \tl_use:N \l_keys_choice_tl }
|
||||
} ,
|
||||
number in .default:n = { document } ,
|
||||
style .choices:nn =
|
||||
{ fancy, plain, classic }
|
||||
{
|
||||
\str_set:Nn \g_@@_style_str { \tl_use:N \l_keys_choice_tl }
|
||||
} ,
|
||||
style .default:n = { fancy } ,
|
||||
cache .code:n =
|
||||
{
|
||||
\clist_put_right:Nn \g_@@_groupthm_option_clist { cache = #1 }
|
||||
} ,
|
||||
cache .default:n = { true } ,
|
||||
cache version .code:n =
|
||||
{
|
||||
\clist_put_right:Nn \g_@@_groupthm_option_clist { cache version = #1 }
|
||||
} ,
|
||||
cache version .default:n = { 0 } ,
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\keys_define:nn { fancythm / fancytheorem }
|
||||
{
|
||||
name .tl_set:N = \l_@@_key_name_tl ,
|
||||
name .default:n = \c_novalue_tl ,
|
||||
mdframed .tl_set:N = \l_@@_key_mdframed_tl ,
|
||||
mdframed .default:n = \c_novalue_tl ,
|
||||
style .tl_set:N = \l_@@_key_style_tl ,
|
||||
style .default:n = \c_novalue_tl ,
|
||||
group .clist_set:N = \l_@@_key_group_clist ,
|
||||
group .default:n = {} ,
|
||||
thmtools .clist_set:N = \l_@@_key_thmtools_clist ,
|
||||
thmtools .default:n = {} ,
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% Process the given keys:
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\keys_set:nn { fancythm } { translator, generate defaults, number in, style }
|
||||
\ProcessKeysOptions{ fancythm }
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
||||
|
||||
% \begin{macro}{\@@_require_package:nn}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_require_package:nn #1
|
||||
{
|
||||
\RequirePackage [ #1 ]
|
||||
}
|
||||
\cs_generate_variant:Nn \@@_require_package:nn { V n }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\@@_require_package:Vn \g_@@_groupthm_option_clist { groupthm }
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
% This sets up translation if requested.
|
||||
% Throughout implementation, we can just use \cs{@@_translate:n}
|
||||
% and will (or not) have translation according to the specified options.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\bool_if:NTF \g_@@_translator_bool
|
||||
{
|
||||
\RequirePackage{translator}
|
||||
\usedictionary{translator-environment-names}
|
||||
\cs_set_eq:NN \@@_translate:n \translate
|
||||
}
|
||||
{
|
||||
\cs_set_eq:NN \@@_translate:n \use:n
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_set_normalized_keys:nn}
|
||||
%
|
||||
% \begin{syntax}
|
||||
% \cs{@@_set_normalized_keys:nn}\marg{keys}\marg{fallback name}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_set_normalized_keys:nn #1 #2
|
||||
{
|
||||
\keys_set:nn { fancythm / fancytheorem } { name, mdframed, style, group, thmtools }
|
||||
\keys_set:nn { fancythm / fancytheorem } { #1 }
|
||||
\clist_set_eq:NN \l_@@_group_clist \l_@@_key_group_clist
|
||||
\clist_set_eq:NN \l_@@_thmtools_clist \l_@@_key_thmtools_clist
|
||||
\tl_if_eq:NnF \l_@@_key_mdframed_tl { \c_novalue_tl }
|
||||
{
|
||||
\clist_put_right:Nx \l_@@_thmtools_clist
|
||||
{
|
||||
mdframed = { style = \tl_use:N \l_@@_key_mdframed_tl }
|
||||
}
|
||||
}
|
||||
\tl_if_eq:NnF \l_@@_key_style_tl { \c_novalue_tl }
|
||||
{
|
||||
\clist_put_right:Nx \l_@@_thmtools_clist
|
||||
{
|
||||
style = \tl_use:N \l_@@_key_style_tl
|
||||
}
|
||||
}
|
||||
\tl_if_eq:NnTF \l_@@_key_name_tl { \c_novalue_tl }
|
||||
{
|
||||
\tl_set:Nx \l_@@_name_tl
|
||||
{
|
||||
\text_titlecase_first:n { \tl_trim_spaces:n { #2 } }
|
||||
}
|
||||
}
|
||||
{
|
||||
\tl_set_eq:NN \l_@@_name_tl \l_@@_key_name_tl
|
||||
}
|
||||
\tl_set:Nx \l_@@_name_tl
|
||||
{
|
||||
\exp_not:N \csname @@_translate:n \exp_not:N \endcsname { \tl_use:N \l_@@_name_tl }
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Fancy theorems}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_wrap_multiple:nnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_wrap_multiple:nnn}\marg{declarator list}\marg{function name}\marg{code}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Defines \meta{function name}, which is assumed to contain \cs{declarator}
|
||||
% by \meta{code} for each declarator in \meta{declarator list}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_wrap_multiple:nnn #1 #2 #3
|
||||
{
|
||||
\cs_set:Npn \@@_map_aux:n ##1
|
||||
{
|
||||
\cs_new:cn { #2 }
|
||||
{
|
||||
#3
|
||||
}
|
||||
}
|
||||
\clist_map_function:nN { #1 } \@@_map_aux:n
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\fancythm_new_theorem:nnnn, \fancythm_provide_theorem:nnnn}
|
||||
% \begin{syntax}
|
||||
% \cs{fancythm_new_theorem:nnnn}\marg{fancy theorem}\marg{groups}
|
||||
% \marg{name}\marg{thmtools keys}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\@@_wrap_multiple:nnn
|
||||
{ new, provide }
|
||||
{ fancythm_#1_theorem:nnnn }
|
||||
{
|
||||
\use:c { groupthm_#1_family:nnnnn } { ##1 } { dagger, star, nobraces } { ##3 } { ##4 } { ##2 }
|
||||
\use:c { groupthm_#1_family_options:nnnn }
|
||||
{ ##1 }
|
||||
{ !s !t+ !t-}
|
||||
{
|
||||
\IfBooleanT { ####1 }
|
||||
{
|
||||
\AddTheoremToGroup { star }
|
||||
}
|
||||
\IfBooleanT { ####2 }
|
||||
{
|
||||
\AddTheoremToGroup { dagger }
|
||||
}
|
||||
\IfBooleanT { ####3 }
|
||||
{
|
||||
\AddTheoremToGroup { nobraces }
|
||||
}
|
||||
}
|
||||
{ ##2 }
|
||||
}
|
||||
\cs_generate_variant:Nn \fancythm_new_theorem:nnnn { n V V V }
|
||||
\cs_generate_variant:Nn \fancythm_provide_theorem:nnnn { n V V V }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\fancythm_new_theorem:nn}
|
||||
% \begin{syntax}
|
||||
% \cs{fanythm_new_theorem:nn}\marg{key=value list}\marg{fancy theorem}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\@@_wrap_multiple:nnn
|
||||
{ new, provide }
|
||||
{ fancythm_#1_theorem:nn }
|
||||
{
|
||||
\@@_set_normalized_keys:nn { ##1 } { ##2 }
|
||||
\use:c { fancythm_#1_theorem:nVVV }
|
||||
{ ##2 }
|
||||
\l_@@_group_clist
|
||||
\l_@@_name_tl
|
||||
\l_@@_thmtools_clist
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_new_document_command:Nnn, \@@_new_document_command:cnn}
|
||||
%
|
||||
% Private wrappers around \cs{NewDocumentCommand}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_new_document_command:Nnn #1 #2 #3
|
||||
{
|
||||
\NewDocumentCommand { #1 } { #2 } { #3 }
|
||||
}
|
||||
\cs_generate_variant:Nn \@@_new_document_command:Nnn { c n n }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_wrap_multiple_document:nnnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_wrap_multiple_document:nnnn}\marg{declarator list}\marg{function name}\marg{arg spec}\marg{code}
|
||||
% \end{syntax}
|
||||
%
|
||||
% This is very similar to \cs{@@_wrap_multiple:nnn}, except that it produces document commands.
|
||||
% For this reason, \cs{declarator} and \cs{Declarator} are available to refer to the lower
|
||||
% and upper-case versions of the current declarator.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_wrap_multiple_document:nnnn #1 #2 #3 #4
|
||||
{
|
||||
\cs_set:Npn \@@_map_aux:n ##1
|
||||
{
|
||||
\cs_set:Nn \@@_Declarator: { \text_titlecase_first:n { ##1 } }
|
||||
\@@_new_document_command:cnn { #2 } { #3 } { #4 }
|
||||
}
|
||||
\clist_map_function:nN { #1 } \@@_map_aux:n
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\NewFancyTheorem, \ProvideFancyTheorem}
|
||||
% \begin{syntax}
|
||||
% \cs{NewFancyTheorem}\marg{key=value list}\marg{fancy theorem}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\@@_wrap_multiple_document:nnnn
|
||||
{ new, provide }
|
||||
{ \@@_Declarator: FancyTheorem }
|
||||
{ O{} m }
|
||||
{
|
||||
\use:c { fancythm_#1_theorem:nn } { ##1 } { ##2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Provided resources}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% We introduce various new 0theorem groups that help us to organize the document
|
||||
% in a flexible way.
|
||||
%
|
||||
% \begin{variable}{star, dagger, big, small, tiny, custom}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\declaretheoremstyle[notebraces={{}{}}]{nobraces}
|
||||
\groupthm_new_group:nnnnn { star } { } { * } { } { }
|
||||
\groupthm_new_group:nnnnn { dagger } { } { $^{\dagger}$ } { } { }
|
||||
\groupthm_new_group:nnnnn { big } { } { } { } { sibling = toplevel }
|
||||
\groupthm_new_group:nnnnn { small } { } { } { } { sibling = sublevel }
|
||||
\groupthm_new_group:nnnnn { tiny } { } { } { } { numbered = no }
|
||||
\groupthm_new_group:nnnnn { custom } { } { } { } { sibling = sublevel }
|
||||
\groupthm_new_group:nnnnn { nobraces } { } { } { } { style = nobraces }
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\groupthm_add_parent:nn { star } { custom }
|
||||
\groupthm_add_parent:nn { dagger } { custom }
|
||||
% \end{macrocode}
|
||||
% \begin{macrocode}
|
||||
\DeclareTheoremGroupRule [ suffix ] { dagger } { higher } { star }
|
||||
\DeclareTheoremGroupRule { tiny } { higher } { small }
|
||||
\DeclareTheoremGroupRule { tiny } { higher } { big }
|
||||
\DeclareTheoremGroupRule { tiny } { higher } { custom }
|
||||
\DeclareTheoremGroupRule { small } { higher } { big }
|
||||
\DeclareTheoremGroupRule { custom } { higher } { big }
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% It remains to provide a list of theorems at the beginning of the document.
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\fancythm_add_provided_theorem_to_group:nn}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \fancythm_add_provided_theorem_to_group:nn #1 #2
|
||||
{
|
||||
\cs_if_exist:cF { @@_provided_theorem__#1__group_clist }
|
||||
{
|
||||
\clist_new:c { @@_provided_theorem__#1__group_clist }
|
||||
}
|
||||
\clist_put_left:cn { @@_provided_theorem__#1__group_clist } { #2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\AddProvidedFancyTheoremToGroup}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\NewDocumentCommand { \AddProvidedFancyTheoremToGroup } { m m }
|
||||
{
|
||||
\fancythm_add_provided_theorem_to_group:nn { #1 } { #2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_provide_package_theorem:nnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_provide_package_theorem:nnn}\marg{key=value list}\marg{fancy theorem}
|
||||
% \marg{group}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Group can be one of \texttt{big}, \texttt{small}, \texttt{tiny},
|
||||
% and the provided theorem will have this group, unless it conflicts
|
||||
% with a user-provided group, in which case this is ignored.
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_provide_package_theorem:nnn #1 #2 #3
|
||||
{
|
||||
\@@_set_normalized_keys:nn { #1 } { #2 }
|
||||
\cs_if_exist:cT { @@_provided_theorem__#2__group_clist }
|
||||
{
|
||||
\clist_concat:ccc
|
||||
{ l_@@_group_clist }
|
||||
{ @@_provided_theorem__#2__group_clist }
|
||||
{ l_@@_group_clist }
|
||||
}
|
||||
\clist_if_in:NnF \l_@@_group_clist { big }
|
||||
{
|
||||
\clist_if_in:NnF \l_@@_group_clist { small }
|
||||
{
|
||||
\clist_if_in:NnF \l_@@_group_clist { tiny }
|
||||
{
|
||||
\clist_put_right:Nn \l_@@_group_clist { #3 }
|
||||
}
|
||||
}
|
||||
}
|
||||
\fancythm_provide_theorem:nVVV
|
||||
{ #2 }
|
||||
\l_@@_group_clist
|
||||
\l_@@_name_tl
|
||||
\l_@@_thmtools_clist
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\fancythm_provide_big_theorem:nn}
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \fancythm_provide_big_theorem:nn #1 #2
|
||||
{
|
||||
\@@_provide_package_theorem:nnn { #1 } { #2 } { big }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\fancythm_provide_small_theorem:nn}
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \fancythm_provide_small_theorem:nn #1 #2
|
||||
{
|
||||
\@@_provide_package_theorem:nnn { #1 } { #2 } { small }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\fancythm_provide_tiny_theorem:nn}
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \fancythm_provide_tiny_theorem:nn #1 #2
|
||||
{
|
||||
\@@_provide_package_theorem:nnn { #1 } { #2 } { tiny }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\bool_if:NT \g_@@_generate_defaults_bool
|
||||
{
|
||||
\AddToHook { begindocument / before } [ fancythm ]
|
||||
{
|
||||
\fancythm_provide_big_theorem:nn { style = thmredmarginandfill } { theorem }
|
||||
\fancythm_provide_big_theorem:nn { style = thmredmarginandfill } { proposition }
|
||||
\fancythm_provide_big_theorem:nn { style = thmredmarginandfill } { corollary }
|
||||
\fancythm_provide_big_theorem:nn { style = thmbluemarginandfill } { definition }
|
||||
\fancythm_provide_big_theorem:nn { style = thmorangemarginandfill} { lemma }
|
||||
\fancythm_provide_big_theorem:nn { style = thmgreenmargin } { example }
|
||||
\fancythm_provide_big_theorem:nn
|
||||
{
|
||||
style = thmredmarginbluefill,
|
||||
name = Theorem ~ and ~ Definition
|
||||
} { theoremdef }
|
||||
\fancythm_provide_big_theorem:nn
|
||||
{
|
||||
style = thmredmarginbluefill,
|
||||
name = Proposition ~ and ~ Definition
|
||||
} { propositiondef }
|
||||
\fancythm_provide_big_theorem:nn
|
||||
{
|
||||
style = thmorangemarginbluefill,
|
||||
name = Lemma ~ and ~ Definition
|
||||
} { propositiondef }
|
||||
% \end{macrocode}
|
||||
% \begin{macrocode}
|
||||
\fancythm_provide_small_theorem:nn { style = thmvioletmargin } { notation }
|
||||
\fancythm_provide_small_theorem:nn { style = thmyellowmargin } { remark }
|
||||
\fancythm_provide_small_theorem:nn { style = thmgoldmargin } { praise }
|
||||
\fancythm_provide_small_theorem:nn { style = thmblackmarginandfill } { question }
|
||||
\fancythm_provide_small_theorem:nn { style = thmblackmargin } { orga }
|
||||
\fancythm_provide_small_theorem:nn { style = thmredmargin } { fact }
|
||||
\fancythm_provide_small_theorem:nn
|
||||
{
|
||||
style = thmyellowmargin,
|
||||
name = Trivial ~ Nonsense
|
||||
} { trivial }
|
||||
\fancythm_provide_small_theorem:nn
|
||||
{
|
||||
style = thmvioletmargin,
|
||||
name = Abuse ~ of ~ Notation
|
||||
} { abuse }
|
||||
\fancythm_provide_small_theorem:nn
|
||||
{
|
||||
style = thmyellowmargin,
|
||||
name = Oral ~ remark
|
||||
} { oral }
|
||||
% \end{macrocode}
|
||||
% \begin{macrocode}
|
||||
\fancythm_provide_tiny_theorem:nn { } { variant }
|
||||
\fancythm_provide_tiny_theorem:nn { } { assumption }
|
||||
\fancythm_provide_tiny_theorem:nn { } { note }
|
||||
\fancythm_provide_tiny_theorem:nn { } { warning }
|
||||
\fancythm_provide_tiny_theorem:nn { } { goal }
|
||||
\fancythm_provide_tiny_theorem:nn { } { strategy }
|
||||
\fancythm_provide_tiny_theorem:nn { } { problem }
|
||||
\fancythm_provide_tiny_theorem:nn { } { info }
|
||||
\fancythm_provide_tiny_theorem:nn { } { observe }
|
||||
\fancythm_provide_tiny_theorem:nn { } { property }
|
||||
\fancythm_provide_tiny_theorem:nn { } { intuition }
|
||||
\fancythm_provide_tiny_theorem:nn { } { recall }
|
||||
\fancythm_provide_tiny_theorem:nn { } { idea }
|
||||
\fancythm_provide_tiny_theorem:nn { } { exercise }
|
||||
\fancythm_provide_tiny_theorem:nn { } { reminder }
|
||||
}
|
||||
}
|
||||
\DeclareHookRule { begindocument / before } { groupthm } { after } { fancythm }
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
%</package>
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \end{implementation}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \newpage
|
||||
% \PrintIndex
|
|
@ -1,6 +0,0 @@
|
|||
@default_files = ("groupthm.dtx");
|
||||
$makeindex = "makeindex -s gind.ist %O -o %D %S";
|
||||
$clean_ext .= ' glo';
|
||||
$clean_ext .= ' hd';
|
||||
$clean_full_ext .= ' sty';
|
||||
$emulate_aux = 1;
|
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
|||
key,English,German
|
||||
Claim,Claim,Behauptung
|
||||
claim,claim,Behauptung
|
||||
Claim*,Claim*,Behauptung*
|
||||
claim*,claim*,Behauptung*
|
||||
Proof,Proof,Beweis
|
||||
proof,proof,Beweis
|
||||
Proof*,Proof*,Beweis*
|
||||
proof*,proof*,Beweis*
|
||||
Proof of,Proof of,Beweis von
|
||||
proof of,proof of,Beweis von
|
||||
Proof* of,Proof* of,Beweis* von
|
||||
proof* of,proof* of,Beweis* von
|
||||
Continuation of proof,Continuation of proof,Fortsetzung des Beweises
|
||||
continuation of proof,continuation of proof,Fortsetzung des Beweises
|
||||
Continuation of proof of,Continuation of proof of,Fortsetzung des Beweises zu
|
||||
continuation of proof of,continuation of proof of,Fortsetzung des Beweises zu
|
||||
Continuation of proof*,Continuation of proof*,Fortsetzung des Beweises*
|
||||
continuation of proof*,continuation of proof*,Fortsetzung des Beweises*
|
||||
Continuation of proof* of,Continuation of proof* of,Fortsetzung des Beweises* zu
|
||||
continuation of proof* of,continuation of proof* of,Fortsetzung des Beweises* zu
|
||||
Subproof,Subproof,Unterbeweis
|
||||
subproof,subproof,Unterbeweis
|
||||
Subproof*,Subproof*,Unterbeweis*
|
||||
subproof*,subproof*,Unterbeweis*
|
|
@ -1,240 +0,0 @@
|
|||
__HEADER__(Automatic references to theorems in proofs. Claim counters within proofs)
|
||||
|
||||
\ExplSyntaxOn
|
||||
|
||||
\RequirePackage{amssymb}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{xparse}
|
||||
\RequirePackage{refcount}
|
||||
\RequirePackage{translator}
|
||||
\RequirePackage{mkessler-subproof} % TODO: let PyTeX format the mkessler- prefix
|
||||
|
||||
|
||||
%%%% Hook management
|
||||
|
||||
\cs_new:Npn__PACKAGE_MACRO__(autoref:n)
|
||||
{
|
||||
\ref
|
||||
}
|
||||
|
||||
\AddToHook{package/hyperref/after}
|
||||
{
|
||||
\cs_set:Npn__PACKAGE_MACRO__(autoref:n)
|
||||
{
|
||||
\autoref
|
||||
}
|
||||
}
|
||||
|
||||
%%% Saving old definitions
|
||||
|
||||
\cs_new_eq:NN __PACKAGE_MACRO__(saved_proof:w) \proof
|
||||
\cs_new_eq:NN __PACKAGE_MACRO__(saved_endproof:) \endproof
|
||||
\cs_new_eq:NN __PACKAGE_MACRO__(saved_subproof:n) \rawsubproof
|
||||
\cs_new_eq:NN __PACKAGE_MACRO__(saved_endsubproof:) \rawendsubproof
|
||||
|
||||
%%% Internal variables
|
||||
|
||||
\int_new:N __PACKAGE_MACRO__(proofdepth_int)
|
||||
\seq_new:N __PACKAGE_MACRO__(nested_claim_counter_values_seq)
|
||||
\prop_new:N __PACKAGE_MACRO__(refproof_claim_counters_prop)
|
||||
|
||||
\cs_generate_variant:Nn \seq_push:Nn { N x }
|
||||
|
||||
%%% Language translations
|
||||
|
||||
\usedictionary{translator-proof-dictionary}
|
||||
|
||||
%%%Now, we internally got a proof and a subproof environment
|
||||
%%%Make them available as 'old' variants, with their defautl behaviour
|
||||
\NewDocumentEnvironment{oldproof} { }
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_proof:w)
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_endproof:)
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{oldsubproof} { o }
|
||||
{
|
||||
\IfValueTF { #1 }
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_subproof:n) { #1 }
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_subproof:n) { \translate { Subproof } }
|
||||
}
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_endsubproof:)
|
||||
}
|
||||
|
||||
%%% Main implementation
|
||||
|
||||
%Introduce claim environment
|
||||
\newtheorem{claim}{\translate{Claim}}
|
||||
\newtheorem*{claim*}{\translate{Claim}}
|
||||
\AtBeginDocument{\def\claimautorefname{\translate{Claim}}}
|
||||
|
||||
|
||||
\cs_new:Nn __PACKAGE_MACRO__(enter_proof:)
|
||||
{
|
||||
\int_gincr:N __PACKAGE_MACRO__(proofdepth_int)
|
||||
\seq_gpush:Nx __PACKAGE_MACRO__(nested_claim_counter_values_seq)
|
||||
{
|
||||
\arabic { claim }
|
||||
}
|
||||
\group_begin:
|
||||
}
|
||||
|
||||
\cs_new:Nn __PACKAGE_MACRO__(leave_proof:)
|
||||
{
|
||||
\group_end:
|
||||
\seq_gpop:NN __PACKAGE_MACRO__(nested_claim_counter_values_seq) \l_tmpa_tl
|
||||
\setcounter { claim } { \tl_use:N \l_tmpa_tl }
|
||||
\int_gdecr:N __PACKAGE_MACRO__(proofdepth_int)
|
||||
}
|
||||
|
||||
|
||||
% Usage:
|
||||
% #1 = \BooleanTrue or \BooleanFalse indicating presence of star
|
||||
% #2 = star version of translation
|
||||
% #3 = nonstar version of translation
|
||||
\cs_new:Nn __PACKAGE_MACRO__(set_proof_prefix:nnn)
|
||||
{
|
||||
\IfBooleanTF { #1 }
|
||||
{
|
||||
\cs_set:Nn __PACKAGE_MACRO__(proof_prefix:)
|
||||
{
|
||||
\translate { #2 }
|
||||
}
|
||||
}
|
||||
{
|
||||
\cs_set:Nn __PACKAGE_MACRO__(proof_prefix:)
|
||||
{
|
||||
\translate { #3 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\cs_new:Nn __PACKAGE_MACRO__(proof_comment:n)
|
||||
{
|
||||
\IfValueT { #1 }
|
||||
{
|
||||
\c_space_tl ( #1 )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
\NewDocumentEnvironment{refproof}{s m !o}
|
||||
{
|
||||
__PACKAGE_MACRO__(enter_proof:)
|
||||
|
||||
\prop_get:NnN
|
||||
__PACKAGE_MACRO__(refproof_claim_counters_prop)
|
||||
{ #2 }
|
||||
\l_tmpa_tl
|
||||
|
||||
\quark_if_no_value:NTF \l_tmpa_tl
|
||||
{
|
||||
\setcounter { claim } { 0 }
|
||||
__PACKAGE_MACRO__(set_proof_prefix:nnn) { #1 }
|
||||
{ Proof* ~ of }
|
||||
{ Proof ~ of }
|
||||
}
|
||||
{
|
||||
\setcounter { claim } { \tl_use:N \l_tmpa_tl }
|
||||
__PACKAGE_MACRO__(set_proof_prefix:nnn) { #1 }
|
||||
{ Continuation ~ of ~ proof* ~ of }
|
||||
{ Continuation ~ of ~ proof ~ of }
|
||||
}
|
||||
% Set up counter number printing as subindexed by numbering of the reference
|
||||
\renewcommand \theclaim
|
||||
{
|
||||
\getrefnumber { #2 } . \arabic { claim }
|
||||
}
|
||||
__PACKAGE_MACRO__(saved_proof:w)
|
||||
[
|
||||
__PACKAGE_MACRO__(proof_prefix:)
|
||||
\c_space_tl
|
||||
__PACKAGE_MACRO__(autoref:n) { #2 }
|
||||
__PACKAGE_MACRO__(proof_comment:n) { #3 }
|
||||
]
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_endproof:)
|
||||
\prop_gput:Nnx __PACKAGE_MACRO__(refproof_claim_counters_prop)
|
||||
{ #2 }
|
||||
{
|
||||
\value{claim}
|
||||
}
|
||||
__PACKAGE_MACRO__(leave_proof:)
|
||||
}
|
||||
|
||||
%%% A 'smart' proof environment
|
||||
\AtBeginDocument{
|
||||
\RenewDocumentEnvironment{proof}{!s !o}
|
||||
{
|
||||
__PACKAGE_MACRO__(enter_proof:)
|
||||
|
||||
\setcounter{claim}{0}
|
||||
|
||||
\renewcommand \theclaim
|
||||
{
|
||||
\arabic { claim }
|
||||
}
|
||||
\int_compare:nNnTF __PACKAGE_MACRO__(proofdepth_int) > 1
|
||||
{
|
||||
__PACKAGE_MACRO__(set_proof_prefix:nnn) { #1 }
|
||||
{ Subproof* }
|
||||
{ Subproof }
|
||||
__PACKAGE_MACRO__(saved_subproof:n)
|
||||
{
|
||||
__PACKAGE_MACRO__(proof_prefix:)
|
||||
__PACKAGE_MACRO__(proof_comment:n) { #2 }
|
||||
}
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(set_proof_prefix:nnn) { #1 }
|
||||
{ Proof* }
|
||||
{ Proof }
|
||||
__PACKAGE_MACRO__(saved_proof:w)
|
||||
[
|
||||
__PACKAGE_MACRO__(proof_prefix:)
|
||||
__PACKAGE_MACRO__(proof_comment:n) { #2 }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_endproof:)
|
||||
__PACKAGE_MACRO__(leave_proof:)
|
||||
}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{subproof}{!s !o}
|
||||
{
|
||||
__PACKAGE_MACRO__(enter_proof:)
|
||||
|
||||
\setcounter { claim } { 0 }
|
||||
\renewcommand \theclaim
|
||||
{
|
||||
\arabic { claim }
|
||||
}
|
||||
|
||||
__PACKAGE_MACRO__(set_proof_prefix:nnn) { #1 }
|
||||
{ Subproof* }
|
||||
{ Subproof }
|
||||
__PACKAGE_MACRO__(saved_subproof:n)
|
||||
{
|
||||
__PACKAGE_MACRO__(proof_prefix:)
|
||||
__PACKAGE_MACRO__(proof_comment:n) { #2 }
|
||||
}
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved_endsubproof:)
|
||||
__PACKAGE_MACRO__(leave_proof:)
|
||||
}
|
||||
|
||||
\DeclareDocumentCommand { \proofdepth } { }
|
||||
{
|
||||
\int_to_arabic:n __PACKAGE_MACRO__(proofdepth_int)
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
@default_files = ("thmstyle.dtx");
|
||||
$makeindex = "makeindex -s gind.ist %O -o %D %S";
|
||||
$clean_ext .= ' glo';
|
||||
$clean_ext .= ' hd';
|
||||
$clean_full_ext .= ' sty';
|
||||
$emulate_aux = 1;
|
|
@ -1,412 +0,0 @@
|
|||
% \iffalse meta-comment
|
||||
%<*internal>
|
||||
\begingroup
|
||||
\input docstrip.tex
|
||||
\keepsilent
|
||||
\usedir{tex/latex/mkessler/thmstyle}
|
||||
\askforoverwritefalse
|
||||
\generate{\file{thmstyle.sty}{\from{thmstyle.dtx}{package}}}
|
||||
\def\tmpa{plain}
|
||||
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
|
||||
\endgroup
|
||||
%</internal>
|
||||
%
|
||||
%% File: thmstyle.dtx
|
||||
%
|
||||
% Copyright (C) 2022 Maximilian Keßler
|
||||
%
|
||||
% It may be distributed and/or modified under the conditions of the
|
||||
% LaTeX Project Public License (LPPL), either version 1.3c of this
|
||||
% license or (at your option) any later version. The latest version
|
||||
% of this license is in the file
|
||||
%
|
||||
% https://www.latex-project.org/lppl.txt
|
||||
%
|
||||
% -----------------------------------------------------------------------
|
||||
%<package>\ProvidesExplPackage{thmstyle}{2022/01/17}{0.0.1}{Styles for thmtools theorems.}
|
||||
%
|
||||
%<*driver>
|
||||
\documentclass[full,kernel]{l3doc}
|
||||
\begin{document}
|
||||
\DocInput{\jobname.dtx}
|
||||
\end{document}
|
||||
%</driver>
|
||||
% \fi
|
||||
%
|
||||
% \title{^^A
|
||||
% The \pkg{thmstyle} package^^A
|
||||
% }
|
||||
%
|
||||
% \author{^^A
|
||||
% Maximilian Ke\ss ler
|
||||
% }
|
||||
%
|
||||
% \date{Released 2022-01-12}
|
||||
%
|
||||
% \maketitle
|
||||
%
|
||||
% \begin{documentation}
|
||||
%
|
||||
% \begin{abstract}
|
||||
% Just a convenience package that provides easy-to-use interface
|
||||
% for creating \pkg{mdframed} and \pkg{thmtools} styles.
|
||||
% Also provides some defaults.
|
||||
% \end{abstract}
|
||||
%
|
||||
% \section{User macros}
|
||||
%
|
||||
% \begin{function}{\DeclareFancyMdfStyle}
|
||||
% \begin{syntax}
|
||||
% \cs{DeclareFancyMdfStyle}\oarg{background color}\marg{left margin color}\oarg{name}
|
||||
% \end{syntax}
|
||||
% Makes \meta{name} a \pkg{mdframed} style with given background and
|
||||
% left margin color.
|
||||
%
|
||||
% If \meta{name} is not given, it is defaulted to
|
||||
% \enquote{md\meta{left margin color}margin}
|
||||
% or
|
||||
% \enquote{md\meta{left margin color}and\meta{background color}fill}
|
||||
% corresponding to whether the \meta{background color} has been given.
|
||||
% \end{function}
|
||||
%
|
||||
% \begin{function}{\DeclareFancyThmStyle}
|
||||
% \begin{syntax}
|
||||
% \cs{DeclareFancyThmStyle}\oarg{background color}\marg{left margin color}\oarg{name}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Same as \cs{DeclareFancyMdfStyle}, but directly declares a
|
||||
% style for \pkg{thmtools}.
|
||||
% The naming behaves the same except \texttt{md} is replaced with \texttt{thm}
|
||||
% \end{function}
|
||||
%
|
||||
% \section{Default styles}
|
||||
%
|
||||
%
|
||||
% The package has the option to provide some default styles.
|
||||
% These can be loaded with the |default styles| (the space is optional)
|
||||
% option, when loading the package.
|
||||
%
|
||||
%
|
||||
% \subsection{colors}
|
||||
%
|
||||
% \begin{variable}{gold}
|
||||
%
|
||||
% Golden color.
|
||||
%
|
||||
%
|
||||
% \end{variable}
|
||||
%
|
||||
% We use the \pkg{xcolor package}.
|
||||
%
|
||||
% You can load this package with the \texttt{default styles} option.
|
||||
% This will make the \pkg{thmtools} styles available given in
|
||||
% \autoref{tab:default-styles}.
|
||||
%
|
||||
% \begin{table}[htpb]
|
||||
% \centering
|
||||
% \begin{tabular}{c | c | c}
|
||||
% Name & Left margin color & Background color \\
|
||||
% \hline
|
||||
% thmredmarginandfill & red & red!8 \\
|
||||
% thmorangemarginandfill & orange & orange!10 \\
|
||||
% thmbluemarginandfill & blue & blue!7 \\
|
||||
% thmgreenmargin & green!70!black & none \\
|
||||
% thmgoldmargin & gold & none \\
|
||||
% thmyellowmargin & yellow!80!orange & none \\
|
||||
% thmgraymargin & gray & none \\
|
||||
% thmvioletmarginandfill & violet & violet!7 \\
|
||||
% thmvioletmargin & violet & none \\
|
||||
% thmredmarginandbuliefill & red & blue!7 \\
|
||||
% thmredmargin & red & none \\
|
||||
% thmorangemarginbluefill & orange & blue!7 \\
|
||||
% thmblackmargindandfill & black & violet!20!gray!20 \\
|
||||
% thmblackmargin & black & none \\
|
||||
% \end{tabular}
|
||||
% \caption{Default styles provided by \pkg{thmstyle}}
|
||||
% \label{tab:default-styles}
|
||||
% \end{table}
|
||||
%
|
||||
% \end{documentation}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{implementation}
|
||||
%
|
||||
% \section{\pkg{thmstyle} implementation}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
%<*package>
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
%<@@=thmstyle>
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Dependencies}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{thmtools}
|
||||
\RequirePackage{mdframed}
|
||||
\RequirePackage{xcolor}
|
||||
\RequirePackage{l3keys2e}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% \subsection{Initialization}
|
||||
% \begin{variable}{\g_@@_default_styles_bool}
|
||||
%
|
||||
% Indicates whether the package will provide default styles.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\bool_new:N \g_@@_default_styles_bool
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{variable}{gold}
|
||||
% New color
|
||||
% \begin{macrocode}
|
||||
\definecolor{gold}{RGB}{218,165,32}
|
||||
% \end{macrocode}
|
||||
% \end{variable}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Package options}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\keys_define:nn { thmstyle }
|
||||
{
|
||||
default styles .bool_set:N = \g_@@_default_styles_bool,
|
||||
default styles .default:n = { true },
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\ProcessKeysOptions { thmstyle }
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Private Wrappers}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_mdframed_define_style:nn, \@@_mdframed_define_style:nx}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_mdframed_define_style:nn}\marg{key=value list}\marg{style}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_mdframed_define_style:nn #1 #2
|
||||
{
|
||||
\mdfdefinestyle{#2}{#1}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_thmtools_declare_style:nn, \@@_thmtools_declare_style:xx}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_thmtools_declare_style:nn}\marg{key=value list}\marg{style}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_thmtools_declare_style:nn #1 #2
|
||||
{
|
||||
\declaretheoremstyle[#1]{#2}
|
||||
}
|
||||
\cs_generate_variant:Nn \@@_thmtools_declare_style:nn { x x }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \subsection{Generation of styles}
|
||||
%
|
||||
% \begin{macro}{\thmstyle_declare_mdf_style:nnn}
|
||||
% \begin{syntax}
|
||||
% \cs{thmstyle_declare_mdf_style:nnn}\marg{style}\marg{margin color}\marg{background color}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \thmstyle_declare_mdf_style:nnn #1 #2 #3
|
||||
{
|
||||
\@@_mdframed_define_style:nn
|
||||
{
|
||||
linecolor = #2,
|
||||
linewidth = 2pt,
|
||||
leftmargin = 0pt,
|
||||
rightmargin = 0pt,
|
||||
rightline = false,
|
||||
topline = false,
|
||||
bottomline = false,
|
||||
backgroundcolor = #3,
|
||||
skipabove = 0.7\baselineskip,
|
||||
skipbelow = 0pt,
|
||||
innerrightmargin = 10pt,
|
||||
innerbottommargin = 5pt
|
||||
}
|
||||
{
|
||||
#1
|
||||
}
|
||||
}
|
||||
\cs_generate_variant:Nn \thmstyle_declare_mdf_style:nnn { x n x }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\DeclareFancyMdfStyle}
|
||||
% \begin{syntax}
|
||||
% \cs{DeclareFancyMdfStyle}\oarg{background color}\marg{line color}\oarg{style}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\NewDocumentCommand { \DeclareFancyMdfStyle } { o m o }
|
||||
{
|
||||
\thmstyle_declare_mdf_style:xnx
|
||||
{
|
||||
\IfValueTF { #3 }
|
||||
{
|
||||
#3
|
||||
}
|
||||
{
|
||||
md #2 margin
|
||||
\IfValueT { #1 }
|
||||
{
|
||||
and #1 fill
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
#2
|
||||
}
|
||||
{
|
||||
\IfValueTF { #1 }
|
||||
{
|
||||
#1
|
||||
}
|
||||
{
|
||||
white
|
||||
}
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\DeclareFancyThmStyle}
|
||||
% \begin{syntax}
|
||||
% \cs{DeclareFancyThmStyle}\oarg{background color}\marg{line color}\oarg{style}
|
||||
% \end{syntax}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\NewDocumentCommand { \DeclareFancyThmStyle } { o m o }
|
||||
{
|
||||
\DeclareFancyMdfStyle [ #1 ] { #2 }
|
||||
\@@_thmtools_declare_style:xx
|
||||
{
|
||||
mdframed =
|
||||
{
|
||||
style = md #2 margin \IfValueT { #1 } { and #1 fill }
|
||||
},
|
||||
postheadspace = { 0.3em },
|
||||
notefont = \noexpand\mdseries,
|
||||
}
|
||||
{
|
||||
\IfValueTF { #3 }
|
||||
{ #3 }
|
||||
{
|
||||
thm #2 margin
|
||||
\IfBooleanT { #1 }
|
||||
{
|
||||
and #1 fill
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \subsection{Default styles}
|
||||
%
|
||||
%
|
||||
% Here, we provide the default styles:
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\bool_if:NT \g_@@_default_styles_bool
|
||||
{
|
||||
\DeclareFancyThmStyle[red!8]{red}[thmredmarginandfill]
|
||||
\DeclareFancyThmStyle[orange!10]{orange}[thmorangemarginandfill]
|
||||
\DeclareFancyThmStyle[blue!7]{blue}[thmbluemarginandfill]
|
||||
\DeclareFancyThmStyle{green!70!black}[thmgreenmargin]
|
||||
\DeclareFancyThmStyle[green!10]{green!70!black}[thmgreenmarginandfill]
|
||||
\DeclareFancyThmStyle{gold}[thmgoldmargin]
|
||||
\DeclareFancyThmStyle{yellow!80!orange}[thmyellowmargin]
|
||||
\DeclareFancyThmStyle{gray}[thmgraymargin]
|
||||
\DeclareFancyThmStyle[violet!7]{violet}[thmvioletmarginandfill]
|
||||
\DeclareFancyThmStyle{violet}[thmvioletmargin]
|
||||
\DeclareFancyThmStyle[blue!7]{red}[thmredmarginbluefill]
|
||||
\DeclareFancyThmStyle{red}[thmredmargin]
|
||||
\DeclareFancyThmStyle[blue!7]{orange}[thmorangemarginbluefill]
|
||||
\DeclareFancyThmStyle[violet!20!gray!20]{black}[thmblackmarginandfill]
|
||||
\DeclareFancyThmStyle{black}[thmblackmargin]
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
%</package>
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \end{implementation}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \newpage
|
||||
% \PrintIndex
|
|
@ -1,77 +0,0 @@
|
|||
__HEADER__(Write up university exercise sheets)
|
||||
|
||||
% This is meant as a layouting class for easily writing up exercise sheets.
|
||||
% Use \course \sheetnumber and \author to set metadata of the document
|
||||
% Use option [largename] if the author(s) is/are too long and collide in the fancy header
|
||||
% Use option [german|ngerman|english] to control language appearance
|
||||
|
||||
\RequirePackage{scrbase}
|
||||
|
||||
__LANGUAGE_OPTIONS__
|
||||
|
||||
__NEW_IF__(largename,false)
|
||||
\DeclareOption{large-name}{__SET_IF__(largename,true)}
|
||||
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
\LoadClass{scrartcl}
|
||||
|
||||
\KOMAoption{fontsize}{12pt}
|
||||
\KOMAoption{parskip}{half-}
|
||||
\KOMAoption{DIV}{12}
|
||||
\KOMAoption{headings}{normal}
|
||||
|
||||
\RequirePackage{scrlayer-scrpage}
|
||||
\KOMAoption{headsepline}{:}
|
||||
|
||||
\def\@course{__ERROR__(No \noexpand\course given){Use \noexpand\course{<coursename>} to set the course.}}%
|
||||
\DeclareRobustCommand*{\course}[1]{\gdef\@course{#1}}
|
||||
\def\@sheetnumber{__ERROR__(No \noexpand\sheetnumber given){Use \noexpand\sheetnumber{<num>} to set the current sheetnumber.}}%
|
||||
\DeclareRobustCommand*{\sheetnumber}[1]{\gdef\@sheetnumber{__IF__(english) Sheet #1 \else Übungsblatt #1\fi}}
|
||||
|
||||
\renewcommand*{\@date}{\today}
|
||||
|
||||
\renewcommand*{\maketitle}{
|
||||
\thispagestyle{plain}
|
||||
{\makebox[0pt][l]{\usekomafont{myauthor}\@author}\hfill\makebox[0pt][r]{\usekomafont{date}\@date}\par}
|
||||
\vspace{0.5em}
|
||||
{\centering\usekomafont{title}\@course\par}
|
||||
{\centering\usekomafont{subtitle}\@sheetnumber \par}
|
||||
\vspace{2em}
|
||||
\hrule
|
||||
\addvspace{2em}
|
||||
}
|
||||
|
||||
\setkomafont{title}{\LARGE\bfseries}
|
||||
\setkomafont{subtitle}{}
|
||||
\newkomafont{myauthor}{}
|
||||
\setkomafont{date}{}
|
||||
\newkomafont{headtitle}{\itshape}
|
||||
\setkomafont{pageheadfoot}{\footnotesize}
|
||||
\setkomafont{descriptionlabel}{\bfseries}
|
||||
\setkomafont{pagenumber}{\normalsize}
|
||||
|
||||
\pagestyle{scrheadings}
|
||||
\ihead[]{__IF__(largename) \usekomafont{myauthor}\@author \\ \@course\;- \@sheetnumber\else \usekomafont{myauthor}\@author\fi }
|
||||
\chead[]{__IF__(largename) \else \usekomafont{subtitle}\@course\;- \@sheetnumber\fi}
|
||||
\ohead[]{\usekomafont{date}\@date}
|
||||
|
||||
% Page layout
|
||||
\setlength{\parindent}{0pt}
|
||||
|
||||
\RequirePackage[a4paper, left=2cm, right=2cm, top=3cm, bottom=3cm, head=15.0pt, headsep=10pt]{geometry}
|
||||
|
||||
\setlength{\skip\footins}{15pt}
|
||||
|
||||
\setlength{\abovecaptionskip}{0cm}
|
||||
\setlength{\belowcaptionskip}{0cm}
|
||||
|
||||
%Für Zeilenabstand 1,5
|
||||
\RequirePackage[onehalfspacing]{setspace}
|
||||
\RequirePackage[super]{nth}
|
||||
|
||||
\newcommand\nr[1]{
|
||||
\section*{__IF__(english)\nth{#1} exercise\else #1. Aufgabe\fi}
|
||||
\setcounter{equation}{0}
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
__HEADER__(Declaring of math symbols with automatic indexing)
|
||||
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\RequirePackage{imakeidx}
|
||||
}
|
||||
\RequirePackage{xparse}
|
||||
|
||||
% Keys used for declaring symbols
|
||||
\keys_define:nn { symbol }
|
||||
{
|
||||
operator .tl_set:N = \l_symbol_operator_tl,
|
||||
operator .default:n = \use:n,
|
||||
formula .tl_set:N = \l_symbol_formula_tl,
|
||||
formula .default:n = \c_novalue_tl,
|
||||
ordered .tl_set:N = \l_symbol_ordered_tl,
|
||||
ordered .default:n = \c_novalue_tl,
|
||||
description .tl_set:N = \l_symbol_description_tl,
|
||||
description .default:n = \c_novalue_tl,
|
||||
group .tl_set:N = \l_symbol_group_tl,
|
||||
group .default:n = \c_novalue_tl,
|
||||
defaultargs .tl_set:N = \l_symbol_defaultargs_tl,
|
||||
defaultargs .default:n = \c_novalue_tl
|
||||
}
|
||||
|
||||
% Core macro not to be used publicly directly. Usage:
|
||||
% #1 = indexname / group
|
||||
% #2 = symbolname,
|
||||
% #3 = description
|
||||
% #4 = operator to apply (one argument) - can be \use:n for identity
|
||||
% #5 = substitution when called
|
||||
% #6 = default appendices to macro in index (e.g. _R)
|
||||
% #7 = ordering in index
|
||||
\cs_new_protected:Nn\symbol_define:nnnnnnn
|
||||
{
|
||||
\bool_new:c { used_#2 }
|
||||
\cs_new_protected:cn { symbol_#2: }
|
||||
{
|
||||
\bool_if:cF { used_#2 }
|
||||
{
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\index[#1]
|
||||
{
|
||||
#7
|
||||
@
|
||||
$#4{#5}#6$
|
||||
#3
|
||||
}
|
||||
}
|
||||
\bool_gset_true:c { used_#2 }
|
||||
}
|
||||
#4{#5}
|
||||
}
|
||||
\expandafter\protected\expandafter\gdef\csname#2\endcsname
|
||||
{
|
||||
\use:c { symbol_#2: }
|
||||
}
|
||||
}
|
||||
\cs_generate_variant:Nn\symbol_define:nnnnnnn { V n V V V V V}
|
||||
|
||||
|
||||
% Main package interface
|
||||
\NewDocumentCommand{\DeclareSymbol}{ O{} m}
|
||||
{
|
||||
\keys_set:nn{ symbol }
|
||||
{
|
||||
operator,
|
||||
formula,
|
||||
ordered,
|
||||
description,
|
||||
group,
|
||||
defaultargs
|
||||
}
|
||||
\keys_set:nn{ symbol }{#1}
|
||||
\tl_if_eq:NnTF\l_symbol_description_tl{\c_novalue_tl}
|
||||
{
|
||||
\tl_set:Nn\l_symbol_description_tl { \c_empty_tl }
|
||||
}
|
||||
{
|
||||
\tl_put_left:Nn\l_symbol_description_tl { ,\c_space_tl }
|
||||
}
|
||||
\tl_if_eq:NnT\l_symbol_formula_tl{\c_novalue_tl}
|
||||
{
|
||||
\tl_set:Nn\l_symbol_formula_tl {#2}
|
||||
}
|
||||
\tl_if_eq:NnT\l_symbol_ordered_tl{\c_novalue_tl}
|
||||
{
|
||||
\tl_set:Nn\l_symbol_ordered_tl {#2}
|
||||
}
|
||||
\tl_if_eq:NnT\l_symbol_defaultargs_tl{\c_novalue_tl}
|
||||
{
|
||||
\tl_clear:N\l_symbol_defaultargs_tl
|
||||
}
|
||||
\symbol_define:VnVVVVV
|
||||
\l_symbol_group_tl
|
||||
{
|
||||
#2
|
||||
}
|
||||
\l_symbol_description_tl
|
||||
\l_symbol_operator_tl
|
||||
\l_symbol_formula_tl
|
||||
\l_symbol_defaultargs_tl
|
||||
\l_symbol_ordered_tl
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
__HEADER__(Package for emphasizing vocabulary)
|
||||
%%Provides a \vocab<[name in index]>{vocabulary} command to print vocabulary in bold blue and automatically index it.
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
__LANGUAGE_OPTIONS_X__
|
||||
__NEW_IF__(index,false)
|
||||
|
||||
\DeclareOptionX{index}{__SET_IF__(index,true)}
|
||||
\DeclareOptionX{noindex}{__SET_IF__(index,false)}
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
%%%%Management of vocabulary and corresponding index
|
||||
\RequirePackage{xparse}
|
||||
\RequirePackage{xcolor}
|
||||
__IF__(index)
|
||||
\RequirePackage{imakeidx}
|
||||
\makeindex[name=vocabindex, columns=2, title=__IF__(english) Index\else Stichwortverzeichnis\fi, intoc]
|
||||
|
||||
%Emphasize \vocabulary
|
||||
\RequirePackage{expl3}
|
||||
\ExplSyntaxOn
|
||||
\NewDocumentCommand{\vocab}{O{} m}{%
|
||||
\textbf{\color{blue} #2}%
|
||||
\if\relax\detokenize{#1}\relax%
|
||||
\index[vocabindex]{\text_titlecase_first:n{#2}} % true branch: #1 was empty
|
||||
\else%
|
||||
\index[vocabindex]{#1} % false branch: #1 was supplied
|
||||
\fi%
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
\newcommand\printvocabindex{%
|
||||
\printindex[vocabindex]%
|
||||
}
|
||||
\NewDocumentCommand{\PrintVocabIndex}{ }
|
||||
{%
|
||||
\printindex[vocabindex]%
|
||||
}
|
||||
\else
|
||||
\NewDocumentCommand{\vocab}{O{} m }{%
|
||||
\textbf{\color{blue} #2}%
|
||||
}%
|
||||
\fi
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
__HEADER__(Package for managing different lectures within a document)
|
||||
% The core of the lecture command this package provides has been taken from the preamble in
|
||||
% https://github.com/gillescastel/university-setup
|
||||
% which is licensed under
|
||||
|
||||
%MIT License
|
||||
|
||||
%Copyright (c) 2019 Gilles Castel
|
||||
|
||||
%Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
%of this software and associated documentation files (the "Software"), to deal
|
||||
%in the Software without restriction, including without limitation the rights
|
||||
%to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
%copies of the Software, and to permit persons to whom the Software is
|
||||
%furnished to do so, subject to the following conditions:
|
||||
%
|
||||
%The above copyright notice and this permission notice shall be included in all
|
||||
%copies or substantial portions of the Software.
|
||||
%
|
||||
%THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
%IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
%FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
%AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
%LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
%OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
%SOFTWARE.
|
||||
% This package extends the lecture command to make a summary of lectures at the beginning of a document, and has thus modified this command.
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
__LANGUAGE_OPTIONS_X__
|
||||
|
||||
__NEW_IF__(fancyhead,false)
|
||||
\DeclareOptionX{fancyhead}{__SET_IF__(fancyhead,true)}
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
%Tocloft package for making a list of lectures
|
||||
\RequirePackage{tocloft}
|
||||
%Store name of the summary in a command to use it multiple times
|
||||
\newcommand__PACKAGE_MACRO__(listlecturename){__IF__(english) Summary of lectures\else Übersicht der Vorlesungen\fi}
|
||||
\newlistof{lecture}{lec}{__PACKAGE_MACRO__(listlecturename)} % Declare new list of lectures
|
||||
%Settings how to print the summary
|
||||
\renewcommand{\cftdot}{}
|
||||
\renewcommand\cftlecturefont{\normalfont\bfseries}
|
||||
\renewcommand\cftlecturepagefont{\normalfont\bfseries}
|
||||
\renewcommand\cftlectitlefont{\Large\bfseries}
|
||||
\renewcommand\cftbeforelectureskip{1em}
|
||||
|
||||
%Command to parse the date
|
||||
\RequirePackage{xifthen}
|
||||
\def\testdateparts#1{\dateparts#1\relax}
|
||||
\def\dateparts#1 #2 #3 #4 #5\relax{
|
||||
\marginpar{\small\textsf{\mbox{#1 #2 #3 #5}}}
|
||||
}
|
||||
|
||||
%Define the main lecture command to start a new lecture
|
||||
\def__PACKAGE_MACRO__(lectureprefix){__IF__(english) Lecture\else Vorlesung\fi}
|
||||
\def\@lecture{}%
|
||||
|
||||
\RequirePackage{xparse}
|
||||
|
||||
% \lecture[keywords]{date}[number]{title}[margin note]
|
||||
\NewDocumentCommand{\lecture}{ O{} m O{} m O{}}{
|
||||
\ifthenelse{\isempty{#3}}{\refstepcounter{lecture}}{\setcounter{lecture}{#3}}
|
||||
%Store lecture name in the macro \@lecture
|
||||
\ifthenelse{\isempty{#4}}{%
|
||||
\def\@lecture{__PACKAGE_MACRO__(lectureprefix)\, \thelecture}%
|
||||
}{%
|
||||
\def\@lecture{__PACKAGE_MACRO__(lectureprefix)\, \thelecture: #4}%
|
||||
}%
|
||||
\marginpar{\small\textsf{\parbox{10em}{__PACKAGE_MACRO__(lectureprefix)\, \thelecture \\#2}}}
|
||||
%Add lecture as an entry to the lectures file
|
||||
\addcontentsline{lec}{lecture}{__PACKAGE_MACRO__(lectureprefix)\,\thelecture\,(#2)}
|
||||
%If key words are provided, add the key words of the lecture below the entry
|
||||
\ifthenelse{\isempty{#1}}{}{\addtocontents{lec}{\smallskip\hspace{1.5em}\protect\parbox{\dimexpr\textwidth-\@pnumwidth - 2em}{#1}}}
|
||||
}
|
||||
|
||||
%Provide a command to show the summary of lectures
|
||||
\DeclareRobustCommand*{\summaryoflectures}{
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{section}{__PACKAGE_MACRO__(listlecturename)}
|
||||
\thispagestyle{plain}
|
||||
\listoflecture
|
||||
}
|
||||
|
||||
|
||||
__IF__(fancyhead)
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
|
||||
% LE: left even
|
||||
% RO: right odd
|
||||
% CE, CO: center even, center odd
|
||||
|
||||
\fancyhead[RO,LE]{\@lecture} % Right odd, Left even
|
||||
\fancyhead[RE,LO]{} % Right even, Left odd
|
||||
|
||||
%%No fancy headers in the appendix (as there is no lecture)
|
||||
\let__PACKAGE_MACRO__(stored@appendix)\appendix
|
||||
\renewcommand\appendix{
|
||||
__PACKAGE_MACRO__(stored@appendix)
|
||||
\fancyhead[RO,LE]{}
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
}
|
||||
\fi
|
|
@ -1,163 +0,0 @@
|
|||
__HEADER__(Write up lecture notes as script)
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
__LANGUAGE_OPTIONS_X__
|
||||
|
||||
__NEW_IF__(showversion,true)
|
||||
\DeclareOptionX{show version}{__SET_IF__(showversion,true)}
|
||||
\DeclareOptionX{hideversion}{__SET_IF__(showversion,false)}
|
||||
|
||||
__NEW_IF__(fancyfoot,false)
|
||||
\DeclareOptionX{fancyfoot}{__SET_IF__(fancyfoot,true)}
|
||||
|
||||
|
||||
__NEW_IF__(gitversion,false)
|
||||
\DeclareOptionX{git}{__SET_IF__(gitversion,true)}
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
\RequirePackage{xifthen}
|
||||
|
||||
%%%%Define command to set metainformation of document
|
||||
%Set the course
|
||||
\def\@course{__ERROR__(No \noexpand\course given){See documentation for details}}%
|
||||
\DeclareRobustCommand*{\course}[1]{\gdef\@course{#1}}
|
||||
|
||||
\def\@lecturer{__ERROR__(No \noexpand\lecturer given){See documentation for details}}%
|
||||
\def\@lecturertitle{}
|
||||
\DeclareRobustCommand*{\lecturer}[2][]{
|
||||
\gdef\@lecturer{#2}
|
||||
\gdef\@lecturertitle{__IF__(english) Lecturer\else\ifthenelse{\isempty{#1}}{Dozent}{Dozentin}\fi}{}
|
||||
}
|
||||
|
||||
%Set the assistant
|
||||
__NEW_IF__(printassistant,false)
|
||||
\def\@assistant{}%
|
||||
\def\@assistantitle{}
|
||||
\DeclareRobustCommand*{\assistant}[2][]{
|
||||
__SET_IF__(printassistant,true)
|
||||
\gdef\@assistant{#2}
|
||||
\gdef\@assistanttitle{__IF__(english) Assistant\else\ifthenelse{\isempty{#1}}{Assistent}{Assistentin}\fi}
|
||||
}
|
||||
|
||||
%%%%Load base class article
|
||||
\LoadClass{article}
|
||||
|
||||
__IF__(showversion)
|
||||
__IF__(gitversion)
|
||||
\RequirePackage[dirty={ (local changes have been made!)}]{gitinfo2}
|
||||
\fi
|
||||
\fi
|
||||
|
||||
|
||||
%%%%Title
|
||||
%Define layout of title using course, lecturer, assistant and author, and optionally the current time
|
||||
\RequirePackage{xparse}
|
||||
\RequirePackage{datetime}
|
||||
\renewcommand\@maketitle{%
|
||||
\newpage
|
||||
\null
|
||||
\vskip 2em%
|
||||
\begin{center}%
|
||||
\let \footnote \thanks
|
||||
{\LARGE \@course \par}%
|
||||
\vskip 1.5em%
|
||||
{\large
|
||||
\lineskip .5em%
|
||||
\begin{tabular}[t]{c}%
|
||||
\@lecturertitle \\
|
||||
{\sc \@lecturer} \\
|
||||
\end{tabular}\par
|
||||
__IF__(printassistant)
|
||||
\vskip 1em%
|
||||
\begin{tabular}[t]{c}%
|
||||
\@assistanttitle \\
|
||||
{\sc \@assistant} \\
|
||||
\end{tabular}\par
|
||||
\fi
|
||||
\vskip 1em%
|
||||
\begin{tabular}[t]{c}%
|
||||
__IF__(english) Notes\else Mitschrift\fi \\
|
||||
{\sc \@author} \\
|
||||
\end{tabular}
|
||||
\par}%
|
||||
__IF__(showversion)
|
||||
\vskip 3em%
|
||||
\begin{tabular}[t]{c}%
|
||||
{\small Version} \\
|
||||
__IF__(gitversion)
|
||||
git: \gitFirstTagDescribe\\
|
||||
__IF__(english) compiled\else kompiliert\fi:
|
||||
\fi\today\,\currenttime \\
|
||||
\end{tabular}\par
|
||||
\fi
|
||||
\vskip 4em%
|
||||
\end{center}%
|
||||
\par
|
||||
\vskip 1.5em
|
||||
}
|
||||
|
||||
|
||||
%%%The following is based on the repository
|
||||
% https://github.com/gillescastel/university-setup
|
||||
% but has been modified for own purposes. The original content is distributed under the following license:
|
||||
|
||||
%MIT License
|
||||
|
||||
%Copyright (c) 2019 Gilles Castel
|
||||
|
||||
%Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
%of this software and associated documentation files (the "Software"), to deal
|
||||
%in the Software without restriction, including without limitation the rights
|
||||
%to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
%copies of the Software, and to permit persons to whom the Software is
|
||||
%furnished to do so, subject to the following conditions:
|
||||
%
|
||||
%The above copyright notice and this permission notice shall be included in all
|
||||
%copies or substantial portions of the Software.
|
||||
%
|
||||
%THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
%IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
%FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
%AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
%LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
%OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
%SOFTWARE.
|
||||
|
||||
%%%% These are the fancy headers
|
||||
|
||||
__IF__(fancyfoot)
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
|
||||
% LE: left even
|
||||
% RO: right odd
|
||||
% CE, CO: center even, center odd
|
||||
|
||||
\fancyhead[RO,LE]{} % Right odd, Left even
|
||||
\fancyhead[RE,LO]{} % Right even, Left odd
|
||||
|
||||
\fancyfoot[RO,LE]{\thepage} % Right odd, Left even
|
||||
\fancyfoot[RE,LO]{} % Right even, Left odd
|
||||
\fancyfoot[C]{\leftmark} % Center
|
||||
|
||||
\makeatother
|
||||
|
||||
\fi
|
||||
|
||||
% Fix some stuff
|
||||
% %http://tex.stackexchange.com/questions/76273/multiple-pdfs-with-page-group-included-in-a-single-page-warning
|
||||
\pdfsuppresswarningpagegroup=1
|
||||
|
||||
% Fix some spacing
|
||||
% http://tex.stackexchange.com/questions/22119/how-can-i-change-the-spacing-before-theorems-with-amsthm
|
||||
\def\thm@space@setup{%
|
||||
\thm@preskip=\parskip \thm@postskip=0pt
|
||||
}
|
||||
|
||||
% Don't indent paragraphs, leave some space between them
|
||||
\RequirePackage{parskip}
|
||||
|
||||
% Hide page number when page is empty
|
||||
\RequirePackage{emptypage}
|
|
@ -1,171 +0,0 @@
|
|||
__HEADER__(Definitions of categories with automatic indexing)%% Wrapper commands specific for defining categories
|
||||
|
||||
\RequirePackage{__AUTHOR_ACRONYM__-symbindex}
|
||||
\RequirePackage{translator}
|
||||
\RequirePackage{amsmath}
|
||||
|
||||
\usedictionary{translator-mathematical-categories-dictionary}
|
||||
|
||||
\NewDocumentCommand{\category}{ m }
|
||||
{
|
||||
\operatorname{\textup{\textbf{#1}}}
|
||||
}
|
||||
|
||||
|
||||
\NewDocumentCommand{\DeclareCategory}{ O{} m }
|
||||
{
|
||||
\DeclareSymbol[group = categories, #1]{#2}
|
||||
}
|
||||
|
||||
|
||||
\NewDocumentCommand{\DeclareSimpleCategory}{ o m o}
|
||||
{
|
||||
\IfValueTF{#1}
|
||||
{
|
||||
\IfValueTF{#3}
|
||||
{
|
||||
\DeclareCategory[operator = \category, description = #3, #1]{#2}
|
||||
}
|
||||
{
|
||||
\DeclareCategory[operator = \category, #1]{#2}
|
||||
}
|
||||
}
|
||||
{
|
||||
\IfValueTF{#3}
|
||||
{
|
||||
\DeclareCategory[operator = \category, description = #3]{#2}
|
||||
}
|
||||
{
|
||||
\DeclareCategory[operator = \category]{#2}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
\NewDocumentCommand{\MakeCategoryIndex}{ }
|
||||
{
|
||||
\printindex[categories]
|
||||
}
|
||||
|
||||
\makeindex
|
||||
[
|
||||
name = categories,
|
||||
title = \translate{Index~of~categories}
|
||||
]
|
||||
|
||||
|
||||
%%%% Categories
|
||||
\DeclareSimpleCategory
|
||||
{ Top }
|
||||
[
|
||||
\translate{Top~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ hTop }
|
||||
[
|
||||
\translate{hTop~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ Set }
|
||||
[
|
||||
\translate{Set~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ CHaus }
|
||||
[
|
||||
\translate{CHaus~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ Grp }
|
||||
[
|
||||
\translate{Grp~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ Ab }
|
||||
[
|
||||
\translate{Ab~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ CRing }
|
||||
[
|
||||
\translate{CRing~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ Ring }
|
||||
[
|
||||
\translate{Ring~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
[
|
||||
defaultargs = _k
|
||||
]
|
||||
{ Vect }
|
||||
[
|
||||
\translate{Vect~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ Cat }
|
||||
[
|
||||
\translate{Cat~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
[
|
||||
defaultargs = _R
|
||||
]
|
||||
{ Mod }
|
||||
[
|
||||
\translate{Mod~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
[
|
||||
defaultargs = _k
|
||||
]
|
||||
{ Alg }
|
||||
[
|
||||
\translate{Alg~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ Field }
|
||||
[
|
||||
\translate{Field~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
[
|
||||
defaultargs = _k
|
||||
]
|
||||
{ AffVar }
|
||||
[
|
||||
\translate{AffVar~(Category~description)}
|
||||
]
|
||||
|
||||
\DeclareSimpleCategory
|
||||
{ Sch }
|
||||
[
|
||||
\translate{Sch~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ GrAb }
|
||||
[
|
||||
\translate{GrAb~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
{ CGHaus }
|
||||
[
|
||||
\translate{CGHaus~(Category~description)}
|
||||
]
|
||||
\DeclareSimpleCategory
|
||||
[
|
||||
formula = S
|
||||
]
|
||||
{ SimplicialSet }
|
||||
[
|
||||
\translate{SimplicialSet~(Category~description)}
|
||||
]
|
||||
\DeclareCategory
|
||||
[
|
||||
operator = \operatorname,
|
||||
formula = \Delta,
|
||||
ordered = Ordinal,
|
||||
description = \translate{Ordinal ~ number ~ category ~ (Category ~ description)}
|
||||
]
|
||||
{OrdCat}
|
|
@ -1,21 +0,0 @@
|
|||
key,English,German
|
||||
Index of categories,Index of categories,Kategorienverzeichnis
|
||||
Top (Category description), spaces and continuous maps, Räume und stetige Abbildungen
|
||||
Set (Category description),Sets and functions,Mengen und Funktionen
|
||||
hTop (Category description),Spaces and homotopy classes of continuous maps,Räume und Homotopieklassen von stetigen Abbildungen
|
||||
CHaus (Category description),Compact hausdorff spaces and continuous maps,Kompakte Hausdorffräume und stetige Abbildungen
|
||||
Grp (Category description),Groups and homomorphisms,Gruppen und Homomorphismen
|
||||
Ab (Category description),Abelian groups and homomorphisms,Abelsche Gruppen und Homomoorphismen
|
||||
CRing (Category description),Commutative rings and homomorphisms,Kommutative Ringe und Homomorphismen
|
||||
Ring (Category description),Rings and homomorphisms,Ringe und Homomorphismen
|
||||
Vect (Category description),$k$-vector spaces and linear maps,Vektorräume und lineare Abbildungen
|
||||
Cat (Category description),Small categories and functors,Kleine Kategorien und Funktoren
|
||||
Mod (Category description),Left $R$-modules and homomorphisms,$R$-Linksmodule und Homomorphismen
|
||||
Alg (Category description),$k$-algebras and homomorphisms,$k$-Algebren und Homomorphismen
|
||||
Field (Category description),Fields and field extensions,Körper und Körpererweiterungen
|
||||
AffVar (Category description),Affine Varieties over $k$,Affine Varietäten über $k$
|
||||
Sch (Category description),Schemes and homomorphisms,Schemata und Homomorphismen
|
||||
GrAb (Category description),Graded abelian groups and homomorphisms,Graduierte Gruppen und Homomorphismen
|
||||
Ordinal number category (Category description),Finite ordinal numbers and order-preserving maps,Endliche Ordinalzahlen und ordnungserhaltende Abbildungen
|
||||
CGHaus (Category description), Compactly generated Hausdorff spaces and continuous maps, Kompakt erzeugte Hausdorffräume und stetige Abbildungen
|
||||
SimplicialSet (Category description),|Functor category $[\OrdCat, \Set]$|,|Funktorkategorie $[\OrdCat, \Set]$|
|
|
@ -1,43 +0,0 @@
|
|||
__HEADER__(Faktor package that also handles cofaktors)
|
||||
|
||||
% Extension the faktor package for
|
||||
% - cofaktor command that provides A \ B notation
|
||||
% - scaling the / in the middle
|
||||
% - fine positioning of enumerator / denominator
|
||||
|
||||
% This is essentially taken from the stackexchange question found at
|
||||
% https://tex.stackexchange.com/questions/27591/extending-the-faktor-package
|
||||
% and answered by 'Werner' (https://tex.stackexchange.com/users/5764/werner)
|
||||
%
|
||||
% This package only packages the corresponding answer and provides an analoguous way of a \cofactor command
|
||||
|
||||
%Dependencies
|
||||
\RequirePackage{xparse}
|
||||
\RequirePackage{amssymb} % provides \diagup and \diagdown
|
||||
\RequirePackage{ifthen} % ifthenelse syntax
|
||||
\RequirePackage{mathtools}
|
||||
|
||||
|
||||
\DeclareDocumentCommand{\faktor}{s O{0.5} m O{-0.5} m}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #3/#5
|
||||
\setbox0=\hbox{\ensuremath{#3}}% Store numerator
|
||||
\setbox1=\hbox{\ensuremath{\diagup}}% Store slash /
|
||||
\setbox2=\hbox{\ensuremath{#5}}% Store denominator
|
||||
\raisebox{#2\ht1}{\usebox0}% Numerator
|
||||
\mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash /
|
||||
{\diagup}% regular \faktor slash
|
||||
{\rotatebox{-44}{\rule[#4\ht2]{0.4pt}{-#4\ht2+#2\ht0+\ht0}}}% tilted rule as a slash
|
||||
\mkern-4mu%
|
||||
\raisebox{#4\ht2}{\usebox2}% Denominator
|
||||
}
|
||||
|
||||
\DeclareDocumentCommand{\cofaktor}{s O{-0.5} m O{0.5} m}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #2\#4
|
||||
\setbox0=\hbox{\ensuremath{#3}}% Store numerator
|
||||
\setbox1=\hbox{\ensuremath{\diagdown}}% Store slash /
|
||||
\setbox2=\hbox{\ensuremath{#5}}% Store denominator
|
||||
\raisebox{#2\ht1}{\usebox0}% Numerator
|
||||
\mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash /
|
||||
{\diagdown}% regular \faktor slash
|
||||
{\rotatebox{44}{\rule[-#4\ht2]{0.4pt}{#4\ht2-#2\ht0+\ht0}}}% tilted rule as a slash
|
||||
\mkern-4mu%
|
||||
\raisebox{#4\ht2}{\usebox2}% Denominator
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
__HEADER__(Easy aliasing for math style commands)
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
__NEW_IF__(basic,false)
|
||||
__NEW_IF__(extended,false)
|
||||
|
||||
\DeclareOptionX{basic}{__SET_IF__(basic,true)}
|
||||
\DeclareOptionX{extended}{__SET_IF__(extended,true)__SET_IF__(basic,true)}
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
%Usage: \MakeAliasesForwith\<mathcommand>{<prefix>}{<Set of letters>}
|
||||
% to declare commands of form \<prefix><Letter> as \<mathcommand>{<Letter>} for each
|
||||
% of the specfied letters
|
||||
%
|
||||
% E.g. \MakeAliasesForwith\mathcal{c}{ABC} will declare
|
||||
% \cA \cB \cC \cD as \mathcal{A}, \mathcal{B}, \mathcal{C}
|
||||
% This is also ensuring math context, so that
|
||||
% \cA will be valid even in normal text.
|
||||
|
||||
\NewDocumentCommand{\MakeAliasesForwith}{m m m}
|
||||
{
|
||||
\def__PACKAGE_MACRO__(makealias)##1{
|
||||
\expandafter\def\csname #2##1\endcsname{\ensuremath{#1{##1}}}
|
||||
}
|
||||
\def__PACKAGE_MACRO__(recurse)##1{
|
||||
\ifx##1__PACKAGE_MACRO__(dummy)\else
|
||||
__PACKAGE_MACRO__(makealias){##1}\expandafter__PACKAGE_MACRO__(recurse)\fi
|
||||
}
|
||||
__PACKAGE_MACRO__(recurse) #3__PACKAGE_MACRO__(dummy)
|
||||
}
|
||||
|
||||
\def__PACKAGE_MACRO__(all){ABCDEFGHIJKLMNOPQRSTUVWXYZ}
|
||||
|
||||
__IF__(basic)
|
||||
\RequirePackage{amsfonts}
|
||||
\MakeAliasesForwith\mathbb{}{CFKNQRZ}
|
||||
\fi
|
||||
|
||||
__IF__(extended)
|
||||
\expandafter\MakeAliasesForwith\expandafter\mathcal\expandafter{\expandafter c\expandafter}\expandafter{__PACKAGE_MACRO__(all)}
|
||||
\expandafter\MakeAliasesForwith\expandafter\mathfrak\expandafter{\expandafter f\expandafter}\expandafter{__PACKAGE_MACRO__(all)}
|
||||
\expandafter\MakeAliasesForwith\expandafter\mathbb\expandafter{\expandafter b\expandafter}\expandafter{__PACKAGE_MACRO__(all)}
|
||||
\fi
|
|
@ -1,72 +0,0 @@
|
|||
__HEADER__(Math figures with TikZ / pgfplots / xy)
|
||||
% This is just a collection of the packages I use to typeset mathematical figures
|
||||
% most commonly plots, commutative diagrams or geometry
|
||||
|
||||
|
||||
|
||||
\RequirePackage{pgfplots} % Plots
|
||||
\pgfplotsset{compat=1.7}
|
||||
|
||||
\RequirePackage{tikz} % Plots / drawings
|
||||
\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes, decorations.markings}
|
||||
|
||||
\RequirePackage{tikz-cd} %Commutative diagrams
|
||||
\RequirePackage{xparse}
|
||||
|
||||
|
||||
%%for small diagrams, similar to tikz-cd
|
||||
\RequirePackage[all]{xy} % for small diagrams, e.g. arrows
|
||||
%%% In older versions, you found
|
||||
% \RequirePackage{xy}
|
||||
% \xyoption{all}
|
||||
% here, but this messes with the catcode of the @ sign (which no package should do!)
|
||||
% so that further parts in this package would get broken
|
||||
|
||||
|
||||
\newcommand\pushoutsymbol{\tikz[baseline=0.5,scale=0.2]{
|
||||
\draw[-] (0,0) --(0,1) -- (1,1);
|
||||
\draw (1,0) circle (1.5pt);}
|
||||
}
|
||||
|
||||
\newcommand\pullbacksymbol{\tikz[baseline=0.5,scale=0.2]{
|
||||
\draw[-] (0,0) --(1,0) -- (1,1);
|
||||
\draw (0,1) circle (1.5pt);}
|
||||
}
|
||||
|
||||
% This is used in a tikzcd
|
||||
\NewDocumentCommand\pushout{ O{dr} }{
|
||||
\arrow[phantom, pos=0.45]{#1}{\pushoutsymbol}
|
||||
}
|
||||
|
||||
% This is used in a tikzcd
|
||||
\NewDocumentCommand\pullback{ O{dr} }{
|
||||
\arrow[phantom, pos=0.45]{#1}{\pullbacksymbol}
|
||||
}
|
||||
|
||||
|
||||
%% Fix for equal arrows in tikz, see
|
||||
% https://tex.stackexchange.com/questions/443017/equal-arrows-without-transparent-ends-possible-in-tikzcd
|
||||
|
||||
\tikzset {
|
||||
double line with arrow/.style args =
|
||||
{#1,#2}%
|
||||
{
|
||||
decorate, decoration =
|
||||
{
|
||||
markings,
|
||||
mark = at position 0 with
|
||||
{
|
||||
\coordinate (ta-base-1) at (0,1pt);
|
||||
\coordinate (ta-base-2) at (0,-1pt);
|
||||
}
|
||||
,
|
||||
mark = at position 1 with
|
||||
{
|
||||
\draw[#1] (ta-base-1) -- (0,1pt);
|
||||
\draw[#2] (ta-base-2) -- (0,-1pt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\tikzset{Equal/.style={-,double line with arrow={-,-}}}
|
|
@ -1,39 +0,0 @@
|
|||
__HEADER__(Hacky math packages for some (custom@) fixes)
|
||||
% This just brings together some (possibly ugly) hacks that I use when writing math. Likely, you do not want to use this except when building around this package (like I did), or already have similar shortcuts
|
||||
|
||||
%Proper Degree command
|
||||
\def__PACKAGE_MACRO__(degree){\ensuremath{^\circ}}
|
||||
\AtBeginDocument{\let\degree__PACKAGE_MACRO__(degree)}
|
||||
|
||||
% Always put limits under \limit
|
||||
\let\oldlim\lim\def\lim{\oldlim\limits}
|
||||
|
||||
% Print equal sign under subset by default to not confuse people
|
||||
% (I still write \subset, because this enables me remove this renewcommand and have the default \subset command evaluated instead
|
||||
\let__PACKAGE_MACRO__(subseteq)\subseteq
|
||||
\let__PACKAGE_MACRO__(supseteq)\supseteq
|
||||
\AtBeginDocument{
|
||||
\let\subset__PACKAGE_MACRO__(subseteq)
|
||||
\let\supset__PACKAGE_MACRO__(supseteq)
|
||||
}
|
||||
|
||||
%%Renew phi and epsilon to their proper versions, make the old ones available as
|
||||
% uglyphi and uglyepsilon
|
||||
|
||||
\let__PACKAGE_MACRO__(stored@phi)\phi
|
||||
\let__PACKAGE_MACRO__(stored@varphi)\varphi
|
||||
\AtBeginDocument{
|
||||
\let\phi__PACKAGE_MACRO__(stored@varphi)
|
||||
\let\varphi__PACKAGE_MACRO__(stored@varphi)
|
||||
\let\uglyphi__PACKAGE_MACRO__(stored@phi)
|
||||
\let\oldphi__PACKAGE_MACRO__(stored@phi)
|
||||
\let\goldenratio__PACKAGE_MACRO__(stored@phi)
|
||||
}
|
||||
|
||||
\let__PACKAGE_MACRO__(stored@epsilon)\epsilon
|
||||
\let__PACKAGE_MACRO__(stored@varepsilon)\varepsilon
|
||||
\AtBeginDocument{
|
||||
\let\epsilon__PACKAGE_MACRO__(stored@varepsilon)
|
||||
\let\uglyepsilon__PACKAGE_MACRO__(stored@epsilon)
|
||||
\let\oldepsilon__PACKAGE_MACRO__(stored@epsilon)
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
__HEADER__(Collects several math fonts together)
|
||||
%%% Store away the several (partially conflicting) fonts in internal macros
|
||||
|
||||
\let__PACKAGE_MACRO__(none@mathcal)\mathcal
|
||||
|
||||
\RequirePackage{mathrsfs}
|
||||
\let__PACKAGE_MACRO__(mathrsfs@mathscr)\mathscr
|
||||
|
||||
\RequirePackage[mathscr]{eucal}
|
||||
\let__PACKAGE_MACRO__(eucal@optionmathscr@mathscr)\mathscr
|
||||
|
||||
\RequirePackage{amsfonts}
|
||||
\let__PACKAGE_MACRO__(amsfonts@mathfrak)\mathfrak
|
||||
|
||||
%%% Provide user commands to internally stored macros
|
||||
\def__PACKAGE_MACRO__(restorefonts){
|
||||
\let\mathcal__PACKAGE_MACRO__(none@mathcal) % Set \mathcal to default calligrapic
|
||||
\let\mathfrak__PACKAGE_MACRO__(amsfonts@mathfrak) % Set \mathfrak to mathfrak from amsfonts
|
||||
\let\mathscr__PACKAGE_MACRO__(mathrsfs@mathscr) % Set \mathscr to mathscript from mathrsfs package
|
||||
\let\mathcat__PACKAGE_MACRO__(mathrsfs@mathscr) % Set \mathcat to mathscript from mathrsfs package
|
||||
\let\mathcalo__PACKAGE_MACRO__(eucal@optionmathscr@mathscr) % Set \mathcalo (for old calligraphic) to \mathscr from [mathscr]{eucal} package
|
||||
}
|
||||
|
||||
\AtBeginDocument{__PACKAGE_MACRO__(restorefonts)}
|
|
@ -1,215 +0,0 @@
|
|||
__HEADER__(Math Operator Package)
|
||||
%Provides some commonly used Operators used in the write-ups of my lecture notes
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
__LANGUAGE_OPTIONS_X__
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
%%%%%Package dependencies
|
||||
\RequirePackage{amsmath}
|
||||
\RequirePackage{bbm}
|
||||
\RequirePackage{mathtools}
|
||||
|
||||
%%%%Different types of operator wrappers:
|
||||
|
||||
% For simple math operators that are just to be printed as their name
|
||||
\newcommand\DeclareSimpleMathOperator[1]{
|
||||
\expandafter\providecommand\csname #1\endcsname{\operatorname{#1}}
|
||||
}
|
||||
|
||||
%%%For distributions
|
||||
%Introduce synonym for \operatorname
|
||||
\newcommand__PACKAGE_MACRO__(distribution)[1]{\operatorname{#1}}
|
||||
%Easily declare new distributions
|
||||
\newcommand\DeclareDistribution[1]{\expandafter\def\csname #1\endcsname{__PACKAGE_MACRO__(distribution){#1}}}
|
||||
|
||||
%%%%%%%%%%% Operators
|
||||
%Basic commands
|
||||
\DeclareSimpleMathOperator{id}
|
||||
\DeclareSimpleMathOperator{im}
|
||||
\DeclareSimpleMathOperator{Bild}
|
||||
\DeclareSimpleMathOperator{dom}
|
||||
\DeclareSimpleMathOperator{Span}
|
||||
\DeclareSimpleMathOperator{Aut}
|
||||
\DeclareMathOperator{\rhs}{RHS} %Right hand side of equation
|
||||
\DeclareMathOperator{\lhs}{LHS} %Left hand side of equation
|
||||
|
||||
%%Provide \ggT \gcd \kgV \lcm for 'greatest common denominator' and 'least common multiple'
|
||||
% \ggT und \gcd, as well as \kgV and \lcm are synonyms and language-aware, so that
|
||||
% e.g. when the german language option is loaded, even
|
||||
% \lcm would print 'kgV'
|
||||
% The starred versions of the four commands will ignore the language option and print their
|
||||
% exact names (without the *, of course)
|
||||
\DeclareMathOperator{\@__PACKAGE_PREFIX__ggT}{ggT}
|
||||
\DeclareMathOperator{\@@__PACKAGE_PREFIX__ggT}{__IF__(english) gcd\else ggT\fi}
|
||||
\def\ggT{\@ifstar\@__PACKAGE_PREFIX__ggT\@@__PACKAGE_PREFIX__ggT}
|
||||
|
||||
\DeclareMathOperator{\@__PACKAGE_PREFIX__gcd}{gcd}
|
||||
\DeclareMathOperator{\@@__PACKAGE_PREFIX__gcd}{__IF__(english) gcd\else ggT\fi}
|
||||
\def\gcd{\@ifstar\@__PACKAGE_PREFIX__gcd\@@__PACKAGE_PREFIX__gcd}
|
||||
|
||||
\DeclareMathOperator{\@__PACKAGE_PREFIX__kgV}{kgV}
|
||||
\DeclareMathOperator{\@@__PACKAGE_PREFIX__kgV}{__IF__(english) lcm\else kgV\fi}
|
||||
\def\kgV{\@ifstar\@__PACKAGE_PREFIX__kgV\@@__PACKAGE_PREFIX__kgV}
|
||||
|
||||
\DeclareMathOperator{\@__PACKAGE_PREFIX__lcm}{lcm}
|
||||
\DeclareMathOperator{\@@__PACKAGE_PREFIX__lcm}{__IF__(english) lcm\else kgV\fi}
|
||||
\def\lcm{\@ifstar\@__PACKAGE_PREFIX__lcm\@@__PACKAGE_PREFIX__lcm}
|
||||
|
||||
%Complex numbers
|
||||
\DeclareMathOperator{__PACKAGE_MACRO__(impart)}{Im}
|
||||
\renewcommand\Im__PACKAGE_MACRO__(impart)
|
||||
\DeclareMathOperator{__PACKAGE_MACRO__(repart)}{Re}
|
||||
\renewcommand\Re__PACKAGE_MACRO__(repart)
|
||||
|
||||
%Linear Algebra
|
||||
\DeclareSimpleMathOperator{Sym}
|
||||
\DeclareSimpleMathOperator{supp}
|
||||
\DeclareSimpleMathOperator{sgn}
|
||||
\DeclareSimpleMathOperator{coker}
|
||||
\DeclareSimpleMathOperator{rank}
|
||||
\DeclareSimpleMathOperator{rk}
|
||||
\DeclareSimpleMathOperator{Mat}
|
||||
\DeclareSimpleMathOperator{ev}
|
||||
\DeclareSimpleMathOperator{tr}
|
||||
\DeclareSimpleMathOperator{GL}
|
||||
\DeclareSimpleMathOperator{PGL}
|
||||
|
||||
%Algebra
|
||||
\DeclareSimpleMathOperator{Quot}
|
||||
\DeclareSimpleMathOperator{rad}
|
||||
\DeclareSimpleMathOperator{Spec}
|
||||
\DeclareSimpleMathOperator{Frac}
|
||||
\DeclareSimpleMathOperator{Gal}
|
||||
\DeclareSimpleMathOperator{Ext}
|
||||
\DeclareSimpleMathOperator{Tor}
|
||||
\DeclareSimpleMathOperator{MaxSpec}
|
||||
\DeclareSimpleMathOperator{Sh}
|
||||
\DeclareSimpleMathOperator{PSh}
|
||||
\DeclareSimpleMathOperator{Proj}
|
||||
\DeclareSimpleMathOperator{QCoh}
|
||||
\DeclareSimpleMathOperator{Fun}
|
||||
\DeclareSimpleMathOperator{ord}
|
||||
\DeclareMathOperator{\Nil}{\mathcal{N}il}
|
||||
\DeclareMathOperator{\Ouv}{\mathcal{O}uv}
|
||||
\DeclareMathOperator{\PreSh}{Pre-Sh}
|
||||
\newcommand{\tensor}{\otimes} %Synonym for tensoring
|
||||
|
||||
%Analysis
|
||||
\DeclareSimpleMathOperator{dx}
|
||||
\DeclareSimpleMathOperator{dy}
|
||||
\DeclareSimpleMathOperator{dz}
|
||||
\DeclareSimpleMathOperator{dt}
|
||||
|
||||
%Sets
|
||||
\DeclareSimpleMathOperator{conv}
|
||||
\DeclareSimpleMathOperator{dist}
|
||||
\DeclareSimpleMathOperator{diam}
|
||||
|
||||
%%Stochastic (Algorithmische Mathematik II)
|
||||
\DeclareDistribution{Bin}
|
||||
\DeclareDistribution{Ber}
|
||||
\DeclareDistribution{Geo}
|
||||
\DeclareDistribution{Poi}
|
||||
\DeclareDistribution{Unif}
|
||||
\DeclareDistribution{Var}
|
||||
\DeclareDistribution{Cov}
|
||||
|
||||
%Topology
|
||||
\DeclareSimpleMathOperator{pr}
|
||||
\def\twedge{\vee} % Semantically correct macros for wedge product
|
||||
\def\tsmash{\wedge} % Semantically correct macro for smash product
|
||||
\DeclareSimpleMathOperator{sing}
|
||||
\DeclareSimpleMathOperator{cell}
|
||||
|
||||
%Category Theory
|
||||
\DeclareSimpleMathOperator{Ob}
|
||||
\DeclareSimpleMathOperator{Hom}
|
||||
\DeclareSimpleMathOperator{Mor}
|
||||
\DeclareSimpleMathOperator{End}
|
||||
\DeclareSimpleMathOperator{colim}
|
||||
|
||||
%Set theory
|
||||
\DeclareSimpleMathOperator{card}
|
||||
\DeclareSimpleMathOperator{Cd}
|
||||
\DeclareSimpleMathOperator{Ord}
|
||||
\DeclareSimpleMathOperator{otp}
|
||||
\DeclareSimpleMathOperator{Card}
|
||||
|
||||
%%Galoiskohomologie
|
||||
\DeclareSimpleMathOperator{Br}
|
||||
\DeclareSimpleMathOperator{EXT}
|
||||
\DeclareSimpleMathOperator{Ind}
|
||||
\DeclareSimpleMathOperator{Char}
|
||||
\DeclareSimpleMathOperator{res}
|
||||
\DeclareSimpleMathOperator{inf}
|
||||
\DeclareSimpleMathOperator{cov}
|
||||
\newcommand{\del}{\partial} % Semantically correct operator for boundary maps
|
||||
|
||||
%% Algebraic geometry
|
||||
\DeclareSimpleMathOperator{eq}
|
||||
\DeclareSimpleMathOperator{Idem}
|
||||
\DeclareSimpleMathOperator{Supp}
|
||||
\DeclareSimpleMathOperator{Ann}
|
||||
\DeclareSimpleMathOperator{OC}
|
||||
\DeclareSimpleMathOperator{red}
|
||||
\DeclareSimpleMathOperator{can}
|
||||
\DeclareSimpleMathOperator{Pic}
|
||||
|
||||
\newcommand\leftadjoint\vdash
|
||||
\newcommand\rightadjoint\dashv
|
||||
|
||||
% Characteristic function
|
||||
\newcommand*{\cfun}{\ensuremath{\mathbbm{1}}}
|
||||
\newcommand*{\One}{\cfun}
|
||||
|
||||
%% such that in set declarations
|
||||
\newcommand{\suchthat}{\;\middle|\;}
|
||||
|
||||
|
||||
%Paired Delimiters
|
||||
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
|
||||
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
|
||||
|
||||
%Norm and absolute value
|
||||
%Make them scaling by default and have \abs*{} as the non-scaling version of the command
|
||||
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
|
||||
\let\oldabs\abs
|
||||
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
|
||||
|
||||
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
|
||||
\let\oldnorm\norm
|
||||
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
|
||||
|
||||
\DeclareMathOperator{\amalgprod}{\star}
|
||||
|
||||
|
||||
\newcommand\op{\text{op}}
|
||||
\newcommand\opposite{^{\op}}
|
||||
|
||||
\newcommand\ab{\text{ab}}
|
||||
\newcommand\abelianization{^{\ab}}
|
||||
|
||||
|
||||
\NewDocumentCommand\set{m}
|
||||
{
|
||||
\left\{ #1 \right\}
|
||||
}
|
||||
|
||||
%Taken from user egreg on
|
||||
% https://tex.stackexchange.com/a/22255
|
||||
\newcommand\frestriction[2]{{% we make the whole thing an ordinary symbol
|
||||
\left.\kern-\nulldelimiterspace % automatically resize the bar with \right
|
||||
#1 % the function
|
||||
\vphantom{\big|} % pretend it's a little taller at normal size
|
||||
\right|_{#2} % this is the delimiter
|
||||
}}
|
||||
|
||||
|
||||
\newcommand\directlimit{\varinjlim}
|
||||
\newcommand\inverselimit{\varprojlim}
|
||||
|
||||
\DeclareMathOperator*{\freeproduct}{\raisebox{-0.5ex}{\scalebox{2}{$\ast$}}}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
__HEADER__(Some extra math-related symbols.)
|
||||
% A collection of math-related symbols / tools I often use, mainly collected together from Stack Overflow or hacked together myself
|
||||
|
||||
%Dependencies
|
||||
\RequirePackage{tikz}
|
||||
|
||||
% noloc command by
|
||||
% user 'egreg' (https://tex.stackexchange.com/users/4427/egreg)
|
||||
% posted on
|
||||
% https://tex.stackexchange.com/questions/546713/spacing-in-colon (Spacing in \colon)
|
||||
% Prints a mirrored \colon correctly
|
||||
\RequirePackage{amsmath}
|
||||
\newcommand\noloc{%
|
||||
\nobreak
|
||||
\mspace{6mu plus 1mu}
|
||||
{:}
|
||||
\nonscript\mkern-\thinmuskip
|
||||
\mathpunct{}
|
||||
\mspace{2mu}
|
||||
}
|
||||
|
||||
% \contra command from Gilles Castel, taken from
|
||||
% https://github.com/gillescastel/university-setup/blob/master/preamble.tex
|
||||
% (retrieved 2021-09-08)
|
||||
% The preamble linked above is MIT-licensed by Gilles Castel
|
||||
\RequirePackage{stmaryrd} % for \lightning
|
||||
\RequirePackage{graphicx}
|
||||
\newcommand\contra{\scalebox{1.5}{$\lightning$}}
|
||||
|
||||
%Print a warning sign
|
||||
\RequirePackage{pgf}
|
||||
\newcommand\Warning{%
|
||||
\makebox[1.4em][c]{%
|
||||
\makebox[0pt][c]{\raisebox{.1em}{\small!}}%
|
||||
\makebox[0pt][c]{\color{red}\Large$\bigtriangleup$}}}%
|
||||
|
||||
%Make circled symbols
|
||||
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
||||
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}
|
||||
}
|
||||
|
||||
% When dealing with chain complexes, one often uses a bullet as placeholder for the index to mean the whole chain:
|
||||
\newcommand\chainbullet{\bullet}
|
||||
|
||||
\newcommand{\blank}{\text{--}}
|
|
@ -1,62 +0,0 @@
|
|||
%MIT License
|
||||
%
|
||||
% Copyright (c) 2018 varkor
|
||||
%
|
||||
% Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
% of this software and associated documentation files (the "Software"), to deal
|
||||
% in the Software without restriction, including without limitation the rights
|
||||
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
% copies of the Software, and to permit persons to whom the Software is
|
||||
% furnished to do so, subject to the following conditions:
|
||||
%
|
||||
% The above copyright notice and this permission notice shall be included in all
|
||||
% copies or substantial portions of the Software.
|
||||
%
|
||||
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
% SOFTWARE. *** quiver ***
|
||||
%
|
||||
%
|
||||
% A package for drawing commutative diagrams exported from https://q.uiver.app.
|
||||
%
|
||||
% This package is currently a wrapper around the `tikz-cd` package, importing necessary TikZ
|
||||
% libraries, and defining a new TikZ style for curves of a fixed height.
|
||||
%
|
||||
% Version: 1.2.1
|
||||
% Authors:
|
||||
% - varkor (https://github.com/varkor)
|
||||
% - AndréC (https://tex.stackexchange.com/users/138900/andr%C3%A9c)
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{quiver}[2021/01/11 quiver]
|
||||
|
||||
% `tikz-cd` is necessary to draw commutative diagrams.
|
||||
\RequirePackage{tikz-cd}
|
||||
% `amssymb` is necessary for `\lrcorner` and `\ulcorner`.
|
||||
\RequirePackage{amssymb}
|
||||
% `calc` is necessary to draw curved arrows.
|
||||
\usetikzlibrary{calc}
|
||||
% `pathmorphing` is necessary to draw squiggly arrows.
|
||||
\usetikzlibrary{decorations.pathmorphing}
|
||||
|
||||
% A TikZ style for curved arrows of a fixed height, due to AndréC.
|
||||
\tikzset{curve/.style={settings={#1},to path={(\tikztostart)
|
||||
.. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
|
||||
and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
|
||||
.. (\tikztotarget)\tikztonodes}},
|
||||
settings/.code={\tikzset{quiver/.cd,#1}
|
||||
\def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}},
|
||||
quiver/.cd,pos/.initial=0.35,height/.initial=0}
|
||||
|
||||
% TikZ arrowhead/tail styles.
|
||||
\tikzset{tail reversed/.code={\pgfsetarrowsstart{tikzcd to}}}
|
||||
\tikzset{2tail/.code={\pgfsetarrowsstart{Implies[reversed]}}}
|
||||
\tikzset{2tail reversed/.code={\pgfsetarrowsstart{Implies}}}
|
||||
% TikZ arrow styles.
|
||||
\tikzset{no body/.style={/tikz/dash pattern=on 0 off 1mm}}
|
||||
|
||||
\endinput
|
|
@ -1,13 +0,0 @@
|
|||
__HEADER__(Write LaTeX counters to auxiliary file)
|
||||
|
||||
\RequirePackage{etoolbox}
|
||||
|
||||
\newwrite__PACKAGE_MACRO__(out)
|
||||
\immediate\openout__PACKAGE_MACRO__(out)\jobname.cnt\relax
|
||||
\AtBeginDocument{
|
||||
\let__PACKAGE_MACRO__(saved@stepcounter)\stepcounter
|
||||
\def\stepcounter#1{
|
||||
__PACKAGE_MACRO__(saved@stepcounter){#1}
|
||||
\immediate\write__PACKAGE_MACRO__(out){#1: \csname the#1\endcsname}}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
__HEADER__(Find a package that provides some command)
|
||||
% This is just a quick packaging of the post by
|
||||
% 'Martin Nyolt' (https://tex.stackexchange.com/users/78783/martin-nyolt)
|
||||
% found at
|
||||
% https://tex.stackexchange.com/users/78783/martin-nyolt
|
||||
% Note that SO answers are by default CC BY-SA 3.0 licensed, see
|
||||
% https://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
\def\find@load#1[#2]#3[#4]{%
|
||||
% load the package
|
||||
\find@fileswith@pti@ns{#1}[#2]{#3}[#4]%
|
||||
% check if commands exists now
|
||||
\ifcsname\find@command\endcsname
|
||||
\typeout{Package #3 introduces command \find@command.}%
|
||||
% command has been found, revert to original version without checks
|
||||
\let\@fileswith@pti@ns\find@fileswith@pti@ns
|
||||
\else
|
||||
% somehow, \@fileswith@pti@ns is restored after loading a package
|
||||
% thus, patch it again
|
||||
\let\@fileswith@pti@ns\find@load
|
||||
\fi
|
||||
}%
|
||||
|
||||
\newcommand*{\findpackagebycommand}[1]{%
|
||||
% using this multiple times - esp. when the package has not been found yet -
|
||||
% will break things. Thus, check first that \find@command has never been defined before
|
||||
\ifx\find@command\undefined
|
||||
\def\find@command{#1}%
|
||||
% first, check if this command is already defined
|
||||
\ifcsname\find@command\endcsname
|
||||
% in this case, just issue a warning and do nothing
|
||||
\@latex@warning@no@line{Command \find@command \space is already defined}%
|
||||
\else
|
||||
% overwrite the internal \@fileswith@pti@ns command, which does the actual loading
|
||||
% \@fileswith@pti@ns is used internally by \usepackage and \RequirePackage
|
||||
\let\find@fileswith@pti@ns\@fileswith@pti@ns
|
||||
\let\@fileswith@pti@ns\find@load
|
||||
\fi
|
||||
\else
|
||||
% used multiple times - prevent and give a warning
|
||||
\@latex@warning@no@line{You can use \protect\findpackagebycommand \space only once}%
|
||||
\errmessage{Invalid use of command findpackagebycommand.}%
|
||||
\fi
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
__HEADER__(Iterate over powerset of clist)
|
||||
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%% Iterate over powerset of claist
|
||||
|
||||
\clist_new:N \l_powerset_copied_clist
|
||||
\seq_new:N \l_powerset_saved_seq
|
||||
|
||||
|
||||
|
||||
\cs_generate_variant:Nn \clist_remove_all:Nn { N V }
|
||||
|
||||
% Pseudocode of this macro
|
||||
% remove left -> push on stack
|
||||
% call recursive
|
||||
% add left to 'extra'
|
||||
% call recursive
|
||||
% remove left from 'extra'
|
||||
% add from stack to left
|
||||
|
||||
\cs_new:Npn \__powerset_clist_foreach_aux:Nn #1 #2
|
||||
{
|
||||
\clist_if_empty:NTF \l_powerset_copied_clist
|
||||
{
|
||||
#2
|
||||
}
|
||||
{
|
||||
\clist_get:NN \l_powerset_copied_clist \l_tmpa_tl
|
||||
\seq_push:NV \l_powerset_saved_seq \l_tmpa_tl
|
||||
\clist_pop:NN \l_powerset_copied_clist { \l_tmpa_tl }
|
||||
|
||||
\__powerset_clist_foreach_aux:Nn #1 {#2}
|
||||
|
||||
\seq_get:NN \l_powerset_saved_seq \l_tmpa_tl
|
||||
\clist_put_left:NV #1 \l_tmpa_tl
|
||||
|
||||
\__powerset_clist_foreach_aux:Nn #1 {#2}
|
||||
|
||||
\seq_get:NN \l_powerset_saved_seq \l_tmpa_tl
|
||||
\clist_remove_all:NV #1 \l_tmpa_tl
|
||||
\clist_push:NV \l_powerset_copied_clist \l_tmpa_tl
|
||||
\seq_pop:NN \l_powerset_saved_seq \l_tmpa_tl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
% Usage:
|
||||
% \clist_use_powerset:Nn {clist variable name}{code for each subset}
|
||||
% This will execute #2 for each subset of the listname given as #1
|
||||
% In #2, the name given as #1 can be used for the current subset
|
||||
% After execution, the value of #1 is restored
|
||||
\cs_new:Npn \powerset_clist_foreach:Nn #1 #2
|
||||
{
|
||||
\clist_set_eq:NN \l_powerset_copied_clist #1
|
||||
\clist_clear:N #1
|
||||
\clist_remove_duplicates:N \l_powerset_copied_clist
|
||||
|
||||
\__powerset_clist_foreach_aux:Nn #1 {#2}
|
||||
|
||||
\clist_set_eq:NN #1 \l_powerset_copied_clist
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
__HEADER__(Package to easily print bibliography and image attributions in document)
|
||||
\RequirePackage{xkeyval}
|
||||
|
||||
__LANGUAGE_OPTIONS_X__
|
||||
|
||||
\def__PACKAGE_MACRO__(bibfile){bibliography.bib}
|
||||
\def__PACKAGE_MACRO__(imagefile){images.bib}
|
||||
\DeclareOptionX{bibfile}[bibliography.bib]{\def__PACKAGE_MACRO__(bibfile){#1}}
|
||||
\DeclareOptionX{imagefile}[images.bib]{\def__PACKAGE_MACRO__(imagefile){#1}}
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
%%%%Bibliography management
|
||||
\RequirePackage[backend=biber,style=alphabetic]{biblatex}
|
||||
\addbibresource{__PACKAGE_MACRO__(bibfile)}
|
||||
\addbibresource{__PACKAGE_MACRO__(imagefile)}
|
||||
|
||||
%Provide simpler commands to properly print image attributions and literature
|
||||
\DeclareRobustCommand*{\printimageattributions}{
|
||||
\def\imageattributionstitle{__IF__(english) Image attributions \else Bildquellen\fi}
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{section}{\imageattributionstitle}
|
||||
\printbibliography[title={\imageattributionstitle}, type=image]
|
||||
}
|
||||
|
||||
\DeclareRobustCommand*{\printliterature}{
|
||||
\def\literaturetitle{__IF__(english) Literature\else Literatur\fi}
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{section}{\literaturetitle}
|
||||
\printbibliography[title={\literaturetitle}, nottype=image]
|
||||
|
||||
}
|
148
src/wip/cache/cache.pysty3
vendored
148
src/wip/cache/cache.pysty3
vendored
|
@ -1,148 +0,0 @@
|
|||
__HEADER__(Cache definitions of previous LaTeX runs to avoid computations)
|
||||
|
||||
|
||||
|
||||
%%%% This is just a proof of concept package,
|
||||
%%%% there is possibly more room for clean-up
|
||||
%%%% and / or speed-up etc.
|
||||
|
||||
%%% Also, the provided
|
||||
%%% \DeclareCachedDocumentCommand
|
||||
%%% is of course not really
|
||||
%%% useful and just for demonstration
|
||||
%%% purposes
|
||||
|
||||
\bool_new:N \g__cache_cache_bool
|
||||
\int_new:N \g__cache_cache_version_document_int
|
||||
\int_new:N \g__cache_cache_version_aux_int
|
||||
\int_gset:Nn \g__cache_cache_version_aux_int { -1 }
|
||||
|
||||
\clist_new:N \g__cache_dump_auxfile_clist %% usual dump
|
||||
\clist_new:N \g__cache_dump_cache_clist %% will be dumped such that it is restored as \g__cache_lazy_auxfile_tl on next run.
|
||||
\tl_new:N \g__cache_lazy_document_tl
|
||||
\tl_new:N \g__cache_lazy_auxfile_tl
|
||||
|
||||
\keys_define:nn { cache }
|
||||
{
|
||||
cache .bool_set:N = \g__cache_cache_bool,
|
||||
cache .default:n = { true },
|
||||
__cache version__ .int_set:N = \g__cache_cache_version_document_int,
|
||||
cache version .meta:nn = { cache } { cache = true, __cache version__ = #1 },
|
||||
cache version .default:n = { 0 },
|
||||
}
|
||||
\RequirePackage{l3keys2e}
|
||||
\ProcessKeysOptions{cache}
|
||||
|
||||
|
||||
% Setting up lazy execution and
|
||||
% selecting of executing after reading of aux file
|
||||
% if cache option has been used
|
||||
\bool_if:NTF \g__cache_cache_bool
|
||||
{
|
||||
%% Writing things (at one go) to aux file at end of document:
|
||||
\cs_new:Npn \__cache_dump_auxfile:n
|
||||
{
|
||||
\clist_gput_right:Nn \g__cache_dump_auxfile_clist
|
||||
}
|
||||
\cs_generate_variant:Nn \__cache_dump_auxfile:n { x }
|
||||
|
||||
\cs_new:Npn \__cache_dump_cache:n
|
||||
{
|
||||
\clist_gput_right:Nn \g__cache_dump_cache_clist
|
||||
}
|
||||
\cs_generate_variant:Nn \__cache_dump_cache:n { V }
|
||||
|
||||
|
||||
\cs_new:Npn \__cache_write_auxout:n
|
||||
{
|
||||
\iow_now:cn { @auxout }
|
||||
}
|
||||
\cs_generate_variant:Nn \__cache_write_auxout:n { x }
|
||||
|
||||
%%% Handles dumping data to aux file at end of document
|
||||
\hook_gput_code:nnn { enddocument } { cache }
|
||||
{
|
||||
\clist_map_function:NN \g__cache_dump_auxfile_clist
|
||||
\__cache_write_auxout:n
|
||||
|
||||
\__cache_write_auxout:n
|
||||
{
|
||||
\csname tl_gput_right:cn \endcsname
|
||||
{
|
||||
g__cache_lazy_auxfile_tl
|
||||
}
|
||||
}
|
||||
\__cache_write_auxout:x { \str_use:N \c_left_brace_str }
|
||||
|
||||
\clist_map_function:NN \g__cache_dump_cache_clist
|
||||
\__cache_write_auxout:n
|
||||
|
||||
\__cache_write_auxout:x { \str_use:N \c_right_brace_str }
|
||||
}
|
||||
|
||||
%%% Writes the current cache version into aux file
|
||||
\__cache_dump_auxfile:x
|
||||
{
|
||||
\ExplSyntaxOn
|
||||
\int_gset:Nn \exp_not:N \g__cache_cache_version_aux_int
|
||||
{
|
||||
\int_use:N \g__cache_cache_version_document_int
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
}
|
||||
|
||||
%%% Executing something lazily at beginning of document
|
||||
%%% Lazy code only gets executed if auxfile version is older than document
|
||||
\cs_new:Npn \__cache_lazy:n
|
||||
{
|
||||
\tl_gput_right:Nn \g__cache_lazy_document_tl
|
||||
}
|
||||
|
||||
%%% Caching things. Handles writing and reading to aux file
|
||||
%%% and makes code available in the next run of LaTeX
|
||||
\cs_new:Npn \__cache_cache:n #1
|
||||
{
|
||||
\tl_set:Nn \l_tmpa_tl
|
||||
{
|
||||
{ #1 }
|
||||
}
|
||||
\regex_replace_all:nnN { \cP\# } { \cO\# } \l_tmpa_tl
|
||||
\__cache_dump_cache:V \l_tmpa_tl
|
||||
}
|
||||
|
||||
%%% This handles loading either the cached definitions
|
||||
%%% from last run or executing the lazy definitions from the current run
|
||||
%%% after loading the aux file
|
||||
\hook_gput_code:nnn { begindocument } { cache }
|
||||
{
|
||||
\int_compare:nNnTF
|
||||
\g__cache_cache_version_aux_int < \g__cache_cache_version_document_int
|
||||
{
|
||||
\tl_use:N \g__cache_lazy_document_tl
|
||||
}
|
||||
{
|
||||
\tl_use:N \g__cache_lazy_auxfile_tl
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
\cs_set_eq:NN \__cache_lazy:n \use:n
|
||||
\cs_set_eq:NN \__cache_cache:n \use_none:n
|
||||
}
|
||||
|
||||
\cs_new:Npn \__cached_new_document_command:nnn #1 #2 #3
|
||||
{
|
||||
\NewDocumentCommand{#1}{#2}{#3}
|
||||
\__cache_cache:n
|
||||
{
|
||||
\csname __cached_new_document_command:nnn \endcsname { #1 } { #2 } { #3 }
|
||||
}
|
||||
}
|
||||
|
||||
\NewDocumentCommand{\DeclareCachedDocumentCommand}{mmm}
|
||||
{
|
||||
\__cache_lazy:n
|
||||
{
|
||||
\__cached_new_document_command:nnn{#1}{#2}{#3}
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
__HEADER__(Hacky code setup for verbatim code)
|
||||
|
||||
__NEW_IF__(pipe,false)
|
||||
\DeclareOption{pipe}{__SET_IF__(pipe,true)}
|
||||
\ProcessOptions
|
||||
|
||||
|
||||
% This is needed in general: when _ is active, we want it to expand to
|
||||
% an actual _ character
|
||||
\catcode`_=13
|
||||
\let_\_
|
||||
\catcode`_=8
|
||||
|
||||
\ExplSyntaxOn
|
||||
\NewDocumentCommand{\code}{m}
|
||||
{
|
||||
\tl_set_rescan:Nnn \l_tmpa_tl
|
||||
{
|
||||
\char_set_catcode_active:N _
|
||||
}
|
||||
{ #1 }
|
||||
\texttt{ \tl_use:N \l_tmpa_tl }
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
|
||||
__IF__(pipe)
|
||||
\catcode`|=\active
|
||||
\def|#1|{
|
||||
\code{#1}
|
||||
}
|
||||
% Do not make | active inside tables
|
||||
\AddToHook{env/tabular/before}[code]{\catcode`|=12}
|
||||
\AddToHook{env/tabular/after}[code]{\catcode`|=13}
|
||||
\fi
|
|
@ -1,33 +0,0 @@
|
|||
__HEADER__(Include exercise sheets into lecture notes easily.)
|
||||
|
||||
\RequirePackage{xkeyval}
|
||||
__LANGUAGE_OPTIONS_X__
|
||||
|
||||
__END_OPTIONS_X__
|
||||
|
||||
\RequirePackage{mkessler-fancythm}
|
||||
|
||||
|
||||
\def__PACKAGE_MACRO__(sheet){
|
||||
__IF__(english) Exercise Sheet\else Übungsblatt\fi
|
||||
}
|
||||
|
||||
\newcounter{__PACKAGE_PREFIX__sheet}
|
||||
|
||||
\declaretheorem[style=thmgreenmargin, numberwithin=__PACKAGE_PREFIX__sheet, name=__IF__(english) Exercise\else Aufgabe\fi]{__PACKAGE_PREFIX__sheetexercise}
|
||||
|
||||
\usepackage{xkeyval}
|
||||
|
||||
\NewDocumentEnvironment{sheetexercise}{O{}}{
|
||||
\begin{__PACKAGE_PREFIX__sheetexercise\expandafter}\if\relax\detokenize{#1}\relax\else[#1]\fi\label{exercise-\the__PACKAGE_PREFIX__sheetexercise}
|
||||
}{
|
||||
\end{__PACKAGE_PREFIX__sheetexercise\expandafter}\relax
|
||||
}
|
||||
|
||||
\newcommand\exercisesheet{
|
||||
\refstepcounter{__PACKAGE_PREFIX__sheet}
|
||||
\subsection*{\the__PACKAGE_PREFIX__sheet. __PACKAGE_MACRO__(sheet)}
|
||||
\addcontentsline{toc}{subsection}{\the__PACKAGE_PREFIX__sheet. __PACKAGE_MACRO__(sheet)}
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
__HEADER__(Packages related to inclusion of figures.)
|
||||
|
||||
\RequirePackage{caption}
|
||||
\RequirePackage{subcaption}
|
||||
\RequirePackage{float}
|
|
@ -1,16 +0,0 @@
|
|||
__HEADER__(Numbering of environments with a fractional environment number)
|
||||
% For the stack exchange source, see
|
||||
% https://tex.stackexchange.com/questions/598076/how-to-have-a-fractional-environment-number/598080?noredirect=1#comment1499689_598080
|
||||
% However, for a reason i don't understand the posted answer does not work for me, but i had to replace theorem with definition in the definition of the gag environment (so apparently, i have to do this for each environment separately). It seems that the definitions of this document do use \thedefinition and not \thetheorem, although by default this is not the case.
|
||||
|
||||
\newcounter{gag}
|
||||
\makeatletter
|
||||
\newenvironment{gag}[1]{%
|
||||
\let\savedthedefinition\thedefinition
|
||||
\thm@headfont{\bfseries\boldmath}%
|
||||
\stepcounter{gag}%
|
||||
\renewcommand{\thedefinition}{\savedthedefinition#1}%
|
||||
\renewcommand{\theHdefinition}{gag\thegag}%
|
||||
\addtocounter{definition}{-1}\ignorespaces
|
||||
}{\ignorespacesafterend}
|
||||
\makeatother
|
|
@ -1,22 +0,0 @@
|
|||
__HEADER__(Packages related to language input. Still work in progress, not intended for use.)
|
||||
\RequirePackage[\ifutf utf8\else utf8x\fi]{inputenc}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
|
||||
% Font
|
||||
\RequirePackage{lmodern} % Use latin modern font
|
||||
\RequirePackage{anyfontsize} % Provides \fontsize{...}{...}\selectfont
|
||||
\RequirePackage{soul} % Hyphenation, crossing \ldots
|
||||
\RequirePackage{microtype} % Hyphenation, character protrusion, font expansion
|
||||
|
||||
% Layout
|
||||
\RequirePackage{parskip} % Leave blank line instead of indenting paragraphs
|
||||
\RequirePackage{onehalfspacing}
|
||||
\RequirePackage{changepage} % Change page layout in middle of document
|
||||
|
||||
\RequirePackage{tabto} % Tabulators
|
||||
|
||||
% Language support
|
||||
\RequirePackage[\ifenglish english \else ngerman\fi]{babel}
|
||||
|
||||
%Referencation
|
||||
\RequirePackage{lastpage} %\pageref{LastPage} for reference on the last page
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue