wrapping a long URL without added spaces
I can wrap a long URL using \hyphenatedurl, but not without getting some unwanted spaces before the numerous “/”s in the URL. I expect that I have missed something elementary, again. Still, my efforts to avoid the spaces have thus far been unsuccessful, so any help would be gratefully received. My current setup is [Campbell] [{http://www.very.long.edu/very/very/long/url/2002dp1.pdf}] [] [{\hyphenatedurl{http://www.very.long.edu/very/very/long/url/ 2002dp1.pdf}}] I also have \setupinteraction[state=start,color=blue,style=rm] Alan
Hi Alan, Alan Bowen wrote:
I can wrap a long URL using \hyphenatedurl, but not without getting some unwanted spaces before the numerous “/”s in the URL.
You are not telling us something, because I get no extra spaces after toying around with your description for a while. Please post a minimal file that demonstrates the problem. Greetings, Taco
Hi, Taco! Here is a minimal file that produces the problem. Note that if you comment out \setupinteraction[...], the problem goes away and the URL is wrapped nicely. Thanks for looking at this. Alan PS I am using ConTeXt ver: 2006.04.09 22:25 fmt: 2006.4.10 int: english mes: english On Apr 12, 2006, at 4:04 AM, Taco Hoekwater wrote:
Hi Alan,
Alan Bowen wrote:
I can wrap a long URL using \hyphenatedurl, but not without getting some unwanted spaces before the numerous “/”s in the URL.
You are not telling us something, because I get no extra spaces after toying around with your description for a while. Please post a minimal file that demonstrates the problem.
Greetings, Taco _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Alan Bowen wrote:
Hi, Taco!
Here is a minimal file that produces the problem. Note that if you comment out \setupinteraction[...], the problem goes away and the URL is wrapped nicely.
Ok, here is the diagnosis: The \from command calls \dogotospace which in turn calls \processisolatedwords, and at that point, \betweenisolatedwords contains the actual space that is causing the problems. I am not sure how to fix this elegantly, though. Taco
Taco— Many thanks for the diagnosis. That is a good start, but I guess that for now I will have to find another way get long interactive links into my docs. Best, Alan On Apr 12, 2006, at 8:45 AM, Taco Hoekwater wrote:
Alan Bowen wrote:
Hi, Taco!
Here is a minimal file that produces the problem. Note that if you comment out \setupinteraction[...], the problem goes away and the URL is wrapped nicely.
Ok, here is the diagnosis:
The \from command calls \dogotospace which in turn calls \processisolatedwords, and at that point, \betweenisolatedwords contains the actual space that is causing the problems.
I am not sure how to fix this elegantly, though.
Taco _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Alan Bowen wrote:
I can wrap a long URL using \hyphenatedurl, but not without getting some unwanted spaces before the numerous �/�s in the URL.
I expect that I have missed something elementary, again. Still, my efforts to avoid the spaces have thus far been unsuccessful, so any help would be gratefully received.
My current setup is
[Campbell] [{http://www.very.long.edu/very/very/long/url/2002dp1.pdf}] [] [{\hyphenatedurl{http://www.very.long.edu/very/very/long/url/ 2002dp1.pdf}}]
I also have \setupinteraction[state=start,color=blue,style=rm]
can you be more specific ... \showframe \setupinteraction[state=start] \starttext \useurl [Campbell] [http://www.very.long.edu/very/very/long/url/2002dp1.pdf] [] [http://www.very.long.edu/very/very/long/url/2002dp1.pdf] \hsize2mm\goto{\url[Campbell]}[url(Campbell)] \stoptext i see no spaces 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— The problem arises if one has [Campbell] [{http://www.very.long.edu/very/very/long/url/2002dp1.pdf}] [] [{\hyphenatedurl{http://www.very.long.edu/very/very/long/url/ 2002dp1.pdf}}] and then tries \from[Campbell] with \setupinteraction[state=start,] But I see now that I that I can get the desired wrapping using \goto rather than \hyphenatedurl and \from. Two questions • Which is preferred, \useURL or \useurl? • Is there a “\setupgoto”? I need to make the typeface in the printed URL the same as that in the body text. and thanks. Alan On Apr 13, 2006, at 7:29 AM, Hans Hagen wrote:
Alan Bowen wrote:
I can wrap a long URL using \hyphenatedurl, but not without getting some unwanted spaces before the numerous �/�s in the URL.
I expect that I have missed something elementary, again. Still, my efforts to avoid the spaces have thus far been unsuccessful, so any help would be gratefully received.
My current setup is
[Campbell] [{http://www.very.long.edu/very/very/long/url/2002dp1.pdf}] [] [{\hyphenatedurl{http://www.very.long.edu/very/very/long/url/ 2002dp1.pdf}}]
I also have \setupinteraction[state=start,color=blue,style=rm]
can you be more specific ...
\showframe
\setupinteraction[state=start]
\starttext
\useurl [Campbell] [http://www.very.long.edu/very/very/long/url/2002dp1.pdf] [] [http://www.very.long.edu/very/very/long/url/2002dp1.pdf]
\hsize2mm\goto{\url[Campbell]}[url(Campbell)]
\stoptext
i see no spaces
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Alan Bowen wrote:
Hans—
The problem arises if one has
[Campbell] [{http://www.very.long.edu/very/very/long/url/2002dp1.pdf}] [] [{\hyphenatedurl{http://www.very.long.edu/very/very/long/url/ 2002dp1.pdf}}]
and then tries \from[Campbell] with \setupinteraction[state=start,]
But I see now that I that I can get the desired wrapping using \goto rather than \hyphenatedurl and \from.
indeed, you do a double hyphenated url then
Two questions
• Which is preferred, \useURL or \useurl?
no prefered
• Is there a “\setupgoto”? I need to make the typeface in the printed URL the same as that in the body text.
\setupurl 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 -----------------------------------------------------------------
Again, thanks, Hans. Your help is very much appreciated. All best, Alan On Apr 13, 2006, at 9:00 AM, Hans Hagen wrote:
Alan Bowen wrote:
Hans—
The problem arises if one has
[Campbell] [{http://www.very.long.edu/very/very/long/url/2002dp1.pdf}] [] [{\hyphenatedurl{http://www.very.long.edu/very/very/long/url/ 2002dp1.pdf}}]
and then tries \from[Campbell] with \setupinteraction[state=start,]
But I see now that I that I can get the desired wrapping using \goto rather than \hyphenatedurl and \from.
indeed, you do a double hyphenated url then
Two questions
• Which is preferred, \useURL or \useurl?
no prefered
• Is there a “\setupgoto”? I need to make the typeface in the printed URL the same as that in the body text.
\setupurl
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Johannes Graumann wrote:
Alan Bowen wrote:
\setupurl
Alan,
Have you gotten this to work? I'm trying to get my \hyphenatedurl to be '\tt', but something like '\setupurl[style=tt]' doesn't work for me ...
does \setupurl[style=\tt] work
Joh
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Joh— All I needed was \setupurl[style=normal] to get urls printed in the bodyfont. Have you tried \setupurl[style=teletype] or \setupurl[style=type]? By the way, I am not using \hypehnatedurl any more: I define \useURL [label] [{insert url here}] [] [{insert url here}] in the preamble and then use \goto{\url[label]}[url(label)] at the desired point in the source file to get proper wrapping and hyphenation. Alan On Apr 14, 2006, at 2:21 PM, Johannes Graumann wrote:
Alan Bowen wrote:
\setupurl
Alan,
Have you gotten this to work? I'm trying to get my \hyphenatedurl to be '\tt', but something like '\setupurl[style=tt]' doesn't work for me ...
Joh
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Alan Bowen wrote:
Have you tried \setupurl[style=teletype] or \setupurl[style=type]? Neither works.
By the way, I am not using \hypehnatedurl any more: I define \useURL [label] [{insert url here}] [] [{insert url here}] in the preamble and then use \goto{\url[label]}[url(label)] at the desired point in the source file to get proper wrapping and hyphenation. Thanks for the hint.
Joh
participants (5)
-
Alan Bowen
-
Alan Bowen
-
Hans Hagen
-
Johannes Graumann
-
Taco Hoekwater