ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* resetting setuphyphenatedurl...
@ 2021-10-23  2:53 Rik Kabel via ntg-context
  2021-10-24 10:37 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Rik Kabel via ntg-context @ 2021-10-23  2:53 UTC (permalink / raw)
  To: ntg-context; +Cc: Rik Kabel


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

Hello List,

As demonstrated in the following example, it does not seem possible to 
reset \setuphyphenatedurlbefore, after, or normal once changed from 
default. That is, the first change appears to be global and unchangeable.

If this is the case, can someone suggest a workaround?

(Use case: I want to break URLs at any place in a bibliography but have 
additional URLs in text that follows which should be broken only in more 
standard places.)

    \starttext
    \hsize 6em

    Default: \hyphenatedurl{https://wiki.contextgarden.net/URL}

    \blank

    \bgroup
    \sethyphenatedurlnormal{:=?&/.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}
    \sethyphenatedurlbefore{:=?&/.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}
    \sethyphenatedurlafter{:=?&/.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}

    In group: \hyphenatedurl{https://wiki.contextgarden.net/URL}

    \blank
    \egroup

       \sethyphenatedurlnormal{:=?&}
       \sethyphenatedurlbefore{?&}
       \sethyphenatedurlafter{:=}

    Reset: \hyphenatedurl{https://wiki.contextgarden.net/URL}
    \stoptext

-- 
Rik


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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: resetting setuphyphenatedurl...
  2021-10-23  2:53 resetting setuphyphenatedurl Rik Kabel via ntg-context
@ 2021-10-24 10:37 ` Hans Hagen via ntg-context
  2021-10-24 14:59   ` Rik Kabel via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2021-10-24 10:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On 10/23/2021 4:53 AM, Rik Kabel via ntg-context wrote:
> Hello List,
> 
> As demonstrated in the following example, it does not seem possible to 
> reset \setuphyphenatedurlbefore, after, or normal once changed from 
> default. That is, the first change appears to be global and unchangeable.
> 
> If this is the case, can someone suggest a workaround?

in lmtx i can add support for grouping (in mkiv it would be a fragile 
hack; these settings happen in lua not in tex)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: resetting setuphyphenatedurl...
  2021-10-24 10:37 ` Hans Hagen via ntg-context
@ 2021-10-24 14:59   ` Rik Kabel via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Rik Kabel via ntg-context @ 2021-10-24 14:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Rik Kabel


On 10/24/2021 06:37, Hans Hagen wrote:
> On 10/23/2021 4:53 AM, Rik Kabel via ntg-context wrote:
>> Hello List,
>>
>> As demonstrated in the following example, it does not seem possible 
>> to reset \setuphyphenatedurlbefore, after, or normal once changed 
>> from default. That is, the first change appears to be global and 
>> unchangeable.
>>
>> If this is the case, can someone suggest a workaround?
>
> in lmtx i can add support for grouping (in mkiv it would be a fragile 
> hack; these settings happen in lua not in tex)
>
> Hans
>
Grouping would be great, since one does not have to keep track of the 
setting outside the immediate scope. However, since this is a setup 
function (per the name), perhaps a setup reset function would be an 
option. Could that be done in MkIV as well? In either case, the user 
must be able to assign new values to all three.

Otherwise, an LMTX-only function is preferable to not having a way to do 
it at all.

-- 
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2021-10-24 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-23  2:53 resetting setuphyphenatedurl Rik Kabel via ntg-context
2021-10-24 10:37 ` Hans Hagen via ntg-context
2021-10-24 14:59   ` Rik Kabel via ntg-context

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