HTML Ascii Codes For Mathematical Expressions

by

Huen Y.K.

CAHRC, P.O.Box 1003, Singapore 911101
http://web.singnet.com.sg/~huens/
email: huens@mbox3.singnet.com.sg
(A Short Communication: First release: 12/7/98)


Abstract

This file contains a fairly complete summary of pure HTML codes for publishing mathematical expressions according to the style adopted by me in this website. In general the files are directly browsable using IE3+ and Netscape3+ without any problems since these files use only basic HTML codes. Keep this file accessible if you intend to follow my style. There is a short learning curve but once you master it, you will be able to put up web-based mathematical papers as fast as me. All you have to do is to cut and paste the relevant sections of HTML code into you own file and modify them a bit. It is as simple as that. Right now, the Greek alphabet set is not catered to in HTML. It is quite obvious to readers if you replace Greek symbols by obvious terms such as pi, gamma, alpha and so on. Since symbolic packages also cannot handle Greek alphabets, this is the best way out. If you need special help, email your request to me.


1. Introduction

After much experimenting and viewing other people's web examples, I have collected a list of HTML based mathematical expressions which I used in my web-based mathematical papers. There are sophisticated mathematical publishing softwares for the web but the resultant web file is about 3 to 10 times longer than the ascii version using pure HTML. You can even send these files directly via email without using attachments since some browsers cannot read attachments. The least convenient feature by using special software is that you can only browse them if you have the right plugins.

A fairly polished mathematical publishing software for the web at present is Publicon produced by Mathematica which must be browsed by its proprietory Mathreader. You must be prepared to download about 7.5 Mbytes for Publicon and about 4.5 Mbytes for Mathreader. It would be rather difficult to convince a casual visitor to your website to install these softwares even though the beta versions are for free.

If you have a standard browser like IE or Netscape, the safest way to publish web-based mathematical papers would be to use pure HTML. You can save a lot of space adjustments work by using a symbolic software to generate ascii based mathematical expressions which you can then cut and paste onto you own HTML file. With a bit of additional space adjustments, the results can be quite satisfactory and after mounting the learning curve, you can be quite productive without relying on expensive and difficult to use commerical softwares. I highly recommend it. The most satisfactory part is that your papers on the web can be downloaded without fuss and your readers are not inconvenienced by partially downloaded files if you use a lot of gif files for mathematical expressions. In the end you are going to have the most compact HTML file which can be downloaded speedily by your readers. So far, very few of my files need to exceed 50 Kbytes. It ought to be pointed out that there is no drawing facilities in HTML, not even for an angled line. So you cannot do convincing geometrical constructions using ascii characters. Chemical formulae are probably OK but not diagrams of molecular chains.


2. Sample HTML Mathematical Expressions

(i) There is no square-root symbol. So use sqrt( ) instead. Notice the use of ISO-Latin-1 character set e.g. ± for +/-. Not all browsers could read these correctly, so you must test extensively. Only a handful are useful as the rest can be typed directly via your keyboard. Some are seldom used.
                     -b ± Sqrt(b2 - 4ac)
                 x = -------------------
                             2a

Here are some ISO-Latin-1 symbols:

(ii) Taylor series expansions. Note that you need some space adjustments to make them look good. Better generate using a symbolic package.


       1     1     1     1     1     1     1     1     
1/z + --- + --- + --- + --- + --- + --- + --- + --- 
        2     3     4     5     6     7     8     9     
       z     z     z     z     z     z     z     z     

        1     1     1     1     1     1     1
     + --- + --- + --- + --- + --- + --- + ---
         10    11    12    13    14    15    16
        z     z     z     z     z     z     z

         1     1     1     1
      + --- + --- + --- + ---
          17    18    19    20
         z     z     z     z

(iii)  Summated expression generated by a symbolic package first.

ub ----- \ 1 ) ----------- / i i ----- z (z - 1) i = 1 (iv) Product expression generated by a symbolic package first.

ub --------' ' | | | | (s - f(k)) | | | | k = 1 (v) Treble indefinite integral. Looks like you need to add your own limits for definite integral even if you use a symbolic package.

/ / / | | | | | | f(x) dx dx dx | | | / / / ------------------------- / / / | | | | | | f(y) dy dy dy | | | / / / (vi) Differentiation. Note some awkward space adjustments.

/ 3 \ / 3 \ | d | | d | |----- f(x)| + |----- f(y)| | 3 | | 3 | \ dx / \ dy / (vii) Tabulated data including tabulated mathematical expression.

(viii) Superscripts and subscripts
Even_perfect(z):= 2p*(2p - 1) p a*b

N = Y

k c*d²

1 14.1347251417347 21 79.3373750202493 41 124.2568185543457 61 165.5370691879003
2 21.0220396387715 22 82.9103808540860 42 127.5166838795965 62 167.184439978174
     1     2     3
x = --- + --- + ---
     z     z     z

Numerical values of the zeros