Skip to content

array, tabularx, longtable and tabulary in Scissor LaTeX

The array and tabularx packages and their relatives work partly in Scissor LaTeX: tabularx, tabulary, longtable and xltabular tables typeset like tabular, and long cells wrap when the table would be wider than the line; column widths (p{3cm}, X, the table width) and >{...}/<{...} code are ignored, \newcolumntype is unknown, and longtable headers do not repeat.

What the packages do

  • array adds column types such as m{width} and b{width}, code before and after each cell with >{...} and <{...}, and \newcolumntype for your own column letters.
  • tabularx gives \begin{tabularx}{\textwidth}{lX}, where X columns stretch so the table has the given width. tabulary does the same with L, C, R, J columns that share the width by content.
  • longtable lets a table break across pages, with a header that repeats (\endhead). xltabular combines longtable and tabularx.

What works here

FeatureIn Scissor LaTeXNotes
tabularx, tabulary, xltabular, longtable, tabular*PartlyTypeset like tabular. The total width argument is ignored.
X, L, C, R, J columnsPartlyX and L are left aligned, C centred, R right aligned.
p{3cm}, m{3cm}, b{3cm}PartlyLeft aligned; the width is ignored.
Long cell textWorksWraps when the table would otherwise run wider than the line.
>{\bfseries}l, r<{\%}Left outThe code before and after cells is ignored.
\newcolumntype{C}{...}Not supportedSkipped with a Problems note, and its definition is printed as text. Write the column type out instead.
\endhead, \endfirsthead, \endfoot, \endlastfootLeft outA long table breaks across pages, but its header is not repeated.
\tabularnewlineWorksSame as \\.
\arraybackslashNot supportedSkipped with a Problems note; harmless otherwise.

Examples

A tabularx table with a stretching column. The long text wraps at the edge of the text, as it would in a TeX installation:

tabularx with an X column

LaTeXPreamble: \usepackage{tabularx}Open in editor (opens in a new tab)
\begin{tabularx}{\textwidth}{lX}
\hline
Name & Notes \\
\hline
Erika Mustermann & Leads the project, writes the reports and checks
  every one of the 44 measurements twice before they are published. \\
John Doe & Builds the test setup. \\
\hline
\end{tabularx}
Rendered by Scissor LaTeX: tabularx with an X column

A longtable with a header row. The table typesets; in a long document the header would not repeat on the next page:

longtable with \endhead

LaTeXPreamble: \usepackage{longtable}Open in editor (opens in a new tab)
\begin{longtable}{lr}
\hline
Item & Count \\
\hline
\endhead
Pencils & 44 \\
Erasers & 12 \\
Rulers  & 7 \\
\hline
\end{longtable}

Code in >{...} is ignored, so this column is not bold and the percent signs are missing:

>{...} and <{...} are ignored

LaTeXPreamble: \usepackage{array}Open in editor (opens in a new tab)
\begin{tabular}{>{\bfseries}l r<{\,\%}}
Growth & 44 \\
Share  & 12 \\
\end{tabular}

Write the formatting into the cells instead. This works here and in a TeX installation:

Formatting written into the cells

\begin{tabular}{lr}
\textbf{Growth} & 44\,\% \\
\textbf{Share}  & 12\,\% \\
\end{tabular}

Compatibility

  • From a TeX installation to here: tables typeset and keep their alignment, but not their column widths. Look for custom column letters from \newcolumntype.
  • From here to a TeX installation: documents compile there unchanged, and widths are applied there.

The full manuals are on CTAN: ctan.org/pkg/array, ctan.org/pkg/tabularx, ctan.org/pkg/tabulary, ctan.org/pkg/longtable and ctan.org/pkg/xltabular. For tables in general, see Tables in LaTeX.

See also Tables, multirow, booktabs and the LaTeX table generator.

Questions and answers

Why does my p{3cm} column not have a width of 3 cm?

Column widths are not applied yet. Long text still wraps at the edge of the text, so the table stays on the page.

Does longtable break across pages?

Yes, a long table continues on the next page, but the rows marked with \endhead are not repeated there.

Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-06.