Texi2roff(1)

πŸ“¦ version 2.0, in opensuse-leap 16.0

okay bestie, welcome to the Texi2roff(1) page from the General Commands Manual β€” this is your group-chat rundown of texi2roff and texi2index, the tools that convert Texinfo documents for formatting by troff. no cap, they're iconic. let's go πŸ’…βœ¨


✨ NAME ✨

the stars of the show are texi2roff and texi2index, and their whole job is converting Texinfo documents for formatting by troff. that's it, that's the vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the literal shape of the commands, bestie:

texi2roff [ -me -mm -ms ] [ -iIt ] [ file ... ]
texi2index [ file ... ]

so texi2roff takes some macro package flags, some behavior flags, and files. texi2index just takes files. simple. πŸ’–


πŸ’– DESCRIPTION πŸ’–

okay so texi2roff translates the named files from the Texinfo macro language for TeX to the language accepted by troff(1). files are read and processed in order β€” no jumping around. if no file is given, or if the file is -, texi2roff reads the standard input. periodt.

texi2index generates indices for documents translated by texi2roff. it's the little helper that makes your index dreams come true. 🧚


πŸ’… OPTIONS πŸ’…

Texi2roff

  • -me, -mm, -ms β€” format the output for use with the troff macro package named. so you pick your macro package and it formats accordingly. slay.
  • -i β€” translate Texinfo index commands into troff index commands. troff will then emit index entries onto the standard error output. you may capture this output and use texi2index(1) and troff to prepare indices from it. lowkey a whole pipeline situation.
  • -I β€” include the Texinfo β€œInfo file” menu and node contents and @ifinfo text in the output. this material does not appear in a Texinfo document formatted by TeX, but it may contain interesting information or be useful when searching a machine-readable document. so it's extra info for the search girlies.
  • -t β€” (transparent) print text affected by otherwise discarded commands, for people who are afraid of missing something. for best results use -It. the combo is giving main character energy. πŸ’…

🌸 EXAMPLES 🌸

translate doc.texinfo using the Bourne shell sh(1). format with troff and -ms, placing the formatted output in doc, index entries in index, and the formatted index in doc.index. here's the exact code, bestie:

$ texi2roff -i -ms doc.texinfo | troff -ms > doc 2> index
$ texi2index index | troff -ms >doc.index

as above, but use the C shell csh(1), nroff with -me, and transparent mode:

% (texi2roff -iIt -me doc.texinfo | nroff -me > doc ) >& index
% texi2index index | nroff -me >doc.index

the way that second one uses parentheses and >& is so csh of it. iconic. πŸ”₯


πŸ”₯ DIAGNOSTICS πŸ”₯

errors are reported giving file name and line number. so if something breaks, you know exactly where. helpful and transparent. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

this page was written by Beverly Erlebacher (erlebach@cs.toronto.edu). give her her flowers, she ate. πŸŒΈπŸ’


πŸ’€ BUGS πŸ’€

okay bestie, there are some quirks, and we're gonna list them all because we don't gatekeep:

  • \f(CW is used to change to constant-width (typewriter-like) font. if this is not the standard at your site, run your texi2roff output through sed(1) or edit texi2roff's translation tables. no cap, just fix it.
  • there are a number of differences in formatting details compared to Texinfo. indentation is occasionally imperfect. it's giving β€œclose enough” 😭.
  • @def commands do not generate index entries. periodt. don't expect them.
  • although Texinfo provides for a @contents and @summarycontents Table of Contents, if both are specified only the first one will appear if -ms is used. to prevent loss of detail, texi2roff generates the same Table of Contents for both commands. so you get the same TOC for both, not two different ones. balance.
  • the -mm macro package regards keeps as a type of display. this can cause troff to abort in the case of a keep nested in a display or vice versa. either use a different macro package or remove a pair of Texinfo commands to eliminate nesting. usually the @group...@end group is the best to remove. so if troff is acting up, check your nesting, bestie. πŸ™ˆ

and that's the tea β˜• β€” this page is from the 3rd Berkeley Distribution, dated 1 Jan 90, and it's the Texi2roff(1) page. mwah πŸ’‹βœ¨