ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Unescaped $ and & in texts
@ 2008-12-17 20:04 Wolfgang Schuster
  2008-12-17 20:46 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2008-12-17 20:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Can't we add a new mode to ConTeXt to use $ and & in text
without escaping them with a backslash, & is not needed
to write tables and for inline math \formula could be used.

In text only documents I want also the % as normal character
where I don't need comments. What do you think, with \nonknuthmode
we have already a command to write '_' in text mode.

\appendtoks
\catcode`\$=12
\catcode`\&=12
\catcode`\%=12
\to \everystarttext

\starttext

Procter & Gamble’s stock climbed to $2, a 10% gain.

\stoptext

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Unescaped $ and & in texts
  2008-12-17 20:04 Unescaped $ and & in texts Wolfgang Schuster
@ 2008-12-17 20:46 ` Aditya Mahajan
  2008-12-17 21:08   ` Wolfgang Schuster
  2008-12-17 21:42   ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Aditya Mahajan @ 2008-12-17 20:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 17 Dec 2008, Wolfgang Schuster wrote:

> Can't we add a new mode to ConTeXt to use $ and & in text
> without escaping them with a backslash, & is not needed
> to write tables and for inline math \formula could be used.

Also add # to the list. Basically, we can just define a catcode regime 
where only \ { and } are special. Inside math mode (activated by \formula, 
\math, \mathematics, or \startformula) we can switch to a catcode regime 
where _ and ^ are also set to appropriate catcodes. I would go as far as 
to say that we should make this default, but I don't think everyone will 
like that. So, for me a \justwritenaturally macro will do :-)

Aditya
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Unescaped $ and & in texts
  2008-12-17 20:46 ` Aditya Mahajan
@ 2008-12-17 21:08   ` Wolfgang Schuster
  2008-12-17 21:42   ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2008-12-17 21:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 17.12.2008 um 21:46 schrieb Aditya Mahajan:

> On Wed, 17 Dec 2008, Wolfgang Schuster wrote:
>
>> Can't we add a new mode to ConTeXt to use $ and & in text
>> without escaping them with a backslash, & is not needed
>> to write tables and for inline math \formula could be used.
>
> Also add # to the list. Basically, we can just define a catcode  
> regime where only \ { and } are special. Inside math mode (activated  
> by \formula, \math, \mathematics, or \startformula) we can switch to  
> a catcode regime where _ and ^ are also set to appropriate catcodes.  
> I would go as far as to say that we should make this default, but I  
> don't think everyone will like that. So, for me a  
> \justwritenaturally macro will do :-)

I wasn't sure if I should add # to the list bit it makes sense.

\nonknuthmode takes care to tread _ and ^ as subscript and superscript
in math mode and as normal chars in text mode.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Unescaped $ and & in texts
  2008-12-17 20:46 ` Aditya Mahajan
  2008-12-17 21:08   ` Wolfgang Schuster
@ 2008-12-17 21:42   ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2008-12-17 21:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> On Wed, 17 Dec 2008, Wolfgang Schuster wrote:
> 
>> Can't we add a new mode to ConTeXt to use $ and & in text
>> without escaping them with a backslash, & is not needed
>> to write tables and for inline math \formula could be used.
> 
> Also add # to the list. Basically, we can just define a catcode regime 
> where only \ { and } are special. Inside math mode (activated by 
> \formula, \math, \mathematics, or \startformula) we can switch to a 
> catcode regime where _ and ^ are also set to appropriate catcodes. I 

there is already \nonknuthmode -)

> would go as far as to say that we should make this default, but I don't 
> think everyone will like that. So, for me a \justwritenaturally macro 
> will do :-)

we can discuss this some time next year or so; it is slightly more 
complex than changing a few catcoded because we need to make sure that 
modules etc are loaded under a different catcode regime then

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2008-12-17 21:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-17 20:04 Unescaped $ and & in texts Wolfgang Schuster
2008-12-17 20:46 ` Aditya Mahajan
2008-12-17 21:08   ` Wolfgang Schuster
2008-12-17 21:42   ` Hans Hagen

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