1

i have a document with about 11 pages and approx. at 2/3 of the document I have a table with the size of a page. This table is always put to the end of the document, even behind the references. How can i avoid this? I tried to use \longtable. This fixed the issue, but caption style is completely different from table. usepackage{float} and [H], [ht] has absolutely no effect.

    \documentclass[a4paper,fleqn]{cas-sc}
    \usepackage[numbers]{natbib}

    \begin{document}
    \let\WriteBookmarks\relax
    \def\floatpagepagefraction{1}
    \def\textpagefraction{.001}
    % text (approx 6 pages)
    \begin{table}
    \caption{this is my caption}\label{table 6}
    \begin{tabular}{p{0.22\textwidth}p{0.30\textwidth}p{0.10\textwidth}p{0.17\textwidth}}
    \toprule
    &   &  &  \\ % Table header row
    \midrule    
    &   &  &  \\ % Table header row
    &   &  &  \\ % Table header row
    &   &  &  \\ % Table header row
    &   &  &  \\ % Table header row
    &   &  &  \\ % Table header row
    %approx 20 further lines                                    
    \bottomrule
    \end{tabular}
    \end{table}


    %futher text (approx 5 pages with two new Chapters)


    \appendix
    
    %% Loading bibliography style file
    \bibliographystyle{cas-model2-names}
    
    % Loading bibliography database
    \bibliography{myLiterature}
    \end{document}

I am using MikTeX and TeXnicCenter.

2
  • ... And, in addition, can somebody explain the following tabular* statement? %\begin{tabular*}{\tblwidth}{@{}LL@{}} per default, all tables should be made with the tabular* environment and the following \tblewidth statement. I did not get it work, so i used the above {tabular]{\textwidth} statement. ... And what is the meaning of the {@{}LL@{}} statement? Thank you!
    – F. H.
    Jul 27, 2021 at 19:48
  • Does \begin{table}[h!] help?
    – citsahcots
    Jul 27, 2021 at 20:15

1 Answer 1

2

Use \FloatBarrier right before beginning the table and after ending it. For this, you need \usepackage{placeins} in the preamble.

Here is your code with the adition.

\documentclass[a4paper,fleqn]{cas-sc}
\usepackage{placeins}
\usepackage[numbers]{natbib}

\begin{document}
\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}
% text (approx 6 pages)
\FloatBarrier
\begin{table}
\caption{this is my caption}\label{table 6}
\begin{tabular}{p{0.22\textwidth}p{0.30\textwidth}p{0.10\textwidth}p{0.17\textwidth}}
\toprule
&   &  &  \\ % Table header row
\midrule    
&   &  &  \\ % Table header row
&   &  &  \\ % Table header row
&   &  &  \\ % Table header row
&   &  &  \\ % Table header row
&   &  &  \\ % Table header row
%approx 20 further lines                                    
\bottomrule
\end{tabular}
\end{table}
\FloatBarrier


%futher text (approx 5 pages with two new Chapters)


\appendix

%% Loading bibliography style file
\bibliographystyle{cas-model2-names}

% Loading bibliography database
\bibliography{myLiterature}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .