Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
Short answer: in LaTeX, type three hyphens (---) or the command \textemdash to get an em dash. Two hyphens (--) or \textendash give an en dash, which is used for ranges such as pages 12–14. This guide is for researchers and analysts writing papers, theses and reports in LaTeX who need the right dash in the right place.
What the em dash is used for in research writing
The LaTeX2e reference describes the em dash as “used for punctuation, usually similar to commas or parentheses”, and notes that “conventions for spacing around em-dashes vary widely” (latexref.xyz, Text symbols, read 2026-11-08). LaTeX gives you the glyph; whether you put spaces around it is a house-style or journal-style decision. Check your target journal’s author guidelines for that choice.
The en dash has a different job: it is “used for ranges, as in ‘see pages 12–14′” (same source). In a research document that covers page ranges in references and similar spans.
Install or access
No package is needed. Both dash forms are part of standard LaTeX text input, so they work in any LaTeX distribution and in an online editor such as Overleaf (see what Overleaf is).
Step-by-step: typing an em dash
- Place the cursor in ordinary text (not math mode) where the dash belongs.
- Type
---with no spaces between the three hyphens. Example from the LaTeX2e reference:The playoffs---if you're lucky enough to make the playoffs---are more like a sprint. - Alternatively, type
\textemdash, which the reference lists as the named form of---. - Decide on spacing around the dash according to the style you are following, and apply it consistently throughout the document.
- Compile and check the PDF: the dash should appear as one long horizontal stroke, longer than the en dash used for ranges.
Em dash, en dash, hyphen and minus: what to type
Four different horizontal marks look similar, and each has its own input. The table follows the LaTeX2e reference and the LaTeX Wikibook (Text Formatting, read 2026-11-08).
| Mark | Type this | Command form | Use |
|---|---|---|---|
| Hyphen | - |
none listed in the LaTeX2e reference | Joining words in compounds |
| En dash | -- |
\textendash |
Ranges, such as pages 12--14 |
| Em dash | --- |
\textemdash |
Punctuation, similar to commas or parentheses |
| Minus sign | $-$ |
math mode | Minus in mathematics, not a dash |
Minus sign versus dash
The Wikibook gives the minus as $-$ in math mode, distinct from the dash runs. For number-and-unit conventions in the same kind of document, see SI units in scientific writing.
Hyphenated compounds that will not break across lines
The LaTeX Wikibook notes that compounds written with a hyphen are not automatically broken across lines, and that the \hyp{} command from the hyphenat package addresses this. For wider typographic tuning, see the microtype guide.
Non-breaking hyphen
The LaTeX2e reference also lists \textnonbreakinghyphen, the Unicode U+2011 non-breaking hyphen. It has no --- or -- shorthand, and the reference says the pdfTeX approximation is a regular ASCII hyphen with breaks disallowed after it.
Output and how to read it
In the compiled PDF the marks should differ visibly in length: hyphen shortest, en dash longer, em dash longest. If a range such as 12–14 looks like a short hyphen, it was probably typed with one hyphen instead of two. If a dash used as punctuation looks the same length as a range dash, it was typed with two hyphens instead of three.
Troubleshooting
- The dash looks too short. Count the hyphens:
--is an en dash and---is an em dash. - A minus sign looks wrong. Put it in math mode (
$-$). - A hyphenated compound runs into the margin. Use
\hyp{}fromhyphenat, as described in the LaTeX Wikibook. - Your style wants (or forbids) spaces around the dash. LaTeX does not decide this; the reference says conventions vary, so follow your journal or thesis template.
- Other special characters misbehave too. See underscore in LaTeX and vertical line in LaTeX.
Two equivalent forms for each dash
| Goal | Shorthand | Named command |
|---|---|---|
| En dash | -- |
\textendash |
| Em dash | --- |
\textemdash |
| Non-breaking hyphen | none | \textnonbreakinghyphen |
Both forms of each dash are documented as the same mark, so choose the one that keeps your source readable.
FAQ
How do I type an em dash in LaTeX?
Type --- (three hyphens) in text mode, or use \textemdash. Both give the same em dash.
What is the LaTeX command for an en dash?
\textendash, or -- in the source. Use it for ranges such as 12--14.
Should there be spaces around an em dash in LaTeX?
LaTeX does not decide this. The LaTeX2e reference states that spacing conventions around em dashes vary widely, so follow your journal’s or institution’s style.
Why does my minus sign look like a hyphen?
Use math mode, $-$, for a minus sign, as the LaTeX Wikibook shows.
Sources
- LaTeX2e unofficial reference manual, “Text symbols” (latexref.xyz/Text-symbols.html), read 2026-11-08.
- Wikibooks, “LaTeX/Text Formatting” (en.wikibooks.org/wiki/LaTeX/Text_Formatting), read 2026-11-08.
- Wikibooks, “LaTeX/Special Characters” (en.wikibooks.org/wiki/LaTeX/Special_Characters), read 2026-11-08.







