Hi Aditya, Philipp and all,

thank you very much for your interesting ideas!
As far as I understood, your starting point is to avoid "%" being treated as 
"comment" ...
This is nice for controlled situations.

But in real life projects there are many, various situations where the "%" is 
used and needed as "comment"!


Isn't there a way to treat "%" as a regular character dedicated in the 
\hyphenatedurl{} environment only??


Steffen

PS @ Philipp: Using "*" as line comment would start the problem again, as "*" 
is also a valid part of URL addresses ...



of course we need to keep a character for comment.

Am 26.10.2010 um 00:49 schrieb Philipp Gesang:

> Hi Aditya, Steffen and others,
> 
> I was toying around with catcode tables too. Shouldn’t it suffice
> to simply change % to ‘other’? This way you can keep the dollar
> style math.
> 
> Philipp
> 
> ···8<····························································
> 
> \setupinteraction[state=start]
> 
> \unprotect
> \newcatcodetable \urlcatcodes % ordinary \ctxcatcodes except for minor changes
> \startcatcodetable \urlcatcodes
>    \catcode`\^^I = 10
>    \catcode`\^^M =  5
>    \catcode`\^^L =  5
>    \catcode`\    = 10
>    \catcode`\^^Z =  9
>    \catcode`\\   =  0
>    \catcode`\{   =  1
>    \catcode`\}   =  2
>    \catcode`\$   =  3
>    \catcode`\&   =  4
>    \catcode`\#   =  6
>    \catcode`\^   =  7
>    \catcode`\_   =  8
>    \catcode`\~   = 13
>    \catcode`\|   = 13
>    \catcode`\%   = \@@other
>    \catcode`\*   = \@@comment % comment this out if you don’t need line 
> comments
> \stopcatcodetable
> 
> \protect
> 
> \starttext
> 
> \bgroup
>  TEST
>  \setcatcodetable \urlcatcodes
>  \hyphenatedurl{www.test%it.com}
>  * this should be treated as comment
>  \footnote{
>    \hyphenatedurl{www.test%it.com}
>  }
>  Math mode: $(x)(y)\,(Fx\,.\,x=y\,.\supset\,Fy)$
>  TEST
> \egroup
> 
> \stoptext
> 
> ···8<····························································

___________________________________________________________________________________
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 via email to