Index: sasmodels/models/fractal_core_shell.py
===================================================================
--- sasmodels/models/fractal_core_shell.py	(revision 8f04da467b56e4e22291910958adebc417b57c19)
+++ sasmodels/models/fractal_core_shell.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -22,6 +22,5 @@
     \frac{\sin(qr_c)-qr_c\cos(qr_c)}{(qr_c)^3}+
     3V_s(\rho_s-\rho_{solv})
-    \frac{\sin(qr_s)-qr_s\cos(qr_s)}{(qr_s)^3}\right]^2
-
+    \frac{\sin(qr_s)-qr_s\cos(qr_s)}{(qr_s)^3}\right]^2 \\
     S(q) &= 1 + \frac{D_f\ \Gamma\!(D_f-1)}{[1+1/(q\xi)^2]^{(D_f-1)/2}}
     \frac{\sin[(D_f-1)\tan^{-1}(q\xi)]}{(qr_s)^{D_f}}
Index: sasmodels/models/mass_surface_fractal.py
===================================================================
--- sasmodels/models/mass_surface_fractal.py	(revision 232bb12413df47112c884bd67cba00dfa28e9e0e)
+++ sasmodels/models/mass_surface_fractal.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -22,14 +22,10 @@
 .. math::
 
-    I(q) = scale \times P(q) + background
-
+    I(q) = scale \times P(q) + background \\
     P(q) = \left\{ \left[ 1+(q^2a)\right]^{D_m/2} \times
                    \left[ 1+(q^2b)\right]^{(6-D_s-D_m)/2}
-           \right\}^{-1}
-
-    a = R_{g}^2/(3D_m/2)
-
-    b = r_{g}^2/[-3(D_s+D_m-6)/2]
-
+           \right\}^{-1} \\
+    a = R_{g}^2/(3D_m/2) \\
+    b = r_{g}^2/[-3(D_s+D_m-6)/2] \\
     scale = scale\_factor \times NV^2 (\rho_{particle} - \rho_{solvent})^2
 
Index: sasmodels/models/mono_gauss_coil.py
===================================================================
--- sasmodels/models/mono_gauss_coil.py	(revision 404ebbd7d77c5752ee99a8b39bf8172dd0c0e551)
+++ sasmodels/models/mono_gauss_coil.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -24,10 +24,7 @@
 
      I_0 &= \phi_\text{poly} \cdot V
-            \cdot (\rho_\text{poly} - \rho_\text{solv})^2
-
-     P(q) &= 2 [\exp(-Z) + Z - 1] / Z^2
-
-     Z &= (q R_g)^2
-
+            \cdot (\rho_\text{poly} - \rho_\text{solv})^2 \\
+     P(q) &= 2 [\exp(-Z) + Z - 1] / Z^2 \\
+     Z &= (q R_g)^2 \\
      V &= M / (N_A \delta)
 
Index: sasmodels/models/onion.py
===================================================================
--- sasmodels/models/onion.py	(revision bccb40fd72559eb4bc7c26324db284c8efb3583f)
+++ sasmodels/models/onion.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -81,6 +81,5 @@
         \left[ B\exp
             \left(A (r - r_{\text{shell}-1}) / \Delta t_\text{shell} \right) + C
-        \right] \frac{\sin(qr)}{qr}\,r^2\,\mathrm{d}r
-
+        \right] \frac{\sin(qr)}{qr}\,r^2\,\mathrm{d}r \\
     &= 3BV(r_\text{shell}) e^A h(\alpha_\text{out},\beta_\text{out})
         - 3BV(r_{\text{shell}-1}) h(\alpha_\text{in},\beta_\text{in})
@@ -95,9 +94,9 @@
     \begin{align*}
     B&=\frac{\rho_\text{out} - \rho_\text{in}}{e^A-1}
-         &C &= \frac{\rho_\text{in}e^A - \rho_\text{out}}{e^A-1} \\
+         & C &= \frac{\rho_\text{in}e^A - \rho_\text{out}}{e^A-1} \\
     \alpha_\text{in} &= A\frac{r_{\text{shell}-1}}{\Delta t_\text{shell}}
-         &\alpha_\text{out} &= A\frac{r_\text{shell}}{\Delta t_\text{shell}} \\
+         & \alpha_\text{out} &= A\frac{r_\text{shell}}{\Delta t_\text{shell}} \\
     \beta_\text{in} &= qr_{\text{shell}-1}
-        &\beta_\text{out} &= qr_\text{shell} \\
+        & \beta_\text{out} &= qr_\text{shell} \\
     \end{align*}
 
