html.out 7.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293

;;;
;;;    Sectioning
;;;
<define-tag section endtag=required><h2>%body</h2></define-tag>
<define-tag subsection endtag=required><h3>%body</h3></define-tag>

;;;
;;;    Set text in typewriter or bold face font
;;;    Constructs like <tt><tt>a</tt></tt> are valid but we
;;;    prefer to avoid them.
;;;
<set-var _text:tt=0 />
<set-var _text:b=0 />
<set-var _text:em=0 />
<define-tag texttt endtag=required whitespace=delete>
<increment _text:tt />
<ifeq <get-var _text:tt /> 1 "<tt*>" />
%body
<ifeq <get-var _text:tt /> 1 "</tt*>" />
<decrement _text:tt />
</define-tag>

<define-tag textbf endtag=required whitespace=delete>
<increment _text:b />
<ifeq <get-var _text:b /> 1 "<b*>" />
%body
<ifeq <get-var _text:b /> 1 "</b*>" />
<decrement _text:b />
</define-tag>

<define-tag textem endtag=required whitespace=delete>
<increment _text:em />
<ifeq <get-var _text:em /> 1 "<em*>" />
%body
<ifeq <get-var _text:em /> 1 "</em*>" />
<decrement _text:em />
</define-tag>

;;;
;;;    Common names
;;;
<define-tag program><textbf>%attributes</textbf></define-tag>
<define-entity mp4h><program mp4h /></define-entity>
<define-entity WML><program WML /></define-entity>
<define-entity m4><program m4 /></define-entity>
<define-entity Meta-HTML><program Meta-HTML /></define-entity>

<define-tag var><textem>%attributes</textem></define-tag>
<define-tag value><texttt>%attributes</texttt></define-tag>
<define-tag command><texttt>%attributes</texttt></define-tag>
<define-tag full-command><texttt>&lt;%attributes&gt;</texttt></define-tag>
<define-tag slash><texttt>S</texttt></define-tag>
<define-tag true><texttt>true</texttt></define-tag>
<define-tag optflag><texttt>-%attributes</texttt></define-tag>
<define-tag file><texttt>%attributes</texttt></define-tag>
<define-tag anchor><a %attributes>&nbsp;</a></define-tag>

<define-tag tag:slash><slash/></define-tag>
<define-tag tag:V><texttt>V</texttt></define-tag>

;;;
;;;    Alias for writing URLs
;;;
<define-tag URL whitespace=delete>
<preserve name src />
<set-var %attributes />
<defvar name <get-var src /> />
<a href="<get-var src />"><texttt><get-var name /></texttt></a>
<restore name src />
</define-tag>

;;;
;;;    Header of the HTML document
;;;
<define-tag header>
<html*>
<head>
<meta name="Author"    content="Denis Barbier" />
<meta name="Generator" content="mp4h <__version__/>" />
<meta name="Created"   content="10-Feb-2000" />
<set-var fileinfo="<get-file-properties <__file__ /> />" />;;;
<meta name="Modified"  content="<date <get-var fileinfo[3] /> />" />
<title><get-var title /></title>
</head>
<body* bgcolor="#ffffff" text="#000000">

<h1><get-var title /></h1>
<para>
This documentation describes <get-var package /> version <__version__ />.
</para>
</define-tag>

;;;
;;;    Footer of the HTML document
;;;
<define-tag footer>;;;
</body>
</html>
</define-tag>

;;;
;;;    Description of mp4h tags
;;;
<define-tag tag:description endtag=required whitespace=delete>
<preserve complex verbatim />
<set-var complex=* />
<set-var verbatim=* />
<set-var %attributes />
<set-var list-attributes="%Ubody" />
<subst-in-var list-attributes "^\n*(.*?)\n*$" "\\1" reflags=s />
<para><a name="tag-%0">&nbsp;</a></para>
<box bdwidth=3 bdcolor="#ff0000" bgcolor="#ffffff" summary="Syntax of the `%0' tag">
<table border=0 summary="">
<tr valign=top>
<td align=center><if <get-var complex /> "<a href=<dq/>#noteattr<dq/>><tag:slash/></a>" "&nbsp;" /></td>
<td align=center><if <get-var verbatim /> "&nbsp;" "<a href=<dq/>#noteattr<dq/>><tag:V/></a>" /></td>
<td align=center>%0</td>
<td>
  <when <gt <array-size list-attributes /> 0 />>
    <table border=0 cellpadding=0 cellspacing=0 summary="">
      <foreach attr list-attributes>
        <tr><td><texttt><get-var attr /></texttt></td></tr>
      </foreach>
    </table>
  </when>
</td>
</tr>
</table>
</box>
<restore complex verbatim />
</define-tag>

<define-tag attributes:description endtag=required>
<ul>
%body
</ul>
</define-tag>

<define-tag attributes:item endtag=required>
<li><attribute %0 /><br />
%body</li>
</define-tag>

