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 -----------------------------------------------------------------
Oeps, should be: \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} (i have a slightly different one here) 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 -----------------------------------------------------------------
* Hans Hagen
\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}
Seems to work fine, thanks. nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay wrote:
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
\setupcolors [state=start] \setupinteraction [state=start] \setupurl [color=blue] \starttext \useURL[something][http://pragma-pod.com/][][something with a space] link to \from[something] here. \stoptext second arg is url, third file, fourth text ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Adam Lindsay said this at Fri, 19 Nov 2004 15:44:20 +0000:
\starttext \useURL[something][something with a space][http://pragma-pod.com/] link to \from[something] here. \stoptext
Sorry, my bad. This works: \starttext \useURL[something][http://pragma-pod.com/][][something with a space] 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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
participants (3)
-
Adam Lindsay
-
Hans Hagen
-
Nikolai Weibull