S programom Latex želim ustvariti takšno tabelo
---------------------------------
| sets |
---------------------------------
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---------------------------------------
| I1 | * | | * | * | | * | | * |
---------------------------------------
Tukaj je to, kar sem napisal
\begin{table}
\caption{Multiprogram sets}
\label{multiprogram}
\begin{tabular}{| c | c | c | c | c | c | c | c | c |}
\cline{3-9}
\multicolumn{8}{}{} & Sets \\
\hline
\multicolumn{1}{}{} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline
astar & & * & & * & & & * & \\
\hline
\end{tabular}
\end{table}
Ampak to ne deluje! Izpis je videti kot
-----------------------------
sets |
---------------------------------------
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---------------------------------------
| I1 | * | | * | * | | * | | * |
---------------------------------------
Kako to popraviti?
Koda:
\documentclass{article}
\begin{document}
\begin{table}
\centering
\caption{Multiprogram sets}
\label{multiprogram}
\begin{tabular}{c|c|c|c|c|c|c|c|c|}
\cline{2-9}
& \multicolumn{8}{|c|}{Sets}\\
\cline{2-9}
& 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\
\hline
\multicolumn{1}{|c|}{astar} & & * & & * & & & * &\\
\hline
\end{tabular}
\end{table}
\end{document}
In rezultat: