[NTG-context] Hyphenation on digits

Jairo A. del Rio jairoadelrio6 at gmail.com
Fri Jan 29 03:21:17 CET 2021


Nice. Thank you very much, it works perfectly. :)

Jairo :)

El jue, 28 de ene. de 2021 a la(s) 09:00, Hans Hagen (j.hagen at xs4all.nl)
escribió:

> On 1/28/2021 12:50 PM, Jairo A. del Rio wrote:
> > Hi, list.
> >
> > I want to know if ConTeXt provides an option to automatically
> > hyphenate/break digits as if they were alphabetic characters. Example,
> > in a narrow page I expect something like that (I've used (-) for an
> > optional hyphen):
> >
> > *π = *3.141592653(-)
> > 58979323846264(-)
> > 33832795028841(-)
> > 97169399375105(-)
> > ...
> >
> > I found myself unable to read a satisfactory solution in the mailing
> > list archive nor other TeX related resources. Maybe LMTX has some magic
> > for that?
>
> I'll add support for:
>
> \starttext
>
> \hsize6cm
>
>     \pi\ =
> \hyphenateddigits[\unknown]{3.141592653589793238462643383279502884197169399375105}
>
>   \blank
>     \pi\ =
> \hyphenateddigits{3.141592653589793238462643383279502884197169399375105}
>             \blank
> x $\pi  =
> \hyphenateddigits[\unknown]{3.141592653589793238462643383279502884197169399375105}$
>
> \blank
> x $\pi  =
> \hyphenateddigits{3.141592653589793238462643383279502884197169399375105}$
>           \blank
>
> \stoptext
>
> A quick and dirty hack as we don't need some full blown mechanism for
> such a rare case.
>
> 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
> -----------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210128/375aaff1/attachment.htm>


More information about the ntg-context mailing list