diff --git a/cpp/kspace.cpp b/cpp/kspace.cpp
index d759219872b7fd9efb1bf6ca98909aa766881649..06afe4a88fbe6c1b1a05040dfbbae72d73c68d18 100644
--- a/cpp/kspace.cpp
+++ b/cpp/kspace.cpp
@@ -433,25 +433,38 @@ int kspace<be, dt>::filter(
  *  a Gaussian filter and a sharp real space spherical filter.
  *
  *  Filter expressions in real space are as follows:
- *  \begin{eqnarray*}
- *      \phi^b_\ell(r) &=&
- *          \frac{1}{\ell^3}\frac{6}{\pi} H(\ell/2 - r) \\
- *      \phi^g_\ell(r) &=&
- *          \frac{1}{\sigma_\ell^3}\frac{1}{(2\pi)^{3/2}}
- *          \exp\left(-\frac{1}{2}\left(\frac{r}{\sigma_\ell}\right)^2\right) \\
- *      \phi^s_\ell(r) &=&
- *          \frac{1}{2 \pi^2 r^3}
- *          \left(\sin k_\ell r - k_\ell r \cos k_\ell r\right)
- *  \end{eqnarray*}
+ *  \rst
+ *  .. math::
+ *      :nowrap:
+ *
+ *      \begin{eqnarray*}
+ *          \phi^b_\ell(r) &=&
+ *              \frac{1}{\ell^3}\frac{6}{\pi} H(\ell/2 - r) \\
+ *          \phi^g_\ell(r) &=&
+ *              \frac{1}{\sigma_\ell^3}\frac{1}{(2\pi)^{3/2}}
+ *              \exp\left(-\frac{1}{2}\left(\frac{r}{\sigma_\ell}\right)^2\right) \\
+ *          \phi^s_\ell(r) &=&
+ *              \frac{1}{2 \pi^2 r^3}
+ *              \left(\sin k_\ell r - k_\ell r \cos k_\ell r\right)
+ *      \end{eqnarray*}
+ *
+ *  \endrst
+ *
  *  and the corresponding expressions in Fourier space are:
- *  \begin{eqnarray*}
- *      \hat{\phi^b_\ell}(k) &=&
- *      \frac{3}{2(k\ell/2)^3}
- *      \left(2\sin (k \ell/2) - k \ell \cos (k \ell/2)\right) \\
- *      \hat{\phi^g_\ell}(k) &=&
- *      \exp\left(-\frac{1}{2}k^2 \sigma_\ell^2\right) \\
- *      \hat{\phi^s_\ell}(k) &=& H(k_\ell - k)
- *  \end{eqnarray*}
+ *  \rst
+ *  .. math::
+ *      :nowrap:
+ *
+ *      \begin{eqnarray*}
+ *          \hat{\phi^b_\ell}(k) &=&
+ *          \frac{3}{2(k\ell/2)^3}
+ *          \left(2\sin (k \ell/2) - k \ell \cos (k \ell/2)\right) \\
+ *          \hat{\phi^g_\ell}(k) &=&
+ *          \exp\left(-\frac{1}{2}k^2 \sigma_\ell^2\right) \\
+ *          \hat{\phi^s_\ell}(k) &=& H(k_\ell - k)
+ *      \end{eqnarray*}
+ *
+ *  \endrst
  *
  *  \f$\sigma_\ell\f$ and \f$k_\ell\f$ are calibrated such that the energy of
  *  the large scales is approximately the same (within the inertial range)