Change row spacing

356 views
Skip to first unread message

hogskolep...@gmail.com

unread,
Apr 8, 2015, 1:38:22 AM4/8/15
to mathja...@googlegroups.com
Hi,

How can I change the spacing between rows in an equation? If i for example write

$$ x = y \\ z + 3 = 4 $$

I would like to increase the space between the rows. It is very thight especiallay when using \frac{}{} and ^.

Where can I find this variable or setting? I use TeX-AMS_HTML.js

Thanks!

Peter Krautzberger

unread,
Apr 8, 2015, 3:11:24 AM4/8/15
to mathja...@googlegroups.com
Hi,

I'm not sure we have a setting to globally control line spacing (@dpvc, please correct me).

For local control (i.e., per equation), you can specify $$ \frac{x}{1} = y \\[20pt] z + 3 = 4 $$ or some such thing.

FWIW, this kind of linebreaking is a non-standard feature in MathJax's TeX input; a more standard approach would be to use an array environment such as align, e.g.,

\begin{align}
  x = y \\[20pt] 
  z + 3 = 4  
\end{align}

Regards,
Peter.


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Davide P. Cervone

unread,
Apr 8, 2015, 9:36:47 AM4/8/15
to mathja...@googlegroups.com
> I'm not sure we have a setting to globally control line spacing (@dpvc, please correct me).

The interline spacing is controlled by the MathML "lineleading" line-breaking attribute, which could be set on the <mo> where the breaking is occurring (or via an <mstyle> or on the <math> element itself). From TeX, you don't have access to that value directly, but you could configure the default using something like

<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("mml Jax Ready",function () {
MathJax.ElementJax.mml.math.prototype.defaults.lineleading = "20px";
});
</script>

before the script that loads MathJax.js itself in order to change the default line leading value. (It is "1ex" by default.)

Davide

hogskolep...@gmail.com

unread,
Apr 10, 2015, 4:12:29 AM4/10/15
to mathja...@googlegroups.com, dp...@union.edu
Thanks for a fast response! I added the code below to TeX-AMS_HTML.js and it worked! Great!
Reply all
Reply to author
Forward
0 new messages