[texhax] Latex Question

Uwe Lueck uwe.lueck at web.de
Thu Oct 28 07:31:45 CEST 2010

vthomas at math.binghamton.edu, 08.10.2010 12:56:40:
> Suppose i am in section two of my latex
> document and within section two i am in Proposition 2.10. Now i
> want to write two equations within Proposition 2.10 and want to
> number them as (2.10.1) and (2.10.2). The only way i know to do
> that right now is use \tag command. But the problem with this is
> that if in the future i realize that i have to add a corollary
> just before Proposition 2.10, then Proposition 2.10 is
> automatically changed to Proposition 2.11 but my equations are
> still numbered (2.10.1) and (2.10.2), which ofcourse i want to
> avoid. So is there a way that the 3rd counter is changed
> automatically in latex?

You can create a new counter for "inside theorem" equations, 
reset by the "theorem" counter -- you seem to use a  "theorem" 
counter shared by all "theorem-like" environments -- for argument's 
sake I assume you indeed call it "theorem", by default or your set-up 
\thetheorem expands to `\thesection.\arabic{theorem}'. Then, e.g.:


so you can use \tag{\theeqinthm}.

With \tag, you seem to use amsmath, so you can even use the 
standard "equation" counter for \tag:


So when you add a theorem-like environment like your corollary, 
the \tag content is adjusted automatically, of course don't use 
\tag with manual content! 

Oh, may be, "inside theorem equations" are rare in your work. 
Then simply use

    ... \tag{\thetheorem.1}
    ... \tag{\thetheorem.2}

so, although the numbering is manual partially, there is an automatic 
component caring for insertions of other theorem-like environments. 

HTH -- Uwe.

More information about the texhax mailing list