ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: "Idris Samawi Hamid ادريس سماوي حامد" <ishamid@colostate.edu>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Exporting highlights
Date: Mon, 16 Mar 2015 00:49:47 -0400 (EDT)	[thread overview]
Message-ID: <alpine.OSX.2.02.1503160045530.64655@nqv-znpobbx> (raw)
In-Reply-To: <op.xvj98eazfkrasx@ishamid-pc>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1411 bytes --]

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 
changed.

> =======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;
}

etc.

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-03-16  4:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-15 23:01 Idris Samawi Hamid ادريس سماوي حامد
2015-03-16  4:49 ` Aditya Mahajan [this message]
2015-03-16 14:34 ` Idris Samawi Hamid ادريس سماوي حامد

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.02.1503160045530.64655@nqv-znpobbx \
    --to=adityam@umich.edu \
    --cc=ishamid@colostate.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).