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.

  • 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

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}

Your Answer

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

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