你好,我正在使用 elsarticle 类。插入如下所示的表格:
\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*}
我得到的结果是
我想将第一列左对齐。使用 l 代替 C 不起作用。还有其他解决方案吗?另外,我希望 (4M) 和下一行的第二列中的其他两列一样,任何帮助都将不胜感激。问候
答案1
这个怎么样?
\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}