Tables – Centering a Table Wider Than Text Width with Tabularray in LaTeX

tablestabularray

I make a table whose width is more than the width of the text, so the table is too right on the paper. How should I move it to center?
For example:

\documentclass{article}
\usepackage{tabularray}
\usepackage{tabularx}
\begin{document}
\begin{table}
\begin{talltblr}{
        colspec={X[c]},width=3cm+\textwidth
    }
    \hline
    hello
\end{talltblr}
\end{table}
\end{document}

enter image description here

Best Answer

Similar functionality as scrextend offer package changepage. With its macro

\begin{adjustwidth}{left margin}{right margin}

or

\begin{adjustwidth*}{}{outer margin}

locally change text margins. More detail description is in package documentation. In your case your MWE should be changed to:

\documentclass{article}
\usepackage{tabularray}
\usepackage[strict]{changepage}

\usepackage{lipsum}

\begin{document}
\lipsum[66]
    \begin{table}[ht]
\begin{adjustwidth}{-15mm}{-15mm}
\begin{talltblr}[
caption = {hello},
  label = {tab:??}]{hlines, vlines, % that width of table is clearly seen
                 colspec={X[c]}
                }
    Hello world!
\end{talltblr}
\end{adjustwidth}
    \end{table}
\lipsum[66]
\end{document}

enter image description here