Math subformula numbering
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 \stopsubformulas and \placeformula \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} and \edef\hetnumber{#4} to \edef\hetnumber{\@@fnseparator#4} To maintain backward compatibility we can change \setupsubformulas[separator=\@@fmseparator] to \setupsubformulas[separator=] 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. Aditya
On 2/23/07, Aditya Mahajan wrote:
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 \stopsubformulas
and
\placeformula \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}
and
\edef\hetnumber{#4} to \edef\hetnumber{\@@fnseparator#4}
To maintain backward compatibility we can change
\setupsubformulas[separator=\@@fmseparator]
to
\setupsubformulas[separator=]
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.
I really don't care about that dot in my own documents. I also think that the feature is fresh enough that it can still be changed. If you ask me: do it in the most consistent possible way. Mojca
Aditya Mahajan wrote:
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.
As long as it's consistent ... I'm really sensitive for consistency -) Just send me the patches needed. (which reminds me of other pending patches but i assume that i get to know things once they're ready) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 23 Feb 2007, Hans Hagen wrote:
Aditya Mahajan wrote:
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.
As long as it's consistent ... I'm really sensitive for consistency -) Just send me the patches needed.
I will do that once I get home.
(which reminds me of other pending patches but i assume that i get to know things once they're ready)
The theorem part needs more work. I have something that works, but it needs more testing. I did not get any feedback on theorems, so I think that I really need to write a myway to show what can and cannot be done :-) Aditya
On 2/23/07, Hans Hagen wrote:
(which reminds me of other pending patches but i assume that i get to know things once they're ready)
If you also have the Norwegian one in mind: you said that one should patch ctxtools, but I don't know how you want to do it. Karl has sent two new files to CTAN: http://www.ctan.org/tex-archive/language/hyphenation/nohyph/ These two: http://www.ctan.org/tex-archive/language/hyphenation/nohyph/nnhyph.tex http://www.ctan.org/tex-archive/language/hyphenation/nohyph/nbhyph.tex should be "adapted" to lang-nn.hyp/pat lang-nb.hyp/pat but you have to decide whether to simply include four "hardcoded" files or to adapt ctxtools to parse these two files and replace "\input nohyphbx" with the appropriate name (if it's worth that). If things get changed or reorganized, you'll most probably have to adapt your scripts again anyway. They had some other feature requests, but I guess that neither of us knows how to solve them anyway, so I doubt that anyone could do much more than what has already been sent to you (language-dependent symbols, language-dependent itemizations without a dot; warnings). Mojca
Mojca Miklavec wrote:
On 2/23/07, Hans Hagen wrote:
(which reminds me of other pending patches but i assume that i get to know things once they're ready)
If you also have the Norwegian one in mind: you said that one should patch ctxtools, but I don't know how you want to do it.
Karl has sent two new files to CTAN: http://www.ctan.org/tex-archive/language/hyphenation/nohyph/
These two: http://www.ctan.org/tex-archive/language/hyphenation/nohyph/nnhyph.tex http://www.ctan.org/tex-archive/language/hyphenation/nohyph/nbhyph.tex should be "adapted" to lang-nn.hyp/pat lang-nb.hyp/pat but you have to decide whether to simply include four "hardcoded" files or to adapt ctxtools to parse these two files and replace "\input nohyphbx" with the appropriate name (if it's worth that). If things get changed or reorganized, you'll most probably have to adapt your scripts again anyway.
hm, i think that we can best forget about the exceptions and just load the patterns directly (no parsing) if needed we can add lang-nn.exc or so to the context distributions, or to a language specific section in lang-* files
They had some other feature requests, but I guess that neither of us knows how to solve them anyway, so I doubt that anyone could do much more than what has already been sent to you (language-dependent symbols, language-dependent itemizations without a dot; warnings).
someone has to wrap that up into nn and nb definitions with no as default language Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec