圖頁「最好」在偶數頁上浮動

圖頁「最好」在偶數頁上浮動

在一本書中,我有一些人物,它們太大了,以至於它們有自己的[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}

相關內容