I am trying to reproduce the following tabular form layout:
Fig. 1: Desired output (found on the internet).
First question:
I can merge multiple cells into a single one both horizontally and vertically (using \multicolumn
and \multirow
), but I do not know how to split a single cell into multiple ones. How can I do that?
Minimal working example:
\documentclass[11pt, a4paper]{article}
\usepackage{lmodern}
\usepackage{array}
\usepackage{tabularx}
\begin{document}
\scriptsize
\setlength{\extrarowheight}{0.2em}
\noindent\begin{tabularx}{\textwidth}{!{\vrule width 1pt}p{4cm} | X !{\vrule width 1pt}}
\noalign{\hrule height 1pt}
Question one & Question two\\[0.5cm] \hline
Question three & Question four\\[1cm] \noalign{\hrule height 1pt}
Question five & Question six\\[0.5cm] \hline
\multicolumn{2}{!{\vrule width 1pt} l !{\vrule width 1pt}}{Question seven}\\[1cm]
\noalign{\hrule height 1pt}
\end{tabularx}
\end{document}
I am able to seamlessly connect two tables using \vskip-0.7mm
, but it would have to be adjusted after many various changes, e.g. font size, so I prefer a single table solution.
Edit (31 July 2011):
Fig. 2: Another tabular
or tabularx
inside a cell does not give a satisfying result.
Fig. 3: Problem with vertical alignment of the X
column of tabularx
.
The relevant part of the code:
\begin{tabularx}{\textwidth}{|p{4cm}|X|}
\hline
{\begin{tabularx}{\linewidth}{@{} l | X @{}}
Some text & Other text\\[1cm]
\end{tabularx}} & Something else\\
\hline
\end{tabularx}