logo

Increasing Line Spacing in LaTeX 📂Writing

Increasing Line Spacing in LaTeX

Code

$$
\begin{vmatrix}
\dfrac{ \partial x}{ \partial r} & \dfrac{ \partial x}{ \partial \theta}
\\[1em] \dfrac{ \partial y}{ \partial r} & \dfrac{ \partial y}{ \partial \theta}
\end{vmatrix}
$$

$$ \begin{align*} \begin{vmatrix} \frac{ \partial x}{ \partial r} & \frac{ \partial x}{ \partial \theta} \\ \frac{ \partial y}{ \partial r} & \frac{ \partial y}{ \partial \theta} \end{vmatrix} && \begin{vmatrix} \dfrac{ \partial x}{ \partial r} & \dfrac{ \partial x}{ \partial \theta} \\ \dfrac{ \partial y}{ \partial r} & \dfrac{ \partial y}{ \partial \theta} \end{vmatrix} && \begin{vmatrix} \dfrac{ \partial x}{ \partial r} & \dfrac{ \partial x}{ \partial \theta} \\[1em] \dfrac{ \partial y}{ \partial r} & \dfrac{ \partial y}{ \partial \theta} \end{vmatrix} && \begin{vmatrix} \dfrac{ \partial x}{ \partial r} & \dfrac{ \partial x}{ \partial \theta} \\[1pt] \dfrac{ \partial y}{ \partial r} & \dfrac{ \partial y}{ \partial \theta} \end{vmatrix} && \begin{vmatrix} \dfrac{ \partial x}{ \partial r} & \dfrac{ \partial x}{ \partial \theta} \\[1ex] \dfrac{ \partial y}{ \partial r} & \dfrac{ \partial y}{ \partial \theta} \end{vmatrix} \\ \text{frac \& no margin} && \text{dfrac \& no margin} && \text{dfrac \& [1em]} && \text{dfrac \& [1pt]} && \text{dfrac \& [1ex]} \end{align*} $$

When the space above and below a matrix containing fractions is too narrow, causing the equations to overlap, using \\[1em], \\[1pt], \\[1ex] instead of \\ can increase the spacing. This can be applied not only within matrices but also in any place where line breaks are used. The ratio of each unit length applied in $\KaTeX$ is as follows1.

KaTeX UnitValueKaTeX UnitValue
emCSS embp1/72​ inch × F × G
exCSS expc12 KaTeX pt
mu1/18 CSS emdd1238/1157​ KaTeX pt
pt1/72.27 inch × F × Gcc14856/1157 KaTeX pt
mm1 mm × F × Gnd685/642 KaTeX pt
cm1 cm × F × Gnc1370/107​ KaTeX pt
in1 inch × F × Gsp1/65536 KaTeX pt