TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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'm having some problems with lines that turn out to be too long. There are correct hyphenation rules for the word but they aren't being applied.

Let me first give the sentence that is too long:

An isomorphism that maps a graph to itself is called an \concept{automorphism}.

The command concept is defined as follows


The problem seems to be that words inside \concept aren't being hyphenated. How can I fix this? If I type

An isomorphism that maps a graph to itself is called an \textbf{automorphism}.

then the word is hyphenated perfectly. So I would now like to have the command \concept behave the same way, i.e. allow concepts to be hyphenated according to the standard rules.

share|improve this question
up vote 14 down vote accepted

The first word is never hyphenated, unless something before it makes TeX think it's not the first word


The \hspace{0pt} is the trick.

\marginpar and \index should follow the word they refer to, being attached to it, in order not to leave a legal break point that could cause misalignment of the marginal note and off-by-one errors in the index. If put before the word, they inhibit its hyphenation.

share|improve this answer
Thanks for this fast response. And thank you for a solution. I might a small edit to your code, because the \hspace{0pt} was needed in two places. – nvcleemp Sep 21 '11 at 12:56
The second \textbf{#1} is typeset in the normal text, so there's no need to give a zero space there. – egreg Sep 21 '11 at 13:06
Actually the \index should go after the word, just for that reason. – egreg Sep 21 '11 at 13:17
Hmm, strange. If I don't place that second \hspace{0pt}, then the text isn't hyphenated. – nvcleemp Sep 21 '11 at 13:30
@nvcleemp Look at the edited answer. I overlooked at the \index command. – egreg Sep 21 '11 at 14:46

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.