Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make a LaTeX table. I have prepared the following code.

\begin{table}[htbp]
\caption{Combination Nomenclature, (Average Fill Factor)}
\resizebox{1.0\textwidth}{!}{
\begin{tabular}{|c||c|c|c|c|}
\hline
\textbf{Combination} &\multicolumn{4}{l|}{\textbf{Included Optional Steps}}\\
\cline{2-5}
&\textbf{1}&\textbf{2}&\textbf{3}&\textbf{4}\\
\hline\hline
\textbf{1}& X & & & \\
\hline
\textbf{2}& X & X & & \\
\hline
\textbf{3}& X & X & X & \\ 
\hline
\textbf{4}& X & X &  &X \\ 
\hline
\textbf{5}& X &  & X & \\ 
\hline
\textbf{6}& X &  & X & X\\ 
\hline
\textbf{7}& X &  & & X\\
\hline
\textbf{8}&  & X & &\\
\hline
\textbf{9}&  & X &  X &\\
\hline
\textbf{10}&  & X &  X & X\\
\hline
\textbf{11}&  & X & & X\\
\hline
\textbf{12}&  &  & X & \\
\hline
\textbf{13}&  &  & X & X \\
\hline
\textbf{14}&  &  &  & X \\
\hline
\hline
\textbf{15}& \multicolumn{1}{l}{Nano Particles Deposited, Not Sintered} &  &  & \\
\hline
\textbf{16}& \multicolumn{1}{l}{Only Grinded Wafer 1, No Particles Deposited, Not Sintered} &  &  & \\
\hline
\textbf{17}& \multicolumn{1}{l}{Only Grinded Wafer 2, No Particles Deposited, Not Sintered}  &  &  &\\
\hline
\end{tabular}}
\label{table:AverageFillFactor}
\end{table}

As you can see, the combinations 15-17 should be indipendent of the rows above and optional steps 1-4 should have equal width. The problem is that I am not sure, how to separate them.

share|improve this question
2  
You should avoid vertical lines. Please have a look at this pdf ece.cmu.edu/~pueschel/teaching/guides/guide-tables.pdf and this question: tex.stackexchange.com/questions/33758/… –  Marco Daniel Dec 18 '11 at 11:34
add comment

2 Answers 2

up vote 5 down vote accepted

One way would be to fix the width of the columns as in the first example:

enter image description here

It would be even better to eliminate the vertical lines as in the second example:

enter image description here

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\begin{table}[htbp]
\caption{Combination Nomenclature, (Average Fill Factor)}
\resizebox{1.0\textwidth}{!}{
\begin{tabular}{|c||p{1.0em}|p{1.0em}|p{1.0em}|p{1.0em} l|}
\hline
\textbf{Combination} &\multicolumn{5}{l|}{\textbf{Included Optional Steps}}\\
\cline{2-6}
&\textbf{1}&\textbf{2}&\textbf{3}&\textbf{4}&\\
\hline\hline
\textbf{1}& X & & & &\\
\hline
\textbf{13}&  &  & X & X &\\
\hline
\textbf{14}&  &  &  & X &\\
\hline
\hline
\textbf{15}& \multicolumn{4}{l}{Nano Particles Deposited, Not Sintered}&\\
\hline
\textbf{16}& \multicolumn{4}{l}{Only Grinded Wafer 1, No Particles Deposited, Not Sintered}&\\
\hline
\textbf{17}& \multicolumn{4}{l}{Only Grinded Wafer 2, No Particles Deposited, Not Sintered}&\\
\hline
\end{tabular}}
\label{table:AverageFillFactor}
\end{table}
%
\begin{table}[htbp]
\caption{Combination Nomenclature, (Average Fill Factor)}
\resizebox{1.0\textwidth}{!}{
\begin{tabular}{c p{1.0em} p{1.0em} p{1.0em} p{1.0em} l }
\hline
\textbf{Combination} &\multicolumn{5}{l}{\textbf{Included Optional Steps}}\\
\cline{2-6}
&\textbf{1}&\textbf{2}&\textbf{3}&\textbf{4}&\\
\hline\hline
\textbf{1}& X & & & &\\
\hline
\textbf{13}&  &  & X & X &\\
\hline
\textbf{14}&  &  &  & X &\\
\hline
\hline
\textbf{15}& \multicolumn{4}{l}{Nano Particles Deposited, Not Sintered}&\\
\hline
\textbf{16}& \multicolumn{4}{l}{Only Grinded Wafer 1, No Particles Deposited, Not Sintered}&\\
\hline
\textbf{17}& \multicolumn{4}{l}{Only Grinded Wafer 2, No Particles Deposited, Not Sintered}&\\
\hline
\end{tabular}}
\label{table:AverageFillFactor}
\end{table}
\end{document}
share|improve this answer
    
Thank you, very helpful as well!!! –  Levon Dec 18 '11 at 17:19
add comment
\documentclass{article}
\usepackage{graphicx,array}    
\begin{document}

\begin{table}[!htb]
\def\arraystretch{1.3}% more vertical space
\caption{Combination Nomenclature, (Average Fill Factor)}\label{table:AverageFillFactor}
\medskip
\resizebox{1.0\textwidth}{!}{%
\begin{tabular}{|>{\bfseries}c||p{1.0em}|p{1.0em}|p{1.0em}|p{1.0em} l|}      \hline
\textbf{Combination} &\multicolumn{5}{l|}{\textbf{Included Optional Steps}}\\\cline{2-6}
   & \textbf{1}&\textbf{2}&\textbf{3}&\textbf{4}&\\\hline\hline
 1 & X & & & &    \\\hline
13 &  &  & X & X &\\\hline
14 &  &  &  & X & \\\hline\hline
15 & \multicolumn{4}{l}{Nano Particles Deposited, Not Sintered}&\\\hline
16 & \multicolumn{4}{l}{Only Grinded Wafer 1, No Particles Deposited, Not Sintered}&\\\hline
17 & \multicolumn{4}{l}{Only Grinded Wafer 2, No Particles Deposited, Not Sintered}&\\\hline
\end{tabular}}
\end{table}

\end{document}

enter image description here

share|improve this answer
    
Thank you, excellent sollution.!!! –  Levon Dec 18 '11 at 17:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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