2

I need to place all my tables and figures at the end of my document. With the enfloat package, I managed to do so with most of my tables. However, I have a very long table that only works for me if I include it via the ltxtable package. The problem is that my LTXtable wont float to the end of my document like all the other tables. I thought about defining a new float enviornment but did not know how.

I am thankful for any suggestions!

I place a minimal example below (I hope that suits the purpose):

\documentclass[12pt, a4paper, notitlepage]{article}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{ragged2e,array,longtable, afterpage}
\usepackage{lscape,booktabs}
\usepackage{tabu}
\usepackage{ltxtable}
\usepackage{pdflscape}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}  % use utf8 for all files
\usepackage[english]{babel}
\usepackage[capposition=top]{floatrow} %footnotes for figures
\usepackage[nolists]{endfloat} % place figures at the end 
\usepackage{setspace}

\usepackage{lipsum}

\begin{document}

\section{Section}

\lipsum[1-2]

\begin{table}
\caption{table 2}
bla bla
\end{table}

\lipsum[1-2]

\begin{landscape}
    \begin{spacing}{1}
        \LTXtable{\linewidth}{table 2}
    \end{spacing}
\end{landscape}

\lipsum[1-2]

\clearpage

\section{Print all tables here}

\processdelayedfloats
\makeatletter
\efloat@restorefloats
\makeatother

\end{document}

This is my LTXtable saved in the file "table 2":

\begin{longtable}[t!hbp]{x c c}}
    \caption{Table 2}\label{Tab: 2} \\ \toprule
    A very very long table
\end{longtable}   
2

You can try something like this:

\documentclass[12pt, a4paper, notitlepage]{article}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{ragged2e,array,longtable, afterpage}
\usepackage{booktabs}
\usepackage{tabu}
\usepackage{ltxtable}
\usepackage{pdflscape}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}  % use utf8 for all files
\usepackage[english]{babel}
\usepackage[capposition=top]{floatrow} %footnotes for figures
\usepackage[nolists]{endfloat} % place figures at the end
\newenvironment{mylongtable}{}{}
\DeclareDelayedFloatFlavour*{mylongtable}{table}
\usepackage{setspace}

\usepackage{lipsum}

\begin{document}

\section{Section}

\lipsum[1-2]

\begin{table}
\caption{table 2}
bla bla
\end{table}

\lipsum[1-2]
\begin{mylongtable}
\begin{landscape}
    \begin{spacing}{1}
    blblblblb    % \LTXtable{\linewidth}{table 2}
    \end{spacing}
\end{landscape}
\end{mylongtable}
\lipsum[1-2]

\clearpage

\section{Print all tables here}

\processdelayedfloats
\makeatletter
\efloat@restorefloats
\makeatother

\end{document}
3
  • Thank you for your answer, but I really need to fit an LTXtable, i.e. I need to combine a longtable and tabularx.
    – Mona
    Feb 3 '17 at 16:38
  • I only removed the \LTXtable for the test, Doesn't it work if you reenable it? Feb 3 '17 at 16:42
  • Oh, sorry. I did not try that. Yes, it works! Thank you so much!
    – Mona
    Feb 3 '17 at 16:43

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.