• If I write an equation between \begin{multline*} …. \end{multline*} there is a hidden space which is visible if I view the HTML of post content. However normally it looks right. But my site share the contents via REST API. So, the rendered content adds

    <p class=”ql-left-displayed-equation” style=”line-height: 116px;”><span class=”ql-right-eqno”>   </span><span class=”ql-left-eqno”>   </span>

    this portion which adds a large space on top of the equation.

    If you remove this portion from that rendered HTML. It looks great.

    For example:

    If I write

    \begin{multline*}
    \left ( 1+x \right )^{8} = 1+\,^{8}C_{1}\left ( 1 \right )^{8-1}.x^{1} \\
    + \,^{8}C_{2} \left ( 1 \right )^{8-2}x^{2}+\,^{8}C_{3}\left ( 1 \right )^{8-3}.x^{3}\\
    +\,^{8}C_{4}\left ( 1 \right )^{8-4}x^{4}+\,^{8}C_{5}\left ( 1 \right )^{8-5}x^{5}\\
    +\,^{8}C_{6}\left ( 1 \right )^{8-6}x^{6}+\,^{8}C_{7}\left ( 1 \right )^{8-7}x^{7}+x^{8}
    \end{multline*}

    It will render as the following HTML with a large white space at top of the equation SVG:

    <p class="ql-left-displayed-equation" style="line-height: 116px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="https://MYWEBSITE/wp-content/ql-cache/quicklatex.com-0ad585b04e1aa32df09ead3bc2291282_l3.svg" height="116" width="578" class="ql-img-displayed-equation " alt="\begin{multline*} \left ( 1+x \right )^{8} = 1+\,^{8}C_{1}\left ( 1 \right )^{8-1}.x^{1} \\ + \,^{8}C_{2} \left ( 1 \right )^{8-2}x^{2}+\,^{8}C_{3}\left ( 1 \right )^{8-3}.x^{3}\\ +\,^{8}C_{4}\left ( 1 \right )^{8-4}x^{4}+\,^{8}C_{5}\left ( 1 \right )^{8-5}x^{5}\\ +\,^{8}C_{6}\left ( 1 \right )^{8-6}x^{6}+\,^{8}C_{7}\left ( 1 \right )^{8-7}x^{7}+x^{8} \end{multline*}" title="Rendered by QuickLaTeX.com"/></p> </p>

    If you remove <p class="ql-left-displayed-equation" style="line-height: 116px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span> from above HTML it will remove the top space.

    Please, I request you to let me know how to fix this by additional CSS or something else.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author advanpix

    (@advanpix)

    WP-QuickLaTeX plugin is open source. You can modify it to your liking (under GPL license conditions): remove CSS styles, etc.

    Thread Starter arindam4u

    (@arindam4u)

    Hi, @advanpix Thank you so much for your reply.
    Can you please tell me how to safely change the line-height: to 0 of ql-left-displayed-equation? I am unable to do that. It will be really helpful.
    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding white space if parse in html for ql-left-displayed-equation class’ is closed to new replies.