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.

    \begin{tabular}{ |c|c|c|c|c| }
        \textbf{Name} & \textbf{Goal} & \textbf{Results} & \textbf{Methods used} & \textbf{Validity} \\
        VS Code       & \makecell[l]{Desktop-\acs{IDE} with plugin\\mechanism and language server\\integration \cite{vscode01, vscode02}.} & ? & ? & ? \\
        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}.} & ? & ? & ? \\

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?

  • \makecell allows for line breaks, but they have to be hand-done. – Bernard Apr 19 '18 at 20:52

There are multiple methods to get automatic line breaks

  • use columns of a fixed with, e.g. p{1cm}
  • use the tabularx package and X columns which will automatically choose column widths to fill the desired width for the whole table

Furthermore I suggest to use the booktabs package for a nice table layout.




        \textbf{Name} & \textbf{Goal} & \textbf{Results} & \textbf{Methods used} & \textbf{Validity} \\
      VS Code  & Desktop-IDE with plugin mechanism and language server integration. & ? & ? & ? \\
            Cloud9 IDE & Cloud-based IDE with real time team collaboration capabilities with a computation and storage based pricing system. & ? & ? & ? \\


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.