2

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, where the value of the first column A is 0.1/5, the column TexttExText is 0.2/5 and TextTextText is 0.2/5.

I wanna need an information, I want that the column accept the auto break line because I will remplace T by a long text.

The picture of the table enter image description here

I tried to create that following code, please help me :

\documentclass[twocolumn]{svjour3}  
\usepackage{graphicx}
\usepackage{makecell, multirow, tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}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
\setlength\tabcolsep{1pt}
  \begin{table} [htp]
    \setcellgapes{4pt}
    \centering
    \makegapedcells
    \setlength\tabcolsep{2pt}
\begin{tabularx}{\linewidth}
{| L L| 
p{0.18\textwidth} |
p{0.18\textwidth} | 
}  
  \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}
5
1

Is it what you want?

\documentclass[twocolumn]{article}%{svjour3}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{makecell, multirow, tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X} % new

\usepackage{lipsum}

\begin{document}

\lipsum[2]

 \begin{table} [htp]
    \setcellgapes{4pt}
    \centering
    \makegapedcells
    \setlength\tabcolsep{2pt}
\begin{tabularx}{\columnwidth}{|>{\hsize =0.66\hsize}L| >{\hsize =0.66\hsize}L|
 >{\hsize =1.34\hsize}L|>{\hsize =1.34\hsize}L|}
  \hline
  \multicolumn{2}{|c|}{ \multirowcell{1}{\centering A}} &
   \multirow{2}{=} {\centering TexttEXTtext} &
   \multirow{2}{=} {\centering TextTextText} \\
    \hline
 \multicolumn{2}{|c|}{ {\centering MADM}} &
 T & T \\
 \hline
 AAAA & AAA & T & T \\
 \hline
  \end{tabularx}
  \end{table}

  \end{document} 

enter image description here

7
  • But I cant remove the space between the first and the second table – stevGates Jun 22 '20 at 14:38
  • Error "! LaTeX Error: Can be used only in preamble.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \usepackage" – stevGates Jun 22 '20 at 14:40
  • Compiling this very code, and only this code?? – Bernard Jun 22 '20 at 14:44
  • What are your first and second tables? – Bernard Jun 22 '20 at 14:45
  • I cant remove the space between the first and the second table – stevGates Jun 22 '20 at 15:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.