ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Steffen Wolfrum <context@st.estfiles.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de>
Subject: Re: hyphenated url
Date: Tue, 26 Oct 2010 10:57:44 +0200	[thread overview]
Message-ID: <6E1ABE79-0E7D-426B-8752-2BACD80CB507@st.estfiles.de> (raw)
In-Reply-To: <20101025224952.GD26195@aides>


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	other threads:[~2010-10-26  8:57 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25  8:25 Steffen Wolfrum
2010-10-25  9:16 ` Philipp Gesang
2010-10-25  9:39   ` Steffen Wolfrum
2010-10-25  9:50     ` Philipp Gesang
2010-10-25 10:05       ` Steffen Wolfrum
2010-10-25 10:26         ` Philipp Gesang
2010-10-25 10:45           ` Steffen Wolfrum
2010-10-25 13:12             ` Philipp Gesang
2010-10-25 15:52               ` Steffen Wolfrum
2010-10-27 21:30                 ` Peter Münster
2010-10-27 20:28               ` Steffen Wolfrum
2010-10-27 22:05                 ` Philipp Gesang
2010-10-28  6:46                   ` Steffen Wolfrum
2010-10-28  7:38                     ` Peter Münster
2010-10-28  8:03                     ` Philipp Gesang
2010-10-25 10:06   ` Steffen Wolfrum
2010-10-25 17:30 ` Aditya Mahajan
2010-10-25 20:25   ` Steffen Wolfrum
2010-10-25 21:00     ` Aditya Mahajan
2010-10-25 21:47       ` Wolfgang Schuster
2010-10-25 22:49       ` Philipp Gesang
2010-10-26  8:57         ` Steffen Wolfrum [this message]
2010-10-27 10:35         ` Steffen Wolfrum
2010-10-27 12:43           ` Wolfgang Schuster
2010-10-27 14:56             ` Peter Münster
2010-10-27 15:11               ` Steffen Wolfrum
2010-10-27 15:59               ` Wolfgang Schuster
2010-10-27 16:20                 ` Thomas A. Schmitz
2010-10-27 17:08                 ` Peter Münster
2010-10-27 17:22                   ` Peter Münster
2010-10-27 18:31                     ` Aditya Mahajan
2010-10-27 18:49                       ` Peter Münster
2010-10-28  9:03                   ` Hans Hagen
2010-10-28  9:53                     ` Peter Münster
2010-10-28 11:02                       ` Khaled Hosny
2010-10-28 11:52                         ` Peter Münster
2010-10-28 12:59                         ` Wolfgang Schuster
2010-10-28  6:53             ` Taco Hoekwater
2010-10-28 12:06               ` hyphenated url (SOLVED) Steffen Wolfrum
2010-10-28 12:50               ` hyphenated url Wolfgang Schuster
2010-10-31  6:06 ` Aditya Mahajan
2010-10-31  9:50   ` Steffen Wolfrum
     [not found]   ` <FC31827A-E920-47C4-9287-8BEE605CE94D@st.estfiles.de>
2010-10-31 20:25     ` Aditya Mahajan

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=6E1ABE79-0E7D-426B-8752-2BACD80CB507@st.estfiles.de \
    --to=context@st.estfiles.de \
    --cc=ntg-context@ntg.nl \
    --cc=pgesang@ix.urz.uni-heidelberg.de \
    /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).