On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Sun, 06 May 2012 14:29:58 -0600, Aditya Mahajan
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 \setupbackend [export=yes, xhtml=yes, css={context-export.css}, ] 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?
See above.
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). Aditya