Excessive blank space after latex equations in pdf exports

Hi,
Whenever I use an environment in latex, such as \begin{equation} or \begin{align}, the equations look great in the web-book, but they don’t in the pdf export. There is a huge blank space after the equations. I show an example of the pdf below:


The equation above looks as follows in the web-book:

The code for this is:

The mean dynamic is then
\begin{align*}
\dot{x}_i &= Inflow_i (x) - Outflow_i (x) \\
&= \frac{x_i}{M-m} \sum_{j \neq i} x_j \left([\pi_{i}-\pi_{j}]_+ - [\pi_{j} - \pi_{i}]_+ \right)\\
&= \frac{x_i}{M-m} \sum_{j \neq i} x_j  (\pi_{i}-\pi_{j}) \\
&= \frac{x_i}{M-m}   (\pi_i - \pi)\end{align*}
This ODE is the replicator dynamics with constant speed factor $\frac{1}{M-m}$.

The same occurs in the EPUB export

It seems that the issue is with the WP QuickLaTeX plugin. I tried deactivating it and the excessive blank space is not there anymore. Is there something I could do to keep on using WP QuickLaTeX plugin and get nice pdf exports? Thanks a lot

In the user defined CSS styles for PDF and EPUB you could add:

.ql-center-displayed-equation,
.ql-left-displayed-equation,
.ql-right-displayed-equation {
line-height: inherit !important;
}

This removed the excessive space after the QuickLaTeX equation in the PDF.

1 Like

Dear Thomas,
You cannot imagine how grateful I am! Thank you so much!!!
I really appreciate it, you’re a star!!!

1 Like

Thank you! Your question sounded desparate enough to give it a try :slight_smile:

1 Like

You’re very right I was desperate :grinning: