I am using the Koma-script book class (scrbook) to draft a manuscript. The publisher has a very strict requirement on the margins of the pages.

I define the margins with the DIV command:


This seems to work well for most of the document, except occasionally, there will be a word that goes over the margin. Is there a way to enforce strict guidelines about the margin?

Please see this screen-shot:

Screenshot of some words that go over the margin

I tried reducing the font size by a couple of points, but it breaks the margins at other points:

Another Example

I am using the microtype package, but it doesn't seem to eliminate all the over-runs.

Secondly, is there a way or a tool to automatically check to see if any part of the text, figures or tables have gone over a 3cm margin requirement? (My publisher seems to have an automated tool that marks the sections over the margin).

  • 1
    Please add the code for a MWE showing your problem.
    – epR8GaYuh
    Jun 25, 2018 at 7:35
  • 6
    TeX should warn you about words running into the margin (the well-loved overfull box warnings, you'll also want to look at underfull boxes). There is also tex.stackexchange.com/q/75140/35864. Anyway Radar should probably be hyphenated 'ra-dar' to avoid running into the margin, so the problem might well lie elsewhere.
    – moewe
    Jun 25, 2018 at 7:39
  • 2
    About the acronym "RADAR": acronyms are generally not hyphenated, and "RADAR" (or "Radar") is no exception. To avoid getting an overfull line in the example above, you could inform LaTeX about an additional, special hyphenation point by issuing the instruction \hyphenation{ra-dar} in the preamble. However, many (most?) readers will probably find such a hyphenation point objectionable -- or worse. Other methods for avoiding overfull lines are (a) Re-write the paragraph in question suitably and (b) issue the commands \begin{sloppypar} and \end{sloppypar} around the problem paragraphs.
    – Mico
    Jun 25, 2018 at 7:45
  • This problem has nothing to do with Komascript. If you load the microtype-package, most likely, the problem disappears.
    – Sveinung
    Jun 25, 2018 at 8:36
  • 1
    Are you sure that DIV results in the correct page layout? If you have such strict requirements, maybe it is better to set the page layout using geometry.
    – Skillmon
    Jun 25, 2018 at 8:53

1 Answer 1


First of all, this isn't a KOMA-script issue, but a TeX issue. TeX uses a very sophisticated algorithm (I'm told, never read it myself) for line break in paragraphs, but even this has its limitations.

What you are asking is a full automatic mode: »Please keep the margin, whatever it costs«. To this end, you can use the command \sloppy, for further advice see here: What is the meaning of \fussy, \sloppy, \emergencystretch, \tolerance, \hbadness?

Before doing this, consider using the microtype package. It can alter the width of the glyphs by up to 3% and get a better line break.

In the end, of course you need to read the whole PDF again. If there really is a bad line or page break, maybe it helps to change the wording a little bit. That might be the price of good typesetting.

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