Dear gang, Ok, I'm rolling up my sleeves and taking another stab at exporting to xhtml (maybe even epub). Major project, so taking this one small step at a time. The immediate aim is to get correct output in a browser (I use Opera, and Chrome as a control). Test files attached. Immediate problem is highlights. ============export-highlight.tex============== \setupbackend [export=yes,css=highlight.css] \definehighlight[emphasis] [style=italic] \definehighlight[important][style=bold] \definehighlight[regular][style=\tf] \starttext \startchapter[title=Highlights] \startparagraph This is \emphasis{emphasis}. This is \important{important}. This is \regular{regular}. This is \emphasis{some emphasized text, with \regular{regular} in between}. This is \important{some important text, with \regular{regular} in between}. \stopparagraph \stopchapter \stoptext =============================================== In highlight.css (copied from export-sample.css and modified) I added these lines: ================== highlight [detail="emphasis"]{ font-weight : italic ; } highlight [detail="important"]{ font-weight : bold ; } highlight [detail="regular"]{ font-weight : regular ; } ================== Results: =======export-highlight-tag.xhtml======== This is emphasis. This is important. This is regular. This is some emphasized text, with regular in between. This is some important text, with regular in between. =======export-highlight-div.xhtml========
This is
emphasis
. This is
important
. This is
regular
.
This is
some emphasized text, with
regular
in between
.
This is
some important text, with
regular
in between
.
========================================= Observation: Opera won't render *-raw.xml, so we ignore that file. In a browser we have Challenge 1: Neither export-highlight-tag.xhtml nor export-highlight-div.xhtml renders the highlights. What do we need to do? Challenge 2: export-highlight-div.xhtml breaks the line before a highlight as well as after a highlight. What is missing here? Aim: To turn my current project into an epub, or at least something that can be viewed in a browser (xhtml). Caveat: I don't know much web development (css, xhtml, div, etc) but am willing to work with what I have... but only IF there is a finish line. If there is no finish line (i.e., things are too broken at the moment to get the mission accomplished via what ConTeXt and CSS provide) kindly let me know so I can stop now! Henning Hraban Ramm and Aditya Mahajan mentioned XSLT stylesheets, but this is probably way above my paygrade, unless someone can give me very simple newbie pointers. Thanks to all in advance and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523