0

1st picture is the expected way in a table cell, 2nd picture is the failed outcome using the following table rules. 1st picture's table cell items can be written in two lines, but in the 2nd picture it cannot make two or three lines, please help me to modify the rules to make the 2nd one as 1st one, Thank you very much

 \sisetup{table-format=4.2(3), separate-uncertainty} \small \setlength\tabcolsep{0pt} \begin{threeparttable} \caption{} \label{tbl:Filt res polymer} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}>{$}l<{$} *{6}{S} } \toprule \textbf{Year} &{\textbf{{Permissioned lottery-based}}} & \mcc[3]{\textbf{CMC}} \\ \cmidrule{2-3} \cmidrule(l){4-5} \cmidrule(l){6-7} % \textbf{[ppb]} & \mcc{\textbf{1.05}} & \mcc{\textbf{2.10}} & \mcc{\textbf{0.525}} & \mcc{\textbf{1.05}} & \mcc{\textbf{2.10}} \\ \midrule \bottomrule \end{tabular*} \begin{tablenotes}[]\small \item[*] \end{tablenotes} \end{threeparttable} \end{table*} 

enter image description here

2
  • 2
    Please don't make us try to guess what packages you're using and post a proper minimal working example compiliable as is. There are many other questions dedicated to this general topic, and you probably just need to change the column specifier to something that supports wrapping, but I can't test your current code. Too many commands I don't know where they came from... Commented Jun 15, 2022 at 1:04
  • Please also tell us how or where \mcc is defined. Commented Jun 15, 2022 at 2:50

1 Answer 1

1

I guessing that you like to obtain the following table design:

enter image description here

With tabularray package you can simply split text in cel into two lines by

{first line\\ second line} 

In MWE below is used recent version (2022B) of package which enable with option guard simple writing of `S column headers.

\documentclass{article} \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \begin{document} \begin{table} \sisetup{table-format=4.2(2), minimum-decimal-digits = 2, separate-uncertainty, tight-spacing} \small \setlength\tabcolsep{0pt} \begin{talltblr}[ caption = {caption}, label = {tbl:Filt res polymer}, remark{Sorce} = {Annual report \dots} ]{colsep=3pt, colspec = {@{} l *{6}{Q[c, m, si]} @{}}, row{1,2} = {font=\bfseries, guard}, } \toprule \SetCell[r=2]{c} Year & \SetCell[c=2]{c} {Permissioned\\ lottery-based} & & \SetCell[c=2]{c} CMC & & \SetCell[c=2]{c} ??? & \\ \cmidrule[lr]{2-3} \cmidrule[lr]{4-5} \cmidrule[l]{6-7} & 1.05 & 2.1 & 0.525 & 1.05 & 2.10 & ? \\ \midrule 2021 & 1234.56(7) & 234.56(1) & 34.56(2) & 4.56(3) & 5432.1(6) & 432.1(8) \\ 2022 & 432.1(8) & 5432.1(6) & 4.56(3) & 34.56(2) & 234.56(1) & 1234.56(7) \\ \bottomrule \end{talltblr} \end{table} \end{document} 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.