Graphics, Figures & TablesEndfloat seems to suppress subnumbering of tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
xgdl2005
Posts: 3
Joined: Sat Apr 28, 2018 10:54 am

Endfloat seems to suppress subnumbering of tables

Post by xgdl2005 »

I have been using the endfloat package to put my figures and tables to the end of the paper. Besides I also use subtables environment from the subfloat package to sub-number some tables, e.g., Table 1a and Table 1b. However, as long as I use the endfloat package, the sub-numbering of tables failed. For example, in the following MWE, there are only two tables. Using the endfloat package, the tables put at the end of the paper start from table 2 and table 3 (not even from table 1?). In the text, the markers show [Table 1 about here.] and [Table 2 about here]. In contrary, if I turn off the endfloat, everything goes well. Does anyone know how to make the sub-numbering work still using endfloat? Thank you in advance for your answers.

Code: Select all

\documentclass[12pt, a4paper]{article}
    \usepackage{eurosym,geometry, pdflscape,booktabs, subfloat, lipsum}
    \usepackage[notablist, nofiglist]{endfloat}
    \geometry{left=1.0in,right=1.0in,top=1.0in,bottom=1.0in}

    \begin{document}
    \lipsum[1-15]

    \begin{subtables}
    \begin{table}[ht]
    \small
    \centering
    \caption{Effects of privatization on general performances 1}\label{perform1}
    \begin{tabular}{lccccc} \toprule\midrule
   Privatization year & -0.001 & 0.006 &  & -0.026 & -0.028\*\* \\ 
     & (0.018) & (0.012) &  & (0.019) & (0.014) \\ 
    One year after & -0.108\*\*\* & -0.114\*\*\* &  & -0.103\*\*\* & -0.107\*\*\* \\ 
     & (0.017) & (0.014) &  & (0.018) & (0.015) \\ 
    Two years after & -0.146\*\*\* & -0.144\*\*\* &  & -0.152\*\*\* & -0.162\*\*\* \\ 
     & (0.013) & (0.016) &  & (0.016) & (0.017) \\ 
    Three years after & -0.155\*\*\* & -0.156\*\*\* &  & -0.126\*\*\* & -0.125\*\*\* \\ 
     & (0.017) & (0.018) &  & (0.015) & (0.019) \\ 
    \bottomrule
    \end{tabular}
    \end{table}

    \begin{table}[ht]
    \centering
    \caption{Effects of privatization on general performances 2}\label{perform2}
    \begin{tabular}{lccccc} \toprule\midrule 
    Privatization year & -0.007 & -0.022\*\* &  & 0.004 & -0.028\*\* \\ 
     & (0.017) & (0.010) &  & (0.019) & (0.013) \\ 
    One year after & -0.043\*\*\* & -0.069\*\*\* &  & -0.032\* & -0.066\*\*\* \\ 
     & (0.015) & (0.011) &  & (0.018) & (0.015) \\ 
    Two years after & -0.079\*\*\* & -0.113\*\*\* &  & -0.058\*\*\* & -0.088\*\*\* \\ 
     & (0.014) & (0.012) &  & (0.022) & (0.016) \\ 
    Three years after & -0.077\*\*\* & -0.094\*\*\* &  & -0.066\*\*\* & -0.097\*\*\* \\ 
     & (0.013) & (0.013) &  & (0.015) & (0.016) \\ 
    \bottomrule

    \end{tabular}
    \end{table}
    \end{subtables}

    \lipsum[16-20]

    \processdelayedfloats
    \lipsum[21-22]
    \end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Endfloat seems to suppress subnumbering of tables

Post by Johannes_B »

Code: Select all

\documentclass[12pt, a4paper]{article}
\usepackage{eurosym,geometry, pdflscape,booktabs,  lipsum}
\usepackage[countmax]{subfloat}
\usepackage[notablist, nofiglist]{endfloat}
\geometry{left=1.0in,right=1.0in,top=1.0in,bottom=1.0in}

\begin{document}
\lipsum[1-15]

\begin{table}
\centering
\begin{subtables}
\small
\caption{Effects of privatization on general performances 1}\label{perform1}
\begin{tabular}{lccccc} \toprule\midrule
rivatization year & -0.001 & 0.006 &  & -0.026 & -0.028\*\* \\ 
 & (0.018) & (0.012) &  & (0.019) & (0.014) \\ 
One year after & -0.108\*\*\* & -0.114\*\*\* &  & -0.103\*\*\* & -0.107\*\*\* \\ 
 & (0.017) & (0.014) &  & (0.018) & (0.015) \\ 
Two years after & -0.146\*\*\* & -0.144\*\*\* &  & -0.152\*\*\* & -0.162\*\*\* \\ 
 & (0.013) & (0.016) &  & (0.016) & (0.017) \\ 
