Index: sasmodels/models/rectangular_prism.py
===================================================================
--- sasmodels/models/rectangular_prism.py	(revision a8072067ae8a224e45d23ba71f663aadbe1ba4a9)
+++ sasmodels/models/rectangular_prism.py	(revision 2941abfa5112eb51b9d041f501b1a9d3f1bc5bd4)
@@ -3,12 +3,12 @@
 r"""
 
-This model provides the form factor, *P(q)*, for a rectangular prism.
+This model provides the form factor, $P(q)$, for a rectangular prism.
 
 Note that this model is almost totally equivalent to the existing
 :ref:`parallelepiped` model.
 The only difference is that the way the relevant
-parameters are defined here (*a*, *b/a*, *c/a* instead of *a*, *b*, *c*)
+parameters are defined here ($a$, $b/a$, $c/a$ instead of $a$, $b$, $c$)
 which allows use of polydispersity with this model while keeping the shape of
-the prism (e.g. setting *b/a* = 1 and *c/a* = 1 and applying polydispersity
+the prism (e.g. setting $b/a = 1$ and $c/a = 1$ and applying polydispersity
 to *a* will generate a distribution of cubes of different sizes).
 Note also that, contrary to :ref:`parallelepiped`, it does not compute
@@ -24,5 +24,5 @@
 Note also that the angle definitions used in the code and the present
 documentation correspond to those used in (Nayuk, 2012) (see Fig. 1 of
-that reference), with |theta| corresponding to |alpha| in that paper,
+that reference), with $\theta$ corresponding to $\alpha$ in that paper,
 and not to the usual convention used for example in the
 :ref:`parallelepiped` model. As the present model does not compute
@@ -30,17 +30,20 @@
 
 In this model the scattering from a massive parallelepiped with an
-orientation with respect to the scattering vector given by |theta|
-and |phi|
+orientation with respect to the scattering vector given by $\theta$
+and $\phi$
 
 .. math::
-  A_P\,(q) =  \frac{\sin \bigl( q \frac{C}{2} \cos\theta \bigr)}{\left( q \frac{C}{2}
-  \cos\theta \right)} \, \times \, \frac{\sin \bigl( q \frac{A}{2} \sin\theta \sin\phi
-  \bigr)}{\left( q \frac{A}{2} \sin\theta \sin\phi \right)} \, \times \, \frac{\sin \bigl(
-  q \frac{B}{2} \sin\theta \cos\phi \bigr)}{\left( q \frac{B}{2} \sin\theta \cos\phi \right)}
 
-where *A*, *B* and *C* are the sides of the parallelepiped and must fulfill
-:math:`A \le B \le C`, |theta| is the angle between the *z* axis and the
-longest axis of the parallelepiped *C*, and |phi| is the angle between the
-scattering vector (lying in the *xy* plane) and the *y* axis.
+  A_P\,(q) =
+      \frac{\sin \left( \tfrac{1}{2}qC \cos\theta \right) }{\tfrac{1}{2} qC \cos\theta}
+      \,\times\,
+      \frac{\sin \left( \tfrac{1}{2}qA \cos\theta \right) }{\tfrac{1}{2} qA \cos\theta}
+      \,\times\ ,
+      \frac{\sin \left( \tfrac{1}{2}qB \cos\theta \right) }{\tfrac{1}{2} qB \cos\theta}
+
+where $A$, $B$ and $C$ are the sides of the parallelepiped and must fulfill
+$A \le B \le C$, $\theta$ is the angle between the $z$ axis and the
+longest axis of the parallelepiped $C$, and $\phi$ is the angle between the
+scattering vector (lying in the $xy$ plane) and the $y$ axis.
 
 The normalized form factor in 1D is obtained averaging over all possible
@@ -48,5 +51,5 @@
 
 .. math::
-  P(q) =  \frac{2}{\pi} \times \, \int_0^{\frac{\pi}{2}} \,
+  P(q) =  \frac{2}{\pi} \int_0^{\frac{\pi}{2}} \,
   \int_0^{\frac{\pi}{2}} A_P^2(q) \, \sin\theta \, d\theta \, d\phi
 
@@ -54,9 +57,9 @@
 
 .. math::
-  I(q) = \mbox{scale} \times V \times (\rho_{\mbox{p}} -
-  \rho_{\mbox{solvent}})^2 \times P(q)
+  I(q) = \text{scale} \times V \times (\rho_\text{p} -
+  \rho_\text{solvent})^2 \times P(q)
 
-where *V* is the volume of the rectangular prism, :math:`\rho_{\mbox{p}}`
-is the scattering length of the parallelepiped, :math:`\rho_{\mbox{solvent}}`
+where $V$ is the volume of the rectangular prism, $\rho_\text{p}$
+is the scattering length of the parallelepiped, $\rho_\text{solvent}$
 is the scattering length of the solvent, and (if the data are in absolute
 units) *scale* represents the volume fraction (which is unitless).
