-1

I want to display a figure (which has introduction blablablabatrtrtrt...) after the table, to do so I don't use the figure environment so that the figure stays in its place, but it's displayed before the table. Normally even if I have used the environment table it shouldn't influence on a float only paragraphs

\documentclass[review]{elsarticle}
\DeclareGraphicsExtensions{.pdf,.gif,.jpg}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
%%\usepackage{caption} % is loaded automatically by 'subcaption'
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % centered 'p' col.
%%\usepackage{natbib} % is loaded automatically by elsarticle doc class
\usepackage{subcaption}
\usepackage{framed}  % Framing content
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip}\usepackage{booktabs,multirow}

%% Load the next two packages *last*:
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}

\journal{Journal of \LaTeX\ Templates}

\bibliographystyle{elsarticle-num}

\begin{document}


\section{Introduction} 


 bhellohellohello\\hellohellohello\\
\begin{table}[!h]
\centering
\begin{tabular}{@{} c *{3}{C{0.45cm}} *{2}{C{1.69cm}} c c @{}} 
\toprule
Voltage N\textsuperscript{o} & \multicolumn{3}{c}{Switching states} & 
\multicolumn{2}{c}{Voltage output} & Magnitude & Phase \\   
\cmidrule(lr){2-4} \cmidrule(lr){5-6}
$V_n$ & $S_a$ & $S_b$ & $S_c$ & $V_{\alpha}$ & $V_{\beta}$ & 
$U_{\mathrm{ref}}$ & $\alpha$ \\ 
\midrule
$V_{0o}$ & 0 & 0    & 0    & 0 & 0                    & 0 & 0 \\
$V_{0p}$ & 1 & 1    & 1   & 0 & 0                    & 0 & 0 \\
$V_{0n}$ &  -1 &  -1    & -1    & 0 & 0                    & 0 & 0 \\
$V_{1p}$ & 1 & 0    & 0    & $U_{dc}/3$ & 0                    & $U_{dc}/3$ 
& 0 \\
$V_{1n}$ & 0 & -1 & -1 & $U_{dc}/3$ & 0                    & $U_{dc}/3$ & 0 
\\
$V_{2p}$ & 1 & 1    & 0    & $U_{dc}/6$ & $\sqrt{3}\,U_{dc}/6$ & $U_{dc}/3$ 
& $\pi/3$ \\
$V_{2n}$  &  0 &  0 &  -1 &  $U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & $\pi/3$ \\
$V_{3p}$  &   0 & 1 &  0 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{3n}$  &   -1 &  0 &  -1 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &   
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{4p}$  &   0 & 1 &  1 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{4n}$  &   -1 & 0 &  0 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{5p}$  &   0 &  0 &  1 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{5n}$  &   -1 &  -1 &  0 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{6p}$  &   1 &  0 &  1 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{6n}$  &   0 &  -1 &  0 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{7}$  &   1 &  0 &  -1 &  $U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & $\pi$/6 \\
$V_{8}$  &   0 &  1 &  -1 &  0 & $\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & $\pi$/2 \\
$V_{9}$  &   -1 &  1 &  0 &  -$U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 5$\pi$/6 \\
$V_{10}$  &   -1 &  0 &  1 &  -$U_{dc}$/2 & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 7$\pi$/6 \\
$V_{11}$  &   0 &  -1 &  1 &  0 & -$\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & 3$\pi$/2 \\
$V_{12}$  &   1 &  -1 &  0 &  $U_{dc}$/2  & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 11$\pi$/6 \\
$V_{13}$  &   1 &  -1 &  -1 &  2$U_{dc}$/3  & 0 &  2 $U_{dc}$/3 & 0 \\
$V_{14}$  &   1 &  1 &  -1 &  $U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & $\pi$/3 \\
$V_{15}$  &   -1 &  1 &  -1 &  -$U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 2$\pi$/3 \\
$V_{16}$  &   -1 &  1 &  1 &  -2$U_{dc}$/3  & 0 & 2$U_{dc}$/3 & $\pi$ \\
$V_{17}$  &   -1 &  -1 &  1 &  -$U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 4$\pi$/3 \\
$V_{18}$  &   1 &  -1 &  1 &  $U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 5$\pi$/3 \\
\bottomrule
\end{tabular}
\end{table} 

\begin{center}
\includegraphics[scale=0.500]{imagetest.png}
\end{center} 

\end{document}

enter image description here

Mensch
  • 65,388
twimo
  • 59
  • 3
    look I realise you are new to the site but this is ridiculous you can't just keep asking the same question over and over. You have specified that the table floats and the image is part of the main document flow, and that is what happens. This question and the example are identical to the previous two. If you do not want any floats to float past the image put \clearpage before the image. – David Carlisle Oct 20 '17 at 21:39
  • OK Sorry maybe the way I explain the problem isn't clear but when I use the \clearpage the paragraph doesn't flow and the table environment is used .Normally the paragraph should flow with keeping the image after the table. Anyway sorry again – twimo Oct 20 '17 at 21:59
  • you have put the image in the main text, it just acts like a big letter, so anything that applies between the floating table and text applies to that image. You could replace the \includegraphics by {\huge ABC} they will be positioned in exactly the same way. I would close this question as a duplicate but I fear you would just open a fourth so I flagged it for moderator attention instead. I urge you to read the top three answers to https://tex.stackexchange.com/questions/tagged/floats?sort=votes there really isn't anything that could be said to this question which isn't said already. – David Carlisle Oct 20 '17 at 22:04
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – samcarter_is_at_topanswers.xyz Dec 26 '17 at 13:09

1 Answers1

2

Well, to bring this to an end: I guess, you didn't read my edit of my answer to your second question. Please reread it, rethink it and then check the following MWE:

\documentclass[review]{elsarticle}
\DeclareGraphicsExtensions{.pdf,.gif,.jpg}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{showframe,blindtext}
\usepackage{longtable} % <==============================================
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
%%\usepackage{caption} % is loaded automatically by 'subcaption'
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % centered 'p' col.
%%\usepackage{natbib} % is loaded automatically by elsarticle doc class
\usepackage{subcaption}
\usepackage{framed}  % Framing contents
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip}\usepackage{booktabs,multirow}

%% Load the next two packages *last*:
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}

\journal{Journal of \LaTeX\ Templates}

\bibliographystyle{elsarticle-num}

\begin{document}

\blindtext

\begin{longtable}{@{} c *{3}{C{0.45cm}} *{2}{C{1.69cm}} c c @{}} % <=============
\toprule
Voltage N\textsuperscript{o} & \multicolumn{3}{c}{Switching states} & 
\multicolumn{2}{c}{Voltage output} & Magnitude & Phase \\   
\cmidrule(lr){2-4} \cmidrule(lr){5-6}
$V_n$ & $S_a$ & $S_b$ & $S_c$ & $V_{\alpha}$ & $V_{\beta}$ & 
$U_{\mathrm{ref}}$ & $\alpha$ \\ 
\midrule
$V_{0o}$ & 0 & 0    & 0    & 0 & 0                    & 0 & 0 \\
$V_{0p}$ & 1 & 1    & 1   & 0 & 0                    & 0 & 0 \\
$V_{0n}$ &  -1 &  -1    & -1    & 0 & 0                    & 0 & 0 \\
$V_{1p}$ & 1 & 0    & 0    & $U_{dc}/3$ & 0                    & $U_{dc}/3$ 
& 0 \\
$V_{1n}$ & 0 & -1 & -1 & $U_{dc}/3$ & 0                    & $U_{dc}/3$ & 0 
\\
$V_{2p}$ & 1 & 1    & 0    & $U_{dc}/6$ & $\sqrt{3}\,U_{dc}/6$ & $U_{dc}/3$ 
& $\pi/3$ \\
$V_{2n}$  &  0 &  0 &  -1 &  $U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & $\pi/3$ \\
$V_{3p}$  &   0 & 1 &  0 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{3n}$  &   -1 &  0 &  -1 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &   
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{4p}$  &   0 & 1 &  1 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{4n}$  &   -1 & 0 &  0 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{5p}$  &   0 &  0 &  1 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{5n}$  &   -1 &  -1 &  0 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{6p}$  &   1 &  0 &  1 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{6n}$  &   0 &  -1 &  0 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{7}$  &   1 &  0 &  -1 &  $U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & $\pi$/6 \\
$V_{8}$  &   0 &  1 &  -1 &  0 & $\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & $\pi$/2 \\
$V_{9}$  &   -1 &  1 &  0 &  -$U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 5$\pi$/6 \\
$V_{10}$  &   -1 &  0 &  1 &  -$U_{dc}$/2 & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 7$\pi$/6 \\
$V_{11}$  &   0 &  -1 &  1 &  0 & -$\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & 3$\pi$/2 \\
$V_{12}$  &   1 &  -1 &  0 &  $U_{dc}$/2  & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 11$\pi$/6 \\
$V_{13}$  &   1 &  -1 &  -1 &  2$U_{dc}$/3  & 0 &  2 $U_{dc}$/3 & 0 \\
$V_{14}$  &   1 &  1 &  -1 &  $U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & $\pi$/3 \\
$V_{15}$  &   -1 &  1 &  -1 &  -$U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 2$\pi$/3 \\
$V_{16}$  &   -1 &  1 &  1 &  -2$U_{dc}$/3  & 0 & 2$U_{dc}$/3 & $\pi$ \\
$V_{17}$  &   -1 &  -1 &  1 &  -$U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 4$\pi$/3 \\
$V_{18}$  &   1 &  -1 &  1 &  $U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 5$\pi$/3 \\
\bottomrule
\end{longtable} % <=====================================================

\blindtext

\begin{center}
\includegraphics[scale=0.500]{example-image}
\end{center} 

\blindtext
\end{document}

Then you will find---after compiling it---on page two first the table, followed by text, then the image. That is what you want I think? Please see, that I used longtable to get a table be able to break at a page end ...

The resulting page 2 is:

resulting page 2

Mensch
  • 65,388