PTF comments are directly extracted from C/C++ sources files.
$ cd tmp $ docc latex -dc article -dco a4paper \ -ti 'The PTF Format and Related Utilties' \ -o ptf.tex ptf.txt docc.cc docx.cc $ ls ptf.tex
docc is run on docc.cc and then on docx.cc to generate two man pages with different headers.
$ cd tmp $ docc man -c -ti docc -se 1 -he 'Text Utilities' -fo Pixware docc.cc $ docc man -c -ti docx -se 1 -he 'Text Utilities' -fo Pixware docx.cc $ ls docc.man docx.man
The hardest format to generate is HTML because in this case you must run docc twice, example:
$ cd tmp $ docc href -o hrefs ptf.txt docc.cc docx.cc $ ls hrefs
$ docc html -br -h hrefs -c ptf.txt docc.cc docx.cc $ ls docc.html hrefs previous.gif docx.html next.gif ptf.html
The -br option is used to chain the generated HTML files not only through hypertext links but also sequentially (i.e. like the pages of a book).
Always use -o when generating non-linear RTF format (WinHelp) to get a single .rtf file and a single .hpj (help project) file.
$ cd tmp $ docc rtf -o docc.rtf ptf.txt docc.cc docx.cc $ ls docc.hpj docc.rtf
Unlike the HTML format, the generation of WinHelp files does not require running docc twice. The hypertext links are resolved by the help compiler (example hc31.exe) that you must run under DOS on the generated .hpj file.
C> hc31 docc