Prev Next Index-> contents reference index search external Up-> overview get_started start_latex overview-> License why Install get_started running files titles+headings cross format spellchecking latex other browser glossary whatsNew get_started-> start_simple start_head start_image start_pre start_font start_spell start_latex start_verbatim start_embed start_multiple start_cref start_index start_latex-> latex_example Headings-> Introduction Execute The Following Steps ---..latex_example.omh ---..Example In This Web Site Context ---..Execute OMhelp ---..Example by Itself

An Example Using Latex Math Formula Commands

Introduction
The latex command is used to display mathematics that is specified using the Latex math formula commands defined in Section 3.3 of Lamport's book . These commands are documented in the latex command documentation sections of this web site.

Execute The Following Steps

latex_example.omh
Use an editor of your choice to create the file  latex_example.omh in the test directory with the following contents:       $begin latex_example$$spell Mozilla$$$section An Example Using Latex To Display Mathematics$$head Browser$$ Any browser can be used to view the HTML file for this example. The Mozilla browser should be used to view the XML file for this example. $head In Line$$The sum latex \sum_{n=1}^\infty 2^{-n}$$ is equal to one.$head Display Mode$$The sum latex $\sum_{n=1}^\infty \frac{1}{2^n}$$$ is equal to one. \$end  Note that you can copy and paste the commands above to your editor window. You may just copy the file with the same name from the getting started directory .

Example In This Web Site Context
You can view the result of making image_example.omh part of the OMhelp help web site by selecting latex_example .

Execute OMhelp
In a command window and in the htm directory execute the following command  omhelp ../latex_example.omh -noframe omhelp ../latex_example.omh -xml -noframe  The first command creates a set of HTML files. The second command creates a set of XML files. In the HTML case, the Latex commands appear to the viewer. In the XML case, the Latex commands are translated to MathML commands and the viewer will see the mathematics.

Example by Itself
Use any browser to view the file test/htm/latex_example.htm. Use the Mozilla web browser to view the file test/htm/latex_example.xml.
Input File: getstarted/start_latex.omh