[NTG-context] startalign broken in latest checkout

2012-07-04 Thread Prashanth

Hi,
The latest checkout has a problem with even the most trivial example of 
\startalign (taken from the wiki):

\starttext
\startformula \startalign
 \NC v \NC = u + at \NR
 \NC h \NC= ut + \frac12 gt^2 \NR
\stopalign \stopformula
\stoptext


% context --version

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file: 
/opt/context-minimals/texmf-context/tex/context/base/context.mkiv

mtx-context | current version: 2012.07.04 15:55

Output
*
* ConTeXt-IV output:
* cd /home/3shared/Source/prash/doc/context-trials
* context --nonstopmode demo.context
*

mtx-context | run 1: luatex 
--fmt=/home/prash/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en 
--interaction=nonstopmode --jobname=demo 
--lua=/home/prash/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui 
--no-parse-first-line --c:currentrun=1 --c:input=./demo.context 
--c:kindofrun=1 --c:nonstopmode cont-yes.mkiv

This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012)
 \write18 enabled.
(/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2012.07.04 15:55 MKIV  fmt: 2012.7.4  int: english/english

system  gt; cont-new.mkiv loaded
(/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv
system  gt; beware: some patches loaded from cont-new.mkiv
)
fonts   gt; latin modern fonts are not preloaded
languages   gt; language en is active
(demo.context{/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}
fonts   gt; preloading latin modern fonts (second stage)
fonts   gt; typescripts gt; unknown: library 'loc'
{/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map}
fonts   gt; virtual math gt; unable to resolve name mapsfromchar
fonts   gt; fallback modern rm 12pt is loaded
! Use of \expandafter doesn't match its definition.

system  gt; tex gt; error on line 4 in file demo.context: Use 
of  ...


1 \starttext
2
3 \startformula \startalign
4 gt;gt;   \NC v \NC = u + at \NR
5  \NC h \NC= ut + \frac12 gt^2 \NR
6 \stopalign \stopformula
7
8 \stoptext
9


\math_both_eqalign_no_aligned ...andafter \bgroup
  \the \scratchtoks \crcr
lt;to be read againgt;
   \NC
l.4  \NC
 v \NC = u + at \NR
! Missing { inserted.

system  gt; tex gt; error on line 4 in file demo.context: 
Missing { inserted ...


1 \starttext
2
3 \startformula \startalign
4 gt;gt;   \NC v \NC = u + at \NR
5  \NC h \NC= ut + \frac12 gt^2 \NR
6 \stopalign \stopformula
7
8 \stoptext
9

lt;to be read againgt;
   \crcr
lt;to be read againgt;
   \NC
l.4  \NC
 v \NC = u + at \NR
! Missing # inserted in alignment preamble.

system  gt; tex gt; error on line 4 in file demo.context: 
Missing # inserted in alignment preamble ...


1 \starttext
2
3 \startformula \startalign
4 gt;gt;   \NC v \NC = u + at \NR
5  \NC h \NC= ut + \frac12 gt^2 \NR
6 \stopalign \stopformula
7
8 \stoptext
9

lt;to be read againgt;
   \crcr
lt;to be read againgt;
   \NC
l.4  \NC
 v \NC = u + at \NR
! Extra alignment tab has been changed to \cr.

system  gt; tex gt; error on line 4 in file demo.context: 
Extra alignment tab has been changed to \cr ...


1 \starttext
2
3 \startformula \startalign
4 gt;gt;   \NC v \NC = u + at \NR
5  \NC h \NC= ut + \frac12 gt^2 \NR
6 \stopalign \stopformula
7
8 \stoptext
9

lt;templategt; \endtemplate

\math_alignment_NC -gt;\aligntab

l.4  \NC v \NC
   = u + at \NR
! Extra alignment tab has been changed to \cr.

system  gt; tex gt; error on line 4 in file demo.context: 
Extra alignment tab has been changed to \cr ...


1 \starttext
2
3 \startformula \startalign
4 gt;gt;   \NC v \NC = u + at \NR
5  \NC h \NC= ut + \frac12 gt^2 \NR
6 \stopalign \stopformula
7
8 \stoptext
9

lt;templategt; \endtemplate

\NR -gt;\aligntab
\dostoptagged \dodoubleempty \math_alignment_NR_indeed
l.4  \NC v \NC = u + at \NR

! Use of \expandafter doesn't match its definition.

system  gt; tex gt; error on line 5 in file demo.context: Use 
of  ...


1 \starttext
2
3 \startformula \startalign
4  \NC v \NC = u + at \NR
5 gt;gt;   \NC h \NC= ut + \frac12 gt^2 \NR
6 \stopalign \stopformula
7
8 \stoptext
9


\syst_helpers_inspect_next_optional_character ...
  \fi
lt;to be read againgt;
   \NC
l.5  \NC
 h \NC= ut + \frac12 gt^2 \NR
! Extra alignment tab has been changed to \cr.

system  gt; tex gt; error on line 5 in file demo.context: 
Extra alignment 

Re: [NTG-context] startalign broken in latest checkout

2012-07-04 Thread Wolfgang Schuster

Am 04.07.2012 um 18:24 schrieb Prashanth:

 Hi,
 The latest checkout has a problem with even the most trivial example of 
 \startalign (taken from the wiki):
 \starttext
 \startformula \startalign
  \NC v \NC = u + at \NR
  \NC h \NC= ut + \frac12 gt^2 \NR
 \stopalign \stopformula
 \stoptext

strc-mat.mkiv (I’m not sure if the first change after \dorecurse is correct)

\def\math_build_eqalign
  {\scratchtoks\emptytoks
-  \dorecurse{\mathalignmentparameter\c!m}\def\math_build_eqalign
+  \dorecurse{\mathalignmentparameter\c!m}\math_build_eqalign_step
   \normalexpanded{\scratchtoks{\the\scratchtoks\the\c_math_align_c}}}

\def\math_alignment_NR_indeed[#1][#2]%
- {\donestedformulanumber{#1}{#2}% to be tagged (better an attribute)
+ {\strc_formulas_place_number_nested{#1}{#2}% to be tagged (better an 
attribute)
   \crcr
   \dostoptagged % finish row
   \noalign{\glet\math_alignment_NC\math_alignment_NC_first}} % noalign used 
for change state, conditional does not work here

\def\math_align_NR_generic[#1][#2]%
- {\donestedformulanumber{#1}{#2}\crcr}
+ {\strc_formulas_place_number_nested{#1}{#2}\crcr}

Wolfgang___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___