Texi2roff(1)
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.troffwill then emit index entries onto the standard error output. you may capture this output and usetexi2index(1)andtroffto prepare indices from it. lowkey a whole pipeline situation.-Iβ include the Texinfo βInfo fileβ menu and node contents and@ifinfotext 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(CWis used to change to constant-width (typewriter-like) font. if this is not the standard at your site, run yourtexi2roffoutput throughsed(1)or edittexi2roff'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β π.
@defcommands do not generate index entries. periodt. don't expect them.- although Texinfo provides for a
@contentsand@summarycontentsTable of Contents, if both are specified only the first one will appear if-msis used. to prevent loss of detail,texi2roffgenerates the same Table of Contents for both commands. so you get the same TOC for both, not two different ones. balance. - the
-mmmacro package regards keeps as a type of display. this can causetroffto 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 groupis the best to remove. so iftroffis 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 πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: texi2roff 2.0-bp160.1.12 Β· SUSE-Permissive-Modify-By-Patch
- opensuse-leap 16.0: texi2roff 2.0-bp160.1.12 Β· SUSE-Permissive-Modify-By-Patch
- opensuse-leap 16.0: texi2roff 2.0-bp160.1.12 Β· SUSE-Permissive-Modify-By-Patch
- opensuse-leap 16.0: texi2roff 2.0-bp160.1.12 Β· SUSE-Permissive-Modify-By-Patch
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms