In Polish typography dash (pol. myślnik) should not be put after a line break. Below you can find badly and correctly typed samples using en dash (pol. półpauza) and em dash (pol. pauza).

% line break before a dash is a sin according to Polish typography rules
To jest maciupeńki test półpauzy -- na Zachodzie nazywanej \emph{en dash}.  {\color{orange}\hfill~--}
\par \emph{Em dash} za to nazywamy pauzą --- obecnie dość rzadko spotykana. {\color{orange}\hfill~---}
% line break after a dash -- this is the way it should be done
To jest maciupeńki test półpauzy~-- na Zachodzie nazywanej \emph{en dash}.  {\color{orange}\hfill~--}
\par \emph{Em dash} za to nazywamy pauzą~--- obecnie dość rzadko spotykana. {\color{orange}\hfill~---}

enter image description here

To obtain correct result I had to use non-breaking space (tie) before each dash.

Is it possible to fix behavior of all en/em dashes surrounded by normal spaces in LaTeX document?

Side note: I am not asking about workarounds requiring preprocessing, like using s/ -- /~-- / in Vim/sed/perl/etc.

  • 5
    Not in a robust way. The ties are the safest method.
    – egreg
    Commented Jul 5, 2011 at 20:30
  • 2
    @przemoc: 1) En dash is never surrounded by spaces. It's always surrounded by characters. 2) It's not good to brake neither after En dash, nor before it. Better both words, or numbers, before and after the En dash to be on the same line. 3) Em dash is treated as the hyphen not only in polish, but as far as I know, in all European languages. Commented Jul 5, 2011 at 22:06
  • 7
    @Karl: In german en-dash is used to separate "thoughts" in a sentence ("Gedankenstrich") and is always surrounded by spaces if it used between words: "foo -- bar". There is no space if a comma or dot follows: "foo --, bar". Breaks before and after the en dash in the first case are ok, in the second case ("--,") the break before should be supressed. Commented Jul 6, 2011 at 7:26
  • 4
    @Karl: I have never seen an en dash separating words (not ranges) without spaces. Em dash is (often) not surrounded by spaces in English typography, but even here it's not the case for many other languages — for example, you ought to use thin/hair spaces in Russian and Latvian, except for ranges. Commented Jul 6, 2011 at 9:45
  • 6
    @Karl: Wrt. 1): Even in English writing, many style guides recommend to use an en-dash surrounded by spaces in places where the (American) writer would commonly use an em-dash: [...] For example, the Canadian The Elements of Typographic Style recommends the spaced en dash – like so – and argues that the length and visual magnitude of an em dash "belongs to the padded and corseted aesthetic of Victorian typography." (en.wikipedia.org/wiki/Dash).
    – Daniel
    Commented Jul 6, 2011 at 10:03

2 Answers 2


The only way to accomplish the task is to make - an active character and define it in such a way that it expands to a minus sign in math mode while, in text mode it looks forward to see whether one or two hyphens follow it and act in consequence.

A possible implementation with the active hyphen is as follows



There is, however, a way out using Unicode characters. If your document is written in UTF-8 you can say


where in line 2 is U+2013 EN DASH and in line 3 is U+2014 EM DASH; using these characters in your source will do what you want. The main problem here is that they are almost indistinguishable from each other in a monospaced font. Just to show them I'll put them in a code box:

– U+2013 EN DASH  
— U+2014 EM DASH

and here's how they appear in a quotation box:

– U+2013 EN DASH
— U+2014 EM DASH

The rendering on screen depends on the font, of course.

  • 4
    – — <- here they are in monospace font.
    – przemoc
    Commented Jul 5, 2011 at 21:11
  • @przemoc - just edited your contribution into the answer... Commented Nov 15, 2011 at 12:38
  • @Brent.Longborough: I thought the idea of showing the dashes as a quote was to make the difference between them visible. As code, they're just as indistinguishable as in the code sample above.
    – doncherry
    Commented Nov 15, 2011 at 14:19
  • I moved the active character part in your solution to the front, just to keep things together that belong to one thought.
    – doncherry
    Commented Nov 15, 2011 at 14:23
  • @doncherry: I thought the idea was to illustrate just how indistinguishable they were; have I misinterpreted? If so, I'll put it back, with grovelling apologies. Enrico, care to comment? Commented Nov 15, 2011 at 15:09

Inserting ties manually is still a good option: it doesn't have side effects, it is readable and it is easy to train yourself to always type ~---.

That said, the extdash package provides commands for dashes with non-breaking spaces. With the [shortcuts] option the \--- command is made available and stands for an em-dash with non-breaking space. Space surrounding the dash is also reduced for a better appearance.

  • The extash package is great. Note that if you want to forbid newlines after, you need to use instead \===. You also have many options, like nospacearound to remove the half-space automatically added before/after the dash.
    – tobiasBora
    Commented Jul 12, 2021 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .