0

I need to list Supplementary Tables separated from main tables.

This is, to replicate exactly the answer from this post, but for tables, considering that I have different table environments (table, longtable, landscape):

How to list supplementary figures in the list of figures?

This is the code employed for figures which is actually working

\usepackage{newfloat}
\DeclareFloatingEnvironment[name={Supplementary Figure},fileext=lsf,listname={List of 
Supplementary Figures}]{suppfigure}

I guess problems arise due to the longtable characteristics

How to create a new environment that contains multi-page longtables with unique caption labels?

Issue in using longtable within table environment

torakxkz
  • 103
  • 4

1 Answers1

1

You can use the following code for making custom Supplementary Table environment

\usepackage{newfloat}
\DeclareFloatingEnvironment[name={Supplementary Table},fileext=lst,listname={List of 
Supplementary Tables}]{supptable}

And then you use

\begin{supptable}
.................. %<----- Some table environment here
\caption{some caption}
\end{supptable}

And to make the list of supplementary tables appear you can \listofsupptables.

lssupptable

UPDATE:

For the longtable, I had to use \captionof just to emulate the float caption so that it gets added to the list and then allow the longtable to be written as usual as follows:

\documentclass{article}

\usepackage{caption} \usepackage{longtable} \usepackage{newfloat}

\DeclareFloatingEnvironment[name={Supplementary Table},fileext=lsst,listname={List of Supplementary Short Tables},within=section, placement=htbp!]{supptable}

\def\nlines#1{\expandafter\nlineii\romannumeral\number\number #1 000\relax} \def\nlineii#1{\if#1m\expandafter\theline\expandafter\nlineii\fi}

\begin{document}

\listofsupptables \clearpage

\begin{supptable} \centering \caption{Short Table} \begin{tabular}{|cccc|c|} \hline 1 & 2 & 3 & 4 & 5\ 1 & 2 & 3 & 4 & 5\ 1 & 2 & 3 & 4 & 5\ 1 & 2 & 3 & 4 & 5\ 1 & 2 & 3 & 4 & 5\ \hline \end{tabular} \end{supptable}

\def\theline{1 & 2 & 3 & 4 & 5\}

\begingroup \captionof{supptable}{Long Table} \endgroup \begin{longtable}{|cccc|c|} \hline \endhead \hline \endfoot \hline \nlines{100} \hline
\end{longtable}

\end{document}

This is adapted from here, where @David Carlisle's comment was useful: How to create a new environment that contains multi-page longtables with unique caption labels?

SolidMark
  • 1,389