[dev-context] Math subformula numbering

Aditya Mahajan adityam at umich.edu
Fri Feb 23 02:07:45 CET 2007

Hi Hans, Taco and Mojca,

There is a bit of inconsistency between the two subformula numbering 
methods (\startsubformulas that I wrote, and \NR[+][a] of 
\startalign). While writing a paper I realized that both of them are 
needed. For example

\startsubformulas[eq:encoder] \placeformula
   \startformula \startalign
     \NC Z_1 \EQ c_1 (X_1), \NR[eq:encoder 1]
   \intertext{and for $t=2,\dots,T$,}
     \NC Z_t \EQ c_t (X_1, \dots, X_t, \tilde Y_1, \dots, \tilde Y_{t-1}).
         \NR[eq:encoder t]
   \stopalign \stopformula


\startformula \startalign
   \NC \hat X_t \EQ g_1(Y_1) \NR[eq:decoder][a]
   \NC M_1      \EQ l_1(Y_1) \NR[eq:memory][a]
   \intertext{and for $t=2,\dots,T$,}
\decrementnumber[formula] \decrementnumber[formula]
   \NC \hat X_t \EQ g_t(Y_t, M_{t-1}) \NR[+][b]
   \NC M_t      \EQ l_t(Y_t, M_{t-1}) \NR[+][b]
\stopalign \stopformula

However, the startsubformulas uses \@@fnseparator as separator while 
\NR[+][a] uses no separator. It is relatively straight forward to make 
\NR honor the separator, in \dododoformulanumber change

\edef\hetnumber{#2} to \edef\hetnumber{\@@fnseparator#2}


\edef\hetnumber{#4} to \edef\hetnumber{\@@fnseparator#4}

To maintain backward compatibility we can change




Any comments? I think that Mojca and I are the only people who use 
\startsubformulas right now (my fault, have not documented them), so 
breaking the backward compatibility of \startsubformulas should not be 
too big a problem.


More information about the dev-context mailing list