I have a large figure over 2 pages which I would like to include into my latex file. This figure is an external PDF and in landscape format already. I want to be able to reference the figure in the text via \ref
, so it needs a label. The code below works fine, but as soon as I use the figure
environment, the rotation of the image is wrong (no landscape anymore). I tried an alternative solution via. includegraphics
, but the image was always too small (and somehow not centered). Is there any way to do that properly?
\documentclass{article}
\usepackage{pdfpages}
\begin{document}
Figure \ref{fig:document} shows\ldots
\begin{figure}[h!]
\includepdf[pages=1,landscape=true]{Figure1.pdf} % exemplary landscape figure, 2 pages long
\label{fig:document}
\end{figure}
\end{document}
It doesnt really have to be a figure environment, as I do not use a list of figures. I just need to be able to link to it and reference it. Any hints highly appreciated.
Edit: Please note, in this case, a caption is not necessary. I am basically looking for a method to include a picture that already has a caption. But I want to link it from the text.
figure
environment can't span several pages. Therefore you should use thecapt-of
package (orcaption
if you already use it for something else) and the\captionof{figure}{<caption>}
command.\captionof{figure}{<caption>}
, that's it? Maybe you could make a full example? I don't fully understand how to use the command. It throws errors atm when I am trying.\usepackage{capt-of}
or\usepackage{caption}
in the preamble?\usepackage{caption}
\includepdf
is not meant to produce something with a caption..