Tried all the forums and questions but could not find one that answered.

I am in latex trying to caption some tables.

I have tables that I have in some instances rotated, and others scaled. They are tables I have imported, not written in latex (they're from python/pandas)

Eg of rotated table code:


And here is the one I resize

        \input{abs hypothesis tables/firsthypothesistable_a}

I've tried a handful of things to caption these tables (i.e., 'Table x: table of bla bla'), without success. Any help welcome :(

  • Please make your code snippets be compilable, then we do not have to guess what you are doing ...
    – Mensch
    Aug 15, 2022 at 16:29
  • Why don't you use the sidewaystable environment, after you've loaded the rotating package?
    – Bernard
    Aug 15, 2022 at 16:33
  • \caption needs to be inside a minipage, \parbox or \vbox, something with a width. You should probably add \centering before the tabular inside th minipage as well. Aug 15, 2022 at 17:24
  • See also tex.stackexchange.com/questions/399557/… Aug 15, 2022 at 18:23

1 Answer 1


IIRC, sidewaystable takes up the whole page.


    yada & yada & yada\\
  \end{tabular}}% measure width
\rotatebox{90}{\begin{minipage}{\wd0}% use width of tabular
  \caption{This is the caption}

  • John Thanks so much for this!! Really appreciate Aug 26, 2022 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .