Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dtformatter(n) [redhat man page]

formatter(n)							Documentation tools						      formatter(n)

NAME
formatter - Interface specification for formatter code DESCRIPTION
This manpage specifies the interface between the manpage processor mpexpand and the tcl code implementing the conversion into a particular output format. The tcl code has to provide [1] Implementations of all commands specified in format(n), using the defined names [2] and additionally implementations for NumPasses This command is called after the formatter is setup and has to return the number of passes required by this formatter to process a manpage. This information has to be an integer number greater or equal to one. PassSetup This command is called at the beginning of each pass over the input. It can assume that the current number of the pass is already set to the correct value and is responsible for setting up the internal state of the formatter for this pass. PostProcess text This command is called after last pass, with the expansion result of that pass, and can do any last-ditch modifications of the generated result. Its result is the final text written to the output. Most formats will use identity here. HandleText text This command is called for any plain text encountered by the processor in the input and can do any special processing required for plain text. Its result is the string written into the expansion. Most formats will use identity here. The tcl code implementing all of the above can make the following assumptions: [1] It has full access to its own non-safe interpreter. In other words, the formatter cannot damage the other parts of the processor, but it can do damage to the filesystem. It is trusted in that way. [2] The surrounding system provides the formatter code with the following commands: mp_pass This command returns the number of the current pass. mp_file This command returns the full name of the file currently processed, or stdin, if the input is read from there. mp_module This command returns the name of the module we are in. cappend cget cis cname cpop cpush cset lb rb All of the above commands are methods of the expander object handling the input. Their arguments and results are described in expander(n). SEE ALSO
expander(n), format(n), mpexpand(n) KEYWORDS
manpage, interface, TMML, HTML, nroff, conversion, markup doctools 1.0 formatter(n)

Check Out this Related Man Page

mpexpand(n)						       Documentation toolbox						       mpexpand(n)

__________________________________________________________________________________________________________________________________________________

NAME
mpexpand - Markup processor SYNOPSIS
mpexpand ?-module module? format infile|- outfile|- mpexpand.all ?-verbose? ?module? _________________________________________________________________ DESCRIPTION
This manpage describes a processor / converter for manpages in the doctools format as specified in doctools_fmt. The processor is based upon the package doctools. mpexpand ?-module module? format infile|- outfile|- The processor takes three arguments, namely the code describing which formatting to generate as the output, the file to read the markup from, and the file to write the generated output into. If the infile is "-" the processor will read from stdin. If outfile is "-" the processor will write to stdout. If the option -module is present its value overrides the internal definition of the module name. The currently known output formats are nroff The processor generates *roff output, the standard format for unix manpages. html The processor generates HTML output, for usage in and display by web browsers. tmml The processor generates TMML output, the Tcl Manpage Markup Language, a derivative of XML. latex The processor generates LaTeX output. wiki The processor generates Wiki markup as understood by wikit. list The processor extracts the information provided by manpage_begin. null The processor does not generate any output. mpexpand.all ?-verbose? ?module? This command uses mpexpand to generate all possible output formats for all manpages in the current directory. The manpages are rec- ognized through the extension ".man". If -verbose is specified the command will list its actions before executing them. The module information is passed to mpexpand. NOTES
Possible future formats are plain text, pdf and postscript. SEE ALSO
expander(n), format(n), formatter(n) KEYWORDS
HTML, TMML, conversion, manpage, markup, nroff CATEGORY
Documentation tools COPYRIGHT
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net> Copyright (c) 2003 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools 1.0 mpexpand(n)
Man Page