2

Look at these questions and their answers:

Splitting a row to two rows in LaTeX

split a table cell in two lines and columns

They present similar issues and, similar accepted answers. However, the answer is not exactly the solution to the questions.

I found them because I raised the same question: how to ACTUALLY split cells?

Observe that this is not a duplicate, since I focus on the splitting action instead of merging most of cells. In fact, as a matter of illustration, the merging action is a solution for those working with Excell like softwares, while the splitting action is common for those working with tables in Word like softwares.

2
  • What do you mean by "actually split"? Automatic line breaking? Change to a small table?
    – user156344
    Commented May 10, 2019 at 14:56
  • Like split a cell into two either vertically or horizontally.
    – Brasil
    Commented May 10, 2019 at 14:58

1 Answer 1

8

You could use nested tabular in order to split cells horizontally and/or vertically:

enter image description here

\documentclass{article}

\begin{document}

Split cells horizontally:

\begin{tabular}{|l|l|}
\hline
some text & some more text \\ 
\hline
non split cell & \begin{tabular}{@{}ll@{}}
                   split cell A & split cell B \\
                 \end{tabular}  \\
\hline
\end{tabular}

\bigskip

Split cells vertically:

\begin{tabular}{|l|l|}
\hline
some text & some more text \\ 
\hline
non split cell & \begin{tabular}{@{}l@{}}
                   split cell A\\
                   split cell B\\
                 \end{tabular} \\
\hline
\end{tabular}

\bigskip

Split cells horizontally and vertically:

\begin{tabular}{|l|l|}
\hline
some text & some more text \\ 
\hline
non split cell & \begin{tabular}{@{}ll@{}}
                   split cell A & split cell B\\
                   split cell C & split cell D\\
                 \end{tabular} \\
\hline
\end{tabular}

\end{document}
1
  • @Brasil: You're welcome. However, you might want to keep in mind that the above posted solution has some limitation especially when it comes to horizontal lines in the nested tabulars.
    – leandriis
    Commented May 10, 2019 at 17:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .