\overfullrule
\overfullrule[=]
dimension
Where:
- “
[=]
” means that the equals sign is optional. - dimension is an amount specified in units that TEX can understand—e.g., pt, bp, mm etc.
When TEX detects that an hbox is overfull—such as a line in a typeset paragraph or
some text in an \hbox{..}
—it will write that information to the log file. In addition,
TEX engines also provide the \overfullrule
command which can be used to
instruct TEX to add a short rule to the end of the offending box, acting as a visual
warning to the user.
Usage example
Because the “=” sign is optional you can write \overfullrule=10pt
or
\overfullrule 10pt
.
Note that LATEXsets \overfullrule
to 0pt, Plain TEX sets it to 5pt.
An example
We’ll use an \hbox{}
that will be overfull: \hbox to 10pt{This box will be overfull}
and set \overfullrule
to a non-zero value, say 10mm:
\overfullrule=10mm\hbox to 10pt{This box will be overfull}\par
The following graphic shows the output:
As you can see, a 10mm-long rule has been added to the end of the overfull
\hbox
. Now set \overfullrule=0mm
to prevent an overfull box rule being
displayed:
\overfullrule=0mm\hbox to 10pt{This box will be overfull}
The following graphic shows the output:
The resulting \hbox
is still overfull but this time it is displayed without an overfull
rule to highlight that fact.
Another example: lines in a paragraph
When TEX breaks a pararaph into lines of typeset text, each line in the paragraph is
stored in an \hbox
. TEX can be told to display overfull lines by setting
\overfullrule
to a non-zero value. The following example shows overfull rules being
displayed at the end of overfull lines in a paragraph.
To create a paragraph, we’ll put some text in a narrow \vbox
, set \overfullrule=10pt
,
and draw the box with a border. Note that because we used the \verb
command we
first need to save the \vbox
in a box register (100) and then use the LATEX
command (macro) \fbox
to draw a tight border around it, making it easier to see the
overfull lines.
\overfullrule=10pt
\setlength{\fboxsep}{0pt}% To ensure a tight border with no gap
\setbox100=\vbox{\hsize=30mm Inside this vbox we’ll set the
linewidth to 30mm using \verb|\hsize=30mm|.
We are typesetting some text inside a \verb|\vbox|
because it will cause \TeX{} to perform linebreaking
and build the paragraph as a stack of horizontal boxes.
For some lines \TeX{} might be unable to find a good
linebreak which can result in lines too wide to fit
within a width of 30mm. Because \verb|\overfullrule| is
non-zero (10pt), those overfull lines are
indicated by an overfull rule of width 10pt. Note that to \TeX{},
this box is still considered to be 30mm wide even though
some lines do not fit and an \verb|\overfullrule|
of width 10pt is added on to the end of some lines.}
\fbox{\copy100}
The following graphic shows the output:
Overleaf guides
- Creating a document in Overleaf
- Uploading a project
- Copying a project
- Creating a project from a template
- Using the Overleaf project menu
- Including images in Overleaf
- Exporting your work from Overleaf
- Working offline in Overleaf
- Using Track Changes in Overleaf
- Using bibliographies in Overleaf
- Sharing your work with others
- Using the History feature
- Debugging Compilation timeout errors
- How-to guides
- Guide to Overleaf’s premium features
LaTeX Basics
- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
- Lists
- Errors
Mathematics
- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Matrices
- Fractions and Binomials
- Aligning equations
- Operators
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts
- Using the Symbol Palette in Overleaf
Figures and tables
- Inserting Images
- Tables
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package
References and Citations
- Bibliography management with bibtex
- Bibliography management with natbib
- Bibliography management with biblatex
- Bibtex bibliography styles
- Natbib bibliography styles
- Natbib citation styles
- Biblatex bibliography styles
- Biblatex citation styles
Languages
- Multilingual typesetting on Overleaf using polyglossia and fontspec
- Multilingual typesetting on Overleaf using babel and fontspec
- International language support
- Quotations and quotation marks
- Arabic
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Korean
- Portuguese
- Russian
- Spanish
Document structure
- Sections and chapters
- Table of contents
- Cross referencing sections, equations and floats
- Indices
- Glossaries
- Nomenclatures
- Management in a large project
- Multi-file LaTeX projects
- Hyperlinks
Formatting
- Lengths in LaTeX
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Counters
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Footnotes
- Margin notes
Fonts
Presentations
Commands
Field specific
- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typesetting exams in LaTeX
- Knitr
- Attribute Value Matrices
Class files
- Understanding packages and class files
- List of packages and class files
- Writing your own package
- Writing your own class