[NTG-context] context to markdown/html
adityam at umich.edu
Mon May 7 00:37:18 CEST 2012
On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Sun, 06 May 2012 14:29:58 -0600, Aditya Mahajan <adityam at umich.edu> wrote:
>> On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote:
>>> I have a paper done in ConTeXt that I would like to put online. I _could_
>>> manually convert my input to markdown, but I was wondering if the
>>> xml/xhtml export options could be used to accomplish the same thing.
>> Why do you want to introduce markdown as an intermediate format? The
>> exported XML can be used directly.
> I opened the xml code in my browser, and there is zero formatting whatsoever.
> So it seems that something else is needed to get the formatting right for the
> web. Hence my thought of converting to markdown.
If you set
then the exported xhtml file should link to context-export.css file and
most modern browsers render the xml correctly (at least opera, firefox,
and chrome on Linux render it correctly).
> Ok, so I have the .export and .css files. How do I turn them into something a
> browser can display correctly?
> How can I turn it into something I can copy
> and paste into, say, WordPress?
You cannot. ConTeXt does not generate xhtml; it generate xml. The only way
to convert xml to xhtml is to use a xmlproc stylesheet (or write your own
xml conversion code in a programming language).
More information about the ntg-context