[NTG-context] Canonical way to escape the square brackets?

2012-01-28 Thread Marco Pessotto

Dear list,

I swear I searched the internet, but I guess the terms are too generic.
The question is: is there a safe way to escape the square brackets,
preventing them to be eaten by the previous command? For example:

\item [this should be in brackets]

My solution is:

\define\leftsquarebracket{[}
\define\rightsquarebracket{]}

\item \leftsquarebracket this should be in brackets\rightsquarebracket

I'm pretty sure there is already a built-in command for them, so I'm
asking the list.

Thanks in advance.

Best regards

-- 
Marco

___
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
___


Re: [NTG-context] Canonical way to escape the square brackets?

2012-01-28 Thread Wolfgang Schuster

Am 28.01.2012 um 16:41 schrieb Marco Pessotto:

 
 Dear list,
 
 I swear I searched the internet, but I guess the terms are too generic.
 The question is: is there a safe way to escape the square brackets,
 preventing them to be eaten by the previous command? For example:
 
 \item [this should be in brackets]
 
 My solution is:
 
 \define\leftsquarebracket{[}
 \define\rightsquarebracket{]}
 
 \item \leftsquarebracket this should be in brackets\rightsquarebracket
 
 I'm pretty sure there is already a built-in command for them, so I'm
 asking the list.

No, there isn’t but you can stop ConTeXt to look for a optional with a \relax
after the command , e.g. \item\relax.

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
___


Re: [NTG-context] Canonical way to escape the square brackets?

2012-01-28 Thread Marco Pessotto
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 Am 28.01.2012 um 16:41 schrieb Marco Pessotto:

 Dear list,
 
 I swear I searched the internet, but I guess the terms are too generic.
 The question is: is there a safe way to escape the square brackets,
 preventing them to be eaten by the previous command? For example:

 No, there isn’t but you can stop ConTeXt to look for a optional with a \relax
 after the command , e.g. \item\relax.


Ok, thanks a lot.
Cheers

-- 
Marco

___
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
___