# Forcing a table or image on a specified page

I would like to enforce a table on a page.

I tried \startpostponing[2] but it doesn't seem to work and gives me an error:

Undefined control sequence \startpostponing


Is there any other way by which, I could force my table to occur on a particular page.

P.S I also tried \afterpage{}, but it didn't work as well.

Edit: My code:

        \documentclass[12pt,oneside, paper=a4,pagesize=pdftex, liststotoc, bibtotoc]{scrartcl}
%Einstellungen der Seitenrnder
\usepackage{graphicx}
%Umlaute ermglichen
\usepackage[latin1]{inputenc}
\usepackage{color}
%\usepackage[printonlyused]{acronym}
\usepackage{cite}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{setspace}
\usepackage{amssymb}
\usepackage{wrapfig}
\usepackage[tight,TABTOPCAP]{subfigure}
\usepackage{float}
\usepackage{epstopdf}
\definecolor{orange}{rgb}{1,0.5,0}
\usepackage[T1]{fontenc}
\usepackage{algorithmic}
\usepackage{amsmath}
%-------------------------------------------------------------------------
% macros - newly defined by htrsek
\newcommand{\todo}[1]{\textcolor{red}{\textbf{TODO: #1}}}
\newcommand{\comment}[2]{\textcolor{orange}{\textbf{\textit{\textless Comment (#1): #2\textgreater}}}}
\newcommand{\inprogress}[3]{\textcolor{blue}{\textbf{InProgress: #1}}}
\newcommand{\translate}[4]{\textcolor{green}{\textbf{(#1)}}}
\newcommand{\flexWARE}{\textsuperscript{flex}WARE }
\newcommand{\thedate}{\today}
%[BC] Using the listing package for source code embedding.
\usepackage{listings} \lstset{numbers=left, numberstyle=\tiny, numbersep=5pt} \lstset{language=Perl}

%PDF Kram
\usepackage[%
pdftitle={something},% Titel des PDF Dokuments.
pdfauthor={someone},%Autor des PDF Dokuments.
pdfsubject={something},%Thema des PDF Dokuments.
pdfcreator={MiKTeX, LaTeX, hyperref, KOMA-Script},%Erzeuger des PDF Dokuments.
pdfkeywords={project title},% auch fr PDF
pdfpagemode=UseOutlines,% Inhaltsverzeichnis anzeigen beim
%pdfdisplaydoctitle=true,%Dokumenttitel statt Dateiname
pdflang=en%Sprache des Dokuments.
]{hyperref}

\definecolor{hellgelb}{rgb}{1,1,0.8}
\definecolor{colKeys}{rgb}{0,0,1}
\definecolor{colIdentifier}{rgb}{0.4,0.4,0.4}
\definecolor{colString}{rgb}{1,0,0}
\definecolor{blue}{rgb}{0,0,1}

\hypersetup
{
urlcolor=LinkColor,%     Farbe von URL's im Dokument.
bookmarksnumbered=true%  Überschriftsnummerierung im PDF Inhalt anzeigen.
}
%Zeilenabstand 1.2
%Kopf- und Fusszeile
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
%Kopfzeile rechts bzw. aussen
%Linie oben
\fancyfoot[L]{\textsf{Something}}
%Fusszeile rechts bzw. aussen
\fancyfoot[R]{{\textsf{\pagemark}}}
%Linie unten
\renewcommand{\footrulewidth}{0.5pt}
\setlength{\parindent}{0pt}

%Setup for listings.
\lstset{basicstyle=\small}
\lstset{language=C}

\newtheorem{Def}{Definition}
\begin{document}
\thispagestyle{empty}

\newpage
\pagenumbering{arabic}

\thispagestyle{empty}
\mbox{}

\newpage
\renewcommand{\thepage}{\roman{page}}
\section*{Affirmation}
\newpage
\section*{Abstract}

\newpage

\section*{Acknowledgements}

\newpage

\setcounter{tocdepth}{3}
\tableofcontents

\newpage

\afterpage{
\clearpage
\begin{landscape}
\begin{table}[p!]
\begin{center}
\rowcolors{1}{thistle}{lightblue}
\begin{tabular}{ | p{4cm} | p{5cm} | p{5cm} | p{4.5cm} |}
\hline

My table

\hline
\end{tabular}
\end{center}
\end{table}
\end{landscape}
\clearpage

\clearpage
\begin{landscape}
\begin{table}[h]
\begin{center}
\rowcolors{1}{thistle}{lightblue}
\begin{tabular}{ | p{4cm} | p{5cm} | p{5cm} | p{4.5cm} |}
\hline
\hiderowcolors \textbf{Examples} & \textbf{How it works} & \textbf{Technologies} & \textbf{On the market} \\ \hline \showrowcolors

Table2

\\ \hline
\end{tabular}
\caption{Examples of IoT.}
\end{center}
\end{table}
\end{landscape}
\clearpage
}

\end{document}

-
If you want it in a particular position just use tabular wrapping that tabular in \begin{table} tells latex to move it to somewhere convenient for page breaking. If you don't tell LaTeX to move it, it won't move. –  David Carlisle Jan 23 '13 at 15:26
@DavidCarlisle I am using Tabular, and it didn't bring any luck. –  Kishore pandey Jan 23 '13 at 15:47
The idea is that you generate a minimal small (but complete) example that shows the problem. But as I said in the first comment the only reason for using begin{table} is to allow latex to move the table. In particular using [h] makes it highly likely that the float goes to the end as it's main effect is to stop latex using t top ppage float or b bottom. –  David Carlisle Jan 23 '13 at 15:58
Please fix your example if you run it it produces ! Undefined control sequence. l.117 \afterpage {! LaTeX Error: Environment landscape undefined. l.119 \begin{landscape} ? ! Undefined control sequence. l.122 \rowcolors {1}{thistle}{lightblue} ? –  David Carlisle Jan 23 '13 at 16:04
Related (duplicate?): tex.stackexchange.com/q/9485/21591 –  mafp Jan 23 '13 at 16:12

The boxhandler package can do what you want. [Note I edited this one day after the first post, offering an improved version that requires no user intervention other than defining in advance on which pages the figures should appear.] In this MWE I give below, the figures will appear on pages 1, 3, and 4, as defined in the preamble to the document.

\documentclass{article}
\usepackage{ifthen}
\usepackage{boxhandler}
\holdFigures
\bxfigure{Here is my caption}
{\fbox{Here is my figure material}}
\bxfigure{Here is my another caption}
{\fbox{Here is some more figure material}}
\bxfigure{Here is my third caption}
{\fbox{Here is yet more figure material}}
\newcommand\checkpage{\ifthenelse%
{\equal{\csname figpage\roman{figure}\endcsname}{\thepage}}%
{\nextFigure[t]}{}}
\let\parsave\par
\def\par{\parsave\checkpage}
\def\figpage{1}
\def\figpagei{3}
\def\figpageii{4}
\begin{document}
The \textsf{boxhandler} package has figure (and table) deferral options.
By using \verb|\holdFigures|, figures may be defined but are not output.
They are only output with a \verb|\nextFigure| or if you want the
backlog cleared out, with \verb|\clearFigures|.

Note that in this MWE, I first create all the figures in the
preamble using the \verb|\bxfigure| command, with
\verb|\holdFigures| active.  I have created a command
\verb|\checkpage| which is automatically invoked with every
\verb|\par|.  If the page is a predefined value, the next figure is
printed.  To predefine what pages the figures will printout, the
user need merely define the variables, using a roman suffix of
(figure$- 1$)\\

\noindent
\verb|\def\figpage{1}   % First  figure on page 1|\\
\verb|\def\figpagei{3}  % second figure on page 3|\\
\verb|\def\figpageii{4} % third  figure on page 4|\\
\verb|...|

Notice in this document that nowhere, after \verb|\begin{document}|
is a figure call invoked anywhere.  Yet the figures show at their
assigned locations.

\clearpage
Here is text

\clearpage
more text

\clearpage
still more text

\end{document}
`

Here is a snapshot of the top of page 1

-