-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two counter aliasing utilities #2
Comments
No. The
Since you clearly understand these better, do you think there's hope in refining the current
|
Similar to
Also I'm not sure which one is right, |
Thank you. Your code is very helpful, after reading it, I changed
Notably, this works for the MWE you provided in your Issue, below is the \documentclass{article}
\usepackage{create-theorem}
\CreateTheorem{theorem}{shared counter = subsection}
\begin{document}
\section{title}
\begin{theorem}
Blah.
\end{theorem}
\begin{theorem}\label{theorem}
Blah.
\end{theorem}
\section{title}
\begin{theorem}\label{othertheorem}
Blah.
\end{theorem}
\Cref{theorem,othertheorem}.
\end{document} The result is now "Theorems 1.2 and 2.1" as expected. However I didn't make the commit yet. I'm playing with things unfamiliar to me here, and your suggestion would be most welcome :) By the way, I don't quite understand the |
For \newcounter{lemma}
\newcounter{theorem}
\newaliascnt{lemma}{theorem} then he/she will expect both For global instead of local definition, that's for being consistent with Also the initial purpose of this issue is more or less to suggest to use only one (set of) counter aliasing utility, for example stick to |
Regarding you first paragraph, this was actually designed on purpose. When using Regarding your initial purpose, I would be glad to use only P.S. Thanks for mentioning |
My current Consider the following example, which tries to change the \documentclass{article}
\usepackage{create-theorem}
\CreateTheorem{theorem}{shared counter = subsection}
\begin{document}
\section{title}
\SetTheorem{theorem}{shared counter = subsubsection}
\begin{theorem}
Blah.
\end{theorem}
\SetTheorem{theorem}{shared counter = subsection}
\begin{theorem}
Blah.
\end{theorem}
\end{document} One shall get the following error:
The error is probably caused by |
Currently two different counter aliasing macros are used
\newaliascnt
from packagealiascnt
which globally lets\c@<cnt>
,\the<cnt>
,\theH<cnt>
and\p@<cnt>
, and globally defines\cl@<cnt>
(to hold the\cl@<mirrored cnt>
)\crthm_counter_alias:nn
, which locally lets\c@<cnt>
,\cl@<cnt>
and\the<cnt>
.Are these differences on purpose?
The text was updated successfully, but these errors were encountered: