From c13f6500d000a1a0875bd53c65819d95a29ee370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 11:19:07 +0200 Subject: [PATCH 1/9] remove unneccessary installs --- .gitlab-ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e6036f..ffde302 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,10 +7,7 @@ stages: # List of stages for jobs, and their order of execution get-build-repo: # This job runs in the build stage, which runs first. stage: get before_script: - - apt-get update -y && apt-get install -yqqf openssh-client git unzip sshpass rsync --fix-missing - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client git -y )' - eval $(ssh-agent -s) - - echo "$GITLAB_DEPLOY_KEY" - echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh @@ -33,8 +30,6 @@ get-build-repo: # This job runs in the build stage, which runs first. build-packages: # This job runs in the deploy stage. stage: build # It only runs when *both* jobs in the test stage complete successfully. before_script: - - apt-get update -y && apt-get install -yqqf openssh-client git unzip sshpass rsync --fix-missing - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client git -y )' - eval $(ssh-agent -s) - echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null From a0fbf61664835eaaa979e0f6e25d994378639d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 11:23:20 +0200 Subject: [PATCH 2/9] clean up gitlab ci config --- .ci/configure_git.sh | 11 +++++++++++ .gitlab-ci.yml | 42 ++++++++++-------------------------------- 2 files changed, 21 insertions(+), 32 deletions(-) create mode 100644 .ci/configure_git.sh diff --git a/.ci/configure_git.sh b/.ci/configure_git.sh new file mode 100644 index 0000000..3d3b4fd --- /dev/null +++ b/.ci/configure_git.sh @@ -0,0 +1,11 @@ +eval $(ssh-agent -s) +echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null + +mkdir -p ~/.ssh +chmod 700 ~/.ssh + +ssh-keyscan gitlab.com >> ~/.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)" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ffde302..0561506 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,46 +1,25 @@ -stages: # List of stages for jobs, and their order of execution +stages: - get - build - pages - -get-build-repo: # This job runs in the build stage, which runs first. +get-build-repo: stage: get before_script: - - eval $(ssh-agent -s) - - echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - - ssh-keyscan gitlab.com >> ~/.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)" + - .ci/configure_git.sh script: - echo "Getting old Build repo..." - .ci/get_build_repo_from_origin.sh - tags: - - latex artifacts: paths: - - build/* + - build/ + tags: + - latex -build-packages: # This job runs in the deploy stage. - stage: build # It only runs when *both* jobs in the test stage complete successfully. +build-packages: + stage: build before_script: - - eval $(ssh-agent -s) - - echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - - ssh-keyscan gitlab.com >> ~/.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)" + - .ci/configure_git.sh script: - echo "Building packages incrementally..." - sh .ci/ci_build.sh @@ -48,11 +27,10 @@ build-packages: # This job runs in the deploy stage. GIT_SUBMODULE_STRATEGY: recursive artifacts: paths: - - build/* + - build/ tags: - latex - pages: stage: pages artifacts: From 3f0fd326c266352888c056bb8e43d4c5d4fd2110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 11:24:07 +0200 Subject: [PATCH 3/9] make script executable --- .ci/configure_git.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .ci/configure_git.sh diff --git a/.ci/configure_git.sh b/.ci/configure_git.sh old mode 100644 new mode 100755 From dd60e7cba7a0693313d9248ddf87c5244912822a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 11:26:00 +0200 Subject: [PATCH 4/9] source git set up script --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0561506..60f19f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: get-build-repo: stage: get before_script: - - .ci/configure_git.sh + - source .ci/configure_git.sh script: - echo "Getting old Build repo..." - .ci/get_build_repo_from_origin.sh @@ -19,7 +19,7 @@ get-build-repo: build-packages: stage: build before_script: - - .ci/configure_git.sh + - source .ci/configure_git.sh script: - echo "Building packages incrementally..." - sh .ci/ci_build.sh From 5a7525ffa42840583a06447de29322f8cc77318f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 21:06:08 +0200 Subject: [PATCH 5/9] faktor: change order of optional arguments to not bother with '[' charactor after faktor --- src/math/faktor.pysty | 24 ++++++++++++------------ tests/math/faktor/test.tex | 6 +++--- tests/wip/exercises/test.toc | 3 --- 3 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 tests/wip/exercises/test.toc diff --git a/src/math/faktor.pysty b/src/math/faktor.pysty index 81b3a6a..2f450a4 100644 --- a/src/math/faktor.pysty +++ b/src/math/faktor.pysty @@ -18,26 +18,26 @@ __HEADER__(Faktor package that also handles cofaktors) \RequirePackage{mathtools} -\DeclareDocumentCommand{\faktor}{s m O{0.5} m O{-0.5}}{% \newfaktor[*]{#2}[#3]{#4}[#5] -> #2/#4 - \setbox0=\hbox{\ensuremath{#2}}% Store numerator +\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{#4}}% Store denominator - \raisebox{#3\ht1}{\usebox0}% Numerator + \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[#5\ht2]{0.4pt}{-#5\ht2+#3\ht0+\ht0}}}% tilted rule as a slash + {\rotatebox{-44}{\rule[#4\ht2]{0.4pt}{-#4\ht2+#2\ht0+\ht0}}}% tilted rule as a slash \mkern-4mu% - \raisebox{#5\ht2}{\usebox2}% Denominator + \raisebox{#4\ht2}{\usebox2}% Denominator } -\DeclareDocumentCommand{\cofaktor}{s m O{-0.5} m O{0.5}}{% \newfaktor[*]{#2}[#3]{#4}[#5] -> #2/#4 - \setbox0=\hbox{\ensuremath{#2}}% Store numerator +\DeclareDocumentCommand{\cofaktor}{s m O{-0.5} m O{0.5}}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #2\#4 + \setbox0=\hbox{\ensuremath{#3}}% Store numerator \setbox1=\hbox{\ensuremath{\diagdown}}% Store slash / - \setbox2=\hbox{\ensuremath{#4}}% Store denominator - \raisebox{#3\ht1}{\usebox0}% Numerator + \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[-#5\ht2]{0.4pt}{#5\ht2-#3\ht0+\ht0}}}% tilted rule as a slash + {\rotatebox{44}{\rule[-#4\ht2]{0.4pt}{#4\ht2-#2\ht0+\ht0}}}% tilted rule as a slash \mkern-4mu% - \raisebox{#5\ht2}{\usebox2}% Denominator + \raisebox{#4\ht2}{\usebox2}% Denominator } diff --git a/tests/math/faktor/test.tex b/tests/math/faktor/test.tex index b2deb2b..3191431 100644 --- a/tests/math/faktor/test.tex +++ b/tests/math/faktor/test.tex @@ -5,12 +5,12 @@ \begin{document} \[ - \faktor{A}{B} \cong \cofaktor{A}{B} + \faktor{A}{B} \cong \cofaktor{C}{D} \] \[ - \faktor{A}[1]{B}[-1.5] \cong \cofaktor{A}[-1]{B}[0.5] + \faktor[1]{A}[-1.5]{B} \cong \cofaktor[-1]{A}[0.5]{B} \] \[ - \cofaktor*{A}[-1]{B}[2] = x + \cofaktor*[-1]{A}[2]{B} = x \] \end{document} diff --git a/tests/wip/exercises/test.toc b/tests/wip/exercises/test.toc deleted file mode 100644 index ac51e5c..0000000 --- a/tests/wip/exercises/test.toc +++ /dev/null @@ -1,3 +0,0 @@ -\contentsline {section}{\numberline {1}test}{1}{section.1}% -\contentsline {subsection}{1. Exercise Sheet}{1}{section*.2}% -\contentsline {subsection}{2. Exercise Sheet}{1}{section*.3}% From c24a383950bcac473f1482579cf55cd4f93d5728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 21:15:21 +0200 Subject: [PATCH 6/9] operators: add sing operator for singular homology --- src/math/mathop.pysty | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math/mathop.pysty b/src/math/mathop.pysty index 0c5c3b1..1f04705 100644 --- a/src/math/mathop.pysty +++ b/src/math/mathop.pysty @@ -120,6 +120,7 @@ __END_OPTIONS_X__ \DeclareSimpleMathOperator{pr} \def\twedge{\vee} % Semantically correct macros for wedge product \def\tsmash{\wedge} % Semantically correct macro for smash product +\DeclareSimpleMathOperator{sing} %Category Theory \DeclareSimpleMathOperator{Ob} From 8cc3232462da2584cdfaee9fb32c3ee6f345876c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 21:17:40 +0200 Subject: [PATCH 7/9] mathalias: add aliases for \mathbb{} in extended mode --- src/math/mathalias.pysty | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math/mathalias.pysty b/src/math/mathalias.pysty index fbb1fcd..bf9d00f 100644 --- a/src/math/mathalias.pysty +++ b/src/math/mathalias.pysty @@ -40,4 +40,5 @@ __IF__(basic) __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 From 356c7a3e1227ae8092bad4db7f170080429ce960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 25 Oct 2021 09:00:04 +0200 Subject: [PATCH 8/9] tests for future math operators --- tests/math/mathop/test.tex | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/math/mathop/test.tex b/tests/math/mathop/test.tex index 0d9816a..9c606be 100644 --- a/tests/math/mathop/test.tex +++ b/tests/math/mathop/test.tex @@ -2,7 +2,24 @@ \usepackage{mkessler-mathop} + +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{mathtools} % loads »amsmath« +\usepackage{graphicx} +\usepackage{relsize} + +\DeclareMathOperator*{\name}{\raisebox{-0.5ex}{\scalebox{2}{$\ast$}}} + + \begin{document} + + a = b = $\name_a^b cd\sum_a^b \int_a^b \name_a^b$ + +\[ +A\name_C D\name_a^b \sum_a^b +\] + \[ \Gal \Quot \PreSh \tensor \Var \Br \Set \CHaus \cfun \One \left\lfloor \frac{1}{\frac{3}{\frac{7}{8}}} \right\rfloor \abs{\frac{1}{\frac{8}{\frac{4}{3}}}} \lVert \frac{a}{\frac{b}{c}} \rVert \left< \frac{a}{\frac{b}{c}} \right> \norm{\frac{a}{\frac{b}{c}}} \norm{test} \norm{\frac{a}{\frac{b}{c}}} \] From 54afb2f0258f3dfbedcadb8e5a22e7b09c9b8cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 25 Oct 2021 09:09:56 +0200 Subject: [PATCH 9/9] add shortcuts for opposite categories and abelianization --- src/math/mathop.pysty | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/math/mathop.pysty b/src/math/mathop.pysty index 1f04705..0a2aaa7 100644 --- a/src/math/mathop.pysty +++ b/src/math/mathop.pysty @@ -178,3 +178,10 @@ __END_OPTIONS_X__ \def\norm{\@ifstar{\oldnorm}{\oldnorm*}} \DeclareMathOperator{\amalgprod}{\star} + + +\newcommand\op{\text{op}} +\newcommand\opposite{^{\op}} + +\newcommand\ab{\text{ab}} +\newcommand\abelianization{^{\ab}}