Open Aljumaily opened 1 year ago
It is a strange bug: when I pass outer option long
to make it a long table, no error occurs:
\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{varwidth}
\begin{document}
% set "measure=vbox" as default
\SetTblrInner{measure=vbox}
\begin{tblr}[long]{ % Changing this to longtblr generates Something's wrong--perhaps a missing \item
colspec = {Xl}, hlines, vlines,
}
text & text \\
\begin{itemize}
\item text 1
\item text 2
\end{itemize} & text 3 \\\pagebreak
text & text
\end{tblr} % longtblr
\end{document}
By default \SetTblrInner
only influence tblr environment. What's needed here is
\SetTblrInner[tblr,longtblr]{measure=vbox}
Also see package doc (2023A (2023-03-01)), sec. 3.3 "Default Specifications": https://github.com/lvjr/tabularray/blob/690e67ee175ff7601d0144c84f9a7e9c67573e0b/manual/manual-3.tex#L312-L337
There're more tblr envs predefined in either the base package or one of its libraries (just searching for \NewTblrEnviron
in tabularray.sty
) hence enumerating full list of them in \SetTblrInner[<list of tblr-envs>]{...}
is a bit of a pain.
Perhaps tabularray
could add a pair of clists storing (real) default inner and outer styles which is applied before per-tblr-env styles and can be set by starred \SetTblrInner
/\SetTblrOuter
.
By default
\SetTblrInner
only influence tblr environment. What's needed here is\SetTblrInner[tblr,longtblr]{measure=vbox}
Also see package doc (2023A (2023-03-01)), sec. 3.3 Default Specifications:
Sorry, obviously I forgot what I have written. ^_^
There're more tblr envs predefined in either the base package or one of its libraries (just searching for
\NewTblrEnviron
intabularray.sty
) hence enumerating full list of them in\SetTblrInner[<list of tblr-envs>]{...}
is a bit of a pain.Perhaps
tabularray
could add a pair of clists storing (real) default inner and outer styles which is applied before per-tblr-env styles and can be set by starred\SetTblrInner
/\SetTblrOuter
.
I ever considered this (see #37), but decided not to do it becauae it is a little complicated when users need to apply it only to text tables (but not math tables). The real problem is that I am not satisfied with the interfaces.
I ever considered this (see #37), but decided not to do it becauae it is a little complicated when users need to apply it only to text tables (but not math tables).
True. I thought about this too, when editing my previous comment. Adding env families or conditional options like if math={<true options>}{<false options>}
are possible choices.
I think the interfaces could be the following:
\SetAllTblrInner{spec}
\SetTextTblrInner{spec}
\SetMathTblrInner{spec}
\SetAllTblrOuter{spec}
\SetTextTblrOuter{spec}
\SetMathTblrOuter{spec}
And we need four new clists.
Then users should be informed that \SetAllTblrInner
actually calls \SetTextTblrInner
and \SetMathTblrInner
, to understand the combined affect of interchanging use like \SetTextTblrInner{...} \SetAllTblrInner{...} \SetTextTblrInner{...}
.
Plus, I'm a bit preferable to stick to prefix \SetTblr...
.
Then users should be informed that
\SetAllTblrInner
actually calls\SetTextTblrInner
and\SetMathTblrInner
, to understand the combined affect of interchanging use like\SetTextTblrInner{...} \SetAllTblrInner{...} \SetTextTblrInner{...}
.
Yes.
Plus, I'm a bit preferable to stick to prefix
\SetTblr...
.
SetAllTblr
is a little easier to understand: "set all tabularray tables".
Related to tabularray and itemize compatibility. This is the solution provided:
Changing the second
tblr
tolongtblr
generatesSomething's wrong--perhaps a missing \item
. What is the fix?