TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to scale this too wide table, but I'm getting an error and unable to solve this problem at all. Here is the error: "! You can't use `\hrule' here except with leaders" on the caption line".

Here is a simplified file:

\documentclass[10pt, a4paper]{article}

\textwidth 16cm
\textheight 23.5cm
\headsep -2em
\headheight 0em
\evensidemargin 0cm
\oddsidemargin 0cm





\caption{The table}
\multicolumn{1}{|c|}{\textbf{1}} & \multicolumn{1}{|c|}{\textbf{2 }} & \multicolumn{1}{|c|}{\textbf{3}} & \multicolumn{1}{|c|}{\textbf{4}} & \multicolumn{1}{|c|}{\textbf{5}} & \multicolumn{1}{|c|}{\textbf{6}} & \multicolumn{1}{|c|}{\textbf{7}} & \multicolumn{1}{|c|}{\textbf{8}}\\

1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline


share|improve this question
\scalebox is a horizontal thing like \mbox so can not include display code such as \caption unless that is nested in a parbox or minipage. Just scale the tabular (and put % at the end of your lines {% and \end{tabular}%otherwise scalebox will do the wrong thing) – David Carlisle Jan 28 '14 at 16:26
also use \multicolumn{1}{c|}{\textbf{2 }} without the | on the left or you will get doubled rules, one from the right of the previous column. – David Carlisle Jan 28 '14 at 16:28
Another thing: Remember to make your example minimal the next time. – Svend Tveskæg Jan 28 '14 at 16:38

As David Carlisle has already noted in a comment, you can't resize both the caption and the tabular material via a \scalebox command. If you do need to reduce the size of the caption material by 20%, say, you could load the caption package and issue a command such as


because "footnotesize" is 20% smaller than "normalsize".

The following example does not include an adjustment to the size of the caption.

enter image description here

\usepackage{graphicx} % for \scalebox macro

\begin{document}    \begin{table}
\caption{The table}
\smallskip % get some separation between the caption and the tabular
\scalebox{0.8}{%  % 20% linear reduction of all items
\textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & 
\textbf{5} & \textbf{6} & \textbf{7} & \textbf{8} \\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.