CONVTAB

Section: User Commands (1)
Updated: Feb 23, 1988
Index Return to Main Contents
 

NAME

convtab - convert nroff driver tables to ditroff form and vice-versa  

SYNOPSIS

convtab [ [-vxd] files...] ...

 

DESCRIPTION

This tool may be used to convert nroff driver files between the all-ASCII form used by ditroff(1) and the undocumented format used by old nroff. If called with no file arguments, it filters a ditroff file to old nroff form.

If called with file arguments, it looks for a ``tab.'' prefix (denoting a ditroff-format file) or (failing that) a ``tab'' prefix (denoting an nroff-format file). Each file mentioned on the command line is then converted to a correspondingly-named file of the other form.

The -v flag causes convtab to get chatty about what it's doing and what files it's converting. The -d flag forces -v and suppresses the actual file conversions, so you can use it to verify what convtab would do with a given command line. Flags and filenames may be freely intermixed and are interpreted left to right on the command line.  

INCOMPATIBILITIES

Note that conversion from ditroff to nroff form may lose information, as nroff only allows redefinition of its ``wired-in'' escapes. Normally, if convtab encounters an escape in a ditroff-format file than nroff doesn't handle, it will emit a diagnostic and exit (but the -x flag allows it to continue in this case).

Conversion from old nroff to ditroff files may also lose information, about what characters are allowed to be underlined for the .I highlight. Old-form driver tables encoded this information in the high bit of each character's leading length byte. There is no documented way to include such information in the new format.

Also, be aware that new nroff no longer assumes (as did older versions) that the twnl string turns off boldfacing. When converting old files to the new form, you may want to edit out any highlight-clearing string occurring after \n in the twnl entry.  

WARNING

Be aware that the new format's character-escape conventions are not documented. It certainly accepts C-style three-digit-octal escapes and the \b, \n and \r escapes for backspace and newline (this much can be gleaned from looking at the driver files supplied with the system). The \t escape is therefore probably also good.

But, for convenience in generating old-form driver tables from scratch, convtab(1) also accepts two-digit hex escapes of the form \xdd, and the special escape \e for the ASCII ESC character (hex 0x1B).

When converting new-format files to old form, it might therefore be wise to check that these interpretations don't munch text that new nroff wants to see literally. A quick way to verify this is to convert a copy of the old form to new format again and diff the two new-format versions. If they differ, it's either the result of a spurious escape or a bug (and if the latter, please report it to the author!).  

AUTHOR

Eric S. Raymond (...!rutgers!vu-vlsi!snark!eric) Feb 1988
Parts of this code are based on Bruce Townsend's table/elbat tools.  

SEE ALSO

dotmatrix(1), term(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
INCOMPATIBILITIES
WARNING
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 06:32:54 GMT, December 12, 2024