I am trying to make a table that has some cells spanning across multiple lines, like this:
(I used print screen on my table and then edited it to show how I want it).
I have been searching around and didn't find a way to do it, though I have seen similar problems but couldn't apply their solution to mine.
This is the code I am using:
\begin{table}
\caption{Funções e conexões do conector X1}
\begin{center}
\begin{tabular}{|c|l|l|}
\hline
\textbf{X1} &\textbf{Descrição} &\textbf{Função} \\
\hline
1 &C &Saída digital 1 \\
\hline
2 &NA &a relé \\
\hline
3 &Dl1 &Entradas digitais \\
\hline
4 &Dl2 &optoacopladas \\
\hline
5 &COM 1,2 &1 e 2 \\
\hline
6 &Dl3 &Entrada digital 3 \\
\hline
7 &COM3 &optoacoplada \\
\hline
8 &Al1 + &Entrada analógica 1 \\
\hline
9 &Al1 - &diferencial \\
\hline
\end{tabular}
\end{center}
\end{table}
Thanks for the help.
Best Answer
The simplest way is to just not draw full horizontal lines when you want to combine rows:
The second tabular shows how to reformat the table in accordance with the guidelines set out in
booktabs
(or some of them anyway).Or you could remove the partial horizontal lines altogether if you took this approach: