On 29 April 2014 21:16, jvdh <[email protected]> wrote:
> Hi,
>
> I've had another look at how to reasonably integrate mathematical (LaTeX)
> equations in my documents with the additional constraint of getting them
> into pdf through the dblatex backend as well as into (x)html.
>
> my understanding is that right now the only route to do that is to use
> latexmath passthrough blocks (restricted to what latexmathML can do) and use
> xhtml output. while the dblatex/pdf output is fine, rendering in html leaves
> things to be desired (and in fact currently it stopped working for me at all
> for whatever reason the `latexmath' attribute is no longer recognized...).
> it also prevents inclusion of equations into the html output generated by
> asciidoc directly.
>
> I now have had a look at MathJax (for the first time) and it seems that it
> is quite powerful and that it should be quite easy to accommodate support
> for it in the latexmath macro (AFAICS): essentially what would be needed is
> to add something like
>
> <script type="text/x-mathjax-config">
>    MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
> </script>
> <script type="text/javascript"
>
> src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";>
> </script>
>
> to the <head> section and to just reduce things like latexmath:[$\sqrt(x)$]
> in the source code to $\sqrt(x)$ in the asciidoc html (or a2x xhtml) output
> (or some other delimiter like the `\(, \)' defined above, if more suitable).
> the rest then would be taken care of by mathjax. in order not to introduce
> incompatibility with the present behaviour the above might be triggered by a
> new attribute `mathjax' or some such.
>
> would this be feasible? or a bad idea?

I believe its been done several times before, for example here
http://comments.gmane.org/gmane.text.formats.asciidoc/3761 and other
earlier examples, but nobody has actually submitted it.  Asciidoc is
now in github https://github.com/asciidoc/asciidoc so you can submit a
pull request.  Don't forget to do the documentation though :)

Cheers
Lex

>
> I believe that improving support for mathematical typesetting could increase
> asciidocs popularity in the corresponding communities.
>
> thank you
>
> joerg
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to