Girar una tabla de entrada sin girar la página

Girar una tabla de entrada sin girar la página

Obtengo un archivo de entrada table1.texque contiene una tabla (es decir, table1.texcomienza con \begin{table} ... \{table})

Me gustaría imprimir esta tabla en modo horizontal, pero sin rotar la página.

Lo intenté:

\begin{landscape}
\input{table1.tex}
\end{landscape}

pero esto rota toda la página.

Respuesta1

Si solo necesita rotar una mesa, intente usar adjustbox. Por cierto, su archivo de entrada debe contener un entorno tabular(no ):table

\documentclass{article}
\usepackage{adjustbox}
\begin{document}
\begin{adjustbox}{rotate=270}
\input{table1.tex} 
%table1.tex contains a tabular environment
%Input example:
%\begin{tabular}{l|l}
%This is & a table \\
%\end{tabular}
\end{adjustbox}
\end{document}

Si realmente necesita utilizar un tableentorno (con subtítulos y referencias), puede probar el siguiente código (nuevamente, evitando que tableaparezca dentro del archivo de entrada):

\documentclass{article}
\usepackage{adjustbox}
\begin{document}
\begin{adjustbox}{addcode={\begin{minipage}{\width}}{\caption{yourcaptions}\end{minipage}},rotate=270,center,float=table}
\input{table1.tex}
%Input example:
%\begin{tabular}{l|l}
%This is & a table \\
%\end{tabular}
\end{adjustbox}
\end{document}

información relacionada