长表不起作用

长表不起作用

我在使用横向模式将一个表格拆分成两个表格时遇到了问题:我尝试从 tablesgeneraton 生成表格以使其正确,但 longtable 命令不起作用,表格在横向模式下从一个页面退出。
服务器没有错误给我任何提示。

我想将其分成两个水平的页面。

这是完整的代码(希望是正确的 MWE - 我无法添加文档类,因为它是定制的,但是article,或者book给我相同的结果):

\documentclass{book}

\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{booktabs}

\begin{document}
\begin{landscape}
    \begin{longtable}{lllllllllll}
        \caption{} \\
        \label{tab:my-table}\\
        \toprule
        Reference               & Seed generation & Production method       & Seed addition   & Crystallization unit     &                                                                 Dimensions                                                      & Flow pattern                                                     & Material and dispersant & Size size control                                                  & Yield estimation                                                                                & Solid loading     \\ \midrule                                                          
        Present work            & Off-line                                                           & Batch + filtration                                                           & Continuous      & Tubular microreactor                                                                         & 1 mm ID, 60 cm L                                                                                                             & Two-phase \newline bubble flow & PCM in water                                                               & CSD, sieving, \newline filtering & Yes                                                                                             & 2\%, 0.8\% wt                                                          \\
        \cite{Eder2010}         & Off-line                                                           & Batch in solution                                                            & Continuous      & Tubular reactor                                                                              & 2 mm ID, 15 m L                                                                                                              & Single-phase                                                     & ASA in ethanol                                                             & CSD                                                                & 569\% \newline mean mass flow/total seed flow       & 5\%wt                                                                 \\
        \cite{Eder2011}         & Off-line                                                           & Batch in solution                                                            & Continuous      & Tubular reactor                                                                              & 2 mm ID, 15 m L                                                                                                              & Single-phase                                                     & ASA in ethanol                                                             & CSD                                                                & 779-407-348\% \newline mean mass flow/total seed flow & 7, 14, 16\% wt                                                         \\
        \cite{Eder2012}         & In-line                                                            & US-aided nucleation           & Continuous      & Tubular reactor                                                                              & 2 mm ID, 27 m L                                                                                                              & Two-phase slug flow   & ASA in ethanol                                                             & CSD                                                                & 172-700\% mean mass flow/ \newline total seed flow   & Based on relative flow rate \\
        \cite{Jiang2014}        & In-line                                                            & Micromixing (cooling)            & Continuous      & Tubular reactor                                                                              & 3.1 mm ID, 15.2 m L                                                                                                          & Two-phase slug flow & LAM in water                                                               & No                                                                 & 87\% product solid/total solid                       & /                                                                      \\
        \cite{Jiang2015}        & In-line                                                            & US-aided nucleation              & Continuous      & Tubular reactor                                                                              & 3.1 mm ID, 15.2 m L                                                                                                          & Two-phase slug flow   & LAM in water                                                               & No                                                                 & 74\% product solid/ total solid                      & /                                                                      \\
        \cite{Jordens2017}      & In-line                                                            & US-aided nucleation and growth    & Semi-continuous & Tubular nucleation + \newline batch growth         & 5 mm ID, 7 m L tubular nucleation \newline 53x83x97 mm batch vessel                & Single-phase                                                     & PCM in water                                                               & No                                                                 & No                                                                                              & /                                                                      \\
        \cite{Wong2013}         & In-line                                                            & Single crystal contact nucleation & Continuous      & Nucleator +  \newline tubular reactor           & 3.2 mm ID \newline 20 ft L                                                        & Single-phase                                                     & Glycine/PCM in water            & CSD                                                                & No                                                                                              & Single crystal                                                         \\
        \cite{MendezDelRio2006} & In-line                                                            & Cooling                                                                      & Continuous      & Tubular nucleation (LFTC) + \newline batch growth & 1.6 mm ID, 7.62 m L LFTC \newline 500 ml batch vessel                            & Single-phase                                                     & PCM in ethanol/methanol        & No                                                                 & No                                                                                              & /                                                                      \\
        \cite{Fatemi2021}       & In-line                                                            & Cooling                                                                      & Continuous      & Tubular microreactor + \newline tubular growth     & 1 mm ID, 60 cm L tubular nucleation \newline 2 mm ID, 1.4, 4, 8 m L tubular growth & Two-phase  bubble flow & PCM in water                                                               & No                                                                 & 2-70\% measured/ \newline maximum concentration    & /                                                                      \\ \bottomrule
    \end{longtable}
\end{landscape}

\end{document}

你能帮我看看我哪里做错了吗?谢谢!

答案1

如果调整列宽,它会适合(但仍然不太易读):

在此处输入图片描述

\documentclass{book}

% not needed as you hav epdflscape\usepackage{lscape}
% not needed here \usepackage{rotating}
% almost never needed in current latex \usepackage{epstopdf}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{array,multirow,graphicx}
\usepackage{enumitem}
\usepackage{booktabs}

