diff --git a/.ci/configure_git.sh b/.ci/configure_git.sh new file mode 100755 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 9e6036f..60f19f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,51 +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: - - 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 - - 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)" + - source .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: - - 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 - - - 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)" + - source .ci/configure_git.sh script: - echo "Building packages incrementally..." - sh .ci/ci_build.sh @@ -53,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: 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/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 diff --git a/src/math/mathop.pysty b/src/math/mathop.pysty index 5f537e1..1337941 100644 --- a/src/math/mathop.pysty +++ b/src/math/mathop.pysty @@ -123,6 +123,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} @@ -185,3 +186,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}} 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/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}}} \] 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}%