Lex and Toni: 

The "someone else" is me. The documentation I did on this topic can be 
found here: 

http://quaoar.us:8080/mathjax.html 

I have not had any time to do more with this. Also, I am not confident in 
my ability to 
create a plug-in for this capability. This is the main reason that I did 
not follow up 
in order to provide a plug-in. In my opinion the ability to use this 
MathJax option 
for rendering mathematics notation using LaTeX formulas would be useful and 
further extend the capabilities of Asciidoc. However, I lack the know-how 
and the 
time to acquire it to  make this an easy to use option in the form of a 
plug-in, etc. 
in way that would allow Asciidoc users to use this feature easily. I hope 
that someone 
who has the time and interest in helping me with this will reply so that 
MathJax 
is an option  available for Asciidoc users that does not require manually 
editing 
config files as I did in the documentation of the link above. By the way, 
my 
recollection is that I was able to get this to work as well with the slidy 
option. 

Best wishes. 

David Miller 

On Wednesday, October 24, 2012 4:57:58 PM UTC-4, Toni Cebrián wrote:
>
> Hi,
>
>    Not all browsers support MathML in a nice way. Another approach to 
> embed mathematics in Html is to use the MathJax javascript library (
> http://www.mathjax.org/) that makes clever use of CSS for displaying 
> Math. I've created a patch for including this functionality when exporting 
> to html so the same code can be used for Html and latex backends.
>
> Here it is the diff against asciidoc-8.6.8:
>
> diff -r 07b55a89f0c6 xhtml11.conf
> --- a/xhtml11.conf    Wed Oct 24 21:29:16 2012 +0200
> +++ b/xhtml11.conf    Wed Oct 24 21:41:15 2012 +0200
> @@ -616,6 +616,21 @@
>  /*]]>*/
>  </script>
>  endif::linkcss[]
> +ifdef::mathjax[]
> +<script type="text/x-mathjax-config">
> +    MathJax.Hub.Config({
> +      extensions: ["tex2jax.js"],
> +      jax: ["input/TeX", "output/HTML-CSS"],
> +      tex2jax: {
> +        inlineMath: [ ['$','$'], ["\\(","\\)"] ],
> +        displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
> +        processEscapes: true
> +      },
> +      "HTML-CSS": { availableFonts: ["TeX"] }
> +    });
> +  </script>
> +<script type="text/javascript" src="
> http://cdn.mathjax.org/mathjax/latest/MathJax.js";></script>
> +endif::mathjax[]
>  endif::latexmath[]
>  {docinfo1,docinfo2#}{include:{docdir}/docinfo.html}
>  {docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html}
>
> Here it is a minimal example using mathematical formulas
>
> Minimal Example
> ===============
>
> Display beautiful formulas with MathJax like famous latexmath:[$E=mc^2$] 
> or the
> cumulative distribution function of the normal distribution
>
> [latexmath]
> ++++
> \[
> F(x;\mu,\sigma)=\int_{-\infty}^x \frac{1}{\sigma\sqrt{2\pi}} 
> e^{-\frac{(x-\mu)^2}{2\sigma^2}}
> \]
> ++++
>
>
> In order to obtain the MathJax version of the HTML run "asciidoc -a 
> mathjax minimal.asciidoc" and you'll get the beautiful math in any modern 
> browser.
>
> I'd like to have this functionality as default for the xhtml11 backend but 
> I don't know how to do this without the -a option.
>
> Hope it is useful to you.
>
> Regards
> Toni
>

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