groff
[Top][All Lists]
Advanced

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

Re: [Groff] [off] micro-typography


From: Werner LEMBERG
Subject: Re: [Groff] [off] micro-typography
Date: Fri, 08 Feb 2002 13:58:19 +0100 (CET)

> As a technical detail on this question, I am wondering how one can
> change the character which is typeset for hyphenation on-the-fly.

Use the .shc request.

> For this purpose, what I would like is that when a hyphen "-" would
> be inserted in the output as a result of automatic line-break, it is
> replaced by say "-\h'-5p'" with the apparent width of "-" being
> reduced by 5p for the purpose of computing line length.  And that
> this could be changed from place to place within the document.

Interestingly, even TeX can't do this, apparently for good reasons.
In groff, .shc only works with real glyphs from the font.  I assume
that the insertion of the hyphen in both programs occur at a very late
point in the processing; restarting the whole mechanism to parse and
handle a macro (via .char, for example) would make the algorithm much
more complicated if not impossible to work.

With other words, add a proper entry for your `half hanging hyphen'
into the font file and activate it with the shc request.

> For instance, I have seen cases where the hyphen
> ("-") is replace by a centred dot.

This is easy, provided the font has a centered period:

  .shc \[pc]

> I have even seen cases where not only is there a hyphen at the end
> of the broken line but also a hyphen at the beginning of the next
> line.  Unusual practices, no doubt; but if it's wanted it should be
> possible to do it.  The objective of groff, after all, is to get
> marks onto paper as and where they're wanted.

This isn't possible automatically.  TeX can't this neither, AFAIK.


    Werner

reply via email to

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