
我經常嘗試將大表格或圖像放在橫向頁面的中央。使用該pdflscape
包我翻頁,但隨後我必須進行大量的播放和重新編譯才能弄清楚如何將物件放在中間(使用hspace
和vspace
)。居中它不起作用。這些物件通常比常規頁邊距允許的要大,因此在理想的情況下,我可以刪除頁邊距(我嘗試使用它,newgeometry
但實際上不起作用),並使用某種居中將其自動放在中間。有辦法嗎?另外,使用我目前的系統,我的標題仍然偏離中心。
\documentclass{article}
\usepackage{pdflscape}
\usepackage{graphicx}
\usepackage[top=1.7cm, left=2.1cm, right=2.1cm, bottom=3.7cm]{geometry}
\begin{document}
\begin{landscape}
\newgeometry{left=0.1cm,top=0.1cm,bottom=0.1cm,right=0.1cm}
\begin{figure}
\vspace*{-8.0cm}
\hspace*{-6.7cm}
\centering
\includegraphics[width=23cm]{black.jpg}
% Try for instance this image: http://i970.photobucket.com/albums/ae189/katiewilson1995/Untitled.jpg
\caption{Here is a caption that should go in the center}
\textit{(And this text should also be in the middle)}
\end{figure}
\restoregeometry
\end{landscape}
\結束{文件}
答案1
與景觀或圖像無關,如果您想要將比文字區塊更寬的內容居中,您需要隱藏其寬度。
\documentclass{article}
\usepackage{pdflscape}
\usepackage{graphicx}
\usepackage[top=1.7cm, left=2.1cm, right=2.1cm, bottom=3.7cm]{geometry}
\begin{document}
\begin{landscape}
\begin{figure}
\centering
\makebox[0pt]{\includegraphics[width=23cm]{black.jpg}}
% Try for instance this image: http://i970.photobucket.com/albums/ae189/katiewilson1995/Untitled.jpg
\caption{Here is a caption that should go in the center}
\textit{(And this text should also be in the middle)}
\end{figure}
\end{landscape}
\end{document}