I'm interested in methods to create a vertical line in a table that spans a range of rows but not all rows. I've found one solution below, but is there another solution such as \cline
which allows you to specify which columns you would like your horizontal line to span?
http://www.latex-community.org/forum/viewtopic.php?f=45&t=3849
Vertical line that spans all rows
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{tabular}{c c|c c c c|}
\multicolumn{2}{c}{} & Piano & Trumpet & Flute & Viola\\
\multicolumn{2}{c}{}& \textbf{pno} & \textbf{tpt} & \textbf{flt} & \textbf{vla}\\
\cline{3-6}
Piano & \textbf{pno} & 0 & 0.5 & 0.25 & 0.75\\
Trumpet & \textbf{tpt} & 0 & 0 & 0.25 & 0.5\\
Flute & \textbf{flt} & 0 & 0 & 0 & 0.75\\
Viola & \textbf{vla} & 0& 0 & 0 & 0\\
\cline{3-6}
\end{tabular}
\end{document}
Vertical line that spans a range of rows
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{tabular}{c c|c c c c|}
\multicolumn{2}{c}{} & Piano & Trumpet & Flute & \multicolumn{1}{c}{Viola}\\
\multicolumn{2}{c}{}& \textbf{pno} & \textbf{tpt} & \textbf{flt} & \multicolumn{1}{c}{\textbf{vla}}\\
\cline{3-6}
Piano & \textbf{pno} & 0 & 0.5 & 0.25 & 0.75\\
Trumpet & \textbf{tpt} & 0 & 0 & 0.25 & 0.5\\
Flute & \textbf{flt} & 0 & 0 & 0 & 0.75\\
Viola & \textbf{vla} & 0& 0 & 0 & 0\\
\cline{3-6}
\end{tabular}
\end{document}