将长表添加到附录,乳胶需要花费大量时间来创建 pdf

将长表添加到附录,乳胶需要花费大量时间来创建 pdf

这是我的代码:

    \documentclass[11pt]{report}
    \usepackage[utf8]{inputenc}
    \usepackage{float,subfig}
    \usepackage{adjustbox,tabularx,ragged2e}
    \usepackage{amsmath,geometry,booktabs}
    \usepackage{mathtools,array,dcolumn,longtable}
    \newcolumntype{L}[1]{>{\RaggedRight\arraybackslash\hsize=#1\hsize}X}
    \setlength\tabcolsep{4pt} 
    \usepackage[justification = centering]{caption}
    \usepackage{siunitx}
    \usepackage[toc,page]{appendix}

    \begin{document}
    \listoffigures % Prints the list of figures
    \listoftables % Prints the list of tables
    \tableofcontents

        %%APPENDIX A    
        \begin{appendices}
    \chapter[]{}
    \begin{table}[!htbp]
        \centering
        \begin{tabular}{ c c }
            \toprule
            \textbf{Geological fm}& \textbf{number of samples examined}\\
            \hline
            MAC&    34\\
            OMT &34\\
            FAF &18\\
            PSM &16\\
            GRE &13\\
            ARB &8\\
            ACC &7\\
            ACCa&7\\
            GOT &7\\
            PRS &7\\
            CGV &6\\
            MAA &5\\
            CCA &4\\
            MDD &4\\
            STO &4\\
            ANL &3\\
            CLF &3\\
            MRQ &3\\
            RET &3\\
            ACCb &2\\
            bv &2\\
            CCVd& 2\\
            MAS &2\\
            MVE &2\\
            OST &2\\
            PRC &2\\
            SSR &2\\
            VEU &2\\
            CCVb &1\\
            CCVc &1\\
            LVG &1\\
            MACa &1\\
            MRR &1\\
            pv  &1\\
            VINa &1\\
            \bottomrule
    \end{tabular}
        \caption{Number of samples for each geological formation examined in the laboratory for the unit weight determination.}
        \label{tab:count_pesovol}
\end{table}

\begin{longtable}{S[table-format=2.0]
            *{2}{S[table-format=2.1]}
            S[table-format=2.1,detect-weight]
        }
        \caption{Results of linear regression model for the prediction of R mean (R mean predicted).}\\
        \label{tab:model_res_t} \\
        \toprule
        {Mv(\%)} 
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endfirsthead
        \caption[]{Results of linear regression model for the prediction of R mean (R mean predicted).} \\           
        \toprule
        {Mv(\%)}
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endhead
        \midrule[\heavyrulewidth]
        \multicolumn{4}{r}{\footnotesize\textit{Continued on the next page}}
        \endfoot
        \bottomrule
        \endlastfoot
        85  &   188.2   &   10.0    &   9.3 \\
        80  &   375.3   &   10.5    &   20.4    \\
        75  &   326.2   &   23.4    &   17.5    \\
        40  &   247.1   &   15.6    &   13.1    \\
        30  &   215.1   &   18.2    &   11.3    \\
        25  &   258.9   &   16.0    &   13.9    \\
        20  &   243.8   &   16.9    &   13.1    \\
        20  &   264.0   &   11.8    &   14.3    \\
        10  &   285.4   &   17.6    &   15.6    \\
        10  &   295.7   &   19.3    &   16.2    \\
        5   &   239.9   &   14.7    &   13.0    \\
        5   &   281.3   &   23.3    &   15.4    \\
        0   &   296.9   &   18.4    &   16.4    \\
        0   &   304.8   &   21.1    &   16.9    \\
        0   &   321.9   &   21.6    &   17.9    \\
        0   &   375.6   &   27.1    &   21.0    \\
        0   &   413.0   &   21.1    &   23.2    \\
        0   &   444.9   &   18.4    &   25.1    \\
        0   &   449.1   &   34.3    &   25.4    \\
        0   &   484.7   &   34.3    &   27.5    \\
        0   &   489.3   &   33.9    &   27.7    \\
        0   &   505.8   &   21.1    &   28.7    \\
        0   &   542.1   &   41.9    &   30.9    \\
        0   &   563.9   &   34.3    &   32.1    \\
        0   &   572.4   &   34.3    &   32.6    \\
        0   &   646.2   &   34.3    &   37.0    \\
        0   &   662.2   &   41.9    &   37.9    \\
        0   &   538.8   &   23.1    &   30.7    \\
        0   &   466.3   &   18.2    &   26.4    \\
        0   &   377.9   &   12.7    &   21.2    \\
        0   &   636.7   &   32.6    &   36.4    \\
        0   &   691.2   &   38.4    &   39.7    \\
        0   &   766.8   &   48.6    &   44.1    \\
        0   &   614.5   &   24.3    &   35.1    \\
        0   &   543.7   &   23.0    &   31.0    \\
        0   &   499.8   &   16.5    &   28.4    \\
        0   &   710.3   &   35.1    &   40.8    \\
        0   &   774.0   &   50.5    &   44.6    \\
        0   &   780.0   &   49.1    &   44.9    \\
        0   &   761.3   &   49.5    &   43.8    \\
        0   &   762.9   &   50.1    &   43.9    \\
        0   &   767.0   &   50.3    &   44.1    \\
        0   &   588.1   &   35.0    &   33.6    \\
        0   &   601.7   &   38.7    &   34.4    \\
        0   &   423.9   &   11.3    &   23.9    \\
        0   &   425.3   &   10.5    &   24.0    \\
        0   &   623.7   &   29.9    &   35.7    \\  
\end{longtable}


\begin{longtable}{S[table-format=2.0]
            *{2}{S[table-format=2.1]}
            S[table-format=2.1,detect-weight]
        }
        \caption{Results of Bayesian Network model for the prediction of R mean (R mean predicted).}\\
        \label{tab:model_res_tot_BN} \\
        \toprule
        {Mv(\%)} 
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endfirsthead
        \caption[]{Results of Bayesian Network model for the prediction of R mean (R mean predicted).} \\
        \toprule
        {Mv(\%)}
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endhead
        \midrule[\heavyrulewidth]
        \multicolumn{4}{r}{\footnotesize\textit{Continued on the next page}}
        \endfoot
        \bottomrule
        \endlastfoot
        85 &188.2   &10.0   &8.6  \\
        80 &375.3   &10.5   &20   \\
        75 &326.2   &23.4   &19.1 \\
        40 &247.1   &15.6   &14.3 \\
        30 &215.1   &18.2   &11.5 \\
        25 &258.9   &16.0   &15.2 \\
        20 &243.8   &16.9   &14.1 \\
        20 &264.0   &11.8   &15.6 \\
        10 &285.4   &17.6   &16.5 \\
        10 &295.7   &19.3   &17.1 \\
        5  &239.9   &14.7   &13.9 \\
        5  &281.3   &23.3   &16.3 \\
        0  &780.0   &49.1   &50.6 \\
        0  &264     &11.8   &15.6 \\
        0  &285.8   &17.6   &16.5 \\
        0  &295.7   &19.3   &17.1 \\
        0  &239.9   &14.7   &13.9 \\
        0  &296.9   &18.4   &17.4 \\
        0  &304.8   &21.1   &18.0 \\
        0  &321.9   &21.6   &19.1 \\
        0  &375.6   &27.1   &20.3 \\
        0  &413.0   &21.1   &21.4 \\
        0  &444.9   &18.4   &22.8 \\
        0  &449.1   &34.3   &23.3 \\
        0  &484.7   &34.3   &25.3 \\
        0  &489.3   &33.9   &25.3 \\
        0  &505.8   &21.1   &26.4 \\
        0  &542.1   &41.9   &28.3 \\
        0  &563.9   &34.3   &29.8 \\
        0  &572.4   &34.3   &30.3 \\
        0  &646.2   &34.3   &35.7 \\
        0  &662.2   &41.9   &36.9 \\
        0  &538.8   &23.1   &28.7 \\
        0  &466.3   &18.2   &24.2 \\
        0  &377.9   &12.7   &20.4 \\
        0  &636.7   &32.6   &35.2 \\
        0  &691.2   &38.4   &38.6 \\
        0  &766.8   &48.6   &43.3 \\
        0  &614.5   &24.3   &33.6 \\
        0  &543.7   &23.0   &29.0 \\
        0  &499.8   &16.5   &25.9 \\
        0  &710.3   &35.1   &38.8 \\
        0  &774.0   &50.5   &48.5 \\
        0  &780.0   &49.1   &50.6 \\
        0  &761.3   &49.5   &41.1 \\
        0  &762.9   &50.1   &41.4 \\
        0  &767.0   &50.3   &43.4 \\
        0  &588.1   &35.0   &31.4 \\
        0  &601.7   &38.7   &32.6 \\
        0  &423.9   &11.3   &21.9 \\
        0  &425.3   &10.5   &22.2 \\
        0  &623.7   &29.9   &33.7 \\
\end{longtable}
    \onehalfspacing
    \end{appendices}

    %\printbibliography

    \end{document}

答案1

您的 MWE 有错误。您在编辑时删除了部分错误,但 MWE 仍然无法正常工作。测试时,您应该会收到有关这些错误的消息,并且应该会看到编译已停止。

修复您的 MWE 后,我发现第一个表格太长,无法放在附录标题下方,因此将其移至长表格的末尾,这可能不是我们想要的。您也可以使用longtable第一个表格来纠正这个问题,或者将其拆分为两部分并将它们并行放置在环境中table

在我的测试中,我使用了以下 MWE,其中我考虑了您问题下方的所有评论,稍微重新组织了您的序言,并makecell在第一个表中为列标题添加了新的包:

    \documentclass[11pt]{report}
    \usepackage{geometry,}
    \usepackage[utf8]{inputenc}
    \usepackage{float,subfig}
    \usepackage[justification = centering]{caption}
    \usepackage{adjustbox,ragged2e}
    \usepackage{mathtools}
    \usepackage{booktabs, dcolumn, 
                makecell,                          % <--- new
                longtable, tabularx}
    \renewcommand\theadfont{\normalsize\bfseries}  % <--- new
    \renewcommand\theadgape{}                      % <--- new
    \newcolumntype{L}[1]{>{\RaggedRight\arraybackslash\hsize=#1\hsize}X}
    \setlength\tabcolsep{4pt}
     \usepackage{siunitx}
    \usepackage[toc,page]{appendix}

    \begin{document}
    \listoffigures % Prints the list of figures
    \listoftables % Prints the list of tables
    \tableofcontents

    %%APPENDIX A
    \begin{appendices}
        \chapter{Tables}
    \begin{table}[ht]
        \centering
        \begin{tabular}[t]{ c c }
            \toprule
            \thead{Geological\\ fm}  & \thead{number of\\ samples examined}\\
            \midrule
            MAC&    34\\
            OMT &34\\
            FAF &18\\
            PSM &16\\
            GRE &13\\
            ARB &8\\
            ACC &7\\
            ACCa&7\\
            GOT &7\\
            PRS &7\\
            CGV &6\\
            MAA &5\\
            CCA &4\\
            MDD &4\\
            STO &4\\
            ANL &3\\
            CLF &3\\
            MRQ &3\\
            \bottomrule
        \end{tabular}
        \begin{tabular}[t]{ c c }
            \toprule
            \thead{Geological\\ fm}  & \thead{number of\\ samples examined}\\
            \midrule
            RET &3\\
            ACCb &2\\
            bv &2\\
            CCVd& 2\\
            MAS &2\\
            MVE &2\\
            OST &2\\
            PRC &2\\
            SSR &2\\
            VEU &2\\
            CCVb &1\\
            CCVc &1\\
            LVG &1\\
            MACa &1\\
            MRR &1\\
            pv  &1\\
            VINa &1\\
            \vphantom{X}&   \\  % empty line
            \bottomrule
        \end{tabular}
        \caption{Number of samples for each geological formation examined in the laboratory for the unit weight determination.}
        \label{tab:count_pesovol}
    \end{table}

    \begin{longtable}{S[table-format=2.0]
            *{2}{S[table-format=2.1]}
            S[table-format=2.1,detect-weight]
        }
        \caption{Results of linear regression model for the prediction of R mean (R mean predicted).}
        \label{tab:model_res_t} \\
        \toprule
        {Mv(\%)}
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endfirsthead
        \caption[]{Results of linear regression model for the prediction of R mean (R mean predicted).}\\
        \toprule
        {Mv(\%)}
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endhead
        \midrule[\heavyrulewidth]
        \multicolumn{4}{r}{\footnotesize\textit{Continued on the next page}}
        \endfoot
        \bottomrule
        \endlastfoot
        85  &   188.2   &   10.0    &   9.3 \\
        80  &   375.3   &   10.5    &   20.4    \\
        75  &   326.2   &   23.4    &   17.5    \\
        40  &   247.1   &   15.6    &   13.1    \\
        30  &   215.1   &   18.2    &   11.3    \\
        25  &   258.9   &   16.0    &   13.9    \\
        20  &   243.8   &   16.9    &   13.1    \\
        20  &   264.0   &   11.8    &   14.3    \\
        10  &   285.4   &   17.6    &   15.6    \\
        10  &   295.7   &   19.3    &   16.2    \\
        5   &   239.9   &   14.7    &   13.0    \\
        5   &   281.3   &   23.3    &   15.4    \\
        0   &   296.9   &   18.4    &   16.4    \\
        0   &   304.8   &   21.1    &   16.9    \\
        0   &   321.9   &   21.6    &   17.9    \\
        0   &   375.6   &   27.1    &   21.0    \\
        0   &   413.0   &   21.1    &   23.2    \\
        0   &   444.9   &   18.4    &   25.1    \\
        0   &   449.1   &   34.3    &   25.4    \\
        0   &   484.7   &   34.3    &   27.5    \\
        0   &   489.3   &   33.9    &   27.7    \\
        0   &   505.8   &   21.1    &   28.7    \\
        0   &   542.1   &   41.9    &   30.9    \\
        0   &   563.9   &   34.3    &   32.1    \\
        0   &   572.4   &   34.3    &   32.6    \\
        0   &   646.2   &   34.3    &   37.0    \\
        0   &   662.2   &   41.9    &   37.9    \\
        0   &   538.8   &   23.1    &   30.7    \\
        0   &   466.3   &   18.2    &   26.4    \\
        0   &   377.9   &   12.7    &   21.2    \\
        0   &   636.7   &   32.6    &   36.4    \\
        0   &   691.2   &   38.4    &   39.7    \\
        0   &   766.8   &   48.6    &   44.1    \\
        0   &   614.5   &   24.3    &   35.1    \\
        0   &   543.7   &   23.0    &   31.0    \\
        0   &   499.8   &   16.5    &   28.4    \\
        0   &   710.3   &   35.1    &   40.8    \\
        0   &   774.0   &   50.5    &   44.6    \\
        0   &   780.0   &   49.1    &   44.9    \\
        0   &   761.3   &   49.5    &   43.8    \\
        0   &   762.9   &   50.1    &   43.9    \\
        0   &   767.0   &   50.3    &   44.1    \\
        0   &   588.1   &   35.0    &   33.6    \\
        0   &   601.7   &   38.7    &   34.4    \\
        0   &   423.9   &   11.3    &   23.9    \\
        0   &   425.3   &   10.5    &   24.0    \\
        0   &   623.7   &   29.9    &   35.7    \\
    \end{longtable}
    %\onehalfspacing

    %\singlespacing
    \begin{longtable}{S[table-format=2.0]
            *{2}{S[table-format=2.1]}
            S[table-format=2.1,detect-weight]
        }
        \caption{Results of Bayesian Network model for the prediction of R mean (R mean predicted).}
        \label{tab:model_res_tot_BN} \\
        \toprule
        {Mv(\%)}
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endfirsthead
        \caption[]{Results of Bayesian Network model for the prediction of R mean (R mean predicted).} \\
        \toprule
        {Mv(\%)}
        & {L mean }& {R mean observed} & {R mean predicted} \\
        \midrule
        \endhead
        \midrule[\heavyrulewidth]
        \multicolumn{4}{r}{\footnotesize\textit{Continued on the next page}}
        \endfoot
        \bottomrule
        \endlastfoot
        85 &188.2   &10.0   &8.6  \\
        80 &375.3   &10.5   &20   \\
        75 &326.2   &23.4   &19.1 \\
        40 &247.1   &15.6   &14.3 \\
        30 &215.1   &18.2   &11.5 \\
        25 &258.9   &16.0   &15.2 \\
        20 &243.8   &16.9   &14.1 \\
        20 &264.0   &11.8   &15.6 \\
        10 &285.4   &17.6   &16.5 \\
        10 &295.7   &19.3   &17.1 \\
        5  &239.9   &14.7   &13.9 \\
        5  &281.3   &23.3   &16.3 \\
        0  &780.0   &49.1   &50.6 \\
        0  &264     &11.8   &15.6 \\
        0  &285.8   &17.6   &16.5 \\
        0  &295.7   &19.3   &17.1 \\
        0  &239.9   &14.7   &13.9 \\
        0  &296.9   &18.4   &17.4 \\
        0  &304.8   &21.1   &18.0 \\
        0  &321.9   &21.6   &19.1 \\
        0  &375.6   &27.1   &20.3 \\
        0  &413.0   &21.1   &21.4 \\
        0  &444.9   &18.4   &22.8 \\
        0  &449.1   &34.3   &23.3 \\
        0  &484.7   &34.3   &25.3 \\
        0  &489.3   &33.9   &25.3 \\
        0  &505.8   &21.1   &26.4 \\
        0  &542.1   &41.9   &28.3 \\
        0  &563.9   &34.3   &29.8 \\
        0  &572.4   &34.3   &30.3 \\
        0  &646.2   &34.3   &35.7 \\
        0  &662.2   &41.9   &36.9 \\
        0  &538.8   &23.1   &28.7 \\
        0  &466.3   &18.2   &24.2 \\
        0  &377.9   &12.7   &20.4 \\
        0  &636.7   &32.6   &35.2 \\
        0  &691.2   &38.4   &38.6 \\
        0  &766.8   &48.6   &43.3 \\
        0  &614.5   &24.3   &33.6 \\
        0  &543.7   &23.0   &29.0 \\
        0  &499.8   &16.5   &25.9 \\
        0  &710.3   &35.1   &38.8 \\
        0  &774.0   &50.5   &48.5 \\
        0  &780.0   &49.1   &50.6 \\
        0  &761.3   &49.5   &41.1 \\
        0  &762.9   &50.1   &41.4 \\
        0  &767.0   &50.3   &43.4 \\
        0  &588.1   &35.0   &31.4 \\
        0  &601.7   &38.7   &32.6 \\
        0  &423.9   &11.3   &21.9 \\
        0  &425.3   &10.5   &22.2 \\
        0  &623.7   &29.9   &33.7 \\
    \end{longtable}
    %\onehalfspacing
    \end{appendices}

    %\printbibliography
    \end{document}

上述 MWE 产生以下内容:

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

如果您在编译包含附录的实际文档(如上述 MWE 中所示)时仍然遇到问题,那么问题的根源不在其中,而是在文档的其他地方。

相关内容