[NTG-context] Typesetting url's in ConTeXt?

Marco Pessotto melmothx at gmail.com
Sun Apr 10 20:48:41 CEST 2011


Aditya Mahajan <adityam at umich.edu> writes:

> On Sun, 10 Apr 2011, Alasdair McAndrew wrote:
>
>> There's a wiki page all about typesetting url's, but I can't seem to get
>> them to work.  All I want to do is to display a url in a typewriter font,
>> for document printing - I don't need a live link. What I want is for the
>> output to be similar to that provided by LaTeX's url package, so that, for
>> example: \url{https://This_is_a_url.html} would be appropriately typeset,
>> including all such ascii characters as underscores.
>>
>> What's the canonical way to do this?
>
> \hyphenatedurl{....}
>
> Aditya

Try this:

\setupinteraction[state=start]

\starttext

\goto{\hyphenatedurl{http://domain.tdl:6666/id=15&ln=test\letterpercent 20_test\#2}}[url(http://domain.tdl:6666/id=15&ln=test\%20_test\#2)]

\stoptext


IIRC there has been a discussion about the percent (%) in url, so maybe
this workaround isn't needed anymore. Anyway, this is what I usually use.

-- 
Marco



More information about the ntg-context mailing list