;;; header.mhtml: -*- Meta-HTML -*- 

;;;  Copyright (c) 1996 Universal Access Inc.
;;;  Author: Henry Minsky (hqm@ua.com) Sun Sep 15 10:09:35 1996.

<include ../header.mhtml>
<use-pagelist tutorial>
<center>
  <font size=+1><i><b>The <Meta-HTML> Tutorial</b></i></font>
</center>

<defmacro eval-table>
  <table border=1 bgcolor="#DDDDDD">
    <set-var bodytext=<prog <verbatim quote> %body </verbatim>>>
    <subst-in-var bodytext "##B" "<b>" "B##" "</b>">
    <tr valign=middle  width=200>
      <td valign=middle>
	<pre><get-var-once bodytext></pre>
      </td>
    </tr>
  </table>
</defmacro>

<defmacro defexample whitespace=delete>
  <ifeq "%1" "code" "<set-var fmt=code>" "<set-var fmt=pre>">
  <set-var %0=<<get-var fmt>><verbatim quote>%body</verbatim></<get-var fmt>>>
  %body
</defmacro>

<defmacro example-table>
  <p>
  <table border=1 width=75% bgcolor="#CCCCCC">
    <tr valign=middle>
      <td valign=middle>
	<pre><verbatim quote>%body</verbatim></pre>
      </td>
    </tr>
    <when <string-eq %0 "result">>
      <tr align=left>
	<td align=left>
	  <strong>%body</strong>
	</td>
      </tr>
    </when>
  </table>
</defmacro>

<defmacro big-sample size>
  <table align=right width=<get-var size>>
    <tr>
      <td>
	<font size=+1> <i> %body </i> </font>
      </td>
    </tr>
  </table>
  <br clear=right>
</defmacro>

<defsubst divider>
  <hr width="10%" size=20>
</defsubst>

<defun file name>
  <code><get-var name></code>
</defun>
