# Tables and Figures are appearing at the end of Chapter [duplicate]

My Table and Figures in Chapter 4 of my thesis are appearing at the end of chapter instead of within the text where I want them to appear. Before these table and figure everything is fine in this chapter and also in the previous chapters. The rest of the tables and figures (only from this chapter) are also appearing at the end of Chapter 4. Tables and figures in Chapter 5 and rest of the thesis are fine and they are appearing where I want them to be. Given below is the code for my table and figure which are causing trouble.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Table 4.3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[!t]
\centering % used for centering table
\caption{Abc..} % title of Table
{\normalsize}\setlength{\tabcolsep}{4pt}
\begin{tabular}{| c || p{5.25cm} | c || p{5.25cm} |}
\hline %inserts double horizontal lines
abc & abc & abc & abc \\ \hline \hline

$a$ & b & c & d \\
$a$ & b & c & d \\
$a$ & b & c & d \\
[1ex] % [1ex] adds vertical space
\hline %inserts single line
\end{tabular}
\label{table:nonlin} % is used to refer this table in the text
\end{table}

\begin{sidewaysfigure}[!t]%[htbp]
\centering
\makebox[\textwidth][c]{\includegraphics[width=0.85\textwidth, height=0.50\textwidth]{./Figures/Chapter4/4point7.pdf}}
\caption{xyz..}
\label{fig:awesome_image}
\end{sidewaysfigure}


Any help would be appreciated. Thank you.

• you have prevented the floats being placed on float pages by using [!t] which severely restricts the places where they are allowed and makes them going to the end more likely. unrelated but if you specify with and height to \includegraphics the image can be distorted, best to specify one or the other Mar 28 '15 at 10:08
• @David Thanks for the magic. It worked! About unrelated part, how can I get user defined width if I only define height or if I go other way around.
– mani
Mar 28 '15 at 10:15
• you can go texdoc usrguide and get a manual:-) If you add keepsapectratio then it's safe to use both (it just uses whichever is the limiting dimension) but normally you know in advance whether it s the height or width that you need to control (almost always, it's the width) Mar 28 '15 at 10:55
• Mar 28 '15 at 15:14
• @DavidCarlisle Answer, or dupe of some float-placement question? Dec 3 '16 at 22:23