Longtable itemize 环境在第一个项目上方添加了不必要的顶部空间

Longtable itemize 环境在第一个项目上方添加了不必要的顶部空间

如何去除(长)表格单元格中 itemize 环境上方的空间?我使用

“ \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]”

但它没有起到作用。

\documentclass[
12pt,
a4paper,
parskip=half,
toc=bibliography,
numbers=noendperiod
]{scrbook}

\usepackage[
left=3cm,
right=2.5cm,
top=2.5cm,
bottom=2.0cm,
includehead,
includefoot
]{geometry}

\usepackage[UKenglish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{scrlayer-scrpage}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{lscape}

\usepackage{makecell}

\usepackage[onehalfspacing]{setspace}

\usepackage[inline]{enumitem} 
\usepackage{float}
\usepackage{caption}
\usepackage{booktabs} 
\usepackage{tabularx, ragged2e} 
\usepackage{siunitx} 
\usepackage{longtable} 
\usepackage[longtable]{multirow}
\usepackage{multicol}
\addtokomafont{caption}{\scriptsize}
\usepackage[font={normal}]{caption}
\captionsetup[table]{labelsep=space, justification=raggedright, singlelinecheck=off}
\usepackage[flushleft]{threeparttable}

\setkomafont{captionlabel}{\bfseries\rmfamily}


\renewcommand*\dictumwidth{0.72\linewidth}
\usepackage[skip=10pt]{parskip}

\usepackage{array}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\newcommand{\abbrlabel}[1]{\makebox[4cm][l]{\textbf{#1}\ \tocfill}}
\newcommand{\rr}{\raggedright}
\newcommand{\tn}{\tabularnewline}
\raggedbottom
\singlespacing\label{key}

\begin{document}
    \begin{landscape}
        \footnotesize
        {\def\arraystretch{2}\tabcolsep=10pt
            \begin{longtable}
                {
                    >{\raggedright\arraybackslash}p{4cm}
                    >{\raggedright\arraybackslash}p{4cm}
                    >{\raggedright\arraybackslash}p{4cm}
                    >{\raggedright\arraybackslash}p{4cm}
                    >{\raggedright\arraybackslash}p{4cm}
                }
                \caption[Characteristics of pressure driven membrane processes]{Characteristics of pressure driven membrane processes}
                \label{tab:pressuredriven}\\
                \toprule
                &Microfiltraton&Ultrafiltration&Nanofiltration&Reverse Osmosis\\
                \midrule
                \endfirsthead
                \caption[Characteristics of pressure driven membrane processes]{Characteristics of pressure driven membrane processes (continued)}\\
                \toprule    
                &   Microfiltraton                              &   Ultrafiltration                 &   Nanofiltration                              &   Reverse Osmosis                     \\
                \midrule
                \endhead
                Membrane material                           &       
                \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                    \item hydrophobic polymeric (PTFE, PVDF, PP, PE)
                    \item hydrophilic polymeric (cellulose, PC, PSU/PES, PI/PEI, PA, PEEK)
                    \item ceramic (Al2O3, ZrO2, TiO2, SiC) 
                    \item glass (SiO2), carbon, metals (stainless steel, palladium, tungsten, silver)
                \end{itemize}
                &
                \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                    \item polymeric (PSU/PES, PVDF, PAN, cellulose, PE/PEI, PA, PEEK) 
                    \item ceramic (Al2O3, ZrO2)
                \end{itemize}
                &
                %   \multicolumn{2}{c}{
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item   integral-asymmetric:\newline
                        cellulose esters (CDA, CTA),\newline
                        aromatic PA,\newline
                        PBI, PAH, PI
                        \item composites 
                    \end{itemize}
                    &
                    \\
                    Characterisation                    & 
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item SEM
                        \item bubble-point method
                        \item mercury porometry
                        \item permeation
                    \end{itemize}
                    &
                    \raggedright
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item cuff-off method
                        \item thermoporometry
                        \item liquid displacement
                        \item permporometry
                        \item gas ad-/desorption
                        \item permeation
                    \end{itemize}
                    & 
                    %\multicolumn{2}{c}{
                        \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                            \item   permeation methods (gas/liquids) 
                            \item   DSC/DTA methods 
                            \item   density measurements 
                            \item   WAXS 
                            \item   plasma etching 
                            \item   surface analysis
                        \end{itemize}               
                        & 
                        \\
                        \bottomrule
                        \multicolumn{5}{p{\dimexpr0.93\linewidth+4\tabcolsep}}{\scriptsize footnote}\\
                    \end{longtable}
                }
            \end{landscape}
        \end{document}

在此处输入图片描述

答案1

之前longtable插入以下内容:

\setlist[itemize]{nosep,
    leftmargin=*,
    label=\textbullet,
    before={\begin{minipage}[t]{\hsize}},%https://tex.stackexchange.com/questions/531952/
    after ={\end{minipage}}
                  }

对于列,使用Lyiu 定义的列。因此 MWE 可以是:

\documentclass[12pt,a4paper]{scrbook}
\usepackage[hmargin={3cm,2.5cm},
            vmargin={2.5cm,2cm},
            includehead, includefoot
            ]{geometry}

\usepackage[UKenglish]{babel}
\usepackage[T1]{fontenc}
\usepackage{scrlayer-scrpage}

\usepackage{pdflscape}
\usepackage{array, booktabs, longtable}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\usepackage{mhchem}

\usepackage{enumitem}

\begin{document}
    \begin{landscape}
\begingroup
\small
\renewcommand\arraystretch{2}
\setlength\tabcolsep{4pt}
\setlist[itemize]{nosep,
    leftmargin=*,
    label=\textbullet,
    before={\begin{minipage}[t]{\hsize}},%https://tex.stackexchange.com/questions/531952/
    after ={\end{minipage}}
                  }
    \begin{longtable}{@{} *{5}{L{44mm}} @{}}
\caption[Characteristics of pressure driven membrane processes]%
         {Characteristics of pressure driven membrane processes}
\label{tab:pressuredriven}\\
    \toprule
    & Microfiltraton & Ultrafiltration & Nanofiltration & Reverse Osmosis       \\
    \midrule
\endfirsthead
\caption[]{Characteristics of pressure driven membrane processes (continued)}   \\
    \toprule
    & Microfiltraton & Ultrafiltration & Nanofiltration & Reverse Osmosis       \\
    \midrule
\endhead
    \midrule
    \multicolumn{5}{r}{\scriptsize continue on next page}                       \\
\endfoot
    \bottomrule
\endlastfoot
    bottomrule
Membrane material                           
    &   \begin{itemize}
    \item hydrophobic polymeric (PTFE, PVDF, PP, PE)
    \item hydrophilic polymeric (cellulose, PC, PSU/PES, PI/PEI, PA, PEEK)
    \item ceramic (\ce{Al2O3}, \ce{ZrO2}, \ce{TiO2}, \ce{SiC})
    \item glass (SiO2), carbon, metals (stainless steel, palladium, tungsten, silver)
        \end{itemize}
        &   \begin{itemize}
        \item polymeric (PSU/PES, PVDF, PAN, cellulose, PE/PEI, PA, PEEK)
        \item ceramic (\ce{Al2O3}, \ce{ZrO2})
            \end{itemize}
            &   \begin{itemize}
            \item   integral-asymmetric: 
                    
                    cellulose esters (CDA, CTA), 
                
                    PBI, PAH, PI
            \item composites
                    \end{itemize}
                    &
                    \\
Membrane material
    &   \begin{itemize}
    \item hydrophobic polymeric (PTFE, PVDF, PP, PE)
    \item hydrophilic polymeric (cellulose, PC, PSU/PES, PI/PEI, PA, PEEK)
    \item ceramic (\ce{Al2O3}, \ce{ZrO2}, \ce{TiO2}, \ce{SiC})
    \item glass (SiO2), carbon, metals (stainless steel, palladium, tungsten, silver)
        \end{itemize}
        &   \begin{itemize}
        \item polymeric (PSU/PES, PVDF, PAN, cellulose, PE/PEI, PA, PEEK)
        \item ceramic (\ce{Al2O3}, \ce{ZrO2})
            \end{itemize}
            &   \begin{itemize}
            \item   integral-asymmetric:

                    cellulose esters (CDA, CTA),

                    PBI, PAH, PI
            \item composites
                    \end{itemize}
                    &
                    \\
     \end{longtable}
    \endgroup
    \end{landscape}
\end{document}

在此处输入图片描述

但是,使用tabularray包代码会更简单和简洁。在 MWE 使用它时,我采取了一些自由并稍微重新设计了表格(在我看来看起来更好):

在此处输入图片描述

\documentclass[12pt,a4paper]{scrbook}
\usepackage[hmargin={3cm,2.5cm},
            vmargin={2.5cm,2cm},
            includehead, includefoot
            ]{geometry}

\usepackage[UKenglish]{babel}
\usepackage[T1]{fontenc}
\usepackage{scrlayer-scrpage}

\usepackage{pdflscape}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, varwidth}
\usepackage{mhchem}

\usepackage{enumitem}

\begin{document}
    \begin{landscape}
\small
\setlist[itemize]{nosep,leftmargin=*}
\SetTblrStyle{contfoot}{font=\footnotesize\itshape}
    \begin{longtblr}[
caption = {Characteristics of pressure driven membrane processes},
  entry = {Characteristics of pressure driven membrane processes},
  label = {tab:pressuredriven},
                    ]{colspec = {@{} X[0.6,l] *{4}{X[l]} @{}},
                      stretch = -1, %<--- remove extra space above and below lists
                                    % with nosep option; doc p.51 tabularray
                       rowsep = 5pt,
                       rowhead  = 1,
                        measure = vbox,
                      }
    \toprule
    &   Microfiltraton 
        &   Ultrafiltration 
            &   Nanofiltration 
                &   Reverse Osmosis         \\
    \midrule
Membrane material                           
    &   \begin{itemize}
    \item hydrophobic polymeric (PTFE, PVDF, PP, PE)
    \item hydrophilic polymeric (cellulose, PC, PSU/PES, PI/PEI, PA, PEEK)
    \item ceramic (\ce{Al2O3}, \ce{ZrO2}, \ce{TiO2}, \ce{SiC})
    \item glass (SiO2), carbon, metals (stainless steel, palladium, tungsten, silver)
        \end{itemize}
        &   \begin{itemize}
        \item polymeric (PSU/PES, PVDF, PAN, cellulose, PE/PEI, PA, PEEK)
        \item ceramic (\ce{Al2O3}, \ce{ZrO2})
            \end{itemize}
            &   \begin{itemize}
            \item   integral-asymmetric: 
                    
                    cellulose esters (CDA, CTA), 
                
                    PBI, PAH, PI
            \item composites
                    \end{itemize}
                    &
                    \\
Membrane material
    &   \begin{itemize}[nosep]
    \item hydrophobic polymeric (PTFE, PVDF, PP, PE)
    \item hydrophilic polymeric (cellulose, PC, PSU/PES, PI/PEI, PA, PEEK)
    \item ceramic (\ce{Al2O3}, \ce{ZrO2}, \ce{TiO2}, \ce{SiC})
    \item glass (SiO2), carbon, metals (stainless steel, palladium, tungsten, silver)
        \end{itemize}
        &   \begin{itemize}[nosep]
        \item polymeric (PSU/PES, PVDF, PAN, cellulose, PE/PEI, PA, PEEK)
        \item ceramic (\ce{Al2O3}, \ce{ZrO2})
            \end{itemize}
            &   \begin{itemize}[nosep]
            \item   integral-asymmetric:

                    cellulose esters (CDA, CTA),

                    PBI, PAH, PI
            \item composites
                    \end{itemize}
                    &
                    \\
                    \\
Membrane material
    &   \begin{itemize}[nosep]
    \item hydrophobic polymeric (PTFE, PVDF, PP, PE)
    \item hydrophilic polymeric (cellulose, PC, PSU/PES, PI/PEI, PA, PEEK)
    \item ceramic (\ce{Al2O3}, \ce{ZrO2}, \ce{TiO2}, \ce{SiC})
    \item glass (SiO2), carbon, metals (stainless steel, palladium, tungsten, silver)
        \end{itemize}
        &   \begin{itemize}[nosep]
        \item polymeric (PSU/PES, PVDF, PAN, cellulose, PE/PEI, PA, PEEK)
        \item ceramic (\ce{Al2O3}, \ce{ZrO2})
            \end{itemize}
            &   \begin{itemize}[nosep]
            \item   integral-asymmetric:

                    cellulose esters (CDA, CTA),

                    PBI, PAH, PI
            \item composites
                    \end{itemize}
                    &
                    \\
    \bottomrule
\end{longtblr}
    \end{landscape}
\end{document}

答案2

再次尝试寻找答案并发现了这一点: 在 longtable 中逐项列出

即使表中并非所有条目都是列表,使用P列类型( )也可以起作用(该语句使我之前无法尝试此操作)。\newcolumntype{P}[1]{>{\endgraf\vspace*{-\baselineskip}}p{#1}}

相关内容