I am writing scientific or technical documents in LaTeX. Often I need to type a non-breaking space, for example when using equation references:

Equation~\eqref{eq:equation1example} shows blaa...

Is there a way of inserting non-breaking hyphens?

For example, this may be useful for technical terms such as Runge-Kutta, non-linear, non-converging or Van-der-Pol Oscillator which would not usually be split over lines.

Additionally, this may be desirable for citations and Author names, or publisher names.


4 Answers 4


If you use the amsmath package, you could employ its \nobreakdash macro to insert a dash or en-dash after which no line break is allowed.

Three examples (all from the user guide of the amsmath package):

pages 1\nobreakdash--9

Basically, where you'd normally write - ("dash") in the input file, you would now write \nobreakdash-, and where you'd normally write -- ("en-dash"), you would now write \nobreakdash--.

The joined-up expression $n$\nobreakdash-dimensional is quite long and might create bad line breaks. To keep this from happening, while still prohibiting a linebreak after $n$-, you could write


That way, if need be, LaTeX can find a line break somewhere inside the "dimensional" substring. Presumably, you're OK with $n$-dimen- being at the end of one line and sional at start of the next line. If you have a lot of instances of "n-dimensional" in your document, it may make sense to set up a macro such as


in the preamble and to write \ndim{} everywhere in the body of the document.


With the babel package loaded there is \babelhyphen{nobreak} available (alongside \babelhyphen{soft}, \babelhyphen{hard} and a few others). While it prohibits a break after the dash the following word may still be hyphenated:


The language ngerman (maybe others, too) defines a shorthand for a non-breaking hyphen: "~. With \addto\extrasenglish{\languageshorthands{ngerman}} it (and the other ngerman shorthands) can be added to english for example. (It probably must be activated with \useshorthands{"}. Contrary to \babelhyphen{nobreak} "~ does not allow the following word to be hyphenated.

% preamble
% document

You can also define the shorthand yourself – either general


or explicitly for one language (english as example):


A complete example:





% default:

% \babelhyphen{nobreak}:

% new `english' shorthand:

% `ngerman' shorthand:


enter image description here

  • 7
    I am open to criticism: if the downvoter kindly would tell me in which respect my answer is bad/wrong? I'll gladly edit/delete if I know why.
    – cgnieder
    Commented Aug 30, 2015 at 21:50
  • 1
    I, for one, upvoted your answer. :-) Absent some clear criticism, I tend to no longer worry too much about any downvotes. Quite a few of the downvotes I've received over time turned out to be entirely accidental, of the "fat-finger" variety -- where somebody meant to upvote but managed to downvote instead. Plus, the fat-finger problem has afflicted me too at times, i.e., I've accidentally downvoted other postings. (I correct those mistakes, though!)
    – Mico
    Commented Aug 30, 2015 at 22:02
  • 3
    @Mico i don't worry but I'm curious :)
    – cgnieder
    Commented Aug 30, 2015 at 22:06

It is also possible to wrap part of text that should not be wrapped or only the dash in \mbox{…}:

  • Wrapping only part of the text will compromise the kerning in the word. But also, wrapping any part of the string in braces will suppress all hyphenation within the string Commented May 13, 2021 at 19:21
  • 1
    this is the way, no additional packages necessary
    – Sergiu
    Commented Oct 26, 2021 at 22:15
  • @Sergiu - why does the fact that no additional packages are necessary that "this is the way"?
    – Mico
    Commented Nov 14, 2021 at 23:24
  • 2
    @Mico the fewer packages the better, as in my experiences when submitting papers to conferences or journals there is tons of resistance to using many packages, because imagine 100 papers accepted from different authors and each using their preferred packages, then putting the content together in one document can be a hassle with conflicting packages
    – Sergiu
    Commented Nov 15, 2021 at 0:23
  • 2
    @Sergiu - There are plenty of obscure and largely undebugged LaTeX packages out there. However, babel and amsmath -- the two packages whose used by the other two answers to this query -- are definitely not in that category; indeed, quite the opposite is the case. To use your rhetoric: Imagine 100 papers accepted from different authors; if the clear majority of these papers did not employ either amsmath or babel (or both), one would very much have to worry about the apparent lack of basic LaTeX competence of the set of authors.
    – Mico
    Commented Nov 15, 2021 at 1:29

The package extdash provides several options for typesetting hyphens and dashes, including disabling line-breaks after them by either:

  1. adding an asterisk to the written-out command
something\Hyphdash* something
something\Endash* something
  1. with the shortcuts option loaded, using equal signs instead of hyphens:

(examples from the package documentation)

You must log in to answer this question.

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