xslides.el

An emacs mode for generating XHMTL presentations. Written by José M. Vidal.

1 Introduction

2 Requirements

3 Motivation

4 Features

5 Sample Presentation

<!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> 
  <head> 
    <title>xslides.el</title>
    <link rel="stylesheet" href="../w3ctalk-summary.css"></link>
  </head>
   
  <body>

    <h1 name="index">xslides.el</h1>
    <p>
      An emacs mode for generating XHMTL presentations. Written by
      Jos&eacute; M. Vidal.
    </p>

    <h1 name="intro">Introduction</h1>
    <p>
      <ul>
        <li>A mode I wrote to generate my <a
        href="../index.html">presentations</a></li>

        <li>I use XEmacs. </li>

        <li>Each presentation is an XML file. xslides parses this file
        and generates all the individual slides.</li>

        <li>Most of the XML file is XHTML, with a few special tags I
        have created for special purpose (no, no namespaces,
        yet). </li>
      </ul>
    </p>

    <h1 name="requirements">Requirements</h1>
    <p>
      <ul>
        <li>XEmacs (emacs might also work). </li>

        <li>Must be fluent in emacs and elisp (for now?). </li>

        <li>Slides use CSS and MathML. They are delivered as .xml. Mozilla 1.2 can handle this. </li>

        <li>Uses xml.el, with a couple of bugfixes I made.</li>

      </ul>
    </p>


    <h1 name="motivation">Motivation</h1>
    <p>
      <ul>
        <li>Fast talk generation.</li>

        <li>Explore the power of the new medium. xslides is meant to
        be used with a computer and projector (<b>not</b> for printing
        slides).
          <ul>
            <li>Scroll: I can have program listings! </li>

            <li>Hyperlink</li>

            <li>Multiple style sheets and views of data.</li>

            <li>Cross-linking across presentations. </li>
          </ul> 
        </li>

        <li>Integration with emacs work environment. 
          <ul>
            <li>htmlize</li>

            <li>HTML mode: xslides is only a minor mode.</li>

            <li>bibcite: minimal as of now. </li>

            <li>quickurl: not yet </li>
          </ul>
        </li>

      </ul>
    </p>

    <h1 name="features">Features</h1>
    <p>
      <ul>
        <li>Multiple stylesheets can be selected at runtime (on
        Mozilla go to View-&gt;Stylesheet). Stylesheet chosen is
        maintained throughout presentation.</li>

        <li>Automatically generates <a href="allslides.xml">all in one
        page</a> summary&mdash;good for printing. </li>

        <li>Generates a <a href="frameindex.xml">framed view</a>. </li>

        <li>Automatically shows files with the same colors as you see
        them in emacs. </li>

      </ul>
    </p>

    <h1 name="sample">Sample Presentation</h1>
    <p>
      <ul>
        <li>You can get the <a href="sourcecode.html">source code</a>
        for this presentation. </li>

      </ul>
      <include href="sourcecode.html" parse="htmlize"/>
    </p>

    <h1 name="animation">Simple Animation</h1>
    <p>
    <ul>
      <li>Create simple animations by hiding text within nested
       &lt;hide&gt;&lt;/hide&gt; elements. They will appear on
      succesive slides, like so:</li>
      <hide>
        <li>First nesting level</li>
        <li>First nesting level</li>
        <hide>
          <li>Second nesting level</li>
            <hide>
              <li>Third nesting level</li>
            </hide>
        </hide>
      </hide>
      <li>Last line</li>
    </ul>
  </p>

    <h1 name="includeslide">Include Slide: htmlize</h1>
    <p>
      <ul>
        <li>To include a file and have it show as it would on emacs use:</li>

        <li>&lt;include href="Event.java" parse="htmlize"&gt;&lt;/include&gt;</li>
      </ul>

      <include href="Event.java" parse="htmlize"></include>
    </p> 
    
    <h1 name="includeslidet">Include Slide: text</h1>
    <p>
      <ul>
        <li>&lt;include href="Event.txt"
        parse="text"&gt;&lt;/include&gt;</li>

        <li>Note that this text file cannot contain any &lt; or &gt; </li>
      </ul>
      <include href="Event.txt" parse="text"></include>
    </p>
    
    <h1 name="includeslideh">Include Slide: html</h1>
    <p>
      <ul>
        <li>&lt;include href="include.html" parse="html"&gt;&lt;/include&gt;</li>
      </ul>
      <include href="include.html" parse="html"></include>
    </p> 
    
    <h1 name="includexml">Include Slide: xml</h1>
    <p>
      <ul>
        <li>&lt;include href="slidetwo.xml.ex" parse="xml"/&gt;&lt;/include&gt;</li>
      </ul>

      <include href="slidetwo.xml.ex" parse="xml"></include>
    </p>

    <h1 next="math" name="randomtest">Non Linearity</h1>
    <p>
      <ul>
        <li>Define which slide is <code>next</code> and
        <code>previous</code> by using those attributes in the
        h1. </li>

        <li>Add a link to another slide by using a URL like
        <code>slide:slidename</code> where slidename is the name of
        the slide.</li> 

        <li><a href="slide:sl1">Go To SL 1</a></li>

        <li><a href="slide:sl2">Go To SL 2</a></li> 

        <li><a href="slide:sl3">Go To SL 3</a></li>
      </ul>
    </p>
    
    <h2 next="randomtest" previous="randomtest" name="sl1">SL1</h2>
    <p>
    <ul>

      <li>Hello</li>

    </ul>
  </p>

    <h2 next="randomtest" previous="randomtest" name="sl2">SL2</h2>
    <p>
    <ul>
      <li>First line</li>
      <hide>
        <li>Second line</li>
        <hide>
          <li>Third line</li>
        </hide>
      </hide>      
    </ul>
  </p>

    <h2 next="randomtest" previous="randomtest" name="sl3">SL3</h2>
    <p>
    <ul>
      <li>Hello</li>
    </ul>
  </p>

    <h1 name="float">Float left</h1>
    <p>

      <div class="floatleft">
        <img class="float" src="sample.png" alt="Sample pic"/>
      </div>
      <ul>
        <li>The picture is floating to the left. </li>

        <li>of this text. </li>
      </ul>
    </p>

    <h2 name="floatright">Float Right</h2>
    <p>

      <div class="floatright">
        <img class="float" src="sample.png" alt="sample"/>
      </div>
      <ul>
        <li>The picture is floating to the right. </li>

        <li>of this text. </li>

        <li>this is more text. </li>
      </ul>
      <div class="floatleft" style="width:10%">
        <img class="float" src="sample.png" alt="sample"/>
      </div>
      <ul>
        <li>This picture is floating to the left</li>

        <li>with a fixed width of 10% </li>
      </ul>

    </p>


    <h1 name="table">Table</h1>
    <p>

      <div class="center">
        <table  border="1" cellpadding="2">
          <tr>
            <td>A centered  </td>
            <td> table   </td>
            <td>c  </td>
          </tr>
          <tr>
            <td> d </td>
            <td> e </td>
            <td> f </td>
          </tr>
          <tr>
            <td> g </td>
            <td> h </td>
            <td> i </td>
          </tr>
        </table>
      </div>
      <ul>
        <li>text after the centered table.</li>
      </ul>

      <div class="floatright">
        <table  border="1" cellpadding="2">
          <tr>
            <td>A table that  </td>
            <td>floats to the   </td>
            <td>right  </td>
          </tr>
          <tr>
            <td> d </td>
            <td> e </td>
            <td> f </td>
          </tr>
          <tr>
            <td> g </td>
            <td> h </td>
            <td> i </td>
          </tr>
        </table>
      </div>

      <ul>
        <li>some text</li>

        <li>after the right-floating table. </li>
      </ul>

    </p>


    <h1 previous="randomtest" name="math">Math</h1>
    <p>
      <ul>
        <li>Math can be typed inline as TeX equations and will show up
        as MathML in the slides. This is done by using <a
        href="http://pear.math.pitt.edu/mathzilla/itex2mml.html">itex2MML</a>.</li>

        <li><pre>&#036;E=mc^2&#036;</pre> appears as $E=mc^2$. </li>

        <li><pre>&#036;\sum_{n=1}^\infty \frac{(-1)^n}{n} = \ln 2&#036;</pre>
        appears as $\sum_{n=1}^\infty \frac{(-1)^n}{n} = \ln 2$. </li>

        <li><pre>&#92;[ \sum_{n=1}^\infty \frac{1}{n} \mbox{ is divergent, but } 
 \lim_{n \to \infty} \sum_{i=1}^n \frac{1+ 2 - 2}{i} 
 - \ln n \mbox{ exists.}&#92;]</pre> appears as

          \[ 
          \sum_{n=1}^\infty \frac{1}{n} \mbox{ is divergent, but }
          \lim_{n \to \infty} \sum_{i=1}^n \frac{1+ 2 - 2}{i} - \ln n
          \mbox{ exists.}
          \]
        </li>

        <li>If the curly bracket below is too small then you probably
        have not installed all the needed fonts.
 </li>
      </ul>
    </p>

    <h1 name="download">Download</h1>
    <p>
      <ul>
        <li>Not yet cleaned up.</li>

        <li>Email me if you are interested.</li>
      </ul>
    </p>

    <h1 name="install">Installation</h1>
    <p>
      <ul>
        <li>Not here yet. </li> 
      </ul>
    </p>

    <h1 name="usage">Usage</h1>
    <p>
      <ul>
        <li>Not here yet. </li>
      </ul>
    </p>

    <hr /> 
    <address><a href="mailto:vidal@sc.edu">Jos&eacute; M Vidal</a></address>
<!-- hhmts start -->
Last modified: Thu Nov 27 23:05:51 EST 2003
<!-- hhmts end -->
  </body>
</html>

6 Simple Animation

7 Include Slide: htmlize

//-*- Mode: JDE -tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
package biter;
import java.util.Vector;

/**
 * An agent-created event. These are usually "alarms" set to go off
 * after a certain time period. 
 *
 * We can even put some math in here: $x^2 = \frac{1}{\alpha}$.
 * As such, this file cannot contain dollar signs.
 *
 * Let $\delta_i^t = \sum_{n=1}^k Pr[x=k_n]$ be $i$'s decision function at time $t$.
 *
 *
 * @author Jose M. Vidal
 * @version 1.0
 *
 */

public class Event extends Input
{
  /** The time when this event is scheduled to happen */
  public long time;

  /** The name of this event */
  public String name;
    
  Event (String name, long time){
    this.time = time;
    this.name = name;
    this.realTime = System.currentTimeMillis();
  }

  Event (Event e){
    this.time = e.time;
    this.name = e.name;
    this.realTime = System.currentTimeMillis();
  }

  /** Does this event happen before another one?
     * @param e the other event
     * @return true this.time < e.time */
  public boolean isBefore (Event e){
    return time < e.time;
  }

  public String toString(){
    return "Event name: " + name + "\ntime: " + time + "\n";
  }

