Am 16.02.2012 um 20:38 schrieb Aditya Mahajan:
On Thu, 16 Feb 2012, Wolfgang Schuster wrote:
Am 16.02.2012 um 16:19 schrieb Jörg Hagmann:
This discussion was continued privately (my mistake). A summary:
Thanks for the file, Luigi -- getting closer. Two problems left:
1. I was using Calibre. Maybe I simply don't know how to use that programme. Whereas a free epub book downloaded from the net opens as it should, the files generated by myself and by you just show the unformatted text. With Firefox it works.
2. In Firefox: My version lacks the images; in fact, the figures showing up in the OPS directory after the mtxrun have zero KB. But it is ok for me to copy them there manually.
Isn’t the problem with context pub’s the format of the xhtml file, when I compile this example:
\setupbackend[export=yes,xhtml=yes]
\starttext
\startparagraph The Earth, as a habitat for animal life, is in old age and has a fatal illness. Several, in fact. It would be happening whether humans had ever evolved or not. But our presence is like the effect of an old|-|age patient who smokes many packs of cigarettes per day – and we humans are the cigarettes. \stopparagraph
\stoptext
I get a xhtml file with the following content (I removed the comments):
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<document xmlns:m="http://www.w3.org/1998/Math/MathML" version="0.30" language="en" date="Thu Feb 16 20:00:31 2012" file="test" context="2012.02.16 17:54" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <paragraph>The Earth, as a habitat for animal life, is in old age and has a fatal illness. Several, in fact. It would be happening whether humans had ever evolved or not. But our presence is like the effect of an old-age patient who smokes many packs of cigarettes per day – and we humans are the cigarettes.</paragraph> </document>
but the produced epub file doesn’t work on my ereader. After I changed the tags of the file to this:
You also need to add the appropriate css file (there is an example css file in $TEXMF/tex/context/base IIRC). Any epub reader that understands xml+css will be able to read the file.
I know the example file but I forgot to add it.
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<html xmlns="http://www.w3.org/1999/xhtml"> <body> <p>The Earth, as a habitat for animal life, is in old age and has a fatal illness. Several, in fact. It would be happening whether humans had ever evolved or not. But our presence is like the effect of an old-age patient who smokes many packs of cigarettes per day – and we humans are the cigarettes.</p> </body> </html>
I got now a epub file which renders on my ereader without problems.
I do agree if the export tags were configurable. Something similar to multi-lingual interface, but for output rather than input.
You mean like labeltexts :) Wolfgang