Index: sasmodels/models/parallelepiped.py
===================================================================
--- sasmodels/models/parallelepiped.py	(revision 30b60d21e384fd9fda8e281e787ff2869925e10d)
+++ sasmodels/models/parallelepiped.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -62,8 +62,6 @@
         \left\{S\left[\frac{\mu}{2}\cos\left(\frac{\pi}{2}u\right)\right]
                S\left[\frac{\mu a}{2}\sin\left(\frac{\pi}{2}u\right)\right]
-               \right\}^2 du
-
-    S(x) &= \frac{\sin x}{x}
-
+               \right\}^2 du \\
+    S(x) &= \frac{\sin x}{x} \\
     \mu &= qB
 
@@ -133,8 +131,6 @@
 .. math::
 
-    \cos\alpha &= \hat A \cdot \hat q,
-
-    \cos\beta  &= \hat B \cdot \hat q,
-
+    \cos\alpha &= \hat A \cdot \hat q, \\
+    \cos\beta  &= \hat B \cdot \hat q, \\
     \cos\gamma &= \hat C \cdot \hat q
 
Index: sasmodels/models/poly_gauss_coil.py
===================================================================
--- sasmodels/models/poly_gauss_coil.py	(revision 404ebbd7d77c5752ee99a8b39bf8172dd0c0e551)
+++ sasmodels/models/poly_gauss_coil.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -21,12 +21,8 @@
 .. math::
 
-     I_0 &= \phi_\text{poly} \cdot V \cdot (\rho_\text{poly}-\rho_\text{solv})^2
-
-     P(q) &= 2 [(1 + UZ)^{-1/U} + Z - 1] / [(1 + U) Z^2]
-
-     Z &= [(q R_g)^2] / (1 + 2U)
-
-     U &= (Mw / Mn) - 1 = \text{polydispersity ratio} - 1
-
+     I_0 &= \phi_\text{poly} \cdot V \cdot (\rho_\text{poly}-\rho_\text{solv})^2 \\
+     P(q) &= 2 [(1 + UZ)^{-1/U} + Z - 1] / [(1 + U) Z^2] \\
+     Z &= [(q R_g)^2] / (1 + 2U) \\
+     U &= (Mw / Mn) - 1 = \text{polydispersity ratio} - 1 \\
      V &= M / (N_A \delta)
 
Index: sasmodels/models/polymer_micelle.py
===================================================================
--- sasmodels/models/polymer_micelle.py	(revision 404ebbd7d77c5752ee99a8b39bf8172dd0c0e551)
+++ sasmodels/models/polymer_micelle.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -26,8 +26,6 @@
 
 .. math::
-    P(q) = N^2\beta^2_s\Phi(qR)^2+N\beta^2_cP_c(q)+2N^2\beta_s\beta_cS_{sc}s_c(q)+N(N-1)\beta_c^2S_{cc}(q)
-
-    \beta_s = v\_core(sld\_core - sld\_solvent)
-
+    P(q) = N^2\beta^2_s\Phi(qR)^2+N\beta^2_cP_c(q)+2N^2\beta_s\beta_cS_{sc}s_c(q)+N(N-1)\beta_c^2S_{cc}(q) \\
+    \beta_s = v\_core(sld\_core - sld\_solvent) \\
     \beta_c = v\_corona(sld\_corona - sld\_solvent)
 
@@ -41,6 +39,5 @@
 .. math::
 
-   P_c(q) &= 2 [\exp(-Z) + Z - 1] / Z^2
-
+   P_c(q) &= 2 [\exp(-Z) + Z - 1] / Z^2 \\
    Z &= (q R_g)^2
 
@@ -50,8 +47,6 @@
 .. math::
 
-   S_{sc}(q)=\Phi(qR)\psi(Z)\frac{sin(q(R+d.R_g))}{q(R+d.R_g)}
-
-   S_{cc}(q)=\psi(Z)^2\left[\frac{sin(q(R+d.R_g))}{q(R+d.R_g)} \right ]^2
-
+   S_{sc}(q)=\Phi(qR)\psi(Z)\frac{sin(q(R+d.R_g))}{q(R+d.R_g)} \\
+   S_{cc}(q)=\psi(Z)^2\left[\frac{sin(q(R+d.R_g))}{q(R+d.R_g)} \right ]^2 \\
    \psi(Z)=\frac{[1-exp^{-Z}]}{Z}
 
