Changes

Jump to navigation Jump to search
101 bytes added ,  14:21, 17 January 2015
some minor restructuring
{{todo|This page is work in progress.}}
ConTeXt does not only produce beautiful PDFs, but can also export to [[XML]]/XHTMLHTML. This is especially useful for creating eBooks in [[ePub]] format.
< [[XML]] | [[ePub]] >
= Minimal example and structure of export files =
<texcode>
% mode=mkiv
\setupbackend[export=yes]% this is all to activate export!
\starttext
</texcode>
= Exported structure = If you compile this an example as above as {{code|1=minimal.tex}}, you get a directory structure like this:
<pre>
</texcode>
= Required structuring of your ConTeXt code =
The export contains usable content only for content that is "well structured" in an XML sense. In our above example all text ended up in the root tag {{code|document}}.
Also note that switches like {{cmd|em}} don’t translate into output structure, you need to {{cmd|definehighlight|2=[emph][style=italic]}} and use as {{code|1=\emph{emphasized}.}}
= Useful More useful example =
<texcode>
\stoptext
</texcode>
 
There’s also an example of an export-friendly ConTeXt file in the sources: {{src|export-example.tex}}.
 
= Choice of output files =
Only after such tagging we find significant differences between the three content output files:
TODO: explain differences between export variants
(WORK IN PROGRESS)
 
There’s an example of an export-friendly ConTeXt file in the sources: {{src|export-example.tex}}.
= Export options =

Navigation menu