groff
[Top][All Lists]
Advanced

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

[Groff] LaTeX-style `emph'


From: Robert D. Goulding
Subject: [Groff] LaTeX-style `emph'
Date: Sun, 1 Dec 2002 23:22:55 -0500 (EST)

Has anyone come up with a good way to implement a LaTeX-style emph - i.e.,
switches to italic font if the current font is roman, but roman if it is
italic.  I thought of the following:

.ds emph \R'nF (3-\\n(.f)'\f[\\n(nF]\\$1\fP

but this is not very robust and only works for R <-> I (and it completely
failed when I was using it in a refer database - maybe because the refer
fields are themselves read into string registers?).  Any such string
should also be able to turn B into BI and vice versa.  Who can do better?
(BTW, as I play around with inline macros like this, I keep thinking that
groff needs some kind of inline conditional - is this possible?)

Robert.

-- 
Robert Goulding
Society of Fellows
Joseph Henry House
Princeton NJ 08544


reply via email to

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