Creé tal configuración
\SetTblrTemplate{middlehead, lasthead, foot}{empty}
\SetTblrStyle{head, caption}{halign=l}
\newlength\lwidth
\setlength\lwidth{0.7pt}
\NewDocumentEnvironment{tabl}{m +b}{
\begin{longtblr}[caption=#1]{hlines={\lwidth}, hline{2}={2\lwidth}, vlines={\lwidth}, columns={halign=c, valign=m, co=1}, width=\linewidth}
#2
\end{longtblr}
}{}
Uso:
\begin{tabl}{caption}
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{tabl}
Debería alinear el título a la izquierda pero configurando \SetTblrStyle{head, caption}{halign=l}
, pero no es así. Yo obtengo:
Me pregunto si entendí algo mal o es un error. Descubrí que alguien escribió su propia configuración para hacer esto.aquí.
Respuesta1
Puede usar caption
el paquete para configurar sus subtítulos y tblr-extras
su biblioteca de subtítulos para crear una matriz tabular longtblr
y talltblr
usar esos subtítulos.
\documentclass{article}
\usepackage{tabularray,tblr-extras}
\UseTblrLibrary{caption}
\captionsetup[table]{singlelinecheck=false,position=above,justification=raggedright}
\newlength\lwidth
\setlength\lwidth{0.7pt}
\SetTblrTemplate{middlehead, lasthead, foot}{empty}
\begin{document}
\begin{longtblr}[
caption={A caption example}
]{
colspec=ccc,
hlines={\lwidth},
hline{2}={2\lwidth},
vlines={\lwidth},
columns={halign=c, valign=m, co=1}, width=\linewidth,
}
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{longtblr}
\bigskip
\captionsetup[table]{justification=raggedleft}
\begin{longtblr}[
caption={A caption example}
]{
colspec=ccc,
hlines={\lwidth},
hline{2}={2\lwidth},
vlines={\lwidth},
columns={halign=c, valign=m, co=1}, width=\linewidth,
}
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{longtblr}
\captionsetup[table]{justification=centering}
\begin{longtblr}[
caption={A caption example}
]{
colspec=ccc,
hlines={\lwidth},
hline{2}={2\lwidth},
vlines={\lwidth},
columns={halign=c, valign=m, co=1}, width=\linewidth,
}
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{longtblr}
\end{document}