2

In a section title the spacing of the words seems long to me although I get no warning by LaTeX for underful/overful boxes. How can I change the space between the words, but only in the titles of the sections?

2
  • Could you give an example of a sectioning header that generates warnings about overfull or underfull boxes? Also, which document class do you use?
    – Mico
    Commented May 18, 2016 at 4:29
  • @Mico I use article. I don't know about the example you ask though :/
    – Adam
    Commented May 18, 2016 at 15:26

2 Answers 2

5

I think what you want is to change the justification of the material in section-level headers from "full" (the default) to "ragged-right", i.e., no justification at all.

This may be achieved by providing the following instructions in the preamble:

\usepackage{sectsty}
\sectionfont{\raggedright}

A side-effect of \raggedright is that no discretionary hyphenation is performed in its scope. That's usually a desirable setting for the material in sectioning headers. If, however, you do wish to permit hyphenation, I suggest you further load the ragged2e package and replace \sectionfont{\raggedright} with \sectionfont{\RaggedRight}.

0
-1

use \begin{flushleft} before \section and \end{flushleft}

You must log in to answer this question.

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