ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \hyphenatedurl problem
@ 2015-04-11  5:20 Rik
  2015-04-13 17:19 ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Rik @ 2015-04-11  5:20 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1028 bytes --]

With versions from 20150325 and earlier, the following example code 
produced nicely wrapped URLs. With current betas, the URLs do not wrap.

(Perhaps this is what Wolfgang meant when he wrote, in a reply in the 
thread _Turning off French character spacing_:

    The \url and \hyphenatedurl need to be fixed

but I do not know that for sure.)

    \setupinteraction[state=start]
    \starttexdefinition href #1
       \goto{\hyphenatedurl{#1}}[url(#1)]
    \stoptexdefinition
    \useURL[aUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable]
    \useURL[bUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable][][\hyphenatedurl{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}]
    \starttext
    goto href macro:
    \href{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}\par
    useURL without hyphenatedurl \from[aUrl]\par
    useURL with hyphenatedurl \from[bUrl]\par
    \stoptext

-- 
Rik Kabel



[-- Attachment #1.2: Type: text/html, Size: 2021 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \hyphenatedurl problem
  2015-04-11  5:20 \hyphenatedurl problem Rik
@ 2015-04-13 17:19 ` Pablo Rodriguez
  2015-04-13 18:45   ` Rik Kabel
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2015-04-13 17:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/11/2015 07:20 AM, Rik wrote:
> With versions from 20150325 and earlier, the following example code
> produced nicely wrapped URLs. With current betas, the URLs do not wrap.

Hi Rik,

with beta from 2015.04.12 15:41, urls are wrapped.

Just in case it helps,


Pablo



> (Perhaps this is what Wolfgang meant when he wrote, in a reply in the
> thread _Turning off French character spacing_:
> 
>     The \url and \hyphenatedurl need to be fixed
> 
> but I do not know that for sure.)
> 
>     \setupinteraction[state=start]
>     \starttexdefinition href #1
>       \goto{\hyphenatedurl{#1}}[url(#1)]
>     \stoptexdefinition
>     \useURL[aUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable]
>     \useURL[bUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable][][\hyphenatedurl{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}]
>     \starttext
>     goto href macro:
>     \href{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}\par
>     useURL without hyphenatedurl \from[aUrl]\par
>     useURL with hyphenatedurl \from[bUrl]\par
>     \stoptext
> 
> -- 
> Rik Kabel
> 
> 
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \hyphenatedurl problem
  2015-04-13 17:19 ` Pablo Rodriguez
@ 2015-04-13 18:45   ` Rik Kabel
  0 siblings, 0 replies; 5+ messages in thread
From: Rik Kabel @ 2015-04-13 18:45 UTC (permalink / raw)
  To: ntg-context

On 2015-04-13 13:19, Pablo Rodriguez wrote:
> On 04/11/2015 07:20 AM, Rik wrote:
>> With versions from 20150325 and earlier, the following example code
>> produced nicely wrapped URLs. With current betas, the URLs do not wrap.
> Hi Rik,
>
> with beta from 2015.04.12 15:41, urls are wrapped.
>
> Just in case it helps,
>
>
> Pablo
>
>
>
>> (Perhaps this is what Wolfgang meant when he wrote, in a reply in the
>> thread _Turning off French character spacing_:
>>
>>      The \url and \hyphenatedurl need to be fixed
>>
>> but I do not know that for sure.)
>>
>>      \setupinteraction[state=start]
>>      \starttexdefinition href #1
>>        \goto{\hyphenatedurl{#1}}[url(#1)]
>>      \stoptexdefinition
>>      \useURL[aUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable]
>>      \useURL[bUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable][][\hyphenatedurl{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}]
>>      \starttext
>>      goto href macro:
>>      \href{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}\par
>>      useURL without hyphenatedurl \from[aUrl]\par
>>      useURL with hyphenatedurl \from[bUrl]\par
>>      \stoptext
Yes, I saw that this morning before I headed out.

Thank you, Hans, for the fix.

-- 
Rik
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \hyphenatedurl problem
  2003-12-21 22:35 Tobias Burnus
@ 2003-12-22 11:36 ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2003-12-22 11:36 UTC (permalink / raw)


At 23:35 21/12/2003, you wrote:
>Hi,
>
>I'm sure I miss something obvious but I have no clue what it is.
>I have:
>
>\def\gotoDOI#1{\hyphenatedurl#1}

\def\gotoDOI#1{\hyphenatedurl{#1}}

otherwise the first token in #1 becomes the argument to \hyphenatedurl


>       \gotoDOI{10.1016/S0009-2614(01)01361-6}
                 ^
                 in your def it's now \hyphenatedurl -> #1 == 1 and the 
0.... is just text

>\hyphenatedurl{10.1016/S0009-2614(01)01361-6}
>
>and I redefined supp-lan.tex's \scanurl to hyphenate at '(' and ')'.

    \else\if#1(%
      \flushurl\splitbefore(%
    \else\if#1)%
      \flushurl\splitafter)%


    ...\fi\fi...

Hans  

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

* \hyphenatedurl problem
@ 2003-12-21 22:35 Tobias Burnus
  2003-12-22 11:36 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Burnus @ 2003-12-21 22:35 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

Hi,

I'm sure I miss something obvious but I have no clue what it is.
I have:

\def\gotoDOI#1{\hyphenatedurl#1}

      \gotoDOI{10.1016/S0009-2614(01)01361-6}
\hyphenatedurl{10.1016/S0009-2614(01)01361-6}

and I redefined supp-lan.tex's \scanurl to hyphenate at '(' and ')'.

The strange thing is: Using gotoDOI the linebreak comes after the last
'-' ('...01361-' // '6') while using hyphenatedurl it's '...(01)' //
'01361-6' (the latter is desired).

See attached test case.


The real definition of gotoDOI will be:
\def\gotoDOI#1{\useURL[doi][#1]\useURL[doiurl][http://dx.doi.org/#1]%
               \goto{\url[doi]}[url(doiurl)]}


MERRY CHRISTMAS (or happy holidays) AND A HAPPY NEW YEAR!


Tobias


PS: Hans, can you include ( and ) as places where a hyphenation may
happen?

[-- Attachment #2: test.tex --]
[-- Type: application/x-tex, Size: 1726 bytes --]

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

end of thread, other threads:[~2015-04-13 18:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-11  5:20 \hyphenatedurl problem Rik
2015-04-13 17:19 ` Pablo Rodriguez
2015-04-13 18:45   ` Rik Kabel
  -- strict thread matches above, loose matches on Subject: below --
2003-12-21 22:35 Tobias Burnus
2003-12-22 11:36 ` 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).