Examples of Command Definition

PreviousUpNext
Up: Customizing the Output Format Next: Installing doctext Previous: The Definition Command Language

This first example shows how to place the argument names and definitions into a table when generating HTML output. This works only with the argument list commands (start a list with + and end it with -). Here are the definitions:

 
# You can get this by specifying -defn htmlargtbl.def to doctext. 
s_arg_list    %n<TABLE BORDER=0> 
s_arg_inlist  %n<TR><TD WIDTH=20></TD><TD ALIGN=LEFT VALIGN=TOP><B> 
e_arg_inlist  </B></TD> 
s_defn_inlist <TD VALIGN=TOP> 
# The br is used to break the line in the event that the browser doesn't 
# support tables.  It is better than nothing. 
e_defn_inlist <BR></TD></TR> 
e_arg_list    </TABLE>%n 
This example uses only the %n escape. The definitions are ordered as they would be used by doctext.

This second example makes tt text one size larger when generating HTML:

 
tt     %f<TT><FONT SIZE=+1>%e="</FONT></TT>" 
The %f command is used to terminate any previous font style command. The %e command defines how to terminate this font style.


PreviousUpNext
Up: Customizing the Output Format Next: Installing doctext Previous: The Definition Command Language