1

I would like to merge the two columns ("Nanofiltration" and "Reverse Osmosis", see image) to one column for both cells and centered.

However, multicolumn does not work: ! LaTeX Error: Something's wrong--perhaps a missing \item.

I can do EITHER \multicolumn without \itemize (but then I have a problem with the table to exceed the page margin) OR \itemize without \multicolumn (as in the example below).

\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}               
                    & 
                \\
                Industrial application                      &
                    \raggedright    
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item analytical applications
                        \item sterilisation and clarification (food, beverages, pharmaceuticals)
                        \item ultrapure water for semiconductors
                        \item cell harvesting, bioreactor in biotechnology
                        \item medical application (plasmapheresis)
                        \item water treatment
                    \end{itemize}       
                    & 
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item dairy
                        \item food (starch, proteins)
                        \item metallurgy (oil-water emulsions)
                        \item textile applications
                        \item pharmaceutical (enzymes, antibiotics)
                        \item water treatment
                    \end{itemize}
                    &
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item desalination of brackish water
                        \item micropollutents removal
                        \item water softening
                        \item waste water treatment
                        \item retention of dyes
                    \end{itemize}
                    &
                    \begin{itemize}[noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
                        \item desalination of brackish and sea water
                        \item ultrapure water production
                        \item food juice and sugars concentration
                        \item milk concentration
                    \end{itemize}
                \\
                \bottomrule
                \multicolumn{5}{p{\dimexpr0.93\linewidth+4\tabcolsep}}{\scriptsize footnote}\\
            \end{longtable}
                }
            \end{landscape}
\end{document}

enter image description here

11
  • 2
    it works in a multicolumn but does not work in a c column as c is like \mbox a one-line entry set to its natural width, you can not have vertical constructs like a list in any c column (unrelated to \multicolumn or longtable) use p{...} for a suitable width not c Sep 29, 2023 at 10:23
  • @DavidCarlisle So you´re saying it´s not possible to center the merged list using multicolumn? Sep 29, 2023 at 10:32
  • 1
    no I'm saying you can not use a c column, you need to use p. If you are merging two p{4cm} you want \multicolumn{2}{p{\dimexpr8cm+2\tabcolsep}} not \multicolumn{2}{c} Sep 29, 2023 at 10:43
  • You could of couse use the C column you have defined for a centred p but since you have an itemized list, centering would be rather weird. Sep 29, 2023 at 10:45
  • 1
    See also tex.stackexchange.com/questions/567746/… Sep 29, 2023 at 13:00

2 Answers 2

0

Based on second example in in my answer on your previous question:

\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.5,l]*{4}{X[l]} @{}},
                      stretch = -1, %<--- remove extra space above and below lists
                                    % with nosep option; doc p.51 tabularray
                       cell{2-Z}{4} = {c=2}{},  % <------- added
                       rowsep = 5pt,
                       rowhead  = 1,
                        measure = vbox,
                        hspan=minimal            % <------- added
                      }
    \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}

enter image description here

0

Itemize works within Multicolumn using p (instead of c) option.

In this case: \multicolumn{2}{p{\dimexpr8cm+2\tabcolsep}}.

If the bullets should be centered within the merged cell, there are a few options:

I used option one resulting in this table format:

enter image description here

You must log in to answer this question.

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