Appetizers and Lessons for Mathematics and Reason (www.whyslopes.com)
||Définition d'une variable || Algèbre || Arithmetique || Logique ||La raison basée sur les règles et modelés||

Online Volumes
1,  Elements of Reason.
1A. Pattern Based Reason 
1B. Math Curriculum Notes
2. Three Skills for Algebra
3. Why Slopes & More Math

 (Optional Book Orders)
More Site Areas 
1. Help Your Child or Teen Learn 
2. Solving Linear Equations
3. Fractions Ratios Rates Proportions & Units
4. Euclidean Geometry
5. Analytic Geometry/Functions 
6. Number Theory
7. More Calculus
More Site Areas 
8. Complex Numbers 
9. Qc Maths  Education  
10. Secondary IV(?) maths
11. Real  Analysis 
12. LaTeX2HotEqn:
13. Electric Circuits Etc  
14.  Français
15. Algebra, Odds & Ends, Etc
More Site Areas 
16. Math Education Essays
17. Telling & Working with Time
18. Maps, Plans & Drawings
19. Quantitative Skills for  home, shopping and work 
20. Statistics Useful, or Not.
Try the
Twiddla Whiteboard
to work online with others.

[Site Entrance & Hub][Site Exit]


A Webpage Development Tool
by Alan Selby, Ph. D.  www.whyslopes.com (email)

The HotEqn applet developed in 1996 by VCLab displays equations online given their LaTeX codification and the dimensions in pixels of the applet display area. See the HotEqn applet homepage for usable LaTeX commands - a list that is essentially complete. 

The LaTeX2HotEqN applet below automates the usage of HotEqn. It generates the html code needed to use HotEqn applet given the LaTeX code for mathematical expressions embedded in the html code for a webpage. 

With the LaTeX2HotEqN applet, you may place in html files,  LaTeX  code for mathematics, code that is delimited by the tag pairs

Running the LaTeX2HotEqn applet on the hybrid LaTeX & html input will replace the LaTeX code  by html code that will or should display the associated formulas via properly sized instances of the HotEqn applet. The resulting code displays  rapidly in webpages except  for a one-time download of th HotEqn, 70K per site visit. 

To see LaTeX2HotEqn and HotEqn in use, follow the instructions for examples 1 and 2 below. Input files can be located on  the world wide web or your PC webserver 127.0.0.1


Buttons to display applet buffers  in a browser window (if javascript is active)

 
Paste data into input into text area or give the URL of the source file. The LaTeX command for a fraction \frac a b needs to be written as \frac {a}{b}
Example 1:  Cut and  paste the following into the text area: 

The function \(\sin(\theta)=\frac{\mbox{opp}}{\mbox{hyp}}\).  The derivative of  \(y = \sin(x)\) is\[\frac{dy}{dx} = \cos(x)\]. The sum \(S\) of the numbers 1 to 10 is \[S= \sum_{j=1}^{10} j = 1+2+3+4+5+6+7+8+9+10 = 55\]   In general, the sum \(S(n) = \sum_{j=1}^n j = \frac{n(n+1)}{2}\). The latter result can be justified using <a href="http://whyslopes.com/volume1a/ch07.html">mathematical induction</a>. The product \(P\) of the numbers \(1\) to \( n\) is \[n!=\Pi_{k=1}^{n} k = 1\cdot 2\cdot 3 \cdot 4 \cdots n \]. <blockquote>While \(n\) gives n typeset in mathfont in LaTeX (good for offline printing), including \(n\) in place of n in a source file for the above applet may lead to too many instances of HotEqn in a webpage. </blockquote>  Input files are best prepared using a text or code editor. Otherwise stray pieces of html (spaces etc) may land inbetween LaTeX mathematics delimiters. 

After pasting. hit buttons: (i) Import Text Area, (ii) To HTML and (iii) View HTML  in that order.

Example 2: Substitute the URL http://whyslopes.com/webmath/linear.html in the text field beneath the text area and besides the of the import URL button in the applet. Then Hit the buttons (i) Import URL and after the text area fills, hit (ii) to HTML and finally after the textarea content changes, hit (iii) View HTML  The buttons View Source will show you the hybrid LaTeX & html input file

TeX was a mathematics typesetting language produced by Donald Knuth in the first instance for his own use. It escaped. From TeX, Leslie Lamport derived another markup language LaTeX. Today, many journals, texts and monographs in matheamtics and science are typeset with TeX or one of its variants. To learn more about the origins and evolution of TeX and LaTeX, visit the TeX User Group (TUG). To learn more about mathematics on the web, see the TUG website Interesting URL page.  See too The Math Forum page Math Typesetting for the Internet.  

How it Works

The above applet could be easily improved (tomorrow) by allowing delimiter  $$ and $$ (or \begin(displaymath) and \end{displaymath} to surround displayed math,  and  $ and$$ (or \begin(math) and \end{math} to surround displayed math, An extension of LaTeX2HotEqn to come in January 2003 may translate LaTeX markup for \part{ }, \chapter{}, ... \paragraph{...} into sectioning commands <h1>  to </h6> and LaTeX markup for itemized and enumerated lists in to html commands for the same. Code for this is 85% done.

Using webpages with HotEqn applets

LaTeX From HTML

After importing the file, you can also hit the [to LaTeX] and [View LaTeX] buttons to keep the LaTeX coding for the formulas and replace some or all of the html in the source file by LaTeX codes.  The replacement works well for \chapters, \sections, \subsections, ... and for list commands <ul> and <ol>. The replacement is approximate for tables.  The html codes for borders are ignored

Single Source File

The foregoing suggests with care that a single source file might be be used for LaTeX and html generation. LaTeX has codes for drawing vertical and horizontal lines between table columns and rows where as html provides methods for drawing borders around individual cells. So the treatment of tables in LaTeX and html is incompatible. 

Extensible markup language xml is fine as assembly language for online software. However, producers of webpages will continue to need a high level language. A mixture of present day html and LaTeX and further markup codes might suffice for this. See generalizations and plug-ins below.

Generalizations and Plug-ins - programming exercises

If an applet X produces an onscreen display (graphics) from a markup language, and the applet X is able to report the minimum size for needed to fully display its input,  then a java application or applet Y may replace instances of the markup language in an input file by html-code for properly sized instance of the applet X for graphic display. Instances of HotEqn cousin, the java component cHotEqn could be used to display mathematics within the applet X.

An variant of the LaTeX2HotEqn applet above (not today) could be coded with a parameter pointing to an input file and a button (part of the applet, or from a  javascript form) attached to the operations of reading and processing the input file and then of opening a new browser window for display purposes.  A further generalization could be to provide a plug-in based on applet X or its innards. Finally, each browser page has a flow layout. The development of applets would be simpler if applets or embedded objects not giving their dimensions,  could report the browser the minimum or preferred dimensions for their display. For applets, the latter would be possible with a java-based browser.

HotEqn Wish List

HotEqn may crash a few browsers if you mis-spell LaTeX commands or ... .  Greater usage of HotEqn by people may lead to bug removal. 

  1. Add space before and after equal signs. 
  2. ....

With usage, this HotEqn wishlist will grow.  The LaTeX2HotEqn applet is only a shell around HotEqn and its cousins.


All trademarks and copyrights on this page are owned by their respective owners. Copyright to comments & contributions, if any, are owned by the Poster. The Rest © 1995 onward by site author Alan Selby, Ph. D. All Rights Reserved