ドキュメントに横長図の PDF を含める

ドキュメントに横長図の PDF を含める

2 ページにわたる大きな図があり、これを LaTeX ファイルに含めたいと思っています。この図は外部 PDF であり、すでに横長形式になっています。 を介してテキストで図を参照できるようにしたい\refので、ラベルが必要です。以下のコードは問題なく動作しますが、 環境を使用するとすぐにfigure、画像の回転が間違っています (横長ではなくなります)。 を介して別の解決策を試しましたincludegraphicsが、画像が常に小さすぎます (そして、どういうわけか中央に配置されていません)。これを適切に行う方法はありますか?

\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}

私は図のリストは使用しないので、実際には図の環境である必要はありません。リンクして参照できれば十分です。ヒントがあれば大歓迎です。

編集: この場合、キャプションは不要であることに注意してください。基本的に、すでにキャプションが付いている画像を含める方法を探しています。ただし、テキストからリンクしたいのです。

答え1

これらを環境に含めてからlandscapeminipages を使用してキャプションが画像と同じページに表示されるように強制することができます。ただし、これでは全幅の包含にはつながりません。

\documentclass{article}
\usepackage[]{graphicx}
\usepackage{caption}
\usepackage{pdflscape}

\begin{document}

Figure \ref{fig:duck1} shows\ldots

\begin{landscape}
  \noindent
  \begin{minipage}{\linewidth}
    \centering
    \includegraphics
      [page=1,width=\linewidth,height=.95\textheight,keepaspectratio]
      {example-image-duck}
    \captionof{figure}{a duck\label{fig:duck1}}
  \end{minipage}
  \begin{minipage}{\linewidth}
    \includegraphics
      [page=2,width=\linewidth,height=.95\textheight,keepaspectratio]
      {example-image-duck}
    \captionof{figure}{another duck\label{fig:duck2}}
  \end{minipage}
\end{landscape}

\end{document}

ここに画像の説明を入力してください

後期編集:

次のコードでは、クリック可能なリンクが 2 つ生成され、PDF ビューアーは 2 羽のアヒルが配置されているページにジャンプします。

\documentclass{article}
\usepackage{pdfpages}
\usepackage[]{hyperref}

\begin{document}

\hyperlink{hyp:duck1}{the first duck} and 
\hyperlink{hyp:duck2}{the second duck}

\clearpage % important or else the first link is on the wrong page
\hypertarget{hyp:duck1}
  {\includepdf[pages=1,landscape=true]{example-image-duck}}
\hypertarget{hyp:duck2}
  {\includepdf[pages=2,landscape=true]{example-image-duck}}

\end{document}

関連情報