
大きな表や画像を横長のページの中央に配置しようとすることがよくあります。 パッケージを使用して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}
\end{ドキュメント}
答え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}