# -*- tcl -*-
#
# $Id: script,v 1.1 1999/10/29 10:10:50 tobotras Exp $

require TEItools.tcl
require RTF.spec
TEItoolsSetup "rtf"
set rtf_fp $outFile

require TEItoolsRTF.tcl

specification translate {
    {element TITLE in PRESENTATION} {
	rtf para
	paraStyle style_Title
    }
    {element AUTHOR in PRESENTATION} {
	rtf para
	paraStyle style_Author
    }
    {element SLIDE} {
	rtf special
	startAction {
	    rtf:startSection	style_Slide
	}
	endAction {
	    rtf:endSection
	}
    }
    {element TITLE in SLIDE} {
	rtf para
	paraStyle style_Head
    }
    {element P} {
	rtf para
	paraStyle style_Default
    }
    {element ITEM} {
	rtf para
	paraStyle style_List_Item
	prefix	"$rtfSpecial(Bullet)$rtfSpecial(EnSpace)"
    }
    {element Q} {
	rtf special
	prefix $rtfSpecial(LDQuote)
	suffix $rtfSpecial(RDQuote)
    }
    {element EM} {
	rtf phrase
	charStyle style_Emphasis
    }
    {elements "LIST TEXT PRESENTATION"} {
	rtf none
    }
    {element SHORTTITLE} {
	rtf none
	cdataFilter null
	sdataFilter null
    }
    {el} {
	cdataFilter textCdataFilter
	sdataFilter textSdataFilter
    }
}

proc main {} {
    rtf:start

    #FIXME
    withNode docroot child el {
	rtf:convert translate
    }
    rtf:end
    rtf:write "\n"
}
