HOW TO ADD WORDS INSIDE A LATEX EQUATION
How to Add Words Inside a LaTeX Equation
Examples checked with MathTexLab’s base and AMS math renderer · Display style
Use \text{words} for short phrases inside a LaTeX equation.
Ordinary letters in math mode are treated as mathematical symbols, so typing a
sentence directly can lose spaces and produce the wrong typography.
Separate words from mathematical conditions
In the example, the word “for” belongs inside the text command, while the condition t greater than zero remains mathematical. A space inside the text group separates the word from the following variable. Keep the braces around the complete phrase.
Text inside an equation is still part of its source. Changing the website language does not translate your formula or its labels. Use the wording your readers need, and inspect the actual rendered glyphs before sharing.
v=\frac{d}{t}\quad\text{for }t>0\qquad d=12\,\mathrm{m}Open example in editor Distinguish labels, units and operators
The example uses \mathrm{m} for an upright metre symbol and
\, for a small space after the number. This is typesetting, not
unit conversion or dimensional analysis. Use text for a phrase and an
upright math style for a simple unit symbol.
For named functions, prefer the appropriate operator command, such as
\sin, instead of putting the function name into ordinary math
letters. The
operators and limits guide
explains spacing and bounds.
Check source and font limitations
The text command is not an HTML container or a full document editor. Do not paste markup or a document preamble into it. Arbitrary packages and complete language/font systems from a desktop TeX installation are not automatically available.
Open the example, replace the short label and check the preview before exporting. If a brace or command fails, follow the equation error checklist. For conditional branches, see piecewise functions.
Syntax reference
Continue with LaTeX Equation Editor.