Is there a way to print the {\LaTeX} original symbol in groff? I would like to use the typography every time the word LaTeX appears in a document made with groff.
1 Answer
You could do it the way the pic(1) man page from groff does it.
.ie t \{\
. ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
. ds lx L\h'-0.36m'\v'-0.22v'\s-2A\s0\h'-0.15m'\v'0.22v'\*[tx]
.\}
.el \{\
. ds tx TeX
. ds lx LaTeX
.\}
What this does is define strings for TeX and LaTeX, using the former to build the latter. But it also provides alternate definitions for non-typesetter devices (like terminals) so that the strings are still readable on devices that aren't capable of small horizontal and vertical motions. (That's what the \h
and \v
escape sequences do.)
You interpolate strings in the roff language by using the \*
escape sequence. Here's where pic(1) does this.
To give the vbox a positive height and a depth of zero
(as used by \*[lx]'s
.IR \%graphics.sty ,
for example)
define the following macro in your document.
You can find the source of the above examples in groff's Git repository.