図ページは「できれば」偶数ページに浮かせる

図ページは「できれば」偶数ページに浮かせる

本の中に、図がいくつかあり、それらは非常に大きいため、独自の [p] ページが割り当てられています。可能であれば (たとえば、次の章の制限やその他の意味論によって)、図を偶数ページ (左側) に配置したいと考えています。図をそこに配置するように強制することはできますが、そうすると図の配置に関する他のすべてのルールが無視されます。図をページに配置する方法はありますか?好む偶数ページ?

答え1

次の文書では、フロートを2、3、5、7ページに配置します。

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

しかし、示されている定義を追加すると、奇数ページのフロートページの選択が延期され、2、4、6ページに配置されます。

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

\documentclass{article}
\let\eject\relax% just in this example

\makeatletter
\def\@floatplacement{\global\@topnum\c@topnumber
    % Textpage bit, global:
   \global\@toproom \topfraction\@colht
   \global\@botnum  \c@bottomnumber
   \global\@botroom \bottomfraction\@colht
   \global\@colnum  \c@totalnumber
    % Floatpage bit, local: don't let floats on to odd numbered p pages
   \@fpmin   \ifodd\c@page\maxdimen\else\floatpagefraction\@colht\fi
 }
 \makeatother
\begin{document}

\input{story}

\begin{figure}[p]
  \centering
  \write300{float on page \thepage}
  \rule{3cm}{12cm}
  
  \caption{a figure}
\end{figure}

\input{story}



\begin{figure}[p]
  \centering
  \write300{float on page \thepage}
  \rule{3cm}{12cm}
  
  \caption{a figure}
\end{figure}

\input{story}



\begin{figure}[p]
  \centering
  \write300{float on page \thepage}
  \rule{3cm}{4cm}
  
  \caption{a figure}
\end{figure}

\input{story}


\begin{figure}[p]
  \centering
  \write300{float on page \thepage}
  \rule{3cm}{8cm}
  
  \caption{a figure}
\end{figure}

\input{story}\input{story}


\begin{figure}[p]
  \centering
  \write300{float on page \thepage}
  \rule{3cm}{4cm}
  
  \caption{a figure}
\end{figure}


\begin{figure}[p]
  \centering
  \write300{float on page \thepage}
  \rule{3cm}{4cm}
  
  \caption{a figure}
\end{figure}

\input{story}\input{story}


\end{document}

関連情報