ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* the url color problem
@ 2004-11-19 13:42 Hans Hagen
  2004-11-19 13:44 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2004-11-19 13:42 UTC (permalink / raw)


For testing:

\def\dodouseURL[#1][#2][#3][#4]% to be redone: not too tricky redefs ad reuse
   {\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}

(nasty bug to solve in the right way)

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

\useURL[one][http://www.google.com/]

\starttext xxxx \from[one] xxxx \url[one] \stoptext


Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2004-11-19 16:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-19 13:42 the url color problem Hans Hagen
2004-11-19 13:44 ` Hans Hagen
2004-11-19 14:54   ` Nikolai Weibull
2004-11-19 15:44     ` Adam Lindsay
2004-11-19 15:54       ` Hans Hagen
2004-11-19 16:23       ` Adam Lindsay

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