0

I hope to make a long table across pages by tabularray package. First, I need to understand the example on page 36 of the book. When I tested it, it showed weird: enter image description here

The code:

\documentclass{article} \usepackage{tabularray} \usepackage{siunitx} \usepackage{tabularx} \usepackage{graphics} \usepackage{ninecolors} \UseTblrLibrary{booktabs, siunitx} \begin{document} \begin{table}[hbt!] \NewTblrTheme{fancy}{ \SetTblrStyle{firsthead}{font=\bfseries} \SetTblrStyle{firstfoot}{fg=blue2} \SetTblrStyle{middlefoot}{\itshape} \SetTblrStyle{caption-tag}{red2} } \begin{longtblr}[ theme = fancy, caption = {A Long Long Long Long Long Long Long Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second long long long long long long footnote.}, remark{Note} = {Some general note. Some general note. Some general note.}, remark{Source} = {Made up by myself. Made up by myself. Made up by myself.}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 2, rowfoot = 1, row{odd} = {gray9}, row{even} = {brown9}, row{1-2} = {purple7}, row{Z} = {blue7}, } \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta & Eta \\ \hline Iota & Kappa & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta & Eta \\ \hline Iota & Kappa & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} \end{table} \end{document} 

1 Answer 1

1

It can extended to multiple tables if you remove \begin{table} environment

Updated

final code:

\documentclass{article} \usepackage{tabularray} \usepackage{siunitx} \usepackage{tabularx} \usepackage{graphics} \usepackage{ninecolors} \UseTblrLibrary{booktabs, siunitx} \DefTblrTemplate{contfoot-text}{normal}{see next page} \SetTblrTemplate{contfoot-text}{normal} \DefTblrTemplate{conthead-text}{normal}{(Here)} \SetTblrTemplate{conthead-text}{normal} \begin{document} \NewTblrTheme{fancy}{ \SetTblrStyle{firsthead}{font=\bfseries} \SetTblrStyle{firstfoot}{fg=blue2} \SetTblrStyle{middlefoot}{\itshape} \SetTblrStyle{caption-tag}{red2} } \begin{longtblr}[ theme = fancy, caption = {A Long Long Long Long Long Long Long Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second long long long long long long footnote.}, remark{Note} = {Some general note. Some general note. Some general note.}, remark{Source} = {Made up by myself. Made up by myself. Made up by myself.}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 2, rowfoot = 1, row{odd} = {gray9}, row{even} = {brown9}, row{1-2} = {purple7}, row{Z} = {blue7}, } \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta & Eta \\ \hline Iota & Kappa & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta & Eta \\ \hline Iota & Kappa & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} \end{document} 

Also take a look here: Make a table span multiple pages

4
  • Yes. You are right. Sometimes it needs \begin{table}, sometimes not. I should be careful. Commented Apr 14, 2022 at 7:13
  • May you teach me how to change characters continued on next page to see next page and 'continued` to here in that table? Commented Apr 14, 2022 at 7:17
  • I updated the answer to include that as well. You should change table template Commented Apr 14, 2022 at 7:26
  • Thanks. You help me a lot. Commented Apr 14, 2022 at 7:41

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.