Thu Trang Đỗ
Thu Trang Đỗ

Reputation: 9

How can I draw a table with vertical lines not aligned in Latex

I want to draw a table like that but don't know how to enter image description here

I tried multirow and multicol but it doesn't work, or i don't know to use it correctly :<<< i find no one who had problem like me. Help mee

Upvotes: 0

Views: 129

Answers (1)

F. Pantigny
F. Pantigny

Reputation: 298

Here is a solution with the juxtaposition of two tabulars.

\documentclass{article}
\usepackage{tabularx}

\begin{document}

\begin{center}
\offinterlineskip
\begin{tabularx}{\linewidth}{|X|X|}
\hline
Cell 1 & Cell 2 \\
\end{tabularx} \newline
\begin{tabularx}{\linewidth}{|X|X|X|}
\hline
Cell 3 & Cell 4 & Cell 5 \\
\hline
\end{tabularx}
\end{center}

\end{document}

Output of the above code

Upvotes: 1

Related Questions