ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: eythanweg@gmail.com (Eythan Weg)
To: ntg-context@ntg.nl
Subject: Re: ## not permitted in the presence of &.
Date: Sat, 14 Jul 2012 17:50:39 -0400	[thread overview]
Message-ID: <87y5mm2es0.fsf@gmail.com> (raw)
In-Reply-To: <5CA7BE20-8BBC-4BCC-8CAA-B00431A182B2@gmail.com>





Thank you.  But isn't  \donknuthmode suppose to keep the
compatibility with standard  tex?  

Eythan 



Wolfgang Schuster <schuster.wolfgang@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
___________________________________________________________________________________

  reply	other threads:[~2012-07-14 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-14 15:20 Eythan Weg
2012-07-14 15:39 ` Wolfgang Schuster
2012-07-14 21:50   ` Eythan Weg [this message]
2012-07-16 16:22     ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5mm2es0.fsf@gmail.com \
    --to=eythanweg@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).