newPage
opens a new file for writing and returns a page handle
which is used by hwrite
to append HTML elements in a current
page. Any previous existing file will be overwritten. The doctype
argument is used to specify the document type and
level of HTML syntax. Valid forms may be found at
http://www.w3.org/QA/2002/04/valid-dtd-list.html.
link.javascript
produces A
tag specifying the
language as JavaScript and stating the location of the
code. hwriterPlus uses MathJax from
http://www.mathjax.org/. The JavaScript may either be loaded
from the MathJax site, or from a local file. The former option
requires an active internet connection, while the latter requires that
MathJax must have been installed locally. The form of the text for
this argument is "path-to-MathJax/MathJax.js"
. See the examples
for the appropriate text when loading from MathJax directly. Details
of how to ensure MathJax is loaded, for Version 2 of MathJax may be
found at http://www.mathjax.org/docs/2.0/configuration.html.
The argument head
is useful to add extra HTML code in the
header code.
head.attributes
is useful to add extra attributes in the
head code. A description of possible head attributes may
be found at http://www.w3schools.com/tags/tag_body.asp.
body.attributes
is useful to add extra attributes in the
body code. A description of possible body attributes may
be found at http://www.w3schools.com/tags/tag_body.asp.
To allow the numbering of displayed equations newPage
creates a
global variable called hwriterEquation
and assigns it the value
zero. This variable will be updated when a numbered equation is written
to the HTML file so that it always records the number of the last
numbered equation. It also creates a a global vector named
hwriterEquationList
, which is initially empty, but will contain
the labels of any numbered equations.