I can not see what i wrong with my table code
\begin{tabular}{l*{11}{c}r}
& A & B & C & D & E & F & G & H\\
\hline
A & 0_A & 4_A & \infty & 5_A & 6_A & \infty & \infty & \infty\\
B & & 4_A & 14_B & 5_A & 6_A & \infty & \infty & \infty\\
D & & & 10_D & 5_A & 6_A & 12_D & 9_D & \infty\\
E & & & 10_D & & 6_A & 8_E & 7_E & \infty\\
G & & & 10_D & & & 8_E & 7_E & 12_G\\
F & & & 9_F & & & 8_E & & 12_G\\
C & & & 9_F & & & & & 11_C\\
H & & & & & & & & 11_C
\end{tabular}
Best Answer
Your given code results in several warnings that an
$ is missing
. So your given code can not work fine.You have two possibilities to solve the issue:
$
arround the mathematical parts in the table, like$\infty$
and$0_A$
etc.array
, which has to be used in mathematical mode, started with\[
, ended with\]
. To keep the letters in the first row and column upright, I used command\mathrm{A}
etc.The following MWE shows both solutions:
resulting in the following pdf page: