ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Canonical way to escape the square brackets?
@ 2012-01-28 15:41 Marco Pessotto
  2012-01-28 17:22 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Pessotto @ 2012-01-28 15:41 UTC (permalink / raw)
  To: ntg-context


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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Canonical way to escape the square brackets?
  2012-01-28 15:41 Canonical way to escape the square brackets? Marco Pessotto
@ 2012-01-28 17:22 ` Wolfgang Schuster
  2012-01-28 18:31   ` Marco Pessotto
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2012-01-28 17:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Canonical way to escape the square brackets?
  2012-01-28 17:22 ` Wolfgang Schuster
@ 2012-01-28 18:31   ` Marco Pessotto
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Pessotto @ 2012-01-28 18:31 UTC (permalink / raw)
  To: ntg-context

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-28 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-28 15:41 Canonical way to escape the square brackets? Marco Pessotto
2012-01-28 17:22 ` Wolfgang Schuster
2012-01-28 18:31   ` Marco Pessotto

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).