Skip to main content

The PreTeXt Guide

Subsection 4.9.1 Inline Mathematics

Use the <m> to place variables or very short expressions within a sentence of a paragraph, the content of a <title>, a <cell> of a table, a footnote, or other similar locations of sentence-like text. You can’t cross-reference this text, nor make a knowl with it. Though you can typically cross-reference a containing element.
Do not use -isms like \displaystyle to try to end-run the inline nature. It will just lead to poor results.

Best Practice 4.9.1.1. Keep Inline Mathematics Short.

Longer mathematical expressions in an <m> element can lead to awkward line breaks, both in HTML output, and especially in PDF generated from . And complicated fractions or integrals can introduce abnormal line-spacing that is distracting to a reader. As a rough rule-of-thumb, keep an inline expression shorter than a moderately-long regular word and avoid tall constructions. This should allow ’s line-breaking algorithms the best chance of success.
So a simple, short equality such as \(x=2\) should not cause a problem, but if you want to claim that the probability distribution of the normal distribution has the right scaling factors, \(\int_{-\infty}^{\infty}\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}\frac{\left(x-\mu\right)^2}{\sigma}} dx = 1\text{,}\) there is a good chance it will do less harm to your paragraph of you display it
\begin{equation*} \int_{-\infty}^{\infty}\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}\frac{\left(x-\mu\right)^2}{\sigma}} dx = 1 \end{equation*}
using the <me> element described next.