2

Is it possible to use tblr with booktabs?

I seem to be getting error messages when I am trying to use it:

\documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \usepackage{booktabs} \begin{document} \begin{table}[h] \centering \begin{tblr}{ colspec = {ccc}, row{2} = {purple7}, column{3} = {teal7}, cell{2}{3} = {yellow7}, } \toprule First & Second & Third \\ \toprule 1 & 0 & 1 \\ \midrule 1 & 0 & 1 \\ \bottomrule \end{tblr} \end{table} \end{document} 

The error message is: ! Misplaced \noalign.

1 Answer 1

7

Just replace \usepackage{booktabs} with \UseTblrLibrary{booktabs}:

mwe

2
  • Thanks, that worked. But why is that needed? Commented Jul 14, 2023 at 23:05
  • 1
    From the manual: "The tabularray package emulates or fixes some commands in other packages. To avoid potential conflict, you need to enable them with \UseTblrLibrary command." Commented Jul 15, 2023 at 0:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.