1

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.

2
  • what do you mean by "{\LaTeX} symbol"?
    – jarnosz
    Commented Oct 18, 2022 at 20:25
  • @jarnosz the LaTeX logo. Something like this
    – ranemirusG
    Commented Oct 20, 2022 at 15:01

1 Answer 1

1

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.

https://git.savannah.gnu.org/cgit/groff.git/tree/src/preproc/pic/pic.1.man?id=c2e894cf5b42cfdaae48f03476fee24a6103f9c9#n39

https://git.savannah.gnu.org/cgit/groff.git/tree/src/preproc/pic/pic.1.man?id=c2e894cf5b42cfdaae48f03476fee24a6103f9c9#n413

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .