I want to use a dash in my beamer presentation, however 4--6 looks just like that in the output (i.e. the -- is not converted to a dash as it usually is).

Does anyone know a way around that?

Here's the requested example (could be it's xelatex...)


\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
\setsansfont{Linux Biolinum O}


  • I think it would help if you provide a working minimal example (MWE) that demonstrates the problem. I’ve tested it with my own MWE an can’t see any problem. Maybe your font doesn't work or you have to use something like \usepackage[T1]{fontenc} – Tobi May 23 '11 at 13:27
  • With a simple test document I couldn't reproduce your problem. Please add a minimal working example illustrating this odd behaviour. – Gonzalo Medina May 23 '11 at 13:27
  • 3
    If you are using xelatex or lualatex: Read the documentation of fontspec (Ligatures=TeX). If not: make a small, complete example. – Ulrike Fischer May 23 '11 at 13:30
  • @Ulrike Fischer Thanks! For some reason I forgot to set my mapping in my sansfont ... I'm still only getting used to xelatex.... – Jonathan May 23 '11 at 13:39

You can use \textendash, such as

4\textendash 6


This is to test dashes \\
X\textendash rays are very powerful

If you want to insert dash within beamer slide, use package textcmds and include \textendash where ever you want to display dash.

If you want to insert a long dash within beamer slide, then use \textemdash. Also remember you have to use package textcmds.

  • 2
    Welcome to TeX.SE. Why textcmds is needed? This \documentclass{beamer} \begin{document} \begin{frame} \textendash \textemdash \end{frame} \end{document} works perfectly. – CarLaTeX Jul 15 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.