In LaTeX, hyphens and dashes are small but important for good-looking text. Many beginners get confused between the short hyphen (-), the medium en-dash (–), and the long em-dash (—).

This guide will show you the easy way to type each one and explain when to use them in your LaTeX documents.

Hyphen Symbol

The hyphen is the shortest dash. It’s used for joining words, like well-known or high-speed. You can type it easily with just one - key.

\documentclass{article}
\begin{document}
  This is a well-known example.
\end{document}

That’s it! No extra commands or packages needed. Just use a single hyphen whenever you join words.

En-dash Symbol

The en-dash (–) is a bit longer. It’s used to show a range, like pages 5–10 or 1990–2000. In LaTeX, you type it with two hyphens.

--
--
Type two hyphens without spaces. LaTeX will turn them into an en-dash automatically. Use it for ranges or links between things like New York–London flight.
\documentclass{article}
\begin{document}
  Pages 10--20 explain the basics.  
  The New York--London flight is always busy.
\end{document}

Em-dash Symbol

The em-dash (—) is the longest dash. It’s used for pauses in sentences — like this one! In LaTeX, you make it with three hyphens.

---
---
Type three hyphens in a row. LaTeX changes them into an em-dash. It doesn’t add spaces automatically, but you can add spaces if you prefer.
\documentclass{article}
\begin{document}
  He waited---but nothing happened.  
  The result---though surprising---was good.
\end{document}

Using \textendash and \textemdash

There are also special commands to make dashes. These are helpful when you write inside macros or captions.

\textendash
\textemdash
\textendash
Makes an en-dash. Useful in special places like captions, sections, or when LaTeX might not read double hyphens correctly.
\textemdash
Makes an em-dash. Good for use in macros or commands where three hyphens could cause an error.
\documentclass{article}
\begin{document}
  The years 2010\textendash2020 showed big progress.  
  He tried\textemdash and failed\textemdash many times.
\end{document}

These commands give you more control and work safely in any LaTeX environment.

Using Babel for Languages

If you write in other languages, use the Babel or Polyglossia package. These handle spaces around dashes automatically based on the language.

\usepackage[english]{babel}
\usepackage[english]{babel}
This package changes punctuation style for each language. For example, French adds small spaces around dashes automatically.
\documentclass{article}
\usepackage[english]{babel}
\begin{document}
  Years 2010--2020 were important---many changes happened.  
  Or use commands: 2010\textendash2020\textemdash many changes happened.
\end{document}

Add Spaces Around Dashes (if Needed)

Sometimes users find that their dashes look too close to the words. That happens because LaTeX, by default, doesn’t add spaces around dashes.

You can fix this easily by adding thin spaces using \, or regular spaces.

word \,---\, word   → adds small space  
word --- word       → adds normal space
\,
This command adds a thin space. It’s useful when you want your text to look less tight without making the gap too large.
Regular space
Simply typing a space before and after the dashes gives a wider look, which some style guides prefer for readability.

Share tutorial

Leave a Comment

Your email address will not be published. Required fields are marked *