# Positioning tables and figures at the end of the respective caption list

My landscape tables are appearing in the body of the text whereas portrait tables are appearing at the end of the file. Please help me to remove the figures and tables from the text of my file and place them at the end of the file, after the tables and figure caption list. I am enclosing the code.

\documentclass[Journal,letterpaper]{ascelike-new}

\usepackage[utf8]{inputenc}
\usepackage{graphicx} %Allows to import images
\usepackage{float} %Allows for control of float positions
\graphicspath{ {images/} }

%Tables preamble
\usepackage[none]{hyphenat} %Stops breaking up words in a table
\usepackage{array}
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}} \newcolumntype{^}{>{\currentrowstyle}} \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1} #1\ignorespaces} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{pdflscape} \usepackage{lscape} \usepackage{rotating} % Provides {sideways}{sidewaysfigure}{sidewaystable} environments \usepackage[figurename=Fig.,labelfont=bf,labelsep=period]{caption} \usepackage{caption} \usepackage{subcaption} \captionsetup{compatibility=false} \usepackage{amsmath} \usepackage{siunitx} \usepackage{newtxtext,newtxmath} \usepackage[colorlinks=true,citecolor=black,linkcolor=black]{hyperref} \usepackage{enumerate}% http://ctan.org/pkg/enumerate %%Tables preamble \usepackage[none]{hyphenat} %Stops breaking up words in a table \usepackage{array} \usepackage{booktabs} \usepackage{multirow} \usepackage{longtable} \usepackage{lipsum} % just for dummy text- not needed for a longtable %Flowchart \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \NameTag{Singh, \today} \begin{document} The range of Strain transducer was +/- 4000 micro-strain, sensitivity = 500 micro-strain/Vout/Vext with accuracy < +/- 1 percent. Based on theoretical simulation of the bridge using MATLAB, strain gages were placed at critical locations as shown in Fig. \ref{fig:sensorloc}. %\begin{landscape} %\begin{figure}[p !] \begin{sidewaysfigure} \centering \includegraphics[width=\columnwidth]{sensor_loc} \caption{Location of sensors} \label{fig:sensorloc} \end{sidewaysfigure} %\end{figure} %\end{landscape} \section{Observations and calculations} The details of trains for which strains have been measured have been shown in Table \ref{tab:train_run}. \begin{table} \centering \caption{Details of trains instrumented for Fatigue life estimation} \label{tab:train_run} \begin{tabular}{$p{0.6in}^p{.2in}^p{1.8in}^p{1.2in}^p{.4in}^p{1in}}
\hline\hline
Date&   Run No& Train details&  Engine details& Time (Hrs)& Speed (Kmph) \\
\hline
18.06.16&   1&  59 BOXN Empty Goods&    27540WAG7&  13:03&  20 to 5 to 20 \\
-do-&  2&  12347 Up Howrah Rampurhat Exp&  16225R/WDM3A&   13:35&  20 \\
-do-&  3&  12369 Up Upasana Exp&   22650/WAP4& 14:18&  20 \\
-do-&  4&  11448 Up Shaktipunj Exp&    22531/WAP4& 14:26&  20 \\
-do-&  5&  59 BXNHS Loaded Goods&  27537/WAG7& 14:46&  20 \\
19.06.16&   1&  13151 Up Jammu Tawi Exp&    22906/WAP4& 13:19&  20 \\
-do-&  2&  12347 Up Howrah Rampurhat Exp&  14006R/WDM3A&   13:28&  20 \\
-do-&  3&  58 BOXN Loaded Goods&   24693/WAG9& 14:00&  5 to 20 \\
\hline\hline
\end{tabular}
\end{table}
%
\begin{longtable}{$p{1in}^p{1in}^p{1in}^p{1in}^p{1in}} \caption{Cumulative GMT of Up Howrah-Barddhaman Chord line between Saktigarh and Barddhaman} \label{tab:GMT} \\ \hline\hline Year &Annual GMT&Annual GMT per line&Cum GMT\\ \hline 1996-97& 38& 19& 480.155\\ 1997-98& 41& 20.5& 500.655\\ 1998-99& 42& 21& 521.655\\ 1999-00& 42& 21& 542.655\\ 2000-01& 40& 20& 562.655\\ 2001-02& 43& 21.5& 584.155\\ 2002-03& 42& 21& 605.155\\ 2003-04& 42& 21& 626.155\\ 2004-05& 44& 22& 648.155\\ 2005-06& 47& 23.5& 671.655\\ 2006-07& 46& 23& 694.655\\ 2007-08& 50& 25& 719.655\\ 2008-09& 58& 29& 748.655\\ 2009-10& 62& 31& 779.655\\ 2010-11& 63& 31.5& 811.155\\ 2011-12& 60& 30& 841.155\\ 2012-13& 62& 31& 872.155\\ 2013-14& 63& 31.5& 903.655\\ 2014-15& 63& 31.5& 935.155\\ 2015-16& 63& 31.5& 966.655\\ \hline\hline \multicolumn{5}{l}{Note: Data obtained from Track Modernization Cell of Eastern Railway} \end{longtable} Sample calculation of effective cycles for the critical member i.e. cross girder (Strain gauge no. 2289) has been furnished in Table \ref{tab:SampleCalc}. \begin{table} \centering \caption{Sample calculation of effective cycles for cross girder} \label{tab:SampleCalc} \begin{tabular}{$p{0.6in}^p{1.8in}^p{1.5in}^p{1.5in}}
\hline\hline
Stress range in N/mm2&No. of observed effective cycles from Rain flow histogram (say a)&No. of modified effective cycles (ni) = ax(68/8)x1.4)&No. of theoretical cycles (Ni) as per S-N curve x $10^6$ \\
\hline
0-10&   117&    1392&   3990.00 \\
10-20&  91& 1083&   498.75 \\
20-30&  1&  11.9&   147.78 \\
30-40&  2&  23.8&   62.34 \\
40-50&  2&  23.8&   31.92 \\
\hline\hline
\end{tabular}
\end{table}

