2

I have this code in Latex

\begin{table}[!hbp]
  \begin{tabular*}{\linewidth}{| m{0.20\linewidth} | m{0.20\linewidth} | 
m{0.20\linewidth} | m{0.40\linewidth} |} 
    \hline  
    Title & Machine Name & Field Type & Widget \\
    \hline
    \hline
    Title & title & Node module element & (used from the module) \\
    \hline
    Activity Type & field\_activity\_type & Term reference & Check boxes/radio 
buttons \\
    \hline
    Contact & field\_contact & Link & Link \\
    \hline
  \end{tabular*}
  \caption{Activities field table}
  \label{Activities Table}
\end{table}

I am using the packages:

\documentclass[11pt, a4paper]{book}
\usepackage{color}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{url} 
\usepackage{style}
\usepackage{wrapfig}
\usepackage{tabularx}
\usepackage{array}
\usepackage[innercaption]{sidecap}

And I am getting the error

Underfull \vbox (badness 10000) has occured while \output is active []
Underfull \vbox (badness 1694) in paragraph
Underfull \hbox (badness 10000) in paragraph
Overfull \hbox (49.993pt too wide) in alignment

I added the m{} in this table in order to run away for the Overfull error I was getting before. It was the same as the one I am getting in this table:

\begin{table}[!hbp]
  \begin{center}
    \begin{tabular}{ l | l | l | l }
      Title & Machine Name & Field Type & Widget \\
      \hline
      \hline
      Title & title & Node module element & (used from the module) \\
      URL path settings &   path & Path module element & (used from the 
module) \\
      Tags & field\_tags & Term reference & Auto-complete term widget 
(tagging) \\
    \end{tabular}
  \end{center}
  \caption{Article fields table}
  \label{Article table}
\end{table}

that gives me the error:

Overfull \hbox (49.38527pt too wide) in paragraph

I think that I am having some problem with the size of the table. I just do not know how to make it fit the text without "bitching" about it. From my understanding If I do not set the width the table will be too big for the page. If i do set the width the text will be too little for the table.

Does anyone have any incites?

migrated from stackoverflow.com Nov 10 '13 at 3:47

This question came from our site for professional and enthusiast programmers.

1

An overfull \hbox means that there is a hyphenation or justification problem: moving the last word on the line to the next line would make the spaces in the line wider than the current limit; keeping the word on the line would make the spaces smaller than the current limit, so the word is left on the line, but with the minimum allowed space between words, and which makes the line go over the edge.

If the "overfull" word includes a forward slash, such as "input/output", this should be properly typeset as "input\slash output". The use of \slash has the same effect as using the "/" character, except that it can form the end of a line (with the following words appearing at the start of the next line). The "/" character is typically used in units, such as "mm/year" character, which should not be broken over multiple lines.

The warning can also be issued when the \end{document} tag was not included and/or was deleted.

example:

Overfull hbox [101] Overfull \hbox (9.11617pt too wide) in paragraph at lines 860--861 []\LY1/brm/m/n/10 Windows, \LY1/brm/m/it/10 see \LY1/brm/m/n/10 X Win-

The warning is given so that you can find the line in the code that originates the problem (in this case: 860-861) and fix it. The line on this example is too long by a shade over 9pt. The chosen hyphenation point which minimizes the error is shown at the end of the line (Win-). Line numbers and page numbers are given as before. In this case, 9pt is too much to ignore (over 3mm), and a manual correction needs making (such as a change to the hyphenation), or the flexibility settings need changing

1

Warning 1

Underfull \vbox (badness 10000) has occured while \output is active []

This refers to something happening during pagination, so it can only be marginally related to the table; it usually means that LaTeX had to stretch a page too much because a big object in the next page makes it impossible to output a good page.

Warning 2

Underfull \vbox (badness 1694) in paragraph

This might be due to sidecap, but it's difficult to say without more information (the style package you load is unavailable here).

Warning 3

Underfull \hbox (badness 10000) in paragraph

This is surely caused by the typesetting of one of the cells, because justification is difficult in narrow columns.

Warning 4

Overfull \hbox (49.993pt too wide) in alignment

Your table is too wide; the specification

| m{0.20\linewidth} | m{0.20\linewidth} | m{0.20\linewidth} | m{0.40\linewidth} |

calls for \linewidth plus eight times the \tabcolsep (LaTeX inserts \tabcolsep space at either side of a cell) and five times the \arrayrulewidth; since the normal value of the parameters is

\tabcolsep=6pt
\arrayrulewidth=0.4pt

the computation 6*6+5*0.4 gives a surplus of 50pt that corresponds to the found overfull (TeX uses binary arithmetic, so some rounding error is expected).

You'll be luckier by loading the calc package and taking into account the additional space:

\usepackage{calc}

and, in the document,

\begin{tabular}{
  |
  >{\raggedright}m{0.2\linewidth-2\tabcolsep-\arrayrulewidth}|
  >{\raggedright}m{0.2\linewidth-2\tabcolsep-\arrayrulewidth}|
  >{\raggedright}m{0.2\linewidth-2\tabcolsep-\arrayrulewidth}|
  >{\raggedright\arraybackslash}m{0.4\linewidth-2\tabcolsep-2\arrayrulewidth}|
}

Note tabular and not tabular* (which makes sense only if you add stretchable intercolumn space).

Of course field\_activity\_type will never fit in a fifth of the text width; TeX will not break it so it's up to you to find a remedy for this: probably adding a zero space after \_ so that a break point can be found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy