stx2any — definitions for HTML

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

Note that the definitions won't look right in the target output format, because they contain target markup.

Definitions for HTML.

HTML provides its own hack diversion, metas.

w_define_div(metas)

Paragraphs and headings.

define(`w_softpara', `w_dump_footnotes(

,)') define(`w_paragraph', `

') define(`w_headline', `$2')

Block system environments.

w_define_env(-,)
w_define_env(#,
    ,
) define(`w_listitem', `
  • ') w_define_env(q,
    ,
    ) w_define_env(:, `pushdef(`w_pending_block_hook',)
    ', `popdef(`w_pending_block_hook')
    ') define(`w_defnterm', `
    $1
    ') w_define_env(t, `define(`w_pending_block_hook',
    )', `ifelse(defn(`w_pending_block_hook'),,
    , `define(`w_pending_block_hook',)')')
  • Other environments.

    w_define_env(litblock, `undefine(`@w_para_flag')
    ', `
    ') define(`w_footnotemark', `[$1]') w_define_env(center, `
    ', `
    ') w_define_env(comment, `') w_derive_env(`w_float_m', `w_float_h', 0, `
    ',,,`
    ') define(`w_caption', `$1')

    Emphasis.

    define(`w_literal', `$1')
    define(`w_emph', `$1')
    define(`w_techemph', `$1')
    define(`w_strong', `$1')
    define(`w_quotation', `$1')
    

    Other inlines.

    define(`w_linebr', 
    ) define(`w_sectbreak', `
    ') define(`w_link', `$2') define(`w_img', `$2') define(`w_label', `$2') define(`w_refer', `$2') define(`w_url', `w_link(`$1', `$1')')

    Slides.

    w_define_env(slide, `w_ensure_slides
    ', `
    ') 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) w_enddiv(metas)w_begdiv(frontmatter)
    w_enddiv(frontmatter)w_begdiv(ingr)
    w_enddiv(ingr)w_begdiv(backmatter)
    w_enddiv(backmatter)undefine(`w_make_title')')

    Tables.

    w_define_env(w_table,
    `pushdef(`w_caption', `$1')',
    `popdef(`w_caption')
    ') w_define_env(w_row, `', `') w_define_env(w_cell, `', `') define(`w_table_rule', `
    ')

    Special and quoted charactes.

    define(`w_lt', `<')
    define(`w_gt', `>')
    define(`w_amp', `&')
    define(`w_emdash', `—')
    define(`w_endash', `–')
    define(`w_ellipsis', `…')
    define(`w_copyrightsign', `©')
    define(`w_trademarksign', `™')
    define(`w_larrow', `←')
    define(`w_rarrow', `→')