I often have large tables or images that I try to put in the center of a landscape page. Using the pdflscape
package I turn the page, but I then have to do a whole lot of playing and recompiling to figure out how to put the object in the middle (with hspace
and vspace
). Centering it does not work. These objects are often larger than the regular page margins allow, so in an ideal scenario I can remove the page margins (which I try doing using newgeometry
but it doesn't really work), and use some sort of centering to put it automatically in the middle. Is there a way? Also, my caption remains off center using my current system.
\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{document}