TROFF2RTF(1)

πŸ“¦
version 1.04 Β· 2 versions
, in debian bookworm, ubuntu noble

πŸ’– TROFF2RTF(1) β€” General Commands Manual πŸ’–

okay bestie, so there's this whole manual page called TROFF2RTF(1), and it lives in the General Commands Manual, and it's about to change your whole *roff-to-Word pipeline, no cap. let's get into it 🫢


✨ NAME ✨

troff2rtf β€” convert troff documents to Rich Text Format


🌸 SYNTAX 🌸

troff2rtf [ -mxx ] [ -S charset ] [ file ...  ]

πŸ¦‹ DESCRIPTION πŸ¦‹

troff2rtf takes documents that were written to be formatted with troff (or nroff, or literally any of the other *roff variants, iykyk) and converts them into Rich Text Format. and why do we care? because RTF is a reasonably portable interchange standard, bestie β€” files in RTF format can be read by a whole variety of applications, e.g., Microsoft Word, WordPerfect (Macintosh version 2.0 and up), WriteNow. iconic behavior honestly πŸ‘‘

the main use for troff2rtf is to make it easier to transport troff documents for use with microcomputers. so step one: convert your document to RTF, like this:

% troff2rtf [options] file > file.rtf

all the available options are described below. the one you'll most likely use is -mxx to specify a macro package like -me or -ms. and if the document contains tables, the conversion can be done like this instead:

% tblcvt file | troff2rtf [options] > file.rtf

then move the RTF file to your target machine and read it into your document processor. slay πŸ’…

optional flags may be given to modify the operation of troff2rtf, as follows:

  • -mxx β€” specify macro package, usually -man, -me, -mm, or -ms. ✨
  • -S charset β€” specify the RTF character set. charset can be one of the following: ansi mac pc pca. the default is the Macintosh character set. for documents that you intend to use under Windows, -S ansi is a better choice. πŸ“

πŸ”₯ SEE ALSO πŸ”₯

tblcvt(1), troffcvt(1)


πŸ‘‘ WHO-TO-BLAME πŸ‘‘

Paul DuBois, dubois@primate.wisc.edu. thank you for your service πŸ«‘πŸ’–


πŸ’€ BUGS πŸ’€

okay so, real talk, table output generated when troff2rtf is used in concert with tblcvt has been known to crash Word outright β€” caution may be in order, bestie, do not play with this 😭. in addition, you may need to read the resulting RTF document into a word processor and tweak column widths manually. annoying? yes. fixable? also yes.

also: Word97 adds support for vertically merging table cells (using the \clvmgf and \clvmrg control words). troff2rtf supports vertical spans using these controls, but earlier versions of Word don't yet understand them. consequently, what you'll see for n-cell vertical spans is n individual cells, with all the text in the top cell and n-1 empty cells below it. not a vibe, but that's the tea 🍡


and that's the whole page, bestie!! 🌈 it's from the General Commands Manual, and the page itself is TROFF2RTF(1) β€” that's your source, your version, your whole entire moment. go forth and convert πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά
πŸ“¦ where this page comes from