asciidoctor-mathematical icon indicating copy to clipboard operation
asciidoctor-mathematical copied to clipboard

\underbrace

Open RarrugasTetra opened this issue 7 years ago • 6 comments

Dear Developers, I have a problem with underbraces in my formulae, namely, they are too small.

Here is a small example of asciidoctor source:

= Underbrace example
Me <[email protected]>
:stem: latexmath

Test of underbrace:

[stem]
++++
  \Phi = \underbrace{\sum_{i} \gamma_i \left( s_i M^{model}(s_i) - s_i M^{exp}(s_i) \right)}_{\Phi_{GED}} + \alpha \cdot \underbrace{ \sum_{j} \gamma_j \left( p_j^{model} - p_j^{QC} \right)}_{\Phi_{QC}} \rightarrow min
++++

I am using the command asciidoctor --backend=html5 -a embedded -a nofooter -r asciidoctor-mathematical -a mathematical-format=svg -o test.html test.adoc and getting a respective output HTML with too small underbraces

In contrast, pure latex works well. An equivalent code

\documentclass{article}
\title{Testing underbrace}
\begin{document}
\maketitle
\begin{equation}
 \label{eq:ged_qc_min}
  \Phi = \underbrace{\sum_{i} \gamma_i \left( s_i M^{model}(s_i) - s_i M^{exp}(s_i) \right)}_{\Phi_{GED}} + \alpha \cdot \underbrace{ \sum_{j} \gamma_j \left( p_j^{model} - p_j^{QC} \right)}_{\Phi_{QC}} \rightarrow min \ ,
\end{equation}
\end{document}

produces correct output PDF

How can I get underbraces with correct size in asciidoctor?

Thank you in advance!

RarrugasTetra avatar Aug 22 '18 07:08 RarrugasTetra

This can be a problem in mathematical, or in its upstream. How does it work in mathjax?

ProgramFan avatar Aug 22 '18 12:08 ProgramFan

With MathJax (I am removing latexmath option from :stem:) the equation looks somewhat strange but the underbraces are ok but I need this latexmath since I need to generate PDF version of my document with asciidoctor-pdf and it works correctly with latexmath.

RarrugasTetra avatar Aug 22 '18 13:08 RarrugasTetra

So it looks like a bug in mathematical. Would you please report it there?

ProgramFan avatar Aug 22 '18 13:08 ProgramFan

But how to isolate it so that I can reproduce the problem without using asciidoctor-mathematical ?

RarrugasTetra avatar Aug 22 '18 14:08 RarrugasTetra

The best way is to consult the mathematical documentation. Or you can refer to asciidoctor-mathematical code for it.

ProgramFan avatar Aug 22 '18 14:08 ProgramFan

Done. Thank you!

RarrugasTetra avatar Aug 22 '18 15:08 RarrugasTetra