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

Is is possible to resize a table imported from another table without having to modify the LaTeX code in the file from which the table is imported? I was thinking of something like:

\usepackage[margin = 1.5 cm, tmargin=1.5 cm]{geometry} 




The table in the file DS.tex looks like the following:

% ...

I got as expected the error : ! LaTeX Error: Not in outer par mode.

I would like to know whether it is possible to resize the table in DS file without modifying it.

share|improve this question
Yes, did you try it? If you have an error then ask about that error (and supply a test file that demonstrates the problem) – David Carlisle Mar 23 '14 at 11:41
Note you are missing a % after the input, and the file needs top contain a tabular not a table environment. – David Carlisle Mar 23 '14 at 12:25
up vote 5 down vote accepted

A floating environment (table, figure, ...) cannot put into an \hbox or \scalebox that internally uses \hbox. However the environment can be redefined locally:


\ignorespaces and \unskip remove spaces by line ends in the file DS.tex that does matter in horizontal mode. An alternative is using \endlinechar=-1\relax, but this depends on the contents of the tabular environment, because some line ends might not be unwanted (e.g. space between words).

The floating environment can be inserted afterwards, e.g.:

  \caption{Table caption}
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.