On 25 October 2013 19:57, Bas <[email protected]> wrote:

> I would like to use *sqrt *in a LaTeX section of my document. The output
> format is html5. Unfortunatelly it is not working properly.
>
> The math macros seem to ignore lines containing something like
> latexmath:[$\sqrt[3]{4}$]. I think the specialcharacters-function(?) is
> confused by the square brackets. MathJax seems to work find (see the
> +++-hack below)
>
> I'd appreciate it if anyone could take a look at it. Thank you.
>
> ----
>
> My asciidoc code:
>
> This line will be rendered: latexmath:[$a=\sqrt{b}$]
> This line will NOT be rendered: latexmath:[$\sqrt[3]{4}$]
>
>
The ] after the 3 is the end of the macro, Asciidoc then tries to
substitute the attribute {4} which does not exist causing the line to be
dropped.  You need to escape the ] with \ so asciidoc won't think its the
end of the attribute list.

Cheers
Lex



> The following hack works fine
>
> +++
> $\sqrt[3]{4}$
> +++
>
>
> HTML output:
>
> <div class="paragraph"><p>This line will be rendered: $a=\sqrt{b}$
> The following hack works fine</p></div>
> <div class="paragraph"><p>$\sqrt[3]{4}$</p></div>
>
>
> Image of HTML output (in Chrome/Win8.1):
>
>
> <https://lh5.googleusercontent.com/-VN-DRdu76cA/Umou-UItDEI/AAAAAAAAALw/2AvsqPqbTBE/s1600/sqrt.png>
>
> MathJax-Integration in html5.conf:
>    <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>
>
>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to