On 23 September 2011 15:28, William Hart <[email protected]> wrote:
> Is it possible to generate math equations in epub documents without
> explicitly including MathML with a pass through?
>
> The asciidoc suggests that the answer is 'no'.  It's nice that asciidoc can
> generate both html and pdf documents with math in a transparent manner.
> Including the ability to generate epub would be very very nice.

Hi Bill,

I assume you are meaning latex markup.

Asciidoc uses external converters/renderers to provide math support.
These are latexmathml in browser javascript renderer for xhtml and
dblatex/latex backend renderer for PDF.

Neither of these will work with epub.

The problem is that epub is specified as a very limited subset of
xhtml that does not support javascript so it can't use that renderer
and also does not support mathml so your passthroughs are not
necessarily going to work either (some readers may support it of
course).

epub does support both images and svg.  You need to identify a
converter that can convert your formula to svg or png and then that
can be included in the epub.  Or rather you need to try the ones
google finds for you and pick one that works reliably :)

You would need to customise the latex macro in the docbook backend to
detect if you are generating pdf or epub (use the a2x_format
attribute) and if its epub run the converter and output the
appropriate docbook to import the result (base it on the image macro
if its png).

Cheers
Lex

>
> --Bill
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asciidoc/-/ytzyN02GmEYJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to