From Table \ref{tab:reslifeeuro3}, it is seen that stringers (after replacement) are still the critical members from fatigue considerations with residual fatigue life of 169 years.

\begin{sidewaystable}[]
\centering
\caption{Calculation of residual life from Fatigue considerations using S-N curve in Eurocode 3}
\label{tab:reslifeeuro3}
\begin{tabular}{lllllllllllllll}
\hline\hline
\multirow{3}{*}{Member}       & \multirow{3}{*}{Strain} &     \multicolumn{5}{c}{Observed ni for 8 trains (5 Pass + 3 Goods)} & \multicolumn{5}{c}{Equated for 68 trains (48 Pass + 20 Goods)} & {Damage} & {Total} & {Residual} \\
&                                   &  0-10          & 10-20           & 20-30          & 30-40         & 40-50         & 0-10            & 10-20          & 20-30          & 30-40         & 40-50         &          {per}                                           &  {life}       & {life}  \\
& Gauge                                  & 35563          & 1111          & 146.35        & 34.73         & 11.38        & 35563            & 1111 & 146.35         & 34.73       & 11.38       &       {Day(D)} \\
\hline
\multirow{1}{*}{Top chord}    & 2897                                                                                     & 125           & 4               & 3              & 1             &               & 1488          & 47.6           & 35.7           & 11.9          & 0             & 0.3426                                         & 2399             & 2307  \\
Vertical                      & 2895                                                                                      & 18            &                 &                &               &               & 214.2           & 0              & 0              & 0             & 0             & 0                                        & -  & -                                                      \\
\multirow{1}{*}{Diagonal}     & 2892                                                                                      & 92            & 1               & 2              &               &               & 1095          & 11.9           & 23.8           & 0            & 0             & 0                                         & -      & -  \\
\multirow{1}{*}{End raker}    & 2829                                                                                      & 36            & 0               & 2              & 1             &               & 428.4           & 0              & 23.8           & 11.9          & 0             & 0.3426                                         & 2399     & 2307 \\
\multirow{1}{*}{Bottom chord} & 2891                                                                                      & 109           & 9               &                &               &               & 1297          & 107          & 0              & 0             & 0             & 0                                       & -    & -  \\
\multirow{1}{*}{Cross girder} & 2889                                                                                      & 117           & 91              & 1              & 2             & 2             & 1392        & 1083        & 11.9           & 23.8          & 23.8          & 2.7767                                     & 296      & 204  \\
\multirow{1}{*}{Stringers}    & 2890                                                                                      & 107           & 111             & 1              & 2             & 4             & 1273          & 1321         & 11.9           & 23.8          & 47.6          & 4.8681                                         & 169      & 167* \\
\hline\hline \\
\multicolumn{5}{l}{*Not reduced as Stringers have been recently changed.} \\
\multicolumn{9}{l}{Theoretical cycles below 32MPa (stress below cut-off limit) have not been considered.}
\end{tabular}
\end{sidewaystable}

