groff
[Top][All Lists]
Advanced

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

Re: [Groff] rationale for italic correction mechanism?


From: Peter Schaffter
Subject: Re: [Groff] rationale for italic correction mechanism?
Date: Sun, 10 Nov 2013 03:44:30 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Nov 10, 2013, Werner Lemberg wrote:
> There is no conflict to groff's `inability' to apply it automatically.
> What you really want is a *macro package* which does the job.  This is
> exactly the same as with TeX and LaTeX: While TeX (the program)
> doesn't apply italic correction automatically, there is LaTeX's \emph
> command which does it.

I'll look into how this might be added to mom.  Meantime, here are a
couple of things to ponder.

Use sed.  I work from structured text files and sed them for the
formats I need.  For groff, my scripts add the italic correction.
I've been using them for so long I'd forgotten italic correction was
an issue.

Another thing to think about is that with single words, you can wrap
the italic correction in a special character using '.char'.

  .char \[word] \fIword\/

If you're a nut about structural markup, this is a great way to
indicate \[word] is emphasized without presentational stuff getting
in the way.  And, I suppose, if you wanted to get fancy, you could
do this for phrases by creating a diversion to hold the phrase and
putting the diversion in the RHS of '.char'.  Something like

  .di words
  words in italic
  .di
  .char \[words-in-italic] \fI\*[words]\/

-- 
Peter Schaffter
http://www.schaffter.ca



reply via email to

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