\begin{document}
\begin{landscape}
\small
\setlength\LTleft{-3cm}
\setlength\tabcolsep{4pt}
    \begin{longtable}{@{}
>{\raggedright\arraybackslash}p{1.5cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{1.5cm}% size and control
>{\raggedright\arraybackslash}p{2cm}
>{\raggedright\arraybackslash}p{1.5cm}% solid loading
@{}}
        \caption{} \\
        \label{tab:my-table}\\
        \toprule
        Reference               & Seed generation & Production method       & Seed addition   & Crystall\-iz\-ation unit     &                                                                 Dimensions                                                      & Flow pattern                                                     & Material and dispersant & Size size control                                                  & Yield estimation                                                                                & Solid loading     \\ \midrule                                                          
        Present work            & Off-line                                                           & Batch + filtration                                                           & Continuous      & Tubular microreactor                                                                         & 1 mm ID, 60 cm L                                                                                                             & Two-phase \newline bubble flow & PCM in water                                                               & CSD, sieving, \newline filtering & Yes                                                                                             & 2\%, 0.8\% wt                                                          \\
        \cite{Eder2010}         & Off-line                                                           & Batch in solution                                                            & Continuous      & Tubular reactor                                                                              & 2 mm ID, 15 m L                                                                                                              & Single-phase                                                     & ASA in ethanol                                                             & CSD                                                                & 569\% \newline mean mass flow/total seed flow       & 5\%wt                                                                 \\
        \cite{Eder2011}         & Off-line                                                           & Batch in solution                                                            & Continuous      & Tubular reactor                                                                              & 2 mm ID, 15 m L                                                                                                              & Single-phase                                                     & ASA in ethanol                                                             & CSD                                                                & 779-407-348\% \newline mean mass flow/total seed flow & 7, 14, 16\% wt                                                         \\
        \cite{Eder2012}         & In-line                                                            & US-aided nucleation           & Continuous      & Tubular reactor                                                                              & 2 mm ID, 27 m L                                                                                                              & Two-phase slug flow   & ASA in ethanol                                                             & CSD                                                                & 172-700\% mean mass flow/ \newline total seed flow   & Based on relative flow rate \\
        \cite{Jiang2014}        & In-line                                                            & Micromixing (cooling)            & Continuous      & Tubular reactor                                                                              & 3.1 mm ID, 15.2 m L                                                                                                          & Two-phase slug flow & LAM in water                                                               & No                                                                 & 87\% product solid/total solid                       & /                                                                      \\
        \cite{Jiang2015}        & In-line                                                            & US-aided nucleation              & Continuous      & Tubular reactor                                                                              & 3.1 mm ID, 15.2 m L                                                                                                          & Two-phase slug flow   & LAM in water                                                               & No                                                                 & 74\% product solid/ total solid                      & /                                                                      \\
        \cite{Jordens2017}      & In-line                                                            & US-aided nucleation and growth    & Semi-continuous & Tubular nucleation + \newline batch growth         & 5 mm ID, 7 m L tubular nucleation \newline 53x83x97 mm batch vessel                & Single-phase                                                     & PCM in water                                                               & No                                                                 & No                                                                                              & /                                                                      \\
        \cite{Wong2013}         & In-line                                                            & Single crystal contact nucleation & Continuous      & Nucleator +  \newline tubular reactor           & 3.2 mm ID \newline 20 ft L                                                        & Single-phase                                                     & Glycine/PCM in water            & CSD                                                                & No                                                                                              & Single crystal                                                         \\
        \cite{MendezDelRio2006} & In-line                                                            & Cooling                                                                      & Continuous      & Tubular nucleation (LFTC) + \newline batch growth & 1.6 mm ID, 7.62 m L LFTC \newline 500 ml batch vessel                            & Single-phase                                                     & PCM in ethanol/methanol        & No                                                                 & No                                                                                              & /                                                                      \\
        \cite{Fatemi2021}       & In-line                                                            & Cooling                                                                      & Continuous      & Tubular microreactor + \newline tubular growth     & 1 mm ID, 60 cm L tubular nucleation \newline 2 mm ID, 1.4, 4, 8 m L tubular growth & Two-phase  bubble flow & PCM in water                                                               & No                                                                 & 2-70\% measured/ \newline maximum concentration    & /                                                                      \\ \bottomrule
    \end{longtable}
\end{landscape}

\end{document}

答案2

基于我之前的建议借助xltabularthreeparttablex,以及较小的字体大小和略微减小的值\tabcolsep,您可以得到以下输出:

在此处输入图片描述 在此处输入图片描述

\documentclass{book}

\usepackage{pdflscape}
\usepackage{xltabular}
\usepackage{booktabs}
\usepackage{threeparttablex}
\newcolumntype{L}{>{\hspace{0pt}\raggedright\arraybackslash}X}


\begin{document}
\begin{landscape}
\small
\setlength{\tabcolsep}{4pt}
\begin{ThreePartTable}
\begin{TableNotes}
\item[a] mean mass flow/total seed flow
\item[b] product solid/ total solid 
\item[c] measured/  maximum concentration                     
\end{TableNotes}
    \begin{xltabular}{\linewidth}{l*{10}{L}}
        \caption{}
        \label{tab:my-table}\\
        \toprule
        Reference               & Seed generation \& addition & Production method       & Crystallization unit     &                                                                 Dimensions                                                      & Flow pattern                                                     & Material and dispersant & Size size control                                                  & Yield estimation                                                                                & Solid loading     \\ \midrule
\endfirsthead
        \caption[]{ - continued from previous page}\\
        \toprule
        Reference               & Seed generation \& addition & Production method       & Crystallization unit     &                                                                 Dimensions                                                      & Flow pattern                                                     & Material and dispersant & Size size control                                                  & Yield estimation                                                                                & Solid loading     \\ \midrule
\endhead      
\bottomrule
\endfoot
\bottomrule
\insertTableNotes
\endlastfoot                                           
        Present work            & Off-line, Continuous                                                          & Batch + filtration                                                                 & Tubular microreactor                                                                         & 1 mm ID, 60 cm L                                                                                                             & Two-phase bubble flow & PCM in water                                                               & CSD, sieving,  filtering & Yes                                                                                             & 2\%, 0.8\% wt                                                          \\ \addlinespace
        
        \cite{Eder2010}         & Off-line, Continuous                                                           & Batch in solution                                                                  & Tubular reactor                                                                              & 2 mm ID, 15 m L                                                                                                              & Single-phase                                                     & ASA in ethanol                                                             & CSD                                                                & 569\%\tnote{a}      & 5\%wt                                                                 \\ \addlinespace
        
        \cite{Eder2011}         & Off-line, Continuous                                                          & Batch in solution                                                                  & Tubular reactor                                                                              & 2 mm ID, 15 m L                                                                                                              & Single-phase                                                     & ASA in ethanol                                                             & CSD                                                                & 779-407-348\%\tnote{a} & 7, 14, 16\% wt                                                         \\ \addlinespace
        
        \cite{Eder2012}         & In-line, Continuous                                                            & US-aided nucleation                 & Tubular reactor                                                                              & 2 mm ID, 27 m L                                                                                                              & Two-phase slug flow   & ASA in ethanol                                                             & CSD                                                                & 172-700\% \tnote{a}  & Based on relative flow rate \\ \addlinespace
        
        \cite{Jiang2014}        & In-line, Continuous                                                             & Micromixing (cooling)                 & Tubular reactor                                                                              & 3.1 mm ID, 15.2 m L                                                                                                          & Two-phase slug flow & LAM in water                                                               & No                                                                 & 87\%\tnote{b} & /                                                                      \\ \addlinespace
        
        \cite{Jiang2015}        & In-line, Continuous                                                            & US-aided nucleation                    & Tubular reactor                                                                              & 3.1 mm ID, 15.2 m L                                                                                                          & Two-phase slug flow   & LAM in water                                                               & No                                                                 & 74\%\tnote{b}  & /                                                                      \\ \addlinespace
        
        
        \cite{Jordens2017}      & In-line, Semi-continuous                                                            & US-aided nucleation and growth     & Tubular nucleation +  batch growth         & 5 mm ID, 7 m L tubular nucleation  53x83x97 mm batch vessel                & Single-phase                                                     & PCM in water                                                               & No                                                                 & No                                                                                              & /                                                                      \\ \addlinespace
        
        \cite{Wong2013}         & In-line, Continuous                                                           & Single crystal contact nucleation       & Nucleator +   tubular reactor           & 3.2 mm ID  20 ft L                                                        & Single-phase                                                     & Glycine/ PCM in water            & CSD                                                                & No                                                                                              & Single crystal                                                         \\ \addlinespace
        
        \cite{MendezDelRio2006} & In-line, Continuous                                                             & Cooling                                                                           & Tubular nucleation (LFTC) +  batch growth & 1.6 mm ID, 7.62 m L LFTC  500 ml batch vessel                            & Single-phase                                                     & PCM in ethanol/ methanol        & No                                                                 & No                                                                                              & /                                                                      \\ \addlinespace
        
        \cite{Fatemi2021}       & In-line, Continuous                                                           & Cooling                                                                            & Tubular microreactor +  tubular growth     & 1 mm ID, 60 cm L tubular nucleation  2 mm ID, 1.4, 4, 8 m L tubular growth & Two-phase  bubble flow & PCM in water                                                               & No                                                                 & 2-70\% \tnote{c}     & /                                                                      \\ 
    \end{xltabular}
    \end{ThreePartTable}
\end{landscape}

\end{document}

相关内容