For this kind of cycle the maximum stress is equal to the minimum stress but completely opposite in nature i.e. $\sigma _m$ = 0 as shown Fig. \ref{fig:revcycle}.

\begin{figure}
\centering
\includegraphics[scale=0.8]{HCFtest}
\caption{Experimental Setup of High Cycle Fatigue test}
\label{fig:hcftest}
\end{figure}

\pagebreak

\end{document}


May kindly help..

Thanking you & regards Sitesh

Assuming, that your documentclass ascelike-new is identical to ascelike as found on CTAN, the following might solve your problem. The documentclass internally loads the endfloat package if the Journal option is used. The endfloat package does only recognize figure and table environments, so longtables, sidewaystables and sidewaysfigures remain in the text rather than being placed at the end.

Section '8.2 Environments based on figures and tables' of the endfloat manual describes the \DeclareDelayedFloatFlavo(u)r{〈environment〉}{〈is a variant of〉} command that can be used in order to let endfloat place longtables, sidewaysfigures and other derived environments at the end of the document.

In the below MWE, I have enclosed the above mentioned command(s) in \AtBeginDocument{} as the documentclass also conditionally loads the endfloat package using \AtBeginDocument{}.

\documentclass[Journal,letterpaper,BackFigs]{ascelike-new}

\usepackage[utf8]{inputenc}
\usepackage{graphicx} %Allows to import images
%\usepackage{float} %Allows for control of float positions
\graphicspath{ {images/} }

