Maple Generates HTML and LaTeX

In an earlier section, we showed how to generate LaTeX with Maple for typesetting. This command is repeated here. We also discuss the useful option of saving a Maple Worksheet as HTML and show some hyperlink properties that are available on the worksheet.

Here we want to test creating technical mathematics inside the text of Maple.

Int(e^(-x^2),x = 0 .. infinity) = limit(1/2*sqrt(Pi...

The equation above was generated by the command below and then pasted into this comment.

> Int(e^(-x^2),x=0..infinity)=int(e^(-x^2),x=0..infinity);

Int(e^(-x^2),x = 0 .. infinity) = limit(1/2*sqrt(Pi...

This complicated expression is readily transformed into LaTeX code with the Maple command below. The output is ASCII characters that can be readily copied and pasted into any LaTeX document. To get the proper look of this equation in LaTeX, you would surround this expression with $$ on each side or use it in between the commands \begin{equation} and \end{equation}. LaTeX is the preferred text editor of Mathematicians and Physicists for technical writing because of its superior appearance. If you want to learn more about LaTeX, then I would suggest a text such as Leslie Lamport's LaTeX: User's Guide and Reference Manual .

> latex(%);

\int _{0}^{\infty }\!{e}^{-{x}^{2}}{dx}=\lim _{x\rightarrow \infty }1/

2\,{\frac {\sqrt {\pi }{\it erf}(\sqrt {\ln (e)}x)}{\sqrt {\ln (e)}}}

HTML

Maple provides a valuable tool for preparing technical documents to post on the Web. You use the text button above to write text like you are reading now. The Maple commands like the one above create good looking mathematical formula. When you choose the Save As

option HTML , then you can make the entire Maple worksheet into an .htm or .html file. In fact, Maple automatically generates 3 HTML documents. If you name your file foo.html, then you obtain a document foo.html, foo1.html, and fooTOC.html. The main text is in foo1.html with foo.html creating a frames environment with the left frame being the fooTOC.html (Table of Contents) frame which gives automatic hyperlinks to sections created on the Worksheet, and foo1.html being the right frame with the entire Maple worksheet. The technical formulae and graphs are saved in a folder, images , with the images numbered sequentially as foo1.gif. foo2.gif, etc. These .gifs can be readily extracted and renamed for use in any other web document that you might be composing. Software such as Photoshop can be used to add labels on graphs or other cosmetic changes.

>