図付きのA3ページをアクティブな参照付きのA4文書に挿入する

図付きのA3ページをアクティブな参照付きのA4文書に挿入する

前回の投稿の最初の回答に基づいて「アクティブな参照を含む A4 文書に折りたたみ可能な A3 ページを挿入する」論文の A3 ページに図を表示しようとしましたが、期待どおりにいきませんでした。図がページの中央に配置されません。それ以外は正常に動作します。(出力例については以下を参照してください)。

私が希望するのは、A4 ページのように、画像をページの中央に配置し、キャプションを A3 ページの内側半分に配置することです。何かアイデアはありますか? また、ハイパーリファレンスも機能させる必要があります...

\usepackage[demo]{graphicx}
\usepackage{lipsum}

\usepackage{afterpage}
\usepackage{changepage}
\newenvironment{hugepage}%
 {\clearpage
  \pagestyle{empty}  % turn off display of page numbers, headers, ...

   \changepage{247mm}{370mm}{25mm}{15mm}{}{}{}{}{}} % switch to A3
 {\clearpage
  \changepage{160mm}{247mm}{25mm}{25mm}{}{}{}{}{}} % back to A4

\begin{document}

\afterpage{%
 \pdfpagewidth=2\pdfpagewidth
 \pagestyle{empty}
 \begin{hugepage}
   $\,$
  \begin{figure}[!t]

    \includegraphics[width=308mm,height=229mm,page=1]{figures/aaa.pdf}
    \caption{Left side image A3.}
  \end{figure}
 \end{hugepage}
}

\newpage

\afterpage{%
 \pdfpagewidth=2\pdfpagewidth
 \pagestyle{empty}
 \begin{hugepage}
   $\,$
  \begin{figure}[!t]

    \includegraphics[width=308mm,height=229mm,page=2]{figures/aaa.pdf}
    \caption{Right side image A3.}
  \end{figure}
 \end{hugepage}
}

\lipsum{3}
\end{document}

ページ 2 (A3 ページ) は次のようになります。 ここに画像の説明を入力してください

問題は、画像が中央揃えになっていないことです。キャプションは奇数ページと偶数ページの右側にありますが、偶数ページでは右側、奇数ページでは左側にある必要があります。

他に提案される解決策は次のとおりです。

変更のtextwidth(クラスが必要なのでオプションではありませんmemoir)。

KOMAスクリプトを使用する(その結果、画像も中央に配置されません。キャプションも中央に配置されますが、そうであるべきではありません)。コードは次のようになります。

\afterpage{% Insert after the current page
\clearpage
\KOMAoptions{paper=A3,paper=landscape,pagesize}
\recalctypearea
\begin{figure}[p]
\centering
   \includegraphics[width=308mm,height=229mm,keepaspectratio]{largeimage}%
   \caption{A large image which required A3}
\end{figure}
\clearpage
\KOMAoptions{paper=A4,pagesize}
\recalctypearea
}

ただし、ページ番号がおかしくなります。(3 ページを参照)

答え1

必要以上に複雑に見えていると思います。afterpage (または float) はまったく必要ありません。画像を配置して、\pdfpagwidth画像が A4 ページに切り取られないようにローカルで 2 倍にするだけです。

この方法の利点は、間隔コマンドを調整することで、水平位置と垂直位置を簡単に微調整できることです。

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

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\usepackage{capt-of,color}


\begin{document}


% \thispagestyle{empty}
 {\pdfpagewidth=2\pdfpagewidth
    \vspace*{-2cm}
    \noindent\kern.5\pdfpagewidth\rlap{\parbox{\textwidth}{%
    \noindent\kern.25\pdfpagewidth
        \llap{\includegraphics[width=308mm,height=229mm,page=1]{figures/aaa.pdf}}\endgraf
    \vspace{2ex}%
    \captionof{figure}{Left side image A3.}}}\kern-.5\pdfpagewidth
     \par
     \vspace*{-5cm}
\clearpage
%\thispagestyle{empty}
    \vspace*{-2cm}
    \noindent\parbox{\textwidth}{%
    \noindent\rlap{\includegraphics[width=308mm,height=229mm,page=2]{figures/aaa.pdf}}\endgraf
    \vspace{2ex}%
    \captionof{figure}{Right side image A3.}}
     \par
     \vspace*{-5cm}
\clearpage
}


\lipsum{3}
\end{document}

関連情報