From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
"Jairo A. del Rio" <jairoadelrio6@gmail.com>
Subject: Re: Hyphenation on digits
Date: Thu, 28 Jan 2021 15:00:28 +0100 [thread overview]
Message-ID: <bb2294fe-b3fb-a3a9-bbc8-9adfbb06a101@xs4all.nl> (raw)
In-Reply-To: <CAKyqqaZwaY4rEk+dHBe8vjkpZqaJKqAdcVduWrDOoeehRhLf7Q@mail.gmail.com>
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2021-01-28 14:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 11:50 Jairo A. del Rio
2021-01-28 14:00 ` Hans Hagen [this message]
2021-01-28 15:52 ` Richard Mahoney
2021-01-29 2:13 ` Fwd: " Richard Mahoney
2021-01-29 2:21 ` Jairo A. del Rio
2021-01-29 9:30 ` Henning Hraban Ramm
2021-01-29 10:25 ` Hans Hagen
2021-01-30 0:24 ` Richard Mahoney
2021-11-03 15:10 ` Jairo A. del Rio via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb2294fe-b3fb-a3a9-bbc8-9adfbb06a101@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=jairoadelrio6@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).