[NTG-context] Exporting highlights

Aditya Mahajan adityam at umich.edu
Mon Mar 16 05:49:47 CET 2015

On Sun, 15 Mar 2015, Idris Samawi Hamid ادريس سماوي حامد wrote:

> [Dear Aditya, I sent this to the list; sending it to you to have a look as 
> well. Any assistance is much appreciated, especially if I have to go the xslt 
> route! Thanks in advance!!]

It has been almost 1.5 years since I had a serious look at XML generated 
by ConTeXt. At that time, ConTeXt did not generate XHTML, so I thought 
that one has to go through the XLST route. But, it looks that things have 

> =======export-highlight-div.xhtml========
>    <div class="paragraph">This is <div class="highlight
> emphasis">emphasis</div>. This is <div class="highlight
> important">important</div>. This is <div class="highlight
> regular">regular</div>.    <div class="break"><!--empty--></div>
> This is <div class="highlight emphasis">some emphasized text, with <div
> class="highlight regular">regular</div> in between</div>.    <div
> class="break"><!--empty--></div>
> This is <div class="highlight important">some important text, with <div
> class="highlight regular">regular</div> in between</div>.</div>
> =========================================

This is very well formed XHTML. You just need a proper CSS stylesheet to 
do the correct rednering. Something like:

.highlight.important {
    font-weight: bold;

.highlight.emphasis {
   font-style: italic;



More information about the ntg-context mailing list