2

I am trying to create a table. This is the code I am using and I am getting this output. As you can see there are weird cell alignments and I can't explain the blank spaces in the bottom part either. Help is appreciated.

enter image description here

\begin{frame}{Ergebnisse}

\begin{table}[]
\centering
\resizebox{0.9\columnwidth}{!}{
    \begin{tabular}{|c|c|c|c|c|}
    \hline
         \textbf{Architektur}                       & \textbf{Model}    & \textbf{Lhasa-Ü-Tsang}     & \textbf{Changdu-Kham}  & \textbf{Amdo Pastoral} \\ \hline
         Dialekt-spezfisch                          &                   & 28.83             & 62.56         & 17.6          \\ \hline
         \makecell{WaveNet-CTC \\ ohne Dialekt ID}  &                   & 29.55             & 62.83         & 33.52         \\ \hline
         \makecell{WaveNet-CTC \\ mit Dialekt ID}   & DialektID-Sprache & 32.84             & 68.58         & 33            \\ \cline{2-5}
                                                    & Sprache-DialektID & 26.8              & 64.03         & 30.79         \\ \hline 
         \makecell{Attention- \\ WaveNet-CTC}       & DialektID-Sprache & 52.19             & 65.24         & 50.22         \\ \cline{2-5} 
                                                    & Sprache-DialektID & 55.16             & 67.78         & 55.23         \\ \hline
         \makeCell{WaveNet- \\ Attention-CTC}       & DialektID-Sprache & 21.44             & 60.16         & 20.46         \\ \cline{2-5}
                                                    & Sprache-DialektID & 23.79             & 62.96         & 24.15         \\ \hline
                                        
    \end{tabular}
}
\caption{SER(\%) des Multitask Modells für Spracherkennung}
\end{table}

\end{frame}
3
  • What result do you actually want? Do you have a sketch of the desired output? – Excelsior May 7 at 10:03
  • 1
    Change \makeCell to \makecell -- and don't ignore LaTeX's error messages. – Mico May 7 at 10:05
  • @Mico Thanks that solved the issue with the blank spaces. Now I only want "DialektID-Sprache" and "Sprache-DialektID" cells to be the same size. – HWilmer May 7 at 10:11
2

I would like to suggest that you give the whole table a more open "look", mainly by omitting all vertical lines and retaining few, but well-spaced, horizontal lines.

enter image description here

\documentclass{beamer} 
\usepackage[ngerman]{babel}
\usepackage{tabularx,ragged2e,booktabs,multirow,makecell}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}\hsize=#1\hsize}X}
\newcolumntype{C}[1]{>{\Centering\hspace{0pt}\hsize=#1\hsize}X}
\renewcommand\tabularxcolumn[1]{m{#1}}

\begin{document}

\begin{frame}{SER (\%) des Multitask-Modells für Spracherkennung}
\small
\setlength\tabcolsep{3pt} % default: 6pt
\begin{tabularx}{\textwidth}{@{} L{1.45} l *{3}{C{0.85}} @{}}
   \toprule
   Architektur & Modell & Lhasa-Ü-Tsang & Changdu-Kham & Amdo Pastoral \\ 
   \midrule
   Dialekt-spezfisch          & & 28.83 & 62.56 & 17.60 \\ \addlinespace
   \makecell[l]{WaveNet-CTC\\ohne Dialekt ID}  
                              & & 29.55 & 62.83 & 33.52 \\ \addlinespace
   \multirow{2}{*}{\makecell[l]{WaveNet-CTC\\mit Dialekt ID}}   
            & DialektID-Sprache & 32.84 & 68.58 & 33.00 \\
            & Sprache-DialektID & 26.80 & 64.03 & 30.79 \\ \addlinespace 
   \multirow{2}{*}{\makecell[l]{Attention-\\WaveNet-CTC}}    
            & DialektID-Sprache & 52.19 & 65.24 & 50.22 \\ 
            & Sprache-DialektID & 55.16 & 67.78 & 55.23 \\ \addlinespace
   \multirow{2}{*}{\makecell[l]{WaveNet-\\Attention-CTC}}    
            & DialektID-Sprache & 21.44 & 60.16 & 20.46 \\
            & Sprache-DialektID & 23.79 & 62.96 & 24.15 \\ 
   \bottomrule                             
\end{tabularx}

\end{frame}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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