I've been fiddling with the following table for a while, and have some minor issues.
\documentclass{article}
\usepackage{threeparttable}
\usepackage{multirow}
\begin{document}
\begin{table}[!ht]
\caption{
\textbf{Pheno file format}}
\begin{threeparttable}
\begin{tabular}{|l|l|c|}\hline\hline
\textbf{Pheno file headers} & \multicolumn{2}{|c|}{\textbf{Notes}} \\ \hline\hline
sex & \multicolumn{2}{|l|}{The sex column is restricted to the following values.} \\ \hline\hline
& \multicolumn{1}{|l|}{Sex} & \multicolumn{1}{p{1cm}|}{Value} \\ \hline\hline
& Male & \multicolumn{1}{p{1cm}|}{1} \\ \hline
& \multicolumn{1}{|l|}{Female} & \multicolumn{1}{p{1cm}|}{2} \\ \hline
& \multicolumn{1}{|l|}{Missing}& \multicolumn{1}{|p{1cm}|}{-1} \\ \hline
studyid & \multicolumn{2}{|l|}{\multirow{1}{*}{Description of the study the data belongs to - eg. 'Hapmap6.0'.}} \\
& \multicolumn{2}{|l|}{If studyid is not given, 'unknown' is used.} \\ \hline
studyid & \multicolumn{2}{p{\dimexpr\textwidth-2\tabcolsep\relax}|}{Description of the study the data belongs to - eg. 'Hapmap6.0'.
If studyid is not given, 'unknown' is used.} \\ \hline
%\cline{3-4}
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}
Questions:
So, I'm sort of embedding a subtable inside a table. I first had it as a separate table, but then I stuck it inside the main table. It is the table with headers
SexandValue. It would be nice if I could adjust the width of the third margin so that it was only as wide as necessary, and also if all the lines to the left of that table, starting with the double line underSex/Valuewere not present. The other problem is that the numbers in the third column are not left justified. So I'd like it to look something like----------------------------------------------------------------------------- | Pheno file headers | Notes | ============================================================================== | sex | The sex column is restricted to the following values | ============================================================================== | Sex | Value | | Male | 1 | | Female | 2 | | Missing| -1 | ------------------------------------------------------------------------------ | Studyid | Some stuff | ------------------------------------------------------------------------------Can this be done without lots of complexity?
I've got two examples of a cell (starting with studyid) across two rows and two columns. I think I prefer the one at the bottom. Is that the best way to do it? It certainly seems simpler than the one above it.
