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

1

1 Answer 1

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?

4
  • Works only on table environment but not on longtable or landscape
    – torakxkz
    Jun 28, 2021 at 14:21
  • 1
    It might be easier to use \listoftables to list supplimetary tables and \listofsuptables (more or less) to list plain tables. Check out \listtablename. Jun 28, 2021 at 15:33
  • 1
    I have updated my answer. You may try it now for the longtable.
    – SolidMark
    Jun 28, 2021 at 18:08
  • That works! Thank you
    – torakxkz
    Jun 29, 2021 at 9:38

You must log in to answer this question.

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