ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* URL again...
@ 2001-01-28 21:05 Joop Susan
  2001-01-29  7:58 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Joop Susan @ 2001-01-28 21:05 UTC (permalink / raw)


Hello,

Is there a way to prevent '\url' from stripping trailing '/'s in the printed 
document? The '/' in the URL passed to the webbrowser is still there (as it 
should be).

I use the following code:

-----------------
% output=PDF

\setupurl
    [style=\ss]

\setupbodyfont[ss,10pt]

\setupwhitespace[medium]

\def\utest#1%
    {{\let~\tildeletter\useURL[tmp][#1]%
      \strut\useexternalfigure[web][web][factor=10]%
      \inframed[offset=none,frame=off]{\externalfigure[web]}\kern0.7mm%
      \goto{\url[tmp]}[URL(tmp)]}}

\setupcolors[state=start]

\setupinteraction[state=start,color=darkred,contrastcolor=red]

\starttext

\utest{http://www.xs4all.nl/~vnf/index.html}
We must be safe for tildes.

\utest{http://www.xs4all.nl/~vnf/}
This one should have a trailing '/'. Why hasn't it?

\utest{http://www.xs4all.nl/~vnf/index_fi.html}
We must be safe for underscores.

\utest{http://localhost/~jgsusan/main.pl?type=5&lang=nl&name=abc\%20def&use=9}
We must be safe for some more funnies...

\stoptext
-------------------

pdfeTeX, Version 3.14159-14f-released-20000525-2.1 (Web2C 7.3.2x)
ConTeXt  ver: 2000.9.21  fmt: 2001.1.26  int: english  mes: english

Joop


^ permalink raw reply	[flat|nested] 4+ messages in thread
* URL again...
@ 2001-08-09 11:12 Joop Susan
  2001-08-09 12:36 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Joop Susan @ 2001-08-09 11:12 UTC (permalink / raw)


Hello,

For some time I have used the following macro:

\setupurl [style=\ss]

\def\VNFurl#1% {{\let~\tildeletter\useURL[tmp][#1]\strut\useexternalfigure[
web][web][factor=10]\inframed[offset=none,frame=off]{\externalfigure[web]}\
kern0.7mm\goto{\url[tmp]}[URL(tmp)]}}

This was Hans' suggestion (14 Jun 2000 on this list). It has worked well 
up to now, living in a standard environment file.

Something has changed in the last context versions that causes the printed 
url's to be in boldtype. This macro was written this was because passing a 
url that contained '~'s caused problems.

I'd like to get rid of the bold type. What would be the preferred way with 
new ConTeXt versions (2001.8.6).

Thanks,

Joop


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

end of thread, other threads:[~2001-08-09 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-28 21:05 URL again Joop Susan
2001-01-29  7:58 ` Hans Hagen
2001-08-09 11:12 Joop Susan
2001-08-09 12:36 ` 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).