%Tables preamble
\usepackage[none]{hyphenat} %Stops breaking up words in a table
\usepackage{array}
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}} \newcolumntype{^}{>{\currentrowstyle}} \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1} #1\ignorespaces} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{pdflscape} \usepackage{lscape} \usepackage{rotating} % Provides {sideways}{sidewaysfigure}{sidewaystable} environments \usepackage[figurename=Fig.,labelfont=bf,labelsep=period]{caption} \usepackage{caption} \usepackage{subcaption} \captionsetup{compatibility=false} \usepackage{amsmath} \usepackage{siunitx} \usepackage{newtxtext,newtxmath} \usepackage[colorlinks=true,citecolor=black,linkcolor=black]{hyperref} \usepackage{enumerate}% http://ctan.org/pkg/enumerate %%Tables preamble \usepackage[none]{hyphenat} %Stops breaking up words in a table \usepackage{array} \usepackage{booktabs} \usepackage{multirow} \usepackage{longtable} \usepackage{lipsum} % just for dummy text- not needed for a longtable %Flowchart \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \NameTag{Singh, \today} \AtBeginDocument{% \DeclareDelayedFloatFlavor{sidewaystable}{table} \DeclareDelayedFloatFlavor{sidewaysfigure}{figure} \DeclareDelayedFloatFlavor{longtable}{table} } \begin{document} The range of Strain transducer was +/- 4000 micro-strain, sensitivity = 500 micro-strain/Vout/Vext with accuracy < +/- 1 percent. Based on theoretical simulation of the bridge using MATLAB, strain gages were placed at critical locations as shown in Fig. \ref{fig:sensorloc}. %\begin{landscape} %\begin{figure}[p !] \begin{sidewaysfigure} \centering \includegraphics[width=\columnwidth]{example-image} \caption{Location of sensors} \label{fig:sensorloc} \end{sidewaysfigure} %\end{figure} %\end{landscape} \section{Observations and calculations} The details of trains for which strains have been measured have been shown in Table \ref{tab:train_run}. \begin{table} \centering \caption{Details of trains instrumented for Fatigue life estimation} \label{tab:train_run} \begin{tabular}{$p{0.6in}^p{.2in}^p{1.8in}^p{1.2in}^p{.4in}^p{1in}}
\hline\hline
Date&   Run No& Train details&  Engine details& Time (Hrs)& Speed (Kmph) \\
\hline
18.06.16&   1&  59 BOXN Empty Goods&    27540WAG7&  13:03&  20 to 5 to 20 \\
-do-&  2&  12347 Up Howrah Rampurhat Exp&  16225R/WDM3A&   13:35&  20 \\
-do-&  3&  12369 Up Upasana Exp&   22650/WAP4& 14:18&  20 \\
-do-&  4&  11448 Up Shaktipunj Exp&    22531/WAP4& 14:26&  20 \\
-do-&  5&  59 BXNHS Loaded Goods&  27537/WAG7& 14:46&  20 \\
19.06.16&   1&  13151 Up Jammu Tawi Exp&    22906/WAP4& 13:19&  20 \\
-do-&  2&  12347 Up Howrah Rampurhat Exp&  14006R/WDM3A&   13:28&  20 \\
-do-&  3&  58 BOXN Loaded Goods&   24693/WAG9& 14:00&  5 to 20 \\
\hline\hline
\end{tabular}
\end{table}
%
\begin{longtable}{$p{1in}^p{1in}^p{1in}^p{1in}^p{1in}} \caption{Cumulative GMT of Up Howrah-Barddhaman Chord line between Saktigarh and Barddhaman} \label{tab:GMT} \\ \hline\hline Year &Annual GMT&Annual GMT per line&Cum GMT\\ \hline 1996-97& 38& 19& 480.155\\ 1997-98& 41& 20.5& 500.655\\ 1998-99& 42& 21& 521.655\\ 1999-00& 42& 21& 542.655\\ 2000-01& 40& 20& 562.655\\ 2001-02& 43& 21.5& 584.155\\ 2002-03& 42& 21& 605.155\\ 2003-04& 42& 21& 626.155\\ 2004-05& 44& 22& 648.155\\ 2005-06& 47& 23.5& 671.655\\ 2006-07& 46& 23& 694.655\\ 2007-08& 50& 25& 719.655\\ 2008-09& 58& 29& 748.655\\ 2009-10& 62& 31& 779.655\\ 2010-11& 63& 31.5& 811.155\\ 2011-12& 60& 30& 841.155\\ 2012-13& 62& 31& 872.155\\ 2013-14& 63& 31.5& 903.655\\ 2014-15& 63& 31.5& 935.155\\ 2015-16& 63& 31.5& 966.655\\ \hline\hline \multicolumn{5}{l}{Note: Data obtained from Track Modernization Cell of Eastern Railway} \end{longtable} Sample calculation of effective cycles for the critical member i.e. cross girder (Strain gauge no. 2289) has been furnished in Table \ref{tab:SampleCalc}. \begin{table} \centering \caption{Sample calculation of effective cycles for cross girder} \label{tab:SampleCalc} \begin{tabular}{$p{0.6in}^p{1.8in}^p{1.5in}^p{1.5in}}
\hline\hline
Stress range in N/mm2&No. of observed effective cycles from Rain flow histogram (say a)&No. of modified effective cycles (ni) = ax(68/8)x1.4)&No. of theoretical cycles (Ni) as per S-N curve x $10^6$ \\
\hline
0-10&   117&    1392&   3990.00 \\
10-20&  91& 1083&   498.75 \\
20-30&  1&  11.9&   147.78 \\
30-40&  2&  23.8&   62.34 \\
40-50&  2&  23.8&   31.92 \\
\hline\hline
\end{tabular}
\end{table}

From Table \ref{tab:reslifeeuro3}, it is seen that stringers (after replacement) are still the critical members from fatigue considerations with residual fatigue life of 169 years.

\begin{sidewaystable}[]
\centering
\caption{Calculation of residual life from Fatigue considerations using S-N curve in Eurocode 3}
\label{tab:reslifeeuro3}
\begin{tabular}{lllllllllllllll}
\hline\hline
\multirow{3}{*}{Member}       & \multirow{3}{*}{Strain} &     \multicolumn{5}{c}{Observed ni for 8 trains (5 Pass + 3 Goods)} & \multicolumn{5}{c}{Equated for 68 trains (48 Pass + 20 Goods)} & {Damage} & {Total} & {Residual} \\
&                                   &  0-10          & 10-20           & 20-30          & 30-40         & 40-50         & 0-10            & 10-20          & 20-30          & 30-40         & 40-50         &          {per}                                           &  {life}       & {life}  \\
& Gauge                                  & 35563          & 1111          & 146.35        & 34.73         & 11.38        & 35563            & 1111 & 146.35         & 34.73       & 11.38       &       {Day(D)} \\
\hline
\multirow{1}{*}{Top chord}    & 2897                                                                                     & 125           & 4               & 3              & 1             &               & 1488          & 47.6           & 35.7           & 11.9          & 0             & 0.3426                                         & 2399             & 2307  \\
Vertical                      & 2895                                                                                      & 18            &                 &                &               &               & 214.2           & 0              & 0              & 0             & 0             & 0                                        & -  & -                                                      \\
\multirow{1}{*}{Diagonal}     & 2892                                                                                      & 92            & 1               & 2              &               &               & 1095          & 11.9           & 23.8           & 0            & 0             & 0                                         & -      & -  \\
\multirow{1}{*}{End raker}    & 2829                                                                                      & 36            & 0               & 2              & 1             &               & 428.4           & 0              & 23.8           & 11.9          & 0             & 0.3426                                         & 2399     & 2307 \\
\multirow{1}{*}{Bottom chord} & 2891                                                                                      & 109           & 9               &                &               &               & 1297          & 107          & 0              & 0             & 0             & 0                                       & -    & -  \\
\multirow{1}{*}{Cross girder} & 2889                                                                                      & 117           & 91              & 1              & 2             & 2             & 1392        & 1083        & 11.9           & 23.8          & 23.8          & 2.7767                                     & 296      & 204  \\
\multirow{1}{*}{Stringers}    & 2890                                                                                      & 107           & 111             & 1              & 2             & 4             & 1273          & 1321         & 11.9           & 23.8          & 47.6          & 4.8681                                         & 169      & 167* \\
\hline\hline \\
\multicolumn{5}{l}{*Not reduced as Stringers have been recently changed.} \\
\multicolumn{9}{l}{Theoretical cycles below 32MPa (stress below cut-off limit) have not been considered.}
\end{tabular}
\end{sidewaystable}

For this kind of cycle the maximum stress is equal to the minimum stress but completely opposite in nature i.e. $\sigma _m$ = 0 as shown Fig. \ref{fig:revcycle}.

\begin{figure}
\centering
\includegraphics[scale=0.8]{example-image}
\caption{Experimental Setup of High Cycle Fatigue test}
\label{fig:hcftest}
\end{figure}

\pagebreak

\end{document}