ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* 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

* Re: URL again...
  2001-08-09 11:12 URL again Joop Susan
@ 2001-08-09 12:36 ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-08-09 12:36 UTC (permalink / raw)
  Cc: ntg-context

At 01:12 PM 8/9/2001 +0200, Joop Susan wrote:

>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).

goto's honor interaction settings, so \setupinteraction[style=] should do, 
or put that in the macro VNFurl, alternatively use a \gotobox, (or 
\gotobox{\strut...}[...]) but then you loose some fine points

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: URL again...
  2001-01-28 21:05 Joop Susan
@ 2001-01-29  7:58 ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-01-29  7:58 UTC (permalink / raw)
  Cc: ntg-context

At 10:05 PM 1/28/01 +0100, Joop Susan wrote:

>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).

Well, that's a bug! In supp-lan.tex, search for \handletokens and add
"\savedurl" as in the following code snippet. Then regenerate the format. I
forgot to flush saved characters, and / can be one. 

   \let\savedurl\empty
   \handletokens#1\with\scanurl\savedurl
   \egroup}

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* 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

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-08-09 11:12 URL again Joop Susan
2001-08-09 12:36 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2001-01-28 21:05 Joop Susan
2001-01-29  7:58 ` 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).