Thank you. But isn't \donknuthmode suppose to keep the
compatibility with standard tex?
Eythan
Wolfgang Schuster <schuster.wolfg...@gmail.com>
Sat, 14 Jul 2012 17:39:12 +0200
Am 14.07.2012 um 17:20 schrieb Eythan Weg:
> Hi,
>
> I run into trouble with mkiv (ConTeXt ver:
> 2012.05.30 11:26 MKIV fmt: 2012.7.7 int:
> english/english).
>
> A small example:
> \starttext
> \def\c#1#2{\halign{##\hfil&##\cr\bf#1&\quad#2\cr}}
> \c{11}{this}
> \stoptext
>
> gives and error:
>
> ! Only one # is allowed per tab.
>
> This runs error-free under mkii (pdftex, xetex), plain tex
> (luatex, xetex), latex (luatex) etc.
>
> Would someone comment?
The error message is not very helpful in this case because the & is the
problem.
In MkIV we made a while ago _, ^ and & normal characters in the text and you
don’t have to write \_ (or \textunderscore) etc. to use them. A side effect
of this
was that \halign can’t be used anymore in a document (which isn’t recommended
anyway because ConTeXt has other high level table interfaces), when you now
want to use \halign to create a command put it in a \unprotect … \protect
block
or use the \aligntab (it’s a LuaTeX primitive with the same meaning as &).
\unprotect
\def\one#1#2{\halign{##\hfil&##\cr\bf#1&\quad#2\cr}}
\protect
\def\two#1#2{\halign{##\hfil\aligntab##\cr\bf#1\aligntab\quad#2\cr}}
\starttext
\one{underscore}{_}
\two{ampersand}{&}
\stoptext
BTW: \c is already defined as a accent macro.
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
___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________