1

there I am using the code given below and also pasted the output. I want to align this table can any guide?

\documentclass[onecolumn]{svjour3}          

\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{sidecap}
\usepackage{subcaption}
\usepackage{multirow}
\usepackage{cite}
\usepackage{flushend}
\usepackage{booktabs,siunitx}


\newcolumntype{A}{>{\raggedright\arraybackslash}p{0.24\linewidth}}
\newcolumntype{B}{>{\centering\arraybackslash}p{0.04\linewidth}}
\newcolumntype{C}{>{\centering\arraybackslash}p{0.05\linewidth}}
\newcolumntype{D}{>{\centering\arraybackslash}p{0.04\linewidth}}
\newcolumntype{E}{>{\centering\arraybackslash}p{0.04\linewidth}}
\newcolumntype{F}{>{\centering\arraybackslash}p{0.04\linewidth}}
\newcolumntype{G}{>{\centering\arraybackslash}p{0.05\linewidth}}
\newcolumntype{H}{>{\centering\arraybackslash}p{0.04\linewidth}}
\newcolumntype{I}{>{\centering\arraybackslash}p{0.07\linewidth}}
\newcolumntype{J}{>{\centering\arraybackslash}p{0.06\linewidth}}
\newcolumntype{K}{>{\centering\arraybackslash}p{0.1\linewidth}}
\newcolumntype{P}\[1\]{>{\centering\arraybackslash}p{#1}}


\begin{document}



\begin{table*}[ht]
    \caption{Utterance distribution over emotional classes of the databases used in the experiments}
    \label{summary}
    {\small
        \begin{tabularx}{1.04\textwidth}{ABCDEFGHIJK}
            
            \toprule
            Dataset &Angry&Neutral&Happy&Sad&Calm&Disgust &Fear&Surprised&Boredom& Total utterances\\
            \midrule
            
            
            RAVDESS &192&96&192&192&192&192&192&192&&1440\\
            Berlin Emotional Speech Database (EmoDB)  &127&79&71&62&-&46&68&-&82&535\\
            
            \bottomrule
        \end{tabularx}
    }
\end{table*}

\end{document}  

 

enter image description here

1
  • You should probably explain what exactly you mean my "align" here?
    – daleif
    Jun 20, 2022 at 12:35

2 Answers 2

1

First of all, caption is not compatible with svjour3 and indeed you get

Package caption Warning: Unknown document class (or package),
(caption)                standard defaults will be used.
See the caption package documentation for explanation.

I'd avoid the two long entries, adding a legend below the table. You can use tabular* and let TeX compute the intercolumn space.

\documentclass[onecolumn]{svjour3}          

\usepackage{booktabs}

\begin{document}

\begin{table}[htp]

\caption{Utterance distribution over emotional classes of the databases used in the experiments}
\label{summary}

\setlength{\tabcolsep}{0pt}

\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lcccccccccc}
\toprule
Dataset & Angry & Neutral & Happy & Sad & Calm & Disgust & Fear & Surprised & Boredom & TU \\
\midrule
RAVDESS & 192 & 96 & 192 & 192 & 192 & 192 & 192 & 192 &    & 1440 \\
EmoDB   & 127 & 79 &  71 &  62 &  -- &  46 &  68 &  -- & 82 &  535 \\
\midrule[\heavyrulewidth]
\multicolumn{11}{l}{EmoDB: Berlin Emotional Speech Database; TU: Total utterances}
\end{tabular*}

\end{table}

\end{document}  

enter image description here

0
\documentclass[onecolumn]{svjour3}          

\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{subcaption}
\usepackage{booktabs,siunitx}    

\begin{document}

\begin{table*}[ht]
    \caption{Utterance distribution over emotional classes of the databases used in the experiments}
    \label{summary}
    \resizebox{\linewidth}{!}{%
        \tabcolsep=4pt
        \begin{tabular}{@{}*{11}{c} @{}}\toprule
            Dataset &Angry&Neutral&Happy&Sad&Calm&Disgust &Fear&Surprised&Boredom& 
                 \tabular{l}Total\\utterances\endtabular\\\midrule            
            
            RAVDESS &192&96&192&192&192&192&192&192&&1440\\
            \tabular{l}Berlin\\Emotional\\ Speech\\ Database \\(EmoDB)\endtabular  
            &127&79&71&62&-&46&68&-&82&535\\
            \bottomrule
        \end{tabular}}
\end{table*}

\end{document} 

enter image description here

You must log in to answer this question.

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