Overleaf – Resolving Issues with Tabularray Package on Overleaf for Smooth Operation

overleaftabularray

I don't know if it's only me and is it the right place to report but this code compiles fine on a local LaTeX distribution (TeXLive 2021) whereas Overleaf generates errors. It seems it's the case only with the tabularray package. I was wondering if there are settings I missed.

The code

\documentclass[12pt]{article}

\usepackage{tabularray}
    \UseTblrLibrary{booktabs}
    
\begin{document}
\begin{booktabs}{colspec = ll}
    \toprule
    Here...             & ... it works. \\
    \midrule
    Here...             & ... it works. \\
    And...              & ... {here\\it does too!} \\
    {But\\here...} & ... it does not. \\
    Some more text.     & Even more text. \\
    \bottomrule
\end{booktabs}
\end{document}

and errors:

I've got the following errors:

LaTeX Error: Environment booktabs undefined.
[Multiple] Misplaced alignment tab character &.
...

Undefined control sequence.
...

EDIT.
Versions on Overleaf:

  • TeXLive: 2021 3 MAR 2022 12:42
  • tabularray: 2021-07-01

Best Answer

On Overleaf, TeXLive 2021 includes version 2021L (2021-07-01) of tabularray package, which is a little old.

You can download the latest version from CTAN and upload it to your Overleaf project:

https://ctan.org/tex-archive/macros/latex/contrib/tabularray

Note that tabularray.sty is version 2022A, and tabularray-2021.sty is version 2021Q.

Related Question