TeX - LaTeX Asked on July 12, 2021
I used a code, I have a table which created by using tabularx, but the problem is that, I want to create that following table by using tabularx
and using textwidth
I wont change the structure of my code and the width of my table :
documentclass[twocolumn]{svjour3}
usepackage{graphicx}
usepackage{makecell, multirow, tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % new
usepackage{enumitem} % new
newlist{tabitem}{itemize}{1} % <-- defined new list
setlist[tabitem]{nosep, % <-- new list setup
leftmargin=*,
label=$bullet$,
before=begin{minipage}[t]{linewidth},
after=end{minipage}
}
begin{table} [htp]
setcellgapes{2pt}
centering
makegapedcells
setlengthtabcolsep{1pt}
begin{table} [htp]
setcellgapes{4pt}
centering
makegapedcells
setlengthtabcolsep{2pt}
begin{tabularx}{linewidth}
{| L L|
p{0.18textwidth} |
p{0.18textwidth} |
}
hline
multicolumn{2}{c}{ multirow{2}{=} {centering A}} &
multirow{2}{=} {centering TextTextText} &
multirow{2}{=} {centering TextTextText}
hline
hline
multicolumn{2}{c}{ {centering MADM}} &
multirow{2}{=} {centering T} &
multirow{2}{=} {centering T}
hline
end{tabularx}
end{table}
documentclass[twocolumn]{svjour3}
usepackage{graphicx}
usepackage[column=0]{cellspace}
setlengthcellspacetoplimit{4pt}
setlengthcellspacebottomlimit{4pt}
usepackage{cellspace, multirow, tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % new
usepackage{enumitem} % new
newlist{tabitem}{itemize}{1} % <-- defined new list
setlist[tabitem]{nosep, % <-- new list setup
leftmargin=*,
label=$bullet$,
before=begin{minipage}[t]{linewidth},
after=end{minipage}
}
usepackage[table]{xcolor} % new
usepackage{xparse} % new
NewExpandableDocumentCommandmcl{O{1}m}
{multicolumn{#1}{|c|}{#2}}
begin{document}
begin{table} [htp]
centering
setlengthtabcolsep{2pt}
begin{tabularx}{linewidth}{| 0{L} 0{L}| *{2}{0{p{0.15textwidth}} |}}
hline
mcl[2]{A} & TextTextText & TextTextText
hline
mcl[2]{MADM}
& T & T
hline
multirow{2}{=}{AAA}
& mcl[1]{multirow{2}{*}{AAA}}
& T & T
cline{3-4}
& mcl[1]{}
& cellcolor{yellow}{T}
& T
hline
end{tabularx}
end{table}
end{document}
Answered by Zarko on July 12, 2021
documentclass[twocolumn]{svjour3}
usepackage{graphicx}
usepackage{makecell, multirow, tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % new
usepackage{enumitem} % new
newlist{tabitem}{itemize}{1} % <-- defined new list
setlist[tabitem]{nosep, % <-- new list setup
leftmargin=*,
label=$bullet$,
before=begin{minipage}[t]{linewidth},
after=end{minipage}
}
begin{document}
begin{table}[!htp]
setcellgapes{2pt}
centering
makegapedcells
begin{tabularx}{linewidth}{|l|l|X|X|}
hline
multicolumn{2}{|l|}{A} & TextTextText & TextTextText hline
multicolumn{2}{|l|}{MADM} & T & T hline
multirow{2}{*}[-2pt]{AAAA} & multirow{2}{*}[-2pt]{AAA} & T & T cline{3-4}
& & T & T hline
end{tabularx}
end{table}
end{document}
If you want a page-wide table in that two-column document, use the starred version of table (begin{table*}[!htb] .. end{table*}
):
Answered by AboAmmar on July 12, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP