7

Is there a way that I can force a table to be printed in an even-numbered page? One thing that comes to mind is to print a blank page before it if the table happens to be in an odd page but this makes the document very unprofessional and discontinuous.

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\pagestyle{plain}

\lipsum[1-10]

\begin{center}
    \begin{tabular}{|c|c|}
    \hline test11 &  test12\\ 
    \hline  test21&  test22\\ 
    \hline 
    \end{tabular} 
\end{center}

\end{document}
Mico
  • 506,678

1 Answers1

6

An example using the information from here:

\documentclass{article}
\usepackage{lipsum,ifthen,changepage,afterpage}
\usepackage[margin=1in]{geometry}
\newcommand{\mytable}{% sample table
    \begin{center}
    \begin{tabular}{|c|c|}
    \hline  test11&  test12\\ 
    \hline  test21&  test22\\ 
    \hline 
    \end{tabular} 
    \end{center}
 }
\begin{document}       
\lipsum[1-10]

\checkoddpage \ifoddpage % if currently on an odd-numbered page, defer execution \afterpage{ \mytable } \else % else, insert table immediately \mytable \fi

\lipsum[1-10] \end{document}

David Carlisle
  • 757,742