JezK
Edit File: Overfull-hboxes.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- This manual is for GNU Texinfo (version 6.8, 8 June 2021), a documentation system that can produce both online information and a printed manual from a single source using semantic markup. Copyright (C) 1988, 1990-1993, 1995-1999, 2001-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". --> <title>Overfull hboxes (GNU Texinfo 6.8)</title> <meta name="description" content="Overfull hboxes (GNU Texinfo 6.8)"> <meta name="keywords" content="Overfull hboxes (GNU Texinfo 6.8)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="texi2any"> <meta name="viewport" content="width=device-width,initial-scale=1"> <link href="index.html" rel="start" title="Top"> <link href="Command-and-Variable-Index.html" rel="index" title="Command and Variable Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Hardcopy.html" rel="up" title="Hardcopy"> <link href="PDF-Output.html" rel="next" title="PDF Output"> <link href="Preparing-for-TeX.html" rel="prev" title="Preparing for TeX"> <style type="text/css"> <!-- a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em} a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} kbd {font-style: oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} span.nolinebreak {white-space: nowrap} span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} span:hover a.copiable-anchor {visibility: visible} ul.no-bullet {list-style: none} --> </style> </head> <body lang="en"> <div class="section" id="Overfull-hboxes"> <div class="header"> <p> Next: <a href="PDF-Output.html" accesskey="n" rel="next">PDF Output</a>, Previous: <a href="Preparing-for-TeX.html" accesskey="p" rel="prev">Preparing for TeX</a>, Up: <a href="Hardcopy.html" accesskey="u" rel="up">Formatting and Printing Hardcopy</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p> </div> <hr> <span id="Overfull-_0060_0060hboxes_0027_0027"></span><h3 class="section">18.10 Overfull “hboxes”</h3> <span id="index-Overfull-hboxes"></span> <span id="index-hbox_002c-overfull"></span> <span id="index-Final-output"></span> <p>TeX is sometimes unable to typeset a line within the normal margins. This most often occurs when TeX comes upon what it interprets as a long word that it cannot hyphenate, such as an electronic mail network address or a very long identifier. When this happens, TeX prints an error message like this: </p> <div class="example"> <pre class="example">Overfull @hbox (20.76302pt too wide) </pre></div> <span id="index-hbox"></span> <p>(In TeX, lines are in “horizontal boxes”, hence the term, “hbox”. ‘<samp>@hbox</samp>’ is a TeX primitive not used in the Texinfo language.) </p> <p>TeX also provides the line number in the Texinfo source file and the text of the offending line, which is marked at all the places that TeX considered hyphenation. See <a href="Debugging-with-TeX.html">Debugging with TeX</a>, for more information about typesetting errors. </p> <p>If the Texinfo file has an overfull hbox, you can rewrite the sentence so the overfull hbox does not occur, or you can decide to leave it. A small excursion into the right margin often does not matter and may not even be noticeable. </p> <p>If you have many overfull boxes and/or an antipathy to rewriting, you can coerce TeX into greatly increasing the allowable interword spacing, thus (if you’re lucky) avoiding many of the bad line breaks, like this: </p> <span id="index-_005cemergencystretch"></span> <div class="example"> <pre class="example">@tex \global\emergencystretch = .9\hsize @end tex </pre></div> <p>(You should adjust the fraction as needed.) This huge value for <code>\emergencystretch</code> cannot be the default, since then the typeset output would generally be of noticeably lower quality; its default value is ‘<samp>.15\hsize</samp>’. <code>\hsize</code> is the TeX dimension containing the current line width. </p> <span id="index-Black-rectangle-in-hardcopy"></span> <span id="index-Rectangle_002c-black-in-hardcopy"></span> <span id="index-Box_002c-ugly-black-in-hardcopy"></span> <span id="index-Ugly-black-rectangles-in-hardcopy"></span> <p>For any overfull boxes you do have, TeX will print a large, ugly, black rectangle beside the line that contains the overfull hbox unless told otherwise. This is so you will notice the location of the problem if you are correcting a draft. </p> <span id="index-finalout"></span> <p>To prevent such a monstrosity from marring your final printout, write the following in the beginning of the Texinfo file on a line of its own, before the <code>@titlepage</code> command: </p> <div class="example"> <pre class="example">@finalout </pre></div> </div> <hr> <div class="header"> <p> Next: <a href="PDF-Output.html">PDF Output</a>, Previous: <a href="Preparing-for-TeX.html">Preparing for TeX</a>, Up: <a href="Hardcopy.html">Formatting and Printing Hardcopy</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p> </div> </body> </html>