Index: sasmodels/models/spherical_sld.py
===================================================================
--- sasmodels/models/spherical_sld.py	(revision 2ad5d3007889c5a943ccedaeada465c4be51317a)
+++ sasmodels/models/spherical_sld.py	(revision ca04add3266620969b29737a0578ec91730bc91c)
@@ -51,9 +51,7 @@
     3 \rho_\text{core} V(r_\text{core})
     \Big[ \frac{\sin(qr_\text{core}) - qr_\text{core} \cos(qr_\text{core})}
-    {qr_\text{core}^3} \Big]
-
+    {qr_\text{core}^3} \Big] \\
     f_{\text{inter}_i} &= 4 \pi \int_{\Delta t_{ \text{inter}_i } }
-    \rho_{ \text{inter}_i } \frac{\sin(qr)} {qr} r^2 dr
-
+    \rho_{ \text{inter}_i } \frac{\sin(qr)} {qr} r^2 dr \\
     f_{\text{shell}_i} &= 4 \pi \int_{\Delta t_{ \text{inter}_i } }
     \rho_{ \text{flat}_i } \frac{\sin(qr)} {qr} r^2 dr =
@@ -66,6 +64,5 @@
     -3 \rho_{ \text{flat}_i } V(r_{ \text{inter}_i })
     \Big[ \frac{\sin(qr_{\text{inter}_i}) - qr_{\text{flat}_i}
-    \cos(qr_{\text{inter}_i}) } {qr_{\text{inter}_i}^3} \Big]
-
+    \cos(qr_{\text{inter}_i}) } {qr_{\text{inter}_i}^3} \Big] \\
     f_\text{solvent} &= 4 \pi \int_{r_N}^{\infty} \rho_\text{solvent}
     \frac{\sin(qr)} {qr} r^2 dr =
@@ -122,20 +119,17 @@
     4 \pi \sum_{j=1}^{n_\text{steps}}
     \int_{r_j}^{r_{j+1}} \rho_{ \text{inter}_i } (r_j)
-    \frac{\sin(qr)} {qr} r^2 dr
-
-    &\approx 4 \pi \sum_{j=1}^{n_\text{steps}} \Big[
+    \frac{\sin(qr)} {qr} r^2 dr \\
+    \approx 4 \pi \sum_{j=1}^{n_\text{steps}} \Big[
     3 ( \rho_{ \text{inter}_i } ( r_{j+1} ) - \rho_{ \text{inter}_i }
     ( r_{j} ) V (r_j)
     \Big[ \frac {r_j^2 \beta_\text{out}^2 \sin(\beta_\text{out})
     - (\beta_\text{out}^2-2) \cos(\beta_\text{out}) }
-    {\beta_\text{out}^4 } \Big]
-
-    &{} - 3 ( \rho_{ \text{inter}_i } ( r_{j+1} ) - \rho_{ \text{inter}_i }
+    {\beta_\text{out}^4 } \Big] \\
+    {} - 3 ( \rho_{ \text{inter}_i } ( r_{j+1} ) - \rho_{ \text{inter}_i }
     ( r_{j} ) V ( r_{j-1} )
     \Big[ \frac {r_{j-1}^2 \sin(\beta_\text{in})
     - (\beta_\text{in}^2-2) \cos(\beta_\text{in}) }
-    {\beta_\text{in}^4 } \Big]
-
-    &{} + 3 \rho_{ \text{inter}_i } ( r_{j+1} )  V ( r_j )
+    {\beta_\text{in}^4 } \Big] \\
+    {} + 3 \rho_{ \text{inter}_i } ( r_{j+1} )  V ( r_j )
     \Big[ \frac {\sin(\beta_\text{out}) - \cos(\beta_\text{out}) }
     {\beta_\text{out}^4 } \Big]
@@ -152,7 +146,7 @@
     \begin{align*}
     V(a) &= \frac {4\pi}{3}a^3 && \\
-    a_\text{in} &\sim \frac{r_j}{r_{j+1} -r_j} \text{, } &a_\text{out}
-    &\sim \frac{r_{j+1}}{r_{j+1} -r_j} \\
-    \beta_\text{in} &= qr_j \text{, } &\beta_\text{out} &= qr_{j+1}
+    a_\text{in} \sim \frac{r_j}{r_{j+1} -r_j} \text{, } & a_\text{out}
+    \sim \frac{r_{j+1}}{r_{j+1} -r_j} \\
+    \beta_\text{in} &= qr_j \text{, } & \beta_\text{out} &= qr_{j+1}
     \end{align*}
 
