PierreSenellart / apxproof

LaTeX package for automatically putting proof environments in appendix
LaTeX Project Public License v1.3c
23 stars 8 forks source link

Parent counters with newtheoremrep #7

Closed a3nm closed 7 years ago

a3nm commented 7 years ago

To make it easier to migrate documents to apxproof, it would be nice if \newtheoremrep could support parent counters, the way it is done in amsthm. E.g., I'd like to be able to write:

\newtheoremrep{theorem}{Theorem}[section]
\newtheoremrep{lemma}[theorem]{Lemma}

and have theorems numbered like "Theorem i.j", where i is the section number and j is the theorem number, and likewise for Lemmas (with the same numbering).

Right now this doesn't work, and using \newtheoremrep{theorem}{Theorem}[section] does not number theorems following sections. I can cheat by using \newtheorem for some other environment, e.g., \newtheorem{definition}{Definition}[definition], and then use the definition counter in \newtheoremrep, but that's a bit ugly. Is it possible to fix this?

PierreSenellart commented 7 years ago

Implemented in 74f882212a5f8b913b892cbd97c110313affe94d. Can you check if the version of the develop branch meets your needs? If so, I will release a new version.

a3nm commented 7 years ago

I just tested it, and it seems to give the same result on my example document (compared using pdftotext) with the new version as it did with the workaround. So I think this is working fine! Thanks. :)

PierreSenellart commented 7 years ago

Thanks. Released 1.0.5.