![図付きのA3ページをアクティブな参照付きのA4文書に挿入する](https://rvso.com/image/266407/%E5%9B%B3%E4%BB%98%E3%81%8D%E3%81%AEA3%E3%83%9A%E3%83%BC%E3%82%B8%E3%82%92%E3%82%A2%E3%82%AF%E3%83%86%E3%82%A3%E3%83%96%E3%81%AA%E5%8F%82%E7%85%A7%E4%BB%98%E3%81%8D%E3%81%AEA4%E6%96%87%E6%9B%B8%E3%81%AB%E6%8C%BF%E5%85%A5%E3%81%99%E3%82%8B.png)
前回の投稿の最初の回答に基づいて「アクティブな参照を含む 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}