[texhax] Request informations
Philip G. Ratcliffe
philip.ratcliffe at uninsubria.it
Thu Jan 8 12:44:44 CET 2004
> I have a little probleme
> maybe two
>
> the first is that I'm not so clever using Latex
>
> The second is that I like to insert the equations in my
> tesis in the following way of numbering:
>
> equ_1 1.1.a
> equ_2 1.1.b
> equ_3 1.1.c
> equ_4 1.1.d
> equ_5 1.1.e
>
> In this moment with the command subequations and using the
> ansmath package I am able to write in this way
>
> equ_1 1.1a
> equ_2 1.1b
> equ_3 1.1c
> equ_4 1.1d
> equ_5 1.1e
I can see two ways:
1. a local hack - use (every time!)
\bgroup%
\let\oldtheequation\theequation
\def\theequation{\oldtheequation.}
\begin{subequations}
\begin{...}
...
\end{...}
\end{subequations}
\egroup%
2. a global hack - copy the amsmath defnition of the subequations
environment and put the period in yourself - can you see it below? Beware
though, amsmath may change the original definition in some future upgrade,
without notification! Note too the \renewenvironment.
\makeatletter
\renewenvironment{subequations}{%
\refstepcounter{equation}%
\protected at edef\theparentequation{\theequation}%
\setcounter{parentequation}{\value{equation}}%
\setcounter{equation}{0}%
\def\theequation{\theparentequation.\alph{equation}}%
\ignorespaces
}{%
\setcounter{equation}{\value{parentequation}}%
\ignorespacesafterend
}
\makeatother
The \makeatletter \makeatother pair are necessary if you put this in your
preamble but not if you put it in, say, 'subeqhack.sty' and load that with
\usepackage{subeqhack} AFTER amsmath.
Cordialmente, Philip G. Ratcliffe
More information about the texhax
mailing list