;;;
;;;    Box
;;;
<define-tag box endtag=required>;;;
<preserve bgcolor fgcolor bdcolor bdwidth bdspace width summary header />;;;
<set-var bdwidth=1 bdspace=4 />;;;
<set-var %attributes />;;;
<if <get-var bdcolor /> <group "
<table* cellspacing=0 cellpadding=<get-var bdwidth /> ;;;
       bgcolor=<get-var bdcolor /> border=0;;;
       <if <get-var summary /> " summary=<dq/><get-var summary /><dq/>" />;;;
>
<tr*>
<td*>;;;
" /> />
<table <if <get-var bgcolor /> "bgcolor=<get-var bgcolor />" /> ;;;
       <if <get-var width /> "width=<get-var width />" /> ;;;
       cellspacing=0 cellpadding=<get-var bdspace /> ;;;
       border=0 summary="">
<tr>
<td>;;;
<if <get-var fgcolor /> "<font* color=<get-var fgcolor />>" />;;;
%body;;;
<if <get-var fgcolor /> "</font>" />;;;
</td>
</tr>
</table>
<if <get-var bdcolor /> <group "
</td*>
</tr*>
</table*>
" /> />;;;
<restore  bgcolor fgcolor bdcolor bdwidth bdspace width summary header />;;;
</define-tag>

;;;
;;;    Paragraphs
;;;
<define-tag para endtag=required>;;;
<p>%body</p>

</define-tag>

;;;
;;;    Notes
;;;
<define-tag note endtag=required>;;;
<para><textbf>Note:</textbf> %body</para></define-tag>

;;;
;;;    Lists
;;;
<define-tag list endtag=required>;;;
<ul>%body</ul>;;;
</define-tag>
<define-tag item endtag=required><li>%body</li></define-tag>

;;;
;;;    Quotes
;;;
<set-quotes />
<define-tag begin-quote><@[</define-tag>
<define-tag end-quote>]@></define-tag>

;;;
;;;    Example of mp4h code
;;;
<set-eol-comment "###" />
<define-tag three-colon>;;;</define-tag>
<define-tag example endtag=required attributes=verbatim>
<set-var-verbatim verb-body=%ubody />
<subst-in-var verb-body "&" "&amp;" />
<subst-in-var verb-body "<" "&lt;" />
<subst-in-var verb-body ">" "&gt;" />
<set-var body=%body />
<subst-in-var body "<(/?[a-z]*)[*]" "<\\1" />
<subst-in-var body "&" "&amp;" />
<subst-in-var body "<" "&lt;" />
<subst-in-var body ">" "&gt;" />
<subst-in-var body "<three-colon/>[^;\n]*\n[ \t]*" "" />
<subst-in-var body "<three-colon/>$" "" reflags=m />
<subst-in-var body "^\n*(.*?)\n*$" "\\1" reflags=s />
<table border=2 cellpadding=0 cellspacing=0 width="80%" summary="">
    <tr><th bgcolor="#ccccff" align=left>&nbsp;&nbsp;&nbsp;Source</th></tr>
    <tr><td bgcolor="#ccff99" width="80%"><dnl/>
      <pre><get-var-once verb-body /></pre><dnl/>
    </td></tr>
    <tr><th bgcolor="#ccccff" align=left>&nbsp;&nbsp;&nbsp;Output</th></tr>
    <tr><td bgcolor="#ff99cc" width="80%"><dnl/>
      <pre><get-var-once body /></pre><dnl/>
    </td></tr>
</table>
</define-tag>
<set-eol-comment ";;;" />

<define-tag void-func></define-tag>
<define-tag pseudo-func>;;;
<set-var liste-funcs="%Aattributes" />;;;
<foreach func liste-funcs>;;;
  <subst-in-string "=LT=let <get-var func />=void-func />" "=LT=" "<" />;;;
</foreach>;;;
</define-tag>

;;;
;;;    Verbatim code
;;;
<define-tag code endtag=required attributes=verbatim whitespace=delete>
<set-var-verbatim verb-body=%Ubody />
<subst-in-var verb-body "&" "&amp;" />
<subst-in-var verb-body "<" "&lt;" />
<subst-in-var verb-body ">" "&gt;" />
<pre><get-var verb-body /></pre>
</define-tag>

;;;
;;;    Attributes
;;;
<define-tag attribute><texttt>%attributes</texttt></define-tag>


;;;
;;;    HTML Comments
;;;
<define-tag html:comment endtag=required>
&lt;!--%body--&gt;
</define-tag>

<define-tag option-list endtag=required whitespace=delete>
<table cellspacing=2 border=0 summary="">
%body
</table>
</define-tag>

<define-tag option endtag=required>;;;
<tr valign=top><td>%attributes</td><td>%body</td></tr>;;;
</define-tag>

<define-tag option-desc endtag=required>
<br />
%body
</define-tag>

<define-tag optmand attributes=verbatim>;;;
<texttt>%attributes</texttt>;;;
</define-tag>
<define-tag optopt attributes=verbatim>;;;
<texttt>[%attributes]</texttt>;;;
</define-tag>