4

I'm commenting a paper inside the margin, but for one comment the margin is too small. Different from Fermat's Last Theorem I'd like to insert a float page with my long comment.

I can't alter the layout and the page breaks breaks of that paper. So I can't simply use [t] for positioning, I need a float page with nothing on it except my text.

MWE:

\documentclass{scrartcl}

\usepackage{blindtext}

\begin{document}
\blindtext

\begin{itemize}
  \item \blindtext
  \begin{figure}[p]
    \blindtext
    \caption{Text should be on next page}
    \label{fig:nextpagefigure}
  \end{figure}
  
  \item \blindtext
\end{itemize}

\blindtext[5]

\end{document}

How can I make the figure with my comment appear on the very next page and this next page be a float page, without any other text than the figure?

I know I can use the package placeins and the command \FloatBarrier. But if the text changes, I need to correct the place of the this command and \FloatBarrier causes a pagebreak frequently.

Probably my description isn't really clear, but I'll watch the comments...

1

2 Answers 2

3

You can use shipout hooks

\documentclass{scrartcl}

\usepackage{blindtext}

\begin{document}
\blindtext

\begin{itemize}
  \item \blindtext
  \AddToHookNext{shipout/after}{%
    \RawShipout\vbox{Text on next page: \blindtext}
   }
  \item \blindtext
\end{itemize}

\blindtext[5]

\end{document}
1
  • Just two commands which are already defined, no extra package. And an extra, which is helpful for me: the inserted page is not numbered.
    – Keks Dose
    Commented Apr 29 at 14:57
3

You can use, e.g., package afterpage:

\documentclass{scrartcl}
\usepackage{afterpage}
\usepackage{blindtext}

\begin{document}
\blindtext

\begin{itemize}
  \item \blindtext\afterpage{\clearpage}
  \begin{figure}[p]
    \blindtext
    \caption{Text should be on next page}
    \label{fig:nextpagefigure}
  \end{figure}
  
  \item \blindtext
\end{itemize}

\blindtext[5]

\end{document}

or maybe better:

\documentclass{scrartcl}
\usepackage{afterpage}
\usepackage{blindtext}

\begin{document}
\blindtext

\begin{itemize}
\item \blindtext
  \afterpage{%
    \begin{figure}[p]
      \blindtext
      \caption{Text should be on next page}
      \label{fig:nextpagefigure}
    \end{figure}
    \clearpage
  }
  
  \item \blindtext
\end{itemize}

\blindtext[5]

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .