[NTG-context] hyphenated url

Philipp Gesang pgesang at ix.urz.uni-heidelberg.de
Mon Oct 25 15:12:31 CEST 2010


On 2010-10-25 <12:45:17>, Steffen Wolfrum wrote:
> 
> Am 25.10.2010 um 12:26 schrieb Philipp Gesang:
> > \unexpanded\gdef\hyphenatedurl
> > 
> > Should work in footnotes. Regards, Philipp
> 
> 
> No, it doesn't (see below).
> Do you have an other idea?

Right; it works in footnotes but doesn’t accomplish what you
want. Sorry, I tried a lot but ‘\letterpercent’ is the only
way it works for me.

Concerning the urlencoding I referred to browsers automatically
converting raw urls, like for instance

  http://www.google.com/search?q=ähre

, which is encoded as

  http://www.google.com/search?q=%C3%A4hre

by my browser. As long as your urls mainly consist of unicode
strings you might not need the actual (ascii) percent sign.  In
this case you could be fine simply by converting strings like
‘%C3%A4hre’ to ‘Ähre’, rendering urls percent-less, and rely on
the browsers to re-encode them on the fly. Might be a bit far
fetched, though.

Philipp


> 
> Thanks, Steffen
> (ConTeXt  ver: 2010.10.21)
> 
> 
> Runaway argument?
> {test \hyphenatedurl {www.test\par \stoptext \par 
> ! File ended while scanning use of \@@notemakedescription.
> 
> system          > error on line 0 in file : File ended while scanning use of \@@notemakedescription ...
> 
> 
> \let\normalhyphenatedurl\hyphenatedurl
> 
> \bgroup
> 
> \catcode`\%=11
> 
> \unexpanded\gdef\hyphenatedurl
>  {\bgroup
>   \catcode`\%=11
>   \expandafter\egroup
>   \normalhyphenatedurl}
> 
> \egroup
> 
> \setupinteraction
>    [state=start]
> 
> \starttext
> 
> text\footnote{test \hyphenatedurl{www.test%it.com} test.} text.
> 
> \stoptext
> 
> 
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at 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
> ___________________________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20101025/ffad413a/attachment.pgp>


More information about the ntg-context mailing list