Take the 2-minute tour ×
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.

I have a problem, this is what it looks like:

enter image description here

And this is the code:

\subsection{Bakterienst\"amme und Anzuchtbedingungen}

Where does the huge whitespace come from?

share|improve this question
Please add a minimal working example (MWE) that illustrates your problem. –  lockstep Jul 20 '11 at 22:35
well, in the code, there is only ONE whitespace and in the output, the spacing between the words is huuuuge. –  mr.bio Jul 20 '11 at 22:40
But for others to find out why, you've got to post a compilable code example that shows the problem. –  lockstep Jul 20 '11 at 22:44
If this is a hyphenation issue, then there must be something "attached" to the end of "Anzuchtbedingungen" to make it want to (stretch out and) break at that point. What do you have immediately following the \subsection{...} definition? –  Werner Jul 20 '11 at 23:48
add comment

1 Answer

Obviously the whitespace comes from fully justifying. It can be fixed by switching to flush left aka ragged-right mode, at least for this heading, for example by

\subsection{\protect\raggedright Bakterienst\"amme und Anzuchtbedingungen}

I used \protect because the command is fragile and needs to be protected in a moving argument such as here. Note, you may decide to use the optional argument to get a different result for the table of contents and the page header, such as

\subsection[Bakterienst\"amme und Anzuchtbedingungen]{%
    \protect\raggedright Bakterienst\"amme und Anzuchtbedingungen}

The ragged2e package provides better commands which even allow hyphenation:

\subsection{\protect\RaggedRight Bakterienst\"amme und Anzuchtbedingungen}

Sadly, you did not provide an example. I simulate the effect of full justification and solution here, see how the small stretching is removed:

\subsection{\protect\justifying Bakterienst\"amme und Anzuchtbedingungen}
\subsection{\protect\justifying\protect\RaggedRight Bakterienst\"amme
    und Anzuchtbedingungen}

enter image description here

Also consider to improve justification for example by

  • loading the microtype package
  • using babel
  • using T1 font encoding

so making it possible to keep full justification with good results.

share|improve this answer
Just a small remark: \protect is not necessary in the mandatory argument if the optional one is used. –  egreg Sep 4 '11 at 9:45
add comment

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.