-.TH HEX 1 "Oct 27, 1987"
-.SH NAME
-hex.c \- dump a file to stdout in CP/M-like hex format
-.SH SYNOPSIS
-.B hex [-V] [-w] [-e] [-c] [-g] [-s] [filename...]
-.SH DESCRIPTION
-This program provides a facility for obtaining a dump of a binary file
-to stdout. The default format is a CP/M style hex dump with byte
-offset in file, 16 bytes of hex and 16 bytes of alpha representation
-with '.' for non-printables per line. If no filename is given, hex
-reads from standard input.
-.PP
-The program accepts the following options to control its output:
-.TP 10
--w -- set # of bytes dumped per line (default is 16)
-.TP 10
--e -- display EBCDIC character assignments rather than ASCII
-.TP 10
--c -- display printable characters as text in-line
-.TP 10
--g -- don't output mid-page gutter
-.TP 10
--s -- dump file section
-.TP 10
--V -- print version number and exit
-.PP
-The command line is scanned left-to-right for filenames and options, and
-each file dumped according to the format defined by preceding options. To
-turn off an option, precede the letter with a +. Options that take arguments
-may have them immediately following the option letter or whitespace-separated.
-.PP
-If the command-line arguments include two or more filenames (with -
-being regarded as a `filename' for standard input), hex will emit a
-one-line header giving the name of
-the file in front of each input file.
-.PP
-The -s option expects a start offset, optionally followed by a
-comma-separated count. Each of these should be a decimal or hex integer
-(hex must be prefixed by x or h; leading zeros will be ignored).
-.PP
-The -w option expects a width, formatted as a single decimal or hex number
-in the style of an -s option argument. Odd widths turn on the -g option.
-.SH NOTE
-The definition of EBCDIC used is IBM's ASCII-compatible 96-character
-SCS set used with Systems Network Architecture (SNA).
-.SH AUTHOR
-Eric S. Raymond <esr@thyrsus.com>. See my home page at
-http://www.tuxedo.org/~esr for updates and related resources.
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<refentry id='hex.1'>
+<refmeta>
+<refentrytitle>hex</refentrytitle>
+<manvolnum>1</manvolnum>
+<refmiscinfo class='date'>Oct 27, 1987</refmiscinfo>
+</refmeta>
+<refnamediv id='name'>
+<refname>hex.c</refname>
+<refpurpose>dump a file to stdout in CP/M-like hex format</refpurpose>
+</refnamediv>
+<refsynopsisdiv id='synopsis'>
+<cmdsynopsis>
+ <!-- hex [-V] [-w] [-e] [-c] [-g] [-s] [filename...] -->
+ <command>hex</command> <arg choice='opt'>-V </arg>
+ <arg choice='opt'>-w </arg>
+ <arg choice='opt'>-e </arg>
+ <arg choice='opt'>-c </arg>
+ <arg choice='opt'>-g </arg>
+ <arg choice='opt'>-s </arg>
+ <arg choice='opt' rep='repeat'><replaceable>filename</replaceable></arg>
+</cmdsynopsis>
+
+</refsynopsisdiv>
+
+<refsect1 id='description'><title>DESCRIPTION</title>
+
+<para>This program provides a facility for obtaining a dump of a
+binary file to stdout. The default format is a CP/M style
+<command>hex</command> dump with byte offset in file, 16 bytes of
+<command>hex</command> and 16 bytes of alpha representation with '.'
+for non-printables per line. If no filename is given, hex reads from
+standard input.</para>
+
+<para>The program accepts the following options to control its output:</para>
+<variablelist remap='TP'>
+<varlistentry>
+<term>-w</term>
+<listentry>
+<para>set # of bytes dumped per line (default is 16)</para>
+</listentry>
+</varlistentry>
+<varlistentry>
+<term>-e</term>
+<listentry>
+<para>display EBCDIC character assignments rather than ASCII</para>
+</listentry>
+</varlistentry>
+<varlistentry>
+<term>-c</term>
+<listentry>
+<para>display printable characters as text in-line</para>
+</listentry>
+</varlistentry>
+<varlistentry>
+<term>-g</term>
+<listentry><para>don't output mid-page gutter</para></listentry>
+</varlistentry>
+<varlistentry>
+<term>-s</term>
+<listentry><para>dump file section</para></listentry>
+</varlistentry>
+<varlistentry>
+<term>--V</term>
+<listentry><para>print version number and exit</para></listentry>
+</varlistentry>
+</variablelist>
+
+<para>The command line is scanned left-to-right for filenames and
+options, and each file dumped according to the format defined by
+preceding options. To turn off an option, precede the letter with a
++. Options that take arguments may have them immediately following the
+option letter or whitespace-separated.</para>
+
+<para>If the command-line arguments include two or more filenames
+(with - being regarded as a `filename' for standard input),
+<command>hex</command> will emit a one-line header giving the name of
+the file in front of each input file.</para>
+
+<para>The <option>-s</option> option expects a start offset,
+optionally followed by a comma-separated count. Each of these should
+be a decimal or <command>hex</command> integer (hex must be prefixed
+by x or h; leading zeros will be ignored).</para>
+
+<para>The <option>-w</option> option expects a width, formatted as a
+single decimal or <command>hex</command> number in the style of an
+<option>-s</option> option argument. Odd widths turn on the
+<option>-g</option> option.</para> </refsect1>
+
+<refsect1 id='note'><title>NOTE</title> <para>The definition of EBCDIC
+used is IBM's ASCII-compatible 96-character SCS set used with Systems
+Network Architecture (SNA).</para> </refsect1>
+
+<refsect1 id='author'><title>AUTHOR</title> <para>Eric S. Raymond
+<esr@thyrsus.com>. See my home page at <ulink
+url='http://www.tuxedo.org/~esr'>http://www.tuxedo.org/~esr</ulink>
+for updates and related resources.</para>
+</refsect1>
+</refentry>