Three years after & -0.155\*\*\* & -0.156\*\*\* &  & -0.126\*\*\* & -0.125\*\*\* \\ 
 & (0.017) & (0.018) &  & (0.015) & (0.019) \\ 
\bottomrule
\end{tabular}

\centering
\caption{Effects of privatization on general performances 2}\label{perform2}
\begin{tabular}{lccccc} \toprule\midrule 
Privatization year & -0.007 & -0.022\*\* &  & 0.004 & -0.028\*\* \\ 
 & (0.017) & (0.010) &  & (0.019) & (0.013) \\ 
One year after & -0.043\*\*\* & -0.069\*\*\* &  & -0.032\* & -0.066\*\*\* \\ 
 & (0.015) & (0.011) &  & (0.018) & (0.015) \\ 
Two years after & -0.079\*\*\* & -0.113\*\*\* &  & -0.058\*\*\* & -0.088\*\*\* \\ 
 & (0.014) & (0.012) &  & (0.022) & (0.016) \\ 
Three years after & -0.077\*\*\* & -0.094\*\*\* &  & -0.066\*\*\* & -0.097\*\*\* \\ 
 & (0.013) & (0.013) &  & (0.015) & (0.016) \\ 
\bottomrule

\end{tabular}
\end{subtables}
\end{table}

\lipsum[16-20]

%\processdelayedfloats
\lipsum[21-22]
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
xgdl2005
Posts: 3
Joined: Sat Apr 28, 2018 10:54 am

Endfloat seems to suppress subnumbering of tables

Post by xgdl2005 »

Johannes_B wrote:

Code: Select all

\documentclass[12pt, a4paper]{article}
\usepackage{eurosym,geometry, pdflscape,booktabs,  lipsum}
\usepackage[countmax]{subfloat}
\usepackage[notablist, nofiglist]{endfloat}
\geometry{left=1.0in,right=1.0in,top=1.0in,bottom=1.0in}

\begin{document}
\lipsum[1-15]

\begin{table}
\centering
\begin{subtables}
\small
\caption{Effects of privatization on general performances 1}\label{perform1}
\begin{tabular}{lccccc} \toprule\midrule
rivatization year & -0.001 & 0.006 &  & -0.026 & -0.028\*\* \\ 
 & (0.018) & (0.012) &  & (0.019) & (0.014) \\ 
One year after & -0.108\*\*\* & -0.114\*\*\* &  & -0.103\*\*\* & -0.107\*\*\* \\ 
 & (0.017) & (0.014) &  & (0.018) & (0.015) \\ 
Two years after & -0.146\*\*\* & -0.144\*\*\* &  & -0.152\*\*\* & -0.162\*\*\* \\ 
 & (0.013) & (0.016) &  & (0.016) & (0.017) \\ 
Three years after & -0.155\*\*\* & -0.156\*\*\* &  & -0.126\*\*\* & -0.125\*\*\* \\ 
 & (0.017) & (0.018) &  & (0.015) & (0.019) \\ 
\bottomrule
\end{tabular}

\centering
\caption{Effects of privatization on general performances 2}\label{perform2}
\begin{tabular}{lccccc} \toprule\midrule 
Privatization year & -0.007 & -0.022\*\* &  & 0.004 & -0.028\*\* \\ 
 & (0.017) & (0.010) &  & (0.019) & (0.013) \\ 
One year after & -0.043\*\*\* & -0.069\*\*\* &  & -0.032\* & -0.066\*\*\* \\ 
 & (0.015) & (0.011) &  & (0.018) & (0.015) \\ 
Two years after & -0.079\*\*\* & -0.113\*\*\* &  & -0.058\*\*\* & -0.088\*\*\* \\ 
 & (0.014) & (0.012) &  & (0.022) & (0.016) \\ 
Three years after & -0.077\*\*\* & -0.094\*\*\* &  & -0.066\*\*\* & -0.097\*\*\* \\ 
 & (0.013) & (0.013) &  & (0.015) & (0.016) \\ 
\bottomrule

\end{tabular}
\end{subtables}
\end{table}

\lipsum[16-20]

%\processdelayedfloats
\lipsum[21-22]
\end{document}
Thank you very much for your reply. It worked! However, my case is actually more complicated (I thought the more complicated case would work too if the simpler case works but unfortunately something is still wrong). The two sub-numberng tables are quite long in my case--each of them occupies one full page. In this case, in order to fully display both of them, I used longtable, and ThreePartTable from package threeparttablex to add notes. However, after making some adaptations following your instructions, the subnumbering works, but endfloat does not---the tables are inserted directly into the text, not at the place I assigned. Besides, \processdelayedfloat is important for me as I want to display the tables before appendix, thus not at the end of the whole paper. My ideal case is to display the two subnumbering tables with each occupying one page at somewhere (before the end, thus needing \processdelayedfloat) and with "Table 1 about here" in the corresponding location in the text. Thank you very much in advance. Below is my MWE.

