Italics in LaTeX
Write \textit{text} to set text in italics, or \emph{text} to emphasize it — \emph prints italics in normal text and switches back to upright inside italic text. In math mode single letters are already italic; use \mathrm{} or \text{} for letters and words that should stay upright.
Italic commands
\textit{italic text}Italic text; also works inside a formula.
- Text mode, no math preview
\emph{text}Emphasis: italic in upright text, upright inside italic text.
- Text mode, no math preview
{\itshape text}Italic until the closing brace; for longer passages.
- Text mode, no math preview
\textsl{text}Slanted (oblique) rather than true italic.
\mathit{diff}Italic word in math with normal letter spacing.
\mathrm{d}xUpright letter in math, e.g. the differential d.
\text{if } x > 0Upright words inside a formula (amsmath).
\textbf{\textit{text}}Bold italic.
Try it live
Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.
Italics examples
Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.
Italic word in a formula
LaTeXx_{\textit{new}} = x_{\textit{old}} + \Delta xMath letters are already italic
LaTeXa^2 + b^2 = c^2No command needed: variables are set in math italic automatically.
Upright differential
LaTeX\int_0^1 x^2 \, \mathrm{d}x = \frac{1}{3}Some style guides want d, e and i upright;
\mathrmdoes it.Multi-letter names
LaTeX\mathit{speed} \quad \text{vs} \quad speedWithout
\mathitthe letters are spaced as a product s·p·e·e·d.Function names stay upright
LaTeX\sin x + \log y + \operatorname{rank}(A)Use
\sin,\logor\operatorname{…}rather than typing the letters.
In a LaTeX document
These commands work in the text of a .tex document (Overleaf, TeX Live, MiKTeX), not inside math. The box on the right shows what the compiled PDF looks like.
Italic words
LaTeXThe species \textit{Homo sapiens} appeared later.Compiled resultThe species Homo sapiens appeared later.
Emphasis inside italics
LaTeX\textit{This theorem is \emph{not} true for n = 2.}Inside italic text
\emphflips back to upright so the word still stands out.Compiled resultThis theorem is not true for n = 2.
\textit or \emph?
\textit always means "set this in italics" — use it for titles, foreign words and species names. \emph means "stress this": it produces italics in upright text but upright text inside an italic passage, such as a theorem statement. Because it describes the meaning, \emph is the usual choice for emphasis.
For a paragraph or more, use the declaration {\itshape …} rather than a very long argument. The deprecated \it still works in the standard classes but does not combine with bold and skips the italic correction.
Italics in math mode
LaTeX sets every letter in math mode in italics and treats consecutive letters as a product, which is why $speed$ looks spaced out. Use \mathit{speed} for an italic word, \text{speed} or \mathrm{speed} for an upright one.
Standard function names have their own commands (\sin, \exp, \det); for others define \DeclareMathOperator{\rank}{rank} in the preamble or write \operatorname{rank}.
Common mistakes
Math mode drops the spaces and uses math letter spacing, so the words run together.
Instead of$italic words$Write\textit{italic words}\itis deprecated, cancels bold and skips the italic correction before the next upright letter.Instead of{\it text}Write\textit{text}^only works in math mode; in text it stops with "Missing $ inserted".Instead of\emph{x^2}Write$x^2$
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
\textit,\emph,\itshapeand\textslneed no package. If the chosen font lacks an italic shape LaTeX warns "Font shape undefined" and substitutes one.MathJax and KaTeX
MathJax renders
\textit,\mathitand\mathrminside math but not\emphor\itshape. In Markdown write italic prose with*…*and keep LaTeX for formulas.Microsoft Word
Italic text in Word is Ctrl+I. In a pasted equation (Copy for Word from the editor above) letters keep math italics; switch a letter to upright in Word's equation tools if needed.
Italics in LaTeX: questions
- How do I italicize text in LaTeX?
- Write
\textit{text}. Use\emph{text}when the italics are for emphasis, so the emphasis still shows inside italic passages. - How do I italicize in math mode?
- Single letters are italic already. For a whole word with normal spacing use
\mathit{word};\textit{word}also works inside a formula. - How do I make a letter upright in an equation?
- Use
\mathrm{d}for a letter or\text{if}for words. For function names use\sin,\logor\operatorname{name}. - How do I get bold italic text?
- Nest the commands:
\textbf{\textit{text}}.
Related LaTeX reference
- How to Bold in LaTeX\textbf for bold text, \mathbf for upright bold math, \boldsymbol or \bm for bold italic and Greek symbols.
- LaTeX Underline: Text and Math\underline for short text and formulas, ulem's \uline and soul's \ul for text that breaks across lines, plus double and wavy lines.
- Math Mode in LaTeXInline math with $…$ or \(…\), displayed math with \[…\], numbered equation environments, references and \text inside formulas.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
Have the formula as a picture?
Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.
Convert an image to LaTeX