Consider a *NIX executable, dvi2rtf
, whose contents are:
#!/bin/sh
TMPX=`mktemp /tmp/dvi2rtf.XXXXXX`
dvitty $1 $TMPX # CTAN
txt2rtf $TMPX $2 # CTAN, in rtfutils
If my head is working this morning and the right executables are on the PATH, this clobbers the second argument with an rtf file whose text contents will roughly correspond to those of the dvi file named by the first argument.
Such a program doesn't deserve the filename dvi2rtf, since it makes no attempt to preserve the formatting of the dvi file; Cf. Q#1621885: How to turn a dvi to tex. Rtf's \wpsp can allow rtf to handle horizontal space similarly to dvi; rtf's notion of code pages is similar to how dvi handles fonts: maybe it is possible to handle other tricky features of dvi, such as vertical space?
QUESTION: Is there such a worthy program, however flaky? And if not, is there useful prior art for implementing it?
Postscript edited, retagged