w_doc_id(s2aimpl.html)dnl

This file is copyright (c) 2004,2005,2006 by Panu Kalliokoski
and released under the license in ../LICENSE

w_use(examples/reflection-disclaimer)

Definitions for HTML.

HTML provides its own hack diversion, ''metas''.
{{{
w_define_div(metas)
}}}

Paragraphs and headings.

{{{
define(`w_softpara', `w_dump_footnotes(<br>,)')
define(`w_paragraph', `<p>')
define(`w_headline',
`<h`'incr($1)>$2</h`'incr($1)>')
}}}

Block system environments.

{{{
w_define_env(-,<ul>,</ul>)
w_define_env(#,<ol>,</ol>)
define(`w_listitem', `<li>')
w_define_env(q,<blockquote>,</blockquote>)
w_define_env(:,
`pushdef(`w_pending_block_hook',)<dl>',
`popdef(`w_pending_block_hook')</dl>')
define(`w_defnterm', `<dt>$1</dt>')
w_define_env(t,
`define(`w_pending_block_hook', <dd>)',
`ifelse(defn(`w_pending_block_hook'),,</dd>,
   `define(`w_pending_block_hook',)')')
}}}

Other environments.

{{{
w_define_env(litblock, `undefine(`@w_para_flag')<pre>', `</pre>')
define(`w_footnotemark', `<small>[$1]</small>')
w_define_env(center, `<div class=centering align=center>', `</div>')
w_define_env(comment, `<!-- ', ` -->')
w_derive_env(`w_float_m', `w_float_h', 0,
`<div class=marginpar style="float: right; padding: 2em">',,,`</div>')
define(`w_caption', `<small>$1</small>')
}}}

Emphasis.

{{{
define(`w_literal', `<tt>$1</tt>')
define(`w_emph', `<em>$1</em>')
define(`w_techemph', `<var>$1</var>')
define(`w_strong', `<strong>$1</strong>')
define(`w_quotation', `<q>$1</q>')
}}}

Other inlines.

{{{
define(`w_linebr', <br>)
define(`w_sectbreak', `<hr size="decr($1)">')
define(`w_link', `<a href="$1">$2</a>')
define(`w_img', `<img src="w_file(`$1.'w_picture_suffix)" alt="$2">')
define(`w_label',
`<a name="$1"ifdef(`w_symmetric_crossrefs',` href="#$1_rev"')>$2</a>')
define(`w_refer',
`<a ifdef(`w_symmetric_crossrefs',`name="$1_rev" ')href="#$1">$2</a>')
define(`w_url', `w_link(`$1', `$1')')
}}}

Slides.

{{{
w_define_env(slide, `w_ensure_slides<div class="slide">', `</div>')
define(`w_ensure_slides', `ifdef(`@w_slidesetup_done',,
  `define(`@w_slidesetup_done',t)w_slide_setup')')

ifdef(`w_s5url',,`define(`w_s5url', `ui/default/')')
define(`w_slide_setup',
`define(`w_s5url', w_file(defn(`w_s5url')))'dnl
`w_begdiv(metas) <meta name="presdate" content="w_date">
 <meta name="defaultView" content="slideshow" />
 <meta name="controlVis" content="hidden" />
 <link rel="stylesheet" href="w_s5url`'slides.css"
       type="text/css" media="projection" id="slideProj" />
 <link rel="stylesheet" href="w_s5url`'outline.css"
       type="text/css" media="screen" id="outlineStyle" />
 <link rel="stylesheet" href="w_s5url`'print.css"
       type="text/css" media="print" id="slidePrint" />
 <link rel="stylesheet" href="w_s5url`'opera.css"
       type="text/css" media="projection" id="operaFix" />
 <script src="w_s5url`'slides.js" type="text/javascript"></script>
w_enddiv(metas)w_begdiv(frontmatter)<div class="layout">
 <div id="controls"></div>
 <div id="currentSlide"></div>
 <div id="header">w_slideheader</div>
 <div id="footer">w_slidefooter</div>
</div>
w_enddiv(frontmatter)w_begdiv(ingr)<div class="presentation">
w_enddiv(ingr)w_begdiv(backmatter)</div>
w_enddiv(backmatter)undefine(`w_make_title')')
}}}

Tables.

{{{
w_define_env(w_table,
`pushdef(`w_caption', `<caption>$1</caption>')<table border=0>',
`popdef(`w_caption')</table>')
w_define_env(w_row, `<tr valign="baseline">', `</tr>')
w_define_env(w_cell,
`<td align="ifelse(`$2',l,left,`$2',r,right,`$2',c,center)">', `</td>')
define(`w_table_rule', `<tr><td colspan="$1"><hr></td></tr>')
}}}

Special and quoted charactes.

{{{
define(`w_lt', `&lt;')
define(`w_gt', `&gt;')
define(`w_amp', `&amp;')
define(`w_emdash', `&mdash;')
define(`w_endash', `&ndash;')
define(`w_ellipsis', `&hellip;')
define(`w_copyrightsign', `&copy;')
define(`w_trademarksign', `&trade;')
define(`w_larrow', `&larr;')
define(`w_rarrow', `&rarr;')
}}}
