Prev Next

Preformatted Text Example

pre
pre_example.omh
Example In This Web Site

pre
The pre command can be used to specify pre-formatted text. This uses a uniformly spaced font and columns in the input correspond directly to columns in the output.

pre_example.omh
Use the editor of your choice to create the file pre_example.omh in the xam directory with the following contents:
 
     $begin pre_example$$
     
     $section Example Pre-Formatted Text$$
     
     $head A Paragraph Without Heading or Subheading$$
     This paragraph has the heading
     "A Paragraph Without Heading or Subheading"
     directly above it.
     $pre
     
     $$
     This paragraph does not have a heading or subheading
     directly above it.
     
     $head Indenting Text$$
     $pre	$$
     The first line of the text of this paragraph is indented
     using the pre command and a tab character.
     The other lines of text are not indented.
     
     $head A Pre-Formatted Paragraph$$
     $pre
     	minimize   f(x) with respect to x
     	subject to g(x) <= 0
     $$
     
     $end
You can also just copy pre_example.omh from the omh/getstarted directory . Once you have done this, you can execute omhelp with example_name equal to pre_example.

Example In This Web Site
You can view the result of making pre_example.omh part of the OMhelp help web site by selecting pre_example .
Input File: omh/getstarted/start_pre.omh