
私は、この件で LaTeX と格闘しています。文書の 2 番目の列の上部に小さな図 1 を配置し、ページの下部に幅の広い図 2 を配置したいのですtwocolumn
。次の MWE は、このことを示しています。
\documentclass[twocolumn]{article}
\usepackage{stfloats}
\usepackage{lipsum}
%\renewcommand{\topfraction}{0.1}
\begin{document}
\global\csname @topnum\endcsname 0
\lipsum[1]
\begin{figure}[t]
\caption{Fig. 1!}
\end{figure}
\begin{figure*}[b]
\caption{Fig. 2!}
\end{figure*}
\lipsum[2-6]
\end{document}
しかし、何を試してもうまくいかないようです。図1が最初の列の一番上に表示され、幅の広い図2が2ページ目に表示されます。これは、
- 幅の広い図形が最初の列の早い段階で現れること、そして
- 小さな数字は最初の列には表示できませんが、そうであればその列に表示されます。
回避策はありますか?フロートを配置したら、番号付けを修正できることは知っています(https://tex.stackexchange.com/a/356902/30810) ですが、まずは位置を正しく設定する必要があります。
アップデート: 参考になれば幸いです。問題はドキュメントの最後のページで発生します。
答え1
環境figure*
は内容を場所の先頭に配置し、オプションの引数は機能しません。環境\InsertBoxC
にネストされた を(バンドル)strip
から試すことができます。 は、一種のローカルな 1 列環境です。cuted
sttools
strip
\documentclass[twocolumn]{article}
\usepackage{stfloats}
\usepackage[unskipbreak]{cuted}
\usepackage{lipsum}
\usepackage{graphicx, caption}
\input{insbox}
\renewcommand{\topfraction}{0.4}
\begin{document}
\lipsum[1-2]
\begin{figure}[!t]
\centering\includegraphics[scale=0.5]{Nightmare_Fussli}
\caption{Nightmare (\emph{Henry Fuseli})}
\end{figure}
\lipsum[3-4]
%
\begin{strip}
\InsertBoxC{
\includegraphics[scale =0.8]{SanRomano-all}}
\captionof{figure}{The Battle of San Romano (\emph{Paolo Uccello})}
\end{strip}
\lipsum[4-8]
\end{document}
答え2
これを試してみました。ひどいハックのように見えますが、私はこれで我慢できます。
\documentclass[twocolumn]{article}
\usepackage{mwe,lipsum}
% Solution:
\usepackage{capt-of}
\newcommand{\figureTwo}[1]{\makebox[0pt][l]{\raisebox{-#1}[0pt][0pt]{\parbox{\textwidth}{
\centering
\includegraphics[scale=0.5]{example-image-16x9}
\captionof{figure}{Caption}
\label{fig:Label}
}}}}
% for Calibration:
\usepackage{stfloats}
\begin{document}
\global\csname @topnum\endcsname 0
\lipsum[1]
\begin{figure}[t]
\caption{Fig. 1!}
\end{figure}
\enlargethispage{-10\baselineskip}
% compare with and without - same thing!
\noindent\figureTwo{10cm}\indent
\lipsum[2-5]
%\end{document}
\cleardoublepage
Calibration:
\begin{figure*}[b]
\centering
\includegraphics[scale=0.5]{example-image-16x9}
\captionof{figure}{Caption}
\end{figure*}
\end{document}
\figureTwo
左の列の段落の先頭で呼び出す必要があります。\makebox
結果の幅がゼロ(そして一行の高さ)であることを確認します。\raisebox
図を適切な位置に垂直に移動します。他の2つのボックスのどちらでも機能しない\parbox
ため必要です(比較してください\captionof
\captionof ボックス内)。この組み合わせを簡素化できれば、私もそうしたいと思います :)
キャリブレーションは、両方のページをコンパイルし、Inkscape にインポートし、両方の図の垂直オフセットを測定し、10cm
それに応じてパラメータを調整することで機能します。ドキュメントが本当に完成したら実行する必要があります。