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 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.

Reply via email to