Making a Reference Manual


Up: Contents Next: Making the man Pages Available Previous: Alternate Formatting for HTML

With the -latex option of doctext, it is easy to create a reference manual containing the manual pages produced by doctext. The style file refman.sty (in share/refman.sty) provides the necessary LaTeX definitions. Below is an example skeleton for a reference manual:


\documentstyle[refman]{article} 

... page size commands ...

\begin{document}

... title page commands ...

\pagenumbering{roman} \tableofcontents \clearpage

\pagenumbering{arabic} \pagestyle{headings}

\section{Introduction} ... regular text ...

\section{My commands} \input ref/ref1

... additional sections ... \end{document}

To generate the LaTeX files for the individual man pages using doctext, you can use the following commands:
 

doctext -latex -mpath ref/ref1 *.c 

followed by
 

cd ref 

ls ref1 | sort | sed 's/^/\ input /g' > ref1.tex 

If named replacement blocks of text (.N name) are used, it may be appropriate to use a different definition for the manual from that used for the man page. For example, if the file common.txt contains
 

/*N defs 

    Definitions are described in Section 2. 

N*/ 

then changing the doctext command to
 

doctext -latex -mpath ref/ref1 common.txt *.c 

will cause each .N defs command to include the text ``Definitions are described in Section 2.''



Up: Contents Next: Making the man Pages Available Previous: Alternate Formatting for HTML