旋转图像表

旋转图像表

我需要将图像表旋转 90 度:

\begin{figure}
\begin{tabular}{cccc}
\subfloat[caption]{\includegraphics[width = 4.5in]{K2E250ellisse.png}} &
\subfloat[caption]{\includegraphics[width = 4.5in]{K2E600ellisse.png}} \\
\subfloat[caption]{\includegraphics[width = 4.5in]{K4E250ellisse.png}}&
\subfloat[caption]{\includegraphics[width = 4.5in]{K4E600ellisse.png}} 

\end{tabular}
\caption{4 x 4}
\end{figure}

我尝试使用 adjustbox 但是它给出了错误:

\begin{adjustbox}{angle=90}
    \begin{figure}
    \begin{tabular}{cccc}
    \subfloat[caption]{\includegraphics[width = 4.5in]{K2E250ellisse.png}} &
    \subfloat[caption]{\includegraphics[width = 4.5in]{K2E600ellisse.png}} \\
    \subfloat[caption]{\includegraphics[width = 4.5in]{K4E250ellisse.png}}&
    \subfloat[caption]{\includegraphics[width = 4.5in]{K4E600ellisse.png}} 

    \end{tabular}
    \caption{4 x 4}
    \end{figure}
    \end{adjustbox}


    ! LaTeX Error: Not in outer par mode.

答案1

使用adjustbox时需要一个额外的内部盒子:

\documentclass{article}
\usepackage{adjustbox,subfig,graphicx}

\begin{document}

    \begin{figure}
    \begin{adjustbox}{angle=90}
    \begin{minipage}{0.9\textheight}  
    \begin{tabular}{cccc}
    \subfloat[caption]{\includegraphics[width = 2.5in]{example-image}} &
    \subfloat[caption]{\includegraphics[width = 2.5in]{example-image}} \\
    \subfloat[caption]{\includegraphics[width = 2.5in]{example-image}}&
    \subfloat[caption]{\includegraphics[width = 2.5in]{example-image}}
    \end{tabular}
    \caption{4 x 4} 
    \end{minipage}  
    \end{adjustbox}
    \end{figure}

\end{document}

相关内容