I currently use the tabular
package to create my table. One of my columns has several lines of text, so I need a line break mechanism. I do currently have a working mechanism.
\usepackage{makecell}
...
\begin{center}
\begin{tabular}{ |c|c|c|c|c| }
\hline
\textbf{Name} & \textbf{Goal} & \textbf{Results} & \textbf{Methods used} & \textbf{Validity} \\
\hline
VS Code & \makecell[l]{Desktop-\acs{IDE} with plugin\\mechanism and language server\\integration \cite{vscode01, vscode02}.} & ? & ? & ? \\
\hline
Cloud9 IDE & \makecell[l]{Cloud-based \acs{IDE} with real time\\team collaboration capabilities with\\a computation and storage based\\pricing system \cite{cloud-ide02, cloud9ide01}.} & ? & ? & ? \\
\hline
\end{tabular}
\end{center}
The annoying thing is that I manually have to do the line break. So if I change the text somewhere in the middle, I have to readjust everything. What would be much better is a function like \makecell{...}
that automatically does its line break as needed.
Is there a function somewhere in Latex for automatic line break?
Best Answer
There are multiple methods to get automatic line breaks
p{1cm}
tabularx
package andX
columns which will automatically choose column widths to fill the desired width for the whole tableFurthermore I suggest to use the
booktabs
package for a nice table layout.