groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] How to show all hyphenation points?


From: Tadziu Hoffmann
Subject: Re: [groff] How to show all hyphenation points?
Date: Fri, 9 Nov 2018 00:13:40 +0100
User-agent: Mutt/1.9.1 (2017-09-22)


> > > a request that would print its argument with all
> > > hyphenation points visible
> 
> I think this is not necessary.
> 
> > [...] single word. That is trivially handled by
> >     groff -a
> >     .ll 1u
> >     recapitulation
> 
> Exactly.  Based on that a simple macro can be constructed:
>
> [...]

That's quite ingenious!
(Also, turning off the warnings for the duration of processing
to suppress the "can't break line" messages.)


I tried prettyprinting this with dots instead of hyphens
(like in the original example), and this turns out to be a
bit more complex, because we have to chop off the hyphens
to replace them with dots.  (I fiddled around with .shc
as well, but that still leaves getting rid of the spaces.
Unfortunately, asciifying the hidden spaces brings them
back.)  Also, if we want to process more than one word
at a time, we have to distinguish between inter-word
and intra-word divisions.

Nevertheless, it's still possible to do this with the help of
a few diversions and traps, as in the attached example macros.
It's somewhat hackish and perhaps not the most compact code
possible, but at least it's reasonably easy to understand
and to modify.


Attachment: hyphenationpoints.ro
Description: Text document

Attachment: hyphenationpoints.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]