Code: Select all

\documentclass[12pt, a4paper]{article}
\usepackage{eurosym,geometry, pdflscape, booktabs, longtable, lipsum}
\usepackage[countmax]{subfloat}
\usepackage{threeparttablex}
\usepackage[notablist, nofiglist]{endfloat}


\geometry{left=1.0in,right=1.0in,top=1.0in,bottom=1.0in}
 
\begin{document}
\lipsum[1-15]

\begin{subtables}
\centering

\begin{ThreePartTable}
\begin{TableNotes}
\footnotesize
\item  Notes: This table reports the baseline results of the effect of privatization on general performances of zombie SOEs. The performance variables are the probability of exit in the next year, the probability of being healthy firms and the logarithm of labor productivity, respectively. 

\end{TableNotes}
\small
\begin{longtable}[c]{l*{5}{c}}
\caption{Effects of privatization on general performances of zombie SOEs} \label{performa1} \\
\toprule\midrule

 & \multicolumn{ 2}{c}{CHK-FN} &  & \multicolumn{ 2}{c}{Actual profit} \\ \cmidrule{2-3} \cmidrule{5-6}
 & Simple DID & DID-PSM &  & Simple DID & DID-PSM \\ \midrule 
\multicolumn{ 6}{l}{\textbf{DV= Prob. of Exit}} \\ 
Privatization year & -0.001 & 0.006 &  & -0.026 & -0.028\*\* \\ 
 & (0.018) & (0.012) &  & (0.019) & (0.014) \\ 
One year after & -0.108\*\*\* & -0.114\*\*\* &  & -0.103\*\*\* & -0.107\*\*\* \\ 
 & (0.017) & (0.014) &  & (0.018) & (0.015) \\ 
Two years after & -0.146\*\*\* & -0.144\*\*\* &  & -0.152\*\*\* & -0.162\*\*\* \\ 
 & (0.013) & (0.016) &  & (0.016) & (0.017) \\ 
Three years after & -0.155\*\*\* & -0.156\*\*\* &  & -0.126\*\*\* & -0.125\*\*\* \\ 
 & (0.017) & (0.018) &  & (0.015) & (0.019) \\ 
 &           &            &  &            &    \\ 
\multicolumn{ 6}{l}{
\textbf{DV= Prob. of being Healthy (non-zombie)}} \\ 
Privatization year & 0.113\*\*\* & 0.108\*\*\* &  & 0.053\*\*\* & 0.033\*\*\* \\ 
 & (0.01) & (0.012) &  & (0.01) & (0.011) \\ 
One year after & 0.234\*\*\* & 0.200\*\*\* &  & 0.153\*\*\* & 0.121\*\*\* \\ 
 & (0.016) & (0.016) &  & (0.018) & (0.017) \\ 
Two years after & 0.254\*\*\* & 0.255\*\*\* &  & 0.244\*\*\* & 0.207\*\*\* \\ 
 & (0.015) & (0.019) &  & (0.02) & (0.021) \\ 
Three years after & 0.236\*\*\* & 0.231\*\*\* &  & 0.231\*\*\* & 0.193\*\*\* \\ 
 & (0.02) & (0.02) &  & (0.026) & (0.024) \\ 
&           &            &  &            &    \\ 
\multicolumn{ 6}{l}{
\textbf{DV= Labor productivity (log Output per worker)}} \\ 
Privatization year & 0.200\*\*\* & 0.248\*\*\* &  & 0.197\*\*\* & 0.231\*\*\* \\ 
 & (0.02) & (0.02) &  & (0.019) & (0.022) \\ 
One year after & 0.288\*\*\* & 0.341\*\*\* &  & 0.286\*\*\* & 0.271\*\*\* \\ 
 & (0.028) & (0.027) &  & (0.025) & (0.029) \\ 
Two years after & 0.309\*\*\* & 0.370\*\*\* &  & 0.307\*\*\* & 0.378\*\*\* \\ 
 & (0.035) & (0.032) &  & (0.022) & (0.033) \\ 
Three years after & 0.264\*\*\* & 0.311\*\*\* &  & 0.258\*\*\* & 0.304\*\*\* \\ 
 & (0.041) & (0.035) &  & (0.025) & (0.037) \\  
\bottomrule
\insertTableNotes  % tell LaTeX where to insert the contents of "TableNotes"
\end{longtable}
\end{ThreePartTable}

