add various shortlabels / enumerate styles to enumerate package
This commit is contained in:
parent
7116da1450
commit
9b279f65fd
2 changed files with 80 additions and 1 deletions
|
@ -1,6 +1,41 @@
|
|||
__HEADER__(Simple enumeration package wrapper. Handles custom number setting and beamer class.)
|
||||
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\usepackage[shortlabels]{enumitem}
|
||||
\RequirePackage[shortlabels]{enumitem}
|
||||
\RequirePackage{tikz}
|
||||
\newcommand\setItemnumber[1]{\setcounter{enum\romannumeral\@enumdepth}{\numexpr#1-1\relax}}
|
||||
|
||||
\def__PACKAGE_MACRO__(drawcircle)#1{
|
||||
\tikz[baseline=(char.base)]{
|
||||
\node[shape=circle,draw,inner sep=2pt] (char) {#1};
|
||||
}
|
||||
}
|
||||
|
||||
\def__PACKAGE_MACRO__(circled){
|
||||
\protect__PACKAGE_MACRO__(drawcircle){\arabic*}
|
||||
}
|
||||
\def__PACKAGE_MACRO__(property){
|
||||
(\roman*)
|
||||
}
|
||||
\def__PACKAGE_MACRO__(equivalent){
|
||||
(\arabic*)
|
||||
}
|
||||
\def__PACKAGE_MACRO__(holds){
|
||||
\arabic*)
|
||||
}
|
||||
|
||||
\SetEnumerateShortLabel{c}{__PACKAGE_MACRO__(circled)}
|
||||
\SetEnumerateShortLabel{p}{__PACKAGE_MACRO__(property)}
|
||||
\SetEnumerateShortLabel{e}{__PACKAGE_MACRO__(equivalent)}
|
||||
\SetEnumerateShortLabel{h}{__PACKAGE_MACRO__(holds)}
|
||||
|
||||
\SetEnumitemValue{label}{circled}{__PACKAGE_MACRO__(circled)}
|
||||
\SetEnumitemValue{label}{property}{__PACKAGE_MACRO__(property)}
|
||||
\SetEnumitemValue{label}{equivalent}{__PACKAGE_MACRO__(equivalent)}
|
||||
\SetEnumitemValue{label}{holds}{__PACKAGE_MACRO__(holds)}
|
||||
|
||||
\SetEnumitemKey{property}{label=property}
|
||||
\SetEnumitemKey{equivalent}{label=equivalent}
|
||||
\SetEnumitemKey{holds}{label=holds}
|
||||
\SetEnumitemKey{circled}{label=circled}
|
||||
}
|
||||
|
|
44
tests/wip/enumerate/test.tex
Normal file
44
tests/wip/enumerate/test.tex
Normal file
|
@ -0,0 +1,44 @@
|
|||
\documentclass{article}
|
||||
|
||||
|
||||
\usepackage{mkessler-enumerate}
|
||||
|
||||
\begin{document}
|
||||
\begin{enumerate}[1)]
|
||||
\item test
|
||||
\item test
|
||||
\end{enumerate}
|
||||
|
||||
\begin{enumerate}[property]
|
||||
\item test
|
||||
\end{enumerate}
|
||||
|
||||
\begin{enumerate}[p]
|
||||
\item property
|
||||
\end{enumerate}
|
||||
|
||||
\begin{enumerate}[equivalent]
|
||||
\item test
|
||||
\end{enumerate}
|
||||
|
||||
\begin{enumerate}[holds]
|
||||
\item test
|
||||
\end{enumerate}
|
||||
|
||||
\begin{enumerate}[circled]
|
||||
\item tes
|
||||
\item
|
||||
\item
|
||||
\item \item \item \item \item \item \item
|
||||
\end{enumerate}
|
||||
|
||||
\begin{enumerate}[c]
|
||||
\item
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\newcounter{test}
|
||||
\stepcounter{test}
|
||||
\arabic{test}
|
||||
|
||||
\end{document}
|
Loading…
Reference in a new issue