  /**
     @param e the other event to compare to.
     @return true if both have the same name */
  public boolean equals(Event e){
    return name.equals(e.name);
  }
}

8 Include Slide: text

//-*- Mode: JDE -tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
package biter;
import java.util.Vector;

/**
 * An agent-created event. These are usually "alarms" set to go off
 * after a certain time period.
 * 
 * @author Jose M. Vidal
 * @version $Revision: 1.6 $, $Date: 2001/02/27 22:24:31 $
 *
 */

public class Event extends Input
{
  /** The time when this event is scheduled to happen */
  public long time;

  /** The name of this event */
  public String name;
    
  Event (String name, long time){
    this.time = time;
    this.name = name;
    this.realTime = System.currentTimeMillis();
  }

  Event (Event e){
    this.time = e.time;
    this.name = e.name;
    this.realTime = System.currentTimeMillis();
  }

  /** Does this event happen before another one?
     * @param e the other event
     * @return true this.time < e.time */
  public boolean isBefore (Event e){
    return time < e.time;
  }

  public String toString(){
    return "Event name: " + name + "\ntime: " + time + "\n";
  }

  /**
     @param e the other event to compare to.
     @return true if both have the same name */
  public boolean equals(Event e){
    return name.equals(e.name);
  }
}

9 Include Slide: html

Hello

10 Include Slide: xml

This is the second slide.

11 Non Linearity

11.1 SL1

11.2 SL2

11.3 SL3

12 Float left

Sample pic

12.1 Float Right

sample
sample

13 Table

A centered table c
d e f
g h i
A table that floats to the right
d e f
g h i

14 Math

15 Download

16 Installation

17 Usage

URLs

  1. itex2MML, http://pear.math.pitt.edu/mathzilla/itex2mml.html

This talk available at http://jmvidal.cse.sc.edu/talks/testtalk/
Copyright © 2009 José M. Vidal . All rights reserved.

27 November 2003, 11:05PM