짝수 페이지에서 그림 페이지 부동 "바람직하게"

짝수 페이지에서 그림 페이지 부동 "바람직하게"

책에는 너무 커서 자신만의 [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}

관련 정보