
나는 종종 가로 페이지의 중앙에 배치하려고 하는 큰 테이블이나 이미지를 가지고 있습니다. 패키지를 사용하여 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}