Convenient Preparation of Presentations in HTML
by Hugh McGuire
Abstract
The system presented here,
a computer program named "fmt_html",
takes straightforwardly typed text and formats it in HTML.
The main intention
is for producing
dynamic
lecture-notes
for Computer Science courses.
The automatic formatting is naturally convenient,
and having the result in HTML
means that it is easily viewable on any machine --
nicely accessible past the presentation, if desired --
plus the material is as infinitely
extensible as the World-Wide Web,
with images, outlines, applets, ...
A distinguishing feature is that
in addition to
the
main
material for public display in the presentation,
with this system
one also has a private document
with
annotations such as
what to say
integrated with
the public material.
This program is written in C,
so it runs on any machine.
Illustration
Here is an example of the output:
CMPSC 10
Document #36
2001:March:02
CMPSC 10 Lecture-notes #20: Multidimensional Arrays
Details of that output such as "UCSB" and "CMPSC 10"
are specified via command-line options.
But the main source-material for the preceding is as follows:
Multidimensional Arrays
Document #36
2001:March:02
<!--
PRE-LOAD (IDE) WITH |life.java|, |life.html|
-->
<!-- IF WRITING (BY HAND)
REM DON'T USE ADDITIONAL PUNCTUATION THIS LECTURE
E.G. "<", ">": "<array-name>"
-->
<!--
<font color="b07000">Announcements</font>
load your |.html| and |.class| files for Exercise~A
into a sub-folder which you create in your |www|-folder
<hr>
-->
declaration:
|@elt.-type@[][] @m-array-name@;|
<!-- this is for two dimensions; for more dimensions, more sets of brackets -->
e.g. |int[][] cell;|
<!-- again, can be done with brackets following,
but it's clearer this way
-->
allocation:
|@m-array-name@ = new @elt.-type@[@num.-rows@][@num.-columns@];|
e.g. |cell = new int[5][4];|
|cell[][]| :
^00^ ^00^ ^00^ ^00^
^00^ ^00^ ^00^ ^00^
^00^ ^00^ ^00^ ^00^
^00^ ^00^ ^00^ ^00^
^00^ ^00^ ^00^ ^00^
usage:
multiple indexing to get individual elements
|@m-array-name@[@row-index@][@column-index@]|
variable of |@elt.-type@|
e.g.:
|cell[3][2] = -5;| <!-- PUT IT THERE -->
|cell[4][0] = 8;| <!-- PUT IT THERE -->
not comma-separated
|cell[3,2] = -5;| ~ ^compilation would fail^
This source-material can be used as lecture-notes
while presenting the formatted material further above.
During the presentation,
one can type material in the input-fields
as shown with the "-5" and the "8"
and as would be done with "compilation would fail".
Related Work
There are many other products that format material for presentation,
e.g.
Microsoft PowerPoint
and LaTeX.
Those are powerful products,
with custom features including graphics.
But fmt_html
differs from those products in various details:
-
A simple detail is the standard restriction to `slides':
it's not always convenient to
clearly divide material into segments of the specified slide-sizes.
Further, re sizes, when material is in
HTML one can actually resize the window with it
during a presentation
to do other things with screen-space,
e.g. to demonstrate software
or to simply reference material beyond the main
material being presented --
considering that so much material is now easily referentiable
via the World-Wide Web.
Such
flexible and powerful
screen-sharing
and further multi-processing
is not so convenient with
other products
such as Microsoft PowerPoint
whose mode of operation is
rigidly and
simplistically
more single-processing and resource-monopolizing.
-
While some of those other products do provide some basic
facilities for
private lecture-notes associated with
the material formatted for presentation,
it's standard for the private lecture-notes to be rather separate
from the main material,
not integrated
as,
for example,
comments are integrated with the main material
of a computer program.
Such separation is typically necessary because products are WYSIWYG;
plus, with the above-mentioned restriction to `slides' or pages,
after a slide is full with presentation-material,
it would be awkward to add further (private) annotations to it.
With fmt_html,
you specify main material and private lecture-notes together in
one document; what gets displayed is automatically extracted
from that,
and then you have the original document
with the displayed material and the private
material
together
to be used as
lecture-notes.
-
Then,
while other presentation-document preparation tools
may have many powerful features,
one will always be limited to just those features and parameters,
whereas HTML-technology is arbitrarily extensible.
HTML
provides document-processing facilities including outlines,
font- and color-changes,
inclusion of images, and so on, with
truly arbitrarily powerful
utilities for presentation such as
Java Applet computer-programs,
which do anything a computer can do.
-
Another issue is
specificity of platforms;
e.g. Microsoft PowerPoint runs on Microsoft machines,
not UNIX (LINUX) ones.
Using HTML,
one can work on any machine
and present the material on any machines.
Re the program fmt_html itself,
that
is written in the universally portable language C,
so it runs on any machine.
-
A final issue
is integration with
other course-materials,
e.g. links to auxiliary documents
or simply earlier lectures.
Hyper-text inherently links with all other media,
whereas such linking is not so naturally provided with
more static documents such as with other products.
One question might be:
why not write directly in HTML, or perhaps related markup-languages
such as XML?
The problem is like that with Postscript:
one can write it,
and
it does everything,
but writing everything desired in it is tedious.
For example, here is some of the HTML from the example above:
allocation:
<br>
<var>m-array-name</var><code> = new </code><var>elt.-type</var><code>[</code><var>num.-rows</var><code>][</code><var>num.-columns</var><code>];</code>
<br>
e.g. <code>cell = new int[5][4];</code>
<br>
<code>cell[][]</code> :
<br>
<input type="text" size=3> <input type="text" size=3> <input type="text" size=3> <input type="text" size=3>
<br>
<input type="text" size=3> <input type="text" size=3> <input type="text" size=3> <input type="text" size=3>
It is easy to make mistakes if trying to type e.g. " "
many times.
XML with
XSL
may address that point somewhat,
enabling less typing via one's own definitions,
but there's a remaining issue:
error-checking.
With HTML (or WYSIWYG systems),
the standard for checking for errors such
as forgetting to close a quoted string or
forgetting to type the "/" in "<code>...</code>"
is:
you view the result, you check if it's OK, and if it's not you must
find what's wrong in your specification.
By contrast, fmt_html
finds such errors
and tells you where they may be.
Acknowledgements
The way fmt_html uses control- or escape-characters,
particularly "|",
is derived from TeX/LaTeX.
Future Work
The main aspect of fmt_html being developed right now is its
flexibility, so it will be usable more ways by more people.
E.g. a planned improvement is to make its control-characters
such as "|" and "@"
command-line switchable.
For More Information
Contact
Hugh McGuire
via
mcguire@cs.ucsb.edu
or
(805) 893-5412.
His main Web-page
is
http://www.cs.ucsb.edu/~mcguire/ ;
starting from there,
you can
browse
more examples of the use of fmt_html
among the Web-pages of courses taught by him.