I found a lot of related questions about Overfull \hbox
warning and tabularx
but none of them have helped me so far.
This is a minimal code which reproduces the warning (the real table isn't so ugly of course):
\documentclass[a4paper,11pt]{article}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{siunitx}
\setlength{\extrarowheight}{3pt}
\begin{document}
\begin{tabularx}{0.95\textwidth}{X S[table-format=2.0]}
\toprule
Text & 5 \\ \midrule
A & 51\% \\
B & 39\% \\
C & 30\% \\
D & 25\% \\
E & 20\% \\
F & 17\% \\
G & 8\% \\
H & 6\% \\
I & 3\% \\
\bottomrule
\end{tabularx}
\end{document}
and this is the output
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2014/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/tools/tabularx.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/tools/array.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/siunitx/siunitx.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/l3kernel/expl3-code.tex
(/usr/local/texlive/2014/texmf-dist/tex/latex/etex-pkg/etex.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/l3kernel/l3unicode-data.def)
(/usr/local/texlive/2014/texmf-dist/tex/latex/l3kernel/l3pdfmode.def))
(/usr/local/texlive/2014/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/beamer/translator/translator.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/beamer/translator/translator-lang
uage-mappings.tex))) (./main.aux)
(/usr/local/texlive/2014/texmf-dist/tex/latex/beamer/translator/dicts/translato
r-basic-dictionary/translator-basic-dictionary-English.dict)
(/usr/local/texlive/2014/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
)
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
Overfull \hbox (9.12502pt too wide) detected at line 25
\OT1/cmr/m/n/10.95 %
[1{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./main.aux) )
(see the transcript file for additional information)</usr/local/texlive/2014/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on main.pdf (1 page, 15096 bytes).
SyncTeX written on main.synctex.gz.
Transcript written on main.log.
The line 25 is \end{tabularx}
.
What I tried:
- use
\noindent
before openingtabularx
environment; - reduce the width of the table;
- use
\end{tabularx}{\parfillskip=0pt\par}
- change the column in
{@{}X@{}S[table-format=2.0]@{}}
.
Any help would be appreciated.