You have forgotten a lot of vertical bars |
in the declaration of your table.
Also, you must remember, that if you use \multicolumn
, you are redefining the look of the column, including the vertical bars. You have to repeat the definition of vertical bars in that case.
Next, you were missing some important packages, for example multirow
, to get the \multirow
-command working. Package ifsym
with option [misc]
to make the command \StrokeFive
working.
You should think about using the >{$}...<{$}
magic, to save from repeatedly inserting the $
in the first column.
I was not able to find a package for the command \boldsymbol
. I replaced it by \mathbf
which might be the same.
First example:
\documentclass{scrartcl}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[misc]{ifsym} % for \StrokeFive
\begin{document}
\begin{tabularx}{\textwidth}{ |% <-- was missing!
>{\centering\arraybackslash}p{1cm} |
X |
p{0.5cm} |
>{\centering\arraybackslash}X |
p{0.5cm} | % <-- bar missing
> {\centering\arraybackslash}X |
p{0.5cm} | % <--- bar missing
}
\hline
\textbf{Code}
& \multicolumn{2}{c|}{\textbf{Richtige Bewertung}}
% & \multicolumn{2}{c}{ \multirow{2}{}{\textbf{Richtige Bewertung}}}
& \multicolumn{4}{c|}{\textbf{Falsche Bewertung}} \\
\cline{4-7}
& \multicolumn{2}{c|}{}
& \multicolumn{2}{c|}{\textbf{False Negatives}}
& \multicolumn{2}{c|}{\textbf{False Positives}} \\
\hline %% in your example was only one line!
$\mathbf{A_1}$ & \StrokeFive\StrokeFive\StrokeTwo (12) & & & & & \\ \hline
$\mathbf{A_2}$ & & & & & & \\ \hline
$\mathbf{B_1}$ & & & & & & \\ \hline
$\mathbf{B_2}$ & & & & & & \\ \hline
$\mathbf{C_1}$ & & & & & & \\ \hline
$\mathbf{C_2}$ & & & & & & \\ \hline
$\mathbf{D_1}$ & & & & & & \\ \hline
$\mathbf{D_2}$ & & & & & & \\ \hline
\end{tabularx}
\end{document}
Second example, using >{$}...<{$}
to save typing:
\documentclass{scrartcl}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[misc]{ifsym} % for \StrokeFive
\begin{document}
\begin{tabularx}{\textwidth}{ |% <-- was missing!
>{\centering\arraybackslash $}p{1cm} <{$} | % <---- added math mode
% magic here!
X |
p{0.5cm} |
>{\centering\arraybackslash}X |
p{0.5cm} | % <-- bar missing
> {\centering\arraybackslash}X |
p{0.5cm} | % <--- bar missing
}
\hline
\multicolumn{1}{|c}{\textbf{Code}} % \multicolumn gets rid of math
% mode here!
& \multicolumn{2}{c|}{\textbf{Richtige Bewertung}}
% & \multicolumn{2}{c}{ \multirow{2}{}{\textbf{Richtige Bewertung}}}
& \multicolumn{4}{c|}{\textbf{Falsche Bewertung}} \\
\cline{4-7}
& \multicolumn{2}{c|}{}
& \multicolumn{2}{c|}{\textbf{False Negatives}}
& \multicolumn{2}{c|}{\textbf{False Positives}} \\
\hline %% in your example was only one line!
\mathbf{A_1} & \StrokeFive\StrokeFive\StrokeTwo (12) & & & & & \\ \hline
\mathbf{A_2} & & & & & & \\ \hline
\mathbf{B_1} & & & & & & \\ \hline
\mathbf{B_2} & & & & & & \\ \hline
\mathbf{C_1} & & & & & & \\ \hline
\mathbf{C_2} & & & & & & \\ \hline
\mathbf{D_1} & & & & & & \\ \hline
\mathbf{D_2} & & & & & & \\ \hline
\end{tabularx}
\end{document}
Result for both examples:
