0

Hi there I am using class elsarticle. Inserting a table as given below:

  \begin{table*}[h] % final column is twice as wide as first three
    \caption{Dataset Summary Used for the Experiments}
    \begin{tabularx}{\textwidth}{@{} C{1.2}C{0.3}C{0.4} C{2.1} @{}}
        \toprule
        Dataset & Number of speakers & Total utterances & Emotions\\
        \midrule
        Berlin Emotional Speech Database & 10 (5M,~5F) & 535 & Angry, Boredom, Disgust, Fear, Happy, Sadness, Neutral\\
Surrey Audio-Visual Expressed Emotion Database &4 (~4M)& 480&Angry, Disgust, Fear, Happy, Neutral, Sad, Surprised\\
        Ryerson Audio-Visual Database of Emotional Speech and Song&24 (12M,~12F)&1440&Neutral, Calm, Happy, Sad, Angry, Disgust, Surprised\\
        \bottomrule
    \end{tabularx}
\end{table*}

The results I am getting is

as below

I want to align the first col in left. Using l in place of C is not working. Is there any other solution. Also I want (4M) in second col in next line as other two, any help would be appreciated. Regards

1 Answer 1

3

How about this?

\documentclass{elsarticle}
\usepackage{fullpage}
\usepackage{tabularx}
\usepackage{booktabs}
\newcolumntype{A}{>{\raggedright\arraybackslash}p{0.28\textwidth}}
\newcolumntype{B}{>{\centering\arraybackslash}p{0.1\textwidth}}
\newcolumntype{C}{>{\centering\arraybackslash}p{0.09\textwidth}}
\newcolumntype{D}{>{\centering\arraybackslash}p{0.49\textwidth}}
\begin{document}
\begin{table*}[h]
  \caption{Dataset Summary Used for the Experiments}
  {\small
    \begin{tabularx}{1.04\textwidth}{ABCD}
      \toprule
      Dataset & Number of speakers & Total utterances & Emotions\\
      \midrule
      Berlin Emotional Speech Database & 10 (5M,~5F)&
      535 & Angry, Boredom, Disgust, Fear, Happy, Sadness, Neutral\\
      Surrey Audio-Visual Expressed Emotion Database&{\centering 4\\(4M)}&
      480&Angry, Disgust, Fear, Happy, Neutral, Sad, Surprised\\
      Ryerson Audio-Visual Database of Emotional Speech and Song&24 (12M,~12F)&
      1440&Neutral, Calm, Happy, Sad, Angry, Disgust, Surprised\\
      \bottomrule
    \end{tabularx}
  }
\end{table*}
\end{document}

enter image description here

2
  • Thanks Sir @modnar Jul 31, 2021 at 16:32
  • @KRISHNACHAUHAN, you are welcome!
    – citsahcots
    Jul 31, 2021 at 16:33

You must log in to answer this question.

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