Newline in a LaTeX tabular cell

There are several ways to accomplish line breaks withing LaTeX table cells, but I wanted to mention a package that offers the ability to format individual table cells and thus give an easy mechanism for including line breaks within them.

With the makecell package, individual formatting can be applied on a per cell basis. Entering a line break within a cell is as simple as:


\makecell[cl]{Here is a\\broken line} & using makecell\\

The option [cl] are optional and specify the alignment within the cell. First option is the vertical alignment can be

t top aligned;
c center aligned;
b bottom aligned.

The second option is the horizontal alignment and can be

l left aligned;
c center aligned;
r right aligned.

If not specified, the default options [cc] are used.

Be the first to comment

Leave a Reply

Your email address will not be published.