A Lecture Generator in the Web

Jorge Kinoshita
Department of Computer Engineering
Polytechnic School of São Paulo University
Brazil
jkinoshi @pcs.usp.br

Abstract: - We made a tool to generate presentations as HTML pages from a simple input text which can be generated in any text editor. This tool is available to public usage through a CGI script at http://www.pcs.usp.br/~jkinoshi/lecture. This paper presents how a text given in a simple notation can create useful presentations.

Introduction
	It is common to use a computer tool (ex: PowerPoint [1]) in order to prepare a presentation. The material generated by the tool is a sequence of slides where each slide consists of:
•	One title
•	Many topics, organized in a hierarchical way.
In this paper we present a "lecture generator" tool that transforms a single text into HTML pages (slides) to be used in a lecture. Our approach is simpler than "PowerPoint":
•	The input text has a very simple notation that can be created in any text editor. 
•	The output are HTML pages that can be seen in any browser, hence, in most platforms. 
The tool is available for test in [2].

Input text and output slides
	Each line of the input text basically corresponds to a title or a topic of some slide. The first character of the line tells the difference:
•	title: A line beginning with '*'.
•	topic: A line beginning with '-'. 

Example 1:
 * Title of Slide 1
 - the first topic inside Slide 1
 - the second topic inside Slide 1
 * Title of Slide 2
 - one
 - second topic.
 - the last topic.

The input text from example 1 generates two slides:
•	Slide 1: The slide "Title of Slide 1". See figure 1
•	Slide 2: the slide "Title of Slide 2". 
Observation: The link to the former and next page is automatically generated at the head of the slide. Example: In figure 1, the link to the next page is "Title of Slide 2".

The hierarchy: Topics in a slide
Each topic line can begin with one or more '-'s. The more '-'s, the lower it will be in the hierarchical structure, as it can be seen in example 2. The first slide of presentation in Example 2 is seen in Figure 2.

Figure 1. First slide of example 1

Example 2: Hierarchy in topics

 * Title of Slide 1
 - 1. the first topic inside Slide 1

 -- 1.1. the sub-topic of 1
 --- 1.1.1 the first sub-sub-topic of 1
 --- 1.1.2 the second sub-sub-topic of 1.
* The second slide
- some topics inside

Figure 2: first slide of example 2

The hierarchy: Slides in a Lecture
	A lecture can correspond to a sequence of slides organized in a hierarchical way. 
Each title line begins with one or more '*'s. The more '*'s, the lower the slide will be in the hierarchical structure of the lecture.

Example 3:
 * Title of Slide 1
 - one topic
 ** Title of Slide 1.1
 - another topic
 ** Title of Slide 1.2
 - one topic more

which generates three HTML pages. The first HTML page is in figure 3:

Figure 3: First slide of Example 3

 Links to the "sub-subjects"
	The tool creates links to the slides at the immediately lower level (sons in a tree structure) at the bottom of the page. This is done because:
- it is common to present the great sub-subjects under some slide and
- it enhances the navigation during presentation. 
Example: The Slide 1 in Figure 3 has two "sons". The two links "Title of Slide 1.1" and "Title of Slide 1.2" (bottom of figure 3) are automatically generated by the "Lecture Generator" tool. 

The table of contents
	The tool automatically creates the HTML page pa0.html that displays the table of contents. The figure 4 shows the table of contents of the example 3.

Commands to the Lecture Generator Tool
	
We created a special notation in the input text (commands) that enables figure insertion, comment insertion, etc. The commands are:

1. mark a portion of input text as comment 
 syntax: 

 :rem
 some comments 
 :/rem
The lines between :rem and :/rem does not appear in the output. 

Figure 4 - Table of contents of table 3

2. keep the text as it is (ex: example of code)
 syntax:

 :pre
 some text that must appear as it is at the output
 :/pre

The lines between :pre and :/pre must appear as a text at the output HTML pages. It is useful to show programming code.

3. insertion of figure
 syntax:

 +img:file
 Example: figure 3: +img:florida/ex3.jpg

The Lecture Tool creates the HTML tag 'IMG' from this notation.

4. insertion of a HTML link.
syntax:

 +http:anURL 

If the user adds the character '+' before an URL (in this context, a sub-string that begins with "http:") then the HTML tags Aa and /A are automatically generated.
5. insertion of a sub-window. It is possible to show some text during the presentation of a particular topic. 
 syntax:

 +[some text]
 Example:
 +[this is an example of a sub-window]

When the sub-window is declared then a HTML link to a window containing "some text" is generated in the slide. This is done by a javascript function. In figure 5, the command: +[this is an example of a sub-window] generated the link "[*]"  to the yellow window containing the text.

Figure 5: Example of a sub-window. The sub-window appears when user clicks the link [*]

6. insertion of any HTML tag
Any HTML tag can be inserted using the normal HTML tag notation.

Example:
 this is a text in <b>bold</b>

The tool development
The tool was created in Perl in a Linux machine.
The tool in http://www.pcs.usp.br/~jkinoshi/lecture uses two Perl-scripts:
•	the script palestreia.pl that takes the text and converts into HTML pages.
•	a CGI script that deals with the user-interface. Basically it:
•	receives the text and user email from a form, 
•	applies palestreia.pl, compacts it and,
•	sends the compacted lecture to the user.

Usage Examples
	A presentation of the Lecture Generator Tool is in http://www.pcs.usp.br/~jkinoshi/lecture/pa0.html and its corresponding input text is in http://www.pcs.usp.br/~jkinoshi/lecture/lg.txt 

Conclusion
	The Lecture Generator Tool creates slides as HTML pages from a very simple input text. It is available to public usage through a CGI-script. It has some advantages and disadvantages over powerpoint.

Advantages over PowerPoint
•	Our tool organizes the slides in a tree structure instead of a linear structure. 
•	PowerPointer can display presentations in the web, but it becomes photos that are heavy to send. The Lecture Generator Tool generates presentations in HTML format. The HTML tags are very powerful and can be used to enhance a presentation.
•	Free of charge usage by  [2].
•	The input text can be generated in any text editor. I recommend emacs [3] in outline-mode. In fact, emacs outline-mode inspired me to construct the lecture generator tool. A description extracted from the help of emacs is:

editing outlines with selective display.
Headings are lines which start with asterisks: one for major headings, two for subheadings, etc.  Lines not starting with asterisks are body lines.
Body text or subheadings under a heading can be made temporarily invisible, or visible again.  Invisible lines are attached to the end of the heading, so they move with it, if the line is killed and yanked back.  A heading with text hidden under it is marked with an ellipsis (...).

Disadvantages  over PowerPoint
	Powerpoint has many facilities that are not yet supported by the Lecture Generator Tool; for instance, it enables to create some special "effects" during the transition from one slide to another. 

Future
	I hope to enhance this tool and license it under GPL [4].

References
[1] PowerPoint: http://www.microsoft.com
[2] Tool demonstration: http://www.pcs.usp.br/~jkinoshi/lecture/
[3] emacs: http://www.gnu.org
[4] GPL: http://www.gnu.org