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?
-
Could you give an example of a sectioning header that generates warnings about overfull or underfull boxes? Also, which document class do you use?– MicoCommented May 18, 2016 at 4:29
-
@Mico I use article. I don't know about the example you ask though :/– AdamCommented May 18, 2016 at 15:26
2 Answers
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}
.