How to insert manual line breaks inside LaTeX tables?

How to insert manual line breaks inside LaTeX tables?

Usually, you use a column definition like p{3cm} instead of l, and then use newline instead of \ in the cell body.

You could do it like this:

documentclass{report}

begin{document}

begin{tabular}{|l|l|}
  hline
  A & B \ 
    & C \ 
  hline
  D & E \
  hline
end{tabular}

end{document}

which produces:

enter

How to insert manual line breaks inside LaTeX tables?

It can be achieved by using newline. Since, the accepted answer did not have any sample snippet, a working sample is provided here:

 begin{tabular}{p{2cm} p{10cm}}
    em{Programming} textsc{languages} & Java, Node.js, Python, Clojure \
    newline & newline \
    em{Development systems} & Concurrent Programming, Design Patterns 
 end{tabular}

Leave a Reply

Your email address will not be published.