ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Adam Lindsay" <atl@comp.lancs.ac.uk>
Subject: Re: Re: the url color problem
Date: Fri, 19 Nov 2004 15:44:20 +0000	[thread overview]
Message-ID: <20041119154420.17419@news.comp.lancs.ac.uk> (raw)
In-Reply-To: <20041119145403.GA9509@puritan.pcp.ath.cx>

Nikolai Weibull said this at Fri, 19 Nov 2004 15:54:03 +0100:

>Seems to work fine, thanks.
Not here. It still gobbles spaces in the label:

\unprotect
\def\dodouseURL[#1][#2][#3][#4]%
   {\iffirstargument
      \iffourthargument
        \setgvalue{\v!file:::#1}{\doexternaldocument[#2][#3][#4]}%
      \else\ifthirdargument
        \setgvalue{\v!file:::#1}{\doexternalurl[#2][#3][#1]}%
      \else\ifsecondargument
        \setgvalue{\v!file:::#1}{\doexternalurl[#2][][#1]}%
      \fi\fi\fi
    \fi}

\def\doexternalurl[#1][#2][#3]%
   {\bgroup
    \doifsomething\@@urstyle{\let\@@iastyle\@@urstyle\let\@@urstyle\empty}%
    \doifsomething\@@urcolor{\let\@@iacolor\@@urcolor\let\@@urcolor\empty}%
    \doexternaldocument[#1][#2][{\url[#3]}]%
    \egroup}

\protect

\setupcolors      [state=start]
\setupinteraction [state=start]
\setupurl [color=blue]

\starttext
\useURL[something][something with a space][http://pragma-pod.com/]
link to \from[something] here.
\stoptext

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay, Computing Dept.     atl@comp.lancs.ac.uk
 Lancaster University, InfoLab21        +44(0)1524/510.514
 Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2004-11-19 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19 13:42 Hans Hagen
2004-11-19 13:44 ` Hans Hagen
2004-11-19 14:54   ` Nikolai Weibull
2004-11-19 15:44     ` Adam Lindsay [this message]
2004-11-19 15:54       ` Hans Hagen
2004-11-19 16:23       ` Adam Lindsay

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=20041119154420.17419@news.comp.lancs.ac.uk \
    --to=atl@comp.lancs.ac.uk \
    --cc=ntg-context@ntg.nl \
    /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).