In HTML, how can I include a mathematical equation?
Creating web pages that contain mathematical equations
Most major mathematics software programs, including Maple, Matlab, and Mathematica, include the ability to export to HTML.
To export a file as an HTML document in Maple, from the
File menu, choose Export As... and select
HTML.
Note: Maple will format any text as an HTML document. You must specify how to include mathematical equations: as inline GIF graphics or as MATHML.
To export a file as an HTML document in Mathematica, from the
File menu, select Save as Special, and then click
HTML.
For less complex formulas, or formulas that must be embedded in
text, it might also be possible to use preformatted text within a
standard HTML document. To do this, enclose the equation with
<pre> and </pre> tags.
Using preformatted text is easy in Maple due to its command line mode. Generate your equation in Maple's command line mode, and then capture the text and transfer it to your HTML document, embedding the text between preformatted text tags.
For extremely long mathematical formulas or proofs where symbols take up most of the page, including the graphic as an image is impractical. In this case, the best solution is to convert the file into a form you can download and open in another application, such as a PDF file or a file in a Maple, Mathematica, or Matlab format. At Indiana University Bloomington, the Center for Innovative Teaching and Learning (CITL) has facilities for producing PDF documents. IU students, faculty, and staff can also use Adobe Acrobat free of charge; see What software is available through the Adobe agreement, and how can I get it?
Viewing web pages that contain mathematical equations
Maple Explorer is part of the Maple software package. At IUB, Maple Explorer is available on all STC computers.
For more information on viewing or creating HTML documents that contain mathematical equations, email the Stat/Math Center. You also can get information on formatting from the Stat/Math Center.
For more about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.
Last modified on April 19, 2011.







