There seems to be more to it:

This works:
\unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr
A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect

But these generate a missing } after the \halign:
\unprotect\framed{\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr
A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}}\protect

\framed{\unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr
A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect}

Is such a construction (now) impossible?

Hans van der Meer



On 18 Apr 2013, at 3:03 PM, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:


Am 18.04.2013 um 14:55 schrieb "Meer, H. van der" 
<h.vanderm...@uva.nl<mailto:h.vanderm...@uva.nl>>:

There seems something very much amiss with \halign in later ConTeXt versions.

This typesets fine in PlainTeX and is an example taken from a textbook.

  \tabskip=1em\halign{%
  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\crA&B&C&D\cr}

Also in contextversion 2012.05.30 (from a TeXlive distribution).

But it fails at least in ConTeXt  ver: 2013.03.20 10:34 MKIV
and in ConTeXt  ver: 2013.04.16 12:08 MKIV beta
with the following error

! Only one # is allowed per tab.
system          > tex > error on line 5 in file fixedwidth.tex: Only one # is 
allowed per tab ...

 1     \starttext
 2     contextversion=\contextversion\par
 3     \tabskip=1em
 4     \halign{%
 5 >>  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\cr
 6     A&B&C&D\cr}
 7     \stoptext
l.5 \hfil\it#\hfil&\hfil#
                       \hfil&#&\hfil#\cr

Why? How primitive it may be, I would like to use \halign now and then.

The error message is misleading because the problem is & and not #.

One of the changes for MkIV was to make _, ^ and & normal characters
in the document (the first two still works for math). For code writing this
doesn’t matter because & has it’s normal meaning when you use
\unprotect … \protect but it can’t be used in the document.

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
___________________________________________________________________________________

Reply via email to