Montag, 27. März 2017

latex tabelle multicolumn Teil 2

multicolumn und multirow
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{Minterme}& \multicolumn{10}{c|}{ON-Menge}\\
\cline{2-11}
 & 00000 & 01000 & 01010 & 01100 & 10000 & 10001 & 10010 & 
10100 & 11010 & 11100 \\
\hline
$\bar{x}_{2}\bar{x}_{3}\bar{x}_{4} \bar{x}_{5}$ & 1 & 0 & 
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\
\hline 
$x_{2} \bar{x}_{3} x_{4} \bar{x}_{5} $ & 0 & 0 & 1 & 0 & 
0 & 0 & 0 & 0 & 1 & 0 \\
\hline
$x_{2}x_{3} \bar{x}_{4} \bar{x}_{5} $ & 0 & 0 & 0 & 1 & 
0 & 0 & 0 & 0 & 0 & 1 \\
\hline
$\bar{x_{1}} \bar{x}_{3} \bar{x}_{4} \bar{x}_{5} $ & 1 & 
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\hline
$\bar{x_{1}} x_{2} \bar{x}_{4} \bar{x}_{5} $ & 0 & 1 & 
0 & 1 & 0 & 0 &0 & 0& 0 & 0 \\
\hline
$\bar{x_{1}} x_{2} \bar{x}_{3} \bar{x}_{5}$ & 0 & 1 & 
1 & 0 &  0 & 0 &0 & 0& 0 & 0 \\
\hline
$x_{1} \bar{x}_{3} x_{4} \bar{x}_{5} $ &  0 & 0 &0 & 
0& 0 & 0 & 1 & 0 & 1 & 0  \\
\hline
$x_{1} x_{3} \bar{x}_{4} \bar{x}_{5}$ &  0 & 0 &0 & 0& 
0 & 0 & 0 & 1 & 0 & 1 \\
\hline
$x_{1} \bar{x}_{2} \bar{x}_{4} \bar{x}_{5} $ & 0 & 0 & 
0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\
\hline
$x_{1} \bar{x}_{2} \bar{x}_{3} \bar{x}_{5}$ & 0 & 0 & 
0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 \\
\hline
$x_{1} \bar{x}_{2} \bar{x}_{3} \bar{x}_{4} $ & 0 & 0 & 
0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 \\
\hline
\end{tabular}
\end{document}
multicolumn, multirow und booktabs
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{*{11}{c}}
\toprule
\multirow{2}{*}{Minterme}& \multicolumn{10}{c}{ON-Menge}\\
\cmidrule(lr){2-11}
 & 00000 & 01000 & 01010 & 01100 & 10000 & 10001 & 10010 & 
10100 & 11010 & 11100 \\
\midrule
$\bar{x}_{2}\bar{x}_{3}\bar{x}_{4} \bar{x}_{5}$ & 1 & 0 & 0 & 
0 & 1 & 0 & 0 & 0 & 0 & 0 \\
$x_{2} \bar{x}_{3} x_{4} \bar{x}_{5} $ & 0 & 0 & 1 & 0 & 0 & 
0 & 0 & 0 & 1 & 0 \\
$x_{2}x_{3} \bar{x}_{4} \bar{x}_{5} $ & 0 & 0 & 0 & 1 & 0 & 
0 & 0 & 0 & 0 & 1 \\
$\bar{x_{1}} \bar{x}_{3} \bar{x}_{4} \bar{x}_{5} $ & 1 & 1 & 
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
$\bar{x_{1}} x_{2} \bar{x}_{4} \bar{x}_{5} $ & 0 & 1 & 0 & 1 & 
0 & 0 &0 & 0& 0 & 0 \\
$\bar{x_{1}} x_{2} \bar{x}_{3} \bar{x}_{5}$ & 0 & 1 & 1 & 0 & 
 0 & 0 &0 & 0& 0 & 0 \\
$x_{1} \bar{x}_{3} x_{4} \bar{x}_{5} $ &  0 & 0 &0 & 0& 0 & 
0 & 1 & 0 & 1 & 0  \\
$x_{1} x_{3} \bar{x}_{4} \bar{x}_{5}$ &  0 & 0 &0 & 0& 0 & 
0 & 0 & 1 & 0 & 1 \\
$x_{1} \bar{x}_{2} \bar{x}_{4} \bar{x}_{5} $ & 0 & 0 & 0 & 
0 & 1 & 0 & 0 & 1 & 0 & 0 \\
$x_{1} \bar{x}_{2} \bar{x}_{3} \bar{x}_{5}$ & 0 & 0 & 0 & 
0 & 1 & 0 & 1 & 0 & 0 & 0 \\
$x_{1} \bar{x}_{2} \bar{x}_{3} \bar{x}_{4} $ & 0 & 0 & 0 & 
0 & 1 & 1 & 0 & 0 & 0 & 0 \\
\bottomrule
\end{tabular}
\end{document}

Keine Kommentare:

Kommentar veröffentlichen