## How the Cap 114/115 lab web is set up

### General Format

Content is separated (into a content directory) so it can by formatted differently for the web or print.

Web pages include content files along with a banner. The web banner includes links of "incBannerCorner.htm". A separate banner is used for printing. The format of a web page is controlled by a style sheet that sets the background (in FrontPage style setting of body/border/shading.

### Web Printing of Manual

Printing is done through an ActiveX component (html has no facility to control printing) by including the page "inc printing.htm" into the top of the web page to be printed. The button on this page will print the page with control over paging and page numbering. The web page to be printed must not be in a frame or system may hange.

The format of the printed page is controlled by the style sheet "Print.css". This removes underlines in hyperlinks, sets background to white, changes some of the title fonts.

### Some FrontPage techniques that are used extensively

• Insert.Component.IncludePage to include other html pages (a FrontPage Extension specific capability)
• Tables with border.size=0 for general positioning (such as equations, equation numbering)
• Paragraph.Spacing.Before=0 or Paragraph.Spacing.After=0 to control excess line spaces

### Equations

Current Method:

The new method for handling equations is presented first, followed by notes of the previous methods for reference:

The current method implements the open source javascript display engine MathJax.  This engine transforms MathML, TeX, and others.  Check out the FAQ under the Resources menu.  The page that covers using MathJax is Loading and Configuring MathJax.  However there is a simple set of instructions that is followed here.  First, you must put a 'script tag' into the header of the page you are working on:

"<script type="text/javascript"
src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>"

This, then, takes any TeX or MathML that is properly flagged in the text of your document and sends it out for re-rendering to the server in the line above.

To include any equations or math symbols in your page, first render them in TeX or MathML, insert them into your document with delineators that indicate either inline or paragraph insertions.  TeX can be rendered using the online LaTeX editor or any other that you might find useful.

There are two 'alignment' schemes that are used determined by the delineators used around the Tex or MathML equations.  Refer to the documentation: Putting Mathematics in a web page on the hyperlinked page to find the defnition of the two delineators.

The paragraph alignment always centers the equations, and there is no vertical compression of the equations:

$S=v_{o}t + \frac{1}{2}at^{2}$

The inline alignment without any other text left-justifies the equations, but vertically compresses the equations:

$$S=v_{o}t + \frac{1}{2}at^{2}$$

The inline alignment in a sentence tries to make the equation $$S=v_{o}t + \frac{1}{2}at^{2}$$ fit in the line nicely.

A fine point or two:  MathJax rendered equations have a context menu attached to them that allows the user to copy the equations or control the rendering of these equations.  This is very handy.

The required script tag that must appear in the header might be in the header of a page that includes the page that you are viewing.   If you look at the index.htm of exp_1 - specific heat  of the 114/115 web page you will find that the index page has the necessary script tag, while the included page Intro.htm does not, and yet the equations in Intro.htm are rendered correctly.

How I build up a page:

In a plain text editor I create the text I need and insert the LaTeX equations I have generated with the online editor.  I then bracket the equations with the appropriate delineators depending on whether I want the equation to render inline or as a seperate centered equation in its own paragraph. I then copy all this plain text into the html editor.  It is entered as one 'paragraph' with line breaks where paragraphs are.  I then adjust the font of this page by 'select then apply' visual methods using the page editor.  This prevents too many tags from being inserted to the page.

Previous method and notes:

Equations are problematic as copying the results of equation editor in Word to the clipboard and pasting this into FrontPage generates something that looks ok in a web browser but prints very poorly.

The Equation Editor produces equations as a vector format. The clipboard copies maintaining the vector format. Pasting to FrontPage rasterizes this to a Gif and also includes the vector information. It is not clear if the vector information is now used anymore.

Design Science (producers of Equation Editor and MathType) have an overview page on web equations. Some work arounds I worked with are:

• Copy the clipboard contents to CorelDraw and then use CorelDraw to produce a Gif (it has control over resolution and sizing)
• JPegs fair much better when being resized and printed. Only disadvantages seems to be some artifacts and no transparent backgrounds.
• Let Word2000 produce the web page. Word using XML with hidden directory to produce the web page. Equations here print with high quality.
• MathType (pay version of Equation Editor) allows finer control of Gifs generated. Equation Editor is set to style bold variables, symbols and numbers and use 18pt as full size (factory setting the other sizes). Equation then are saved as a Gif at 300dpi with anti-aliasing. The Gif is reduced in size in FrontPage. Browser will show a poor image but the print will be quite good.
• OfficeXP with the new FrontPage and Word may be of help.