TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to TEX and am using scribtex as an online latex editor. My problem is that when I put hyphen in my text it sometimes appears and sometimes doesn't appear. What can be the reason for this and how do I fix this?

The code for example I am putting in is:

  \newcommand{\R}{{\mathbb R}}
  Reissener – Nordstrom 

​ The output I get is "ReissenerNordstrom Reissener Nordstrom" whereas I expect "Reissener-Nordstrom Reissener-Nordstrom".


share|improve this question
What kind of hyphenation are you talking about: manual discretionary hyphenation like this\-is\-a\-long\-word or even \hyphenation{this-is-a-long-word}? If so, these only appear when necessary. If you want them to appear always, you can just write them as-is in your text: blah blah this-is-a-long-word blah blah – Werner Oct 20 '11 at 15:23
Welcome to TeX.SE. Keep in mind that it is always best to compose a MWE that illustrates the problem including the \documentclass. Personally, I have often solved my own problems in the process of reducing the amount of code actually required to reproduce the problem. So, if what is below does not answer the question for you, please create a MWE. – Peter Grill Oct 20 '11 at 16:37
Thank you. I have implemented your suggestion. Can you now suggest what is going wrong? – Shahab Oct 21 '11 at 11:31
@Shahab: see my answer – Herbert Oct 21 '11 at 11:42
up vote 4 down vote accepted

what you call a hyphen is the unicode character for a n-dash. You can see it with


I changed the first one to a hyphen to make the difference visible:

enter image description here

share|improve this answer
Thank you. Can you explain why earlier in well known english words (such as momentum-tensor) the dash was appearing while it wasnt appearing for Reissener-Nordstrom. – Shahab Oct 21 '11 at 12:08
that depends to your keyboard or to the online LaTeX compiler. It is possible that your double -- hyphens are converted into the unicode caracter by default. However, using an online compiler does't really make sense – Herbert Oct 21 '11 at 12:13

Hyphens are used for compound words like: son-in-law. For number ranges use two dashes: 15--24. Punctuation in sentences uses three dashes --- such as this. However, if you are in math mode then things are different as a dash is a minus sign. So, you need to use either \hbox, or \mbox, or \text (if you have amsmath pacakge loaded).

I just tied pasting the code below at http://scribtex.com, and the output PDF that I got seems to work fine.


Compound words like: daughter-in-law.\par
Number ranges: 15--24.\par
Punctuation in sentences---such as this.

However, in math mode, a dash gets treated as a minus sign:
$15-25$, $15--24$ 

So use \textbackslash mbox (or \textbackslash hbox) to get back to text mode:
$a \mbox{-} b$  $15 \mbox{--} 24$

or with `amsmath` you can also use `\textbackslash text`:
$a \text{-} b$  

$14 \text{--} 24$
share|improve this answer
I added the Reissener–Nordstrom and was unable to get the hyphen in your code as well. – Shahab Oct 21 '11 at 11:34
Looks like you have to use a -- in this case, but I don't know why. – Peter Grill Oct 21 '11 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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