* \setbreakpoints[compound] with numbers
@ 2020-09-17 14:54 Denis Maier
2020-09-17 17:07 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Denis Maier @ 2020-09-17 14:54 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
In the texts I'm currently typesetting, I occassionaly have to deal with
ISBNs. So, e.g. 978-3-123456-78-9
\setbreakpoints[compound] does not enable automatic linebreaks after or
before the hyphens. Is there a way to deal with this? Perhaps something
similar like \hyphenatedurl{} or an extended version of \setbreakpoints.
(I currently use zero-width spaces, so I got rid of ISBNs in the
margins, but a more automatic solution would be great.)
Best,
Denis
___________________________________________________________________________________
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: \setbreakpoints[compound] with numbers
2020-09-17 14:54 \setbreakpoints[compound] with numbers Denis Maier
@ 2020-09-17 17:07 ` Hans Hagen
2020-09-18 6:20 ` Denis Maier
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2020-09-17 17:07 UTC (permalink / raw)
To: mailing list for ConTeXt users, Denis Maier
On 9/17/2020 4:54 PM, Denis Maier wrote:
> Hi,
>
> In the texts I'm currently typesetting, I occassionaly have to deal with
> ISBNs. So, e.g. 978-3-123456-78-9
>
> \setbreakpoints[compound] does not enable automatic linebreaks after or
> before the hyphens. Is there a way to deal with this? Perhaps something
> similar like \hyphenatedurl{} or an extended version of \setbreakpoints.
>
> (I currently use zero-width spaces, so I got rid of ISBNs in the
> margins, but a more automatic solution would be great.)
\unexpanded\def\isbnnumber#1%
{\cldcontext{string.gsub("#1","-","\\automaticdiscretionary")}}
\hsize 1mm \isbnnumber{123-456}
-----------------------------------------------------------------
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: \setbreakpoints[compound] with numbers
2020-09-17 17:07 ` Hans Hagen
@ 2020-09-18 6:20 ` Denis Maier
0 siblings, 0 replies; 3+ messages in thread
From: Denis Maier @ 2020-09-18 6:20 UTC (permalink / raw)
To: mailing list for ConTeXt users, Hans Hagen
Am 17.09.2020 um 19:07 schrieb Hans Hagen:
> On 9/17/2020 4:54 PM, Denis Maier wrote:
>> Hi,
>>
>> In the texts I'm currently typesetting, I occassionaly have to deal
>> with ISBNs. So, e.g. 978-3-123456-78-9
>>
>> \setbreakpoints[compound] does not enable automatic linebreaks after
>> or before the hyphens. Is there a way to deal with this? Perhaps
>> something similar like \hyphenatedurl{} or an extended version of
>> \setbreakpoints.
>>
>> (I currently use zero-width spaces, so I got rid of ISBNs in the
>> margins, but a more automatic solution would be great.)
>
> \unexpanded\def\isbnnumber#1%
> {\cldcontext{string.gsub("#1","-","\\automaticdiscretionary")}}
>
> \hsize 1mm \isbnnumber{123-456}
Thanks.
___________________________________________________________________________________
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:[~2020-09-18 6:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 14:54 \setbreakpoints[compound] with numbers Denis Maier
2020-09-17 17:07 ` Hans Hagen
2020-09-18 6:20 ` Denis Maier
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).