add various shortlabels / enumerate styles to enumerate package

Build branch topology-1 (9b279f6) from kesslermaximilian/LatexPackages
This commit is contained in:
Maximilian Keßler 2021-10-26 18:36:20 +00:00
parent 9b5ae77f03
commit 4e9441b3d9
3 changed files with 81 additions and 14 deletions

View file

@ -1,8 +1,8 @@
{ {
"build_time": "", "build_time": "",
"source files": { "source files": {
"version": "v2.2.2-10", "version": "v2.2.2-20",
"commit": "8cc3232462da2584cdfaee9fb32c3ee6f345876c", "commit": "9b279f65fd45d99ffd45ca6131b07c306e15215e",
"dirty": false "dirty": false
}, },
"pytex": { "pytex": {
@ -24,9 +24,9 @@
{ {
"name": "mkessler-enumerate.sty", "name": "mkessler-enumerate.sty",
"source file": "enumerate.pysty", "source file": "enumerate.pysty",
"build time": "2021/10/24 08:55", "build time": "2021/10/26 18:36",
"source version": "v2.2.2-3", "source version": "v2.2.2-20",
"source commit hash": "1113e0ddd01036e5bad92b18c912e94bbc6f85c4", "source commit hash": "9b279f65fd45d99ffd45ca6131b07c306e15215e",
"pytex version": "v1.0.0-18", "pytex version": "v1.0.0-18",
"pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643", "pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643",
"dirty": false "dirty": false
@ -144,9 +144,9 @@
{ {
"name": "mkessler-mathop.sty", "name": "mkessler-mathop.sty",
"source file": "mathop.pysty", "source file": "mathop.pysty",
"build time": "2021/10/24 19:18", "build time": "2021/10/26 18:36",
"source version": "v2.2.2-10", "source version": "v2.2.2-20",
"source commit hash": "8cc3232462da2584cdfaee9fb32c3ee6f345876c", "source commit hash": "9b279f65fd45d99ffd45ca6131b07c306e15215e",
"pytex version": "v1.0.0-18", "pytex version": "v1.0.0-18",
"pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643", "pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643",
"dirty": false "dirty": false

View file

@ -27,7 +27,7 @@
% %
% Build details: % Build details:
% PyTeX version: v1.0.0-18 (commit 126d420) % PyTeX version: v1.0.0-18 (commit 126d420)
% Source code version: v2.2.2-10 (commit 8cc3232) % Source code version: v2.2.2-20 (commit 9b279f6)
% %
% This LaTeX package is free software and distributed under the MIT License. You % This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be % may use it freely for your purposes. The latest version of the package can be
@ -39,7 +39,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-mathop}[2021/10/24 - Math Operator Package] \ProvidesPackage{mkessler-mathop}[2021/10/26 - Math Operator Package]
%Provides some commonly used Operators used in the write-ups of my lecture notes %Provides some commonly used Operators used in the write-ups of my lecture notes
@ -131,6 +131,9 @@
%Algebra %Algebra
\DeclareSimpleMathOperator{Quot} \DeclareSimpleMathOperator{Quot}
\DeclareSimpleMathOperator{rad}
\DeclareSimpleMathOperator{Spec}
\DeclareSimpleMathOperator{Frac}
\DeclareSimpleMathOperator{Gal} \DeclareSimpleMathOperator{Gal}
\DeclareSimpleMathOperator{Ext} \DeclareSimpleMathOperator{Ext}
\DeclareSimpleMathOperator{Tor} \DeclareSimpleMathOperator{Tor}
@ -138,9 +141,9 @@
\DeclareSimpleMathOperator{Sh} \DeclareSimpleMathOperator{Sh}
\DeclareSimpleMathOperator{Proj} \DeclareSimpleMathOperator{Proj}
\DeclareSimpleMathOperator{QCoh} \DeclareSimpleMathOperator{QCoh}
\DeclareSimpleMathOperator{MaxSpec}
\DeclareSimpleMathOperator{Fun} \DeclareSimpleMathOperator{Fun}
\DeclareMathOperator{\Nil}{\mathcal{N}il} \DeclareMathOperator{\Nil}{\mathcal{N}il}
\DeclareMathOperator{\Ouv}{\mathcal{O}uv}
\DeclareMathOperator{\PreSh}{Pre-Sh} \DeclareMathOperator{\PreSh}{Pre-Sh}
\newcommand{\tensor}{\otimes} %Synonym for tensoring \newcommand{\tensor}{\otimes} %Synonym for tensoring
@ -185,10 +188,15 @@
\DeclareCategory{Grp} \DeclareCategory{Grp}
\DeclareCategory{Ab} \DeclareCategory{Ab}
\DeclareCategory{CRing} \DeclareCategory{CRing}
\DeclareCategory{Ring}
\DeclareCategory{Vect} \DeclareCategory{Vect}
\DeclareCategory{Fin} \DeclareCategory{Fin}
\DeclareCategory{Ab} \DeclareCategory{Ab}
\DeclareCategory{Cat} \DeclareCategory{Cat}
\DeclareCategory{Mod}
\DeclareCategory{AffVar}
\DeclareCategory{Alg}
\DeclareCategory{Field}
%Set theory %Set theory
\DeclareSimpleMathOperator{card} \DeclareSimpleMathOperator{card}
@ -226,3 +234,27 @@
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}} \def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
\DeclareMathOperator{\amalgprod}{\star} \DeclareMathOperator{\amalgprod}{\star}
\newcommand\op{\text{op}}
\newcommand\opposite{^{\op}}
\newcommand\ab{\text{ab}}
\newcommand\abelianization{^{\ab}}
%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$}}}

View file

@ -27,7 +27,7 @@
% %
% Build details: % Build details:
% PyTeX version: v1.0.0-18 (commit 126d420) % PyTeX version: v1.0.0-18 (commit 126d420)
% Source code version: v2.2.2-3 (commit 1113e0d) % Source code version: v2.2.2-20 (commit 9b279f6)
% %
% This LaTeX package is free software and distributed under the MIT License. You % This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be % may use it freely for your purposes. The latest version of the package can be
@ -39,11 +39,46 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-enumerate}[2021/10/24 - Simple enumeration package wrapper. Handles custom number setting and beamer class.] \ProvidesPackage{mkessler-enumerate}[2021/10/26 - Simple enumeration package wrapper. Handles custom number setting and beamer class.]
\@ifclassloaded{beamer}{}{ \@ifclassloaded{beamer}{}{
\usepackage[shortlabels]{enumitem} \RequirePackage[shortlabels]{enumitem}
\RequirePackage{tikz}
\newcommand\setItemnumber[1]{\setcounter{enum\romannumeral\@enumdepth}{\numexpr#1-1\relax}} \newcommand\setItemnumber[1]{\setcounter{enum\romannumeral\@enumdepth}{\numexpr#1-1\relax}}
\def\mkessler@enumerate@drawcircle#1{
\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};
}
}
\def\mkessler@enumerate@circled{
\protect\mkessler@enumerate@drawcircle{\arabic*}
}
\def\mkessler@enumerate@property{
(\roman*)
}
\def\mkessler@enumerate@equivalent{
(\arabic*)
}
\def\mkessler@enumerate@holds{
\arabic*)
}
\SetEnumerateShortLabel{c}{\mkessler@enumerate@circled}
\SetEnumerateShortLabel{p}{\mkessler@enumerate@property}
\SetEnumerateShortLabel{e}{\mkessler@enumerate@equivalent}
\SetEnumerateShortLabel{h}{\mkessler@enumerate@holds}
\SetEnumitemValue{label}{circled}{\mkessler@enumerate@circled}
\SetEnumitemValue{label}{property}{\mkessler@enumerate@property}
\SetEnumitemValue{label}{equivalent}{\mkessler@enumerate@equivalent}
\SetEnumitemValue{label}{holds}{\mkessler@enumerate@holds}
\SetEnumitemKey{property}{label=property}
\SetEnumitemKey{equivalent}{label=equivalent}
\SetEnumitemKey{holds}{label=holds}
\SetEnumitemKey{circled}{label=circled}
} }