I am finding it difficult to organise the content after using the {rotating} package along with \begin{sidewaysfigure}. The images jump over to the next section while the table gets displayed before the image. What should I be doing to control the sequence of the content. I 've tried adjusting the width to even 0.5\textwidth. that doesn't work. Here is the minimal working code sample

\usepackage[left=2in, right=1in, top=1in, bottom=1in]{geometry}
\usepackage{sectsty} %to customise headings
\usepackage{times} %this is for the selection of font
\usepackage{caption} \captionsetup[table]{singlelinecheck=false, margin=1em}





\section{Section 1}

        \includegraphics[ width=\textwidth , keepaspectratio ]{MainScreen.png}\\[-1em]
        \caption{Customer Login Screen}



    \captionof{table}{ \textbf {\small {Customer Login Screen}}} \label{table:2}

    \begin{tabularx}{\textwidth}{ | >{\ttfamily\raggedright\arraybackslash} s 
    | >{\ttfamily\raggedright\arraybackslash} t 
    | >{\ttfamily\raggedright\arraybackslash} t | }


    {\textbf{\textcolor{black}{{Sr. No.} \newline}}} & {\textbf{\textcolor{black}{{Input Element}}}} & \textbf{\textcolor{black}{{Description \& Behaviour}}} \\

    1.0 & Username Input Field & Textbox to accept registered username. Email ID or any other unique attribute shall not be accepted \\
    2.0 & Password Input Field & Textbox to accept password associated with the Username  \\
    3.0 & Submit Button & To post the Username and password entered by the user to the server  \\
    4.0 & Alert & To notify User of incorrect or empty Username and / or password or an expired User session  \\

        \includegraphics[ width=\textwidth , keepaspectratio ]{LoginValidation.png}\\[-1em]
        \caption{Customer Login Screen - Alert}

\section{Section 2}


I am using PDFLatex to compile using Texstudio. Would appreciate suggestions. Thanks!

  • Hello. Its depends on the size of the graphics(its alwasy not easy with many images and less test). Can you add the graphics? You can tr: The \cleardoublepage command ends the current page and causes all figures and tables that have so far appeared in the input to be printed. Maybe this command is too hard here...
    – Bobyandbob
    Feb 25 '17 at 11:23

As you define it in your text, the figures are floating elements (since you use the figure environment), whereas the tabular is a regular text element. Moreover, the images might have a size different from what you intend: setting the width (which will be the vertical extension) to \textwidth makes the images quite big, so they probably exceed the allowed percentage of a text that may be occupied by floats. Instead of fiddling with the placement parameters you can make the images also text elements, like that:

  \includegraphics[ width=\textwidth , keepaspectratio ]{example-image-a}\\
  \captionof{figure}{Customer Login Screen\label{fig:1}}

Note that the first \textwidth in the argument of minipage refers to the text width of the whole text, whereas the second one refers to the textwidth within the minipage.

  • Thanks a lot!. And I used width=\textheight instead of \textwidth to fit the images to the page. Feb 25 '17 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.