\begin{ThreePartTable}
\begin{TableNotes}
\footnotesize
\item  Notes: This table reports the baseline results of the effect of privatization on general performances of non-zombie firms. The performance variables are the probability of exit in the next year, the probability of being healthy firms and the logarithm of labor productivity, respectively. 


\begin{longtable}[c]{l*{5}{c}}
%\small
\caption{Effects of privatization on general performances of non-zombie SOEs} \label{performa2} \\
\toprule\midrule

 & \multicolumn{ 2}{c}{CHK-FN} &  & \multicolumn{ 2}{c}{Actual profit} \\ \cmidrule{2-3} \cmidrule{5-6}
 & Simple DID & DID-PSM &  & Simple DID & DID-PSM \\ \midrule 
Privatization year & -0.007 & -0.022\*\* &  & 0.004 & -0.028\*\* \\ 
 & (0.017) & (0.010) &  & (0.019) & (0.013) \\ 
One year after & -0.043\*\*\* & -0.069\*\*\* &  & -0.032\* & -0.066\*\*\* \\ 
 & (0.015) & (0.011) &  & (0.018) & (0.015) \\ 
Two years after & -0.079\*\*\* & -0.113\*\*\* &  & -0.058\*\*\* & -0.088\*\*\* \\ 
 & (0.014) & (0.012) &  & (0.022) & (0.016) \\ 
Three years after & -0.077\*\*\* & -0.094\*\*\* &  & -0.066\*\*\* & -0.097\*\*\* \\ 
 & (0.013) & (0.013) &  & (0.015) & (0.016) \\ 
 &           &            &  &            &    \\ 
\multicolumn{ 6}{l}{\textbf{
DV= Prob. of being Healthy (non-zombie)}} \\ 
Privatization year & 0.025\*\* & 0.017 &  & 0.019 & 0.026\*\* \\ 
 & (0.011) & (0.010) &  & (0.014) & (0.013) \\ 
One year after & 0.074\*\*\* & 0.059\*\*\* &  & 0.041\*\* & 0.077\*\*\* \\ 
 & (0.012) & (0.012) &  & (0.020) & (0.018) \\ 
Two years after & 0.091\*\*\* & 0.095\*\*\* &  & 0.088\*\*\* & 0.100\*\*\* \\ 
 & (0.012) & (0.014) &  & (0.022) & (0.019) \\ 
Three years after & 0.098\*\*\* & 0.110\*\*\* &  & 0.115\*\*\* & 0.159\*\*\* \\ 
 & (0.012) & (0.015) &  & (0.024) & (0.022) \\ 
 &           &            &  &            &    \\ 
\multicolumn{ 6}{l}{\textbf{
DV= Labor productivity (log Output per worker)}} \\ 
Privatization year & 0.048\*\*\* & 0.067\*\*\* &  & 0.065\*\*\* & 0.084\*\*\* \\ 
 & (0.012) & (0.013) &  & (0.019) & (0.018) \\ 
One year after & 0.104\*\*\* & 0.161\*\*\* &  & 0.132\*\*\* & 0.186\*\*\* \\ 
 & (0.025) & (0.019) &  & (0.028) & (0.025) \\ 
Two years after & 0.115\*\*\* & 0.181\*\*\* &  & 0.161\*\*\* & 0.144\*\*\* \\ 
 & (0.029) & (0.023) &  & (0.026) & (0.029) \\ 
Three years after & 0.086\*\*\* & 0.203\*\*\* &  & 0.140\*\*\* & 0.141\*\*\* \\ 
 & (0.031) & (0.026) &  & (0.036) & (0.035) \\  
\bottomrule
\insertTableNotes  % tell LaTeX where to insert the contents of "TableNotes"
\end{longtable}
\end{ThreePartTable}
\end{subtables}

\lipsum[16-23]
 
\clearpage
\processdelayedfloats
\lipsum[21-22]
\end{document}
our reply. It really works.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Endfloat seems to suppress subnumbering of tables

Post by Johannes_B »

\DeclareDelayedFloatFlavour*{longtable}{table}
found on TeX.SX
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
xgdl2005
Posts: 3
Joined: Sat Apr 28, 2018 10:54 am

Endfloat seems to suppress subnumbering of tables

Post by xgdl2005 »

Johannes_B wrote:\DeclareDelayedFloatFlavour*{longtable}{table}
found on TeX.SX
Thank you for the reply. Sorry, I forgot to include this. However, as long as the endfloat package is in effect, the sub-numbering stops working. Could you kindly help me solve this in the context of longtable with notes (using the ThreePartTable), as posted in the last MWE? I really appreciate your kind help.
Post Reply