풍경 그림 PDF를 문서에 포함

풍경 그림 PDF를 문서에 포함

라텍스 파일에 포함하고 싶은 2페이지가 넘는 큰 그림이 있습니다. 이 그림은 외부 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

이를 landscape환경에 포함시킨 다음 minipages를 사용하여 캡션이 이미지와 동일한 페이지에 있도록 강제할 수 있습니다. 하지만 이로 인해 전체 너비가 포함되지는 않습니다.

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

여기에 이미지 설명을 입력하세요

늦은 편집:

다음은 PDF 뷰어가 두 오리가 배치된 페이지로 이동하도록 하는 두 개의 클릭 가능한 링크를 생성합니다.

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

관련 정보