3

I want to typeset this table:

enter image description here

As you see, it's hard to use multicolumn here. I tried 2 consecutive tables:

enter image description here

\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{tabularx}
\usepackage{lipsum}
\usepackage{array}
\setlength{\parindent}{0cm}
\begin{document}

\begin{tabularx}{\textwidth}{ | X | X | }
  \hline
  1 & 2\\
  \hline
\end{tabularx}
\begin{tabularx}{\textwidth}{ |m{20mm} | X|m{20mm}| }
  1 & 2 & 3\\
  \hline
\end{tabularx}
\end{document}

But there is a gap between them.

Any suggestions about typesetting the top table?

4

Something like this?

\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{tabularx}
\usepackage{lipsum}
\usepackage{array}
\setlength{\parindent}{0cm}
\begin{document}
\begin{tabularx}{\textwidth}{ | X  X  X  X | }
  \hline
  \multicolumn{2}{|X|}{1} & \multicolumn{2}{X|}{2}\\
  \hline
  \multicolumn{1}{|m{20mm}|}{1} & \multicolumn{2}{X}{2} & \multicolumn{1}{|m{20mm}|}{3}\\
  \hline
\end{tabularx}\unskip
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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