lvjr / tabularray

Typeset tabulars and arrays with LaTeX3
https://ctan.org/pkg/tabularray
247 stars 22 forks source link

The styles of elements interfere with each other #286

Closed Meiting-Wang closed 1 year ago

Meiting-Wang commented 1 year ago

Hello Mr. Lu. I find that \SetTblrStyle{note}{\huge\color{blue}} will also affect the style of remark and contfoot-text, if I run the codes below:

\SetTblrStyle{contfoot-text}{\Large\color{red}}
\SetTblrStyle{remark}{\footnotesize}
\SetTblrStyle{note}{\huge\color{blue}}

and \SetTblrStyle{note}{\huge\color{blue}} will not affect the style of remark and contfoot-text, if I don't set style for both remark and contfoot-text at the same time, i.e. I only run the code:

\SetTblrStyle{note}{\huge\color{blue}}

I think this may be a bug.

Best wishes

PS. my system: win10 Tex Live version: TeX 3.141592653 (TeX Live 2022) tlmgr update time: August 6, 2022 My MWE:

image

\documentclass{article}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{tabularray}

\SetTblrStyle{contfoot-text}{\Large\color{red}}
\SetTblrStyle{remark}{\footnotesize}
\SetTblrStyle{note}{\huge\color{blue}}

\begin{document}

\lipsum[1-4]

\begin{longtblr}[
  caption={There is a caption},
  remark{Note 1}={There is a remark.},
  note{a}={There is a note.},
]{
  hline{1,Z}={1pt},
}
  Alpha   & Beta             & Gamma  & Delta & aaa & bbb  \\
  Epsilon & Zeta\TblrNote{a} & Eta    & Theta & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
\end{longtblr}
\end{document}
lvjr commented 1 year ago

This bug should has been fixed. You may download the latest package file https://github.com/lvjr/tabularray/raw/main/tabularray.sty and test whether there are other problems.

PS: It is better to write your \SetTblrStyle commands as follows:

\SetTblrStyle{contfoot-text}{font=\Large,fg=red}
\SetTblrStyle{remark}{font=\footnotesize}
\SetTblrStyle{note}{font=\huge,fg=blue}
lvjr commented 1 year ago

With the latest package file, you get the expected result:

\documentclass{article}
\usepackage[paperheight=6cm,height=3.5cm]{geometry}

\usepackage{xcolor}
\usepackage{tabularray}

\SetTblrStyle{contfoot-text}{font=\Large,fg=red}
\SetTblrStyle{remark}{font=\footnotesize}
\SetTblrStyle{note}{font=\huge,fg=blue}

%\SetTblrStyle{contfoot-text}{\Large\color{red}}
%\SetTblrStyle{remark}{\footnotesize}
%\SetTblrStyle{note}{\huge\color{blue}}

\begin{document}

\begin{longtblr}[
  caption={There is a caption},
  remark{Note 1}={There is a remark.},
  note{a}={There is a note.},
]{
  hline{1,Z}={1pt},
}
  Alpha   & Beta             & Gamma  & Delta & aaa & bbb  \\
  Epsilon & Zeta\TblrNote{a} & Eta    & Theta & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
\end{longtblr}
\end{document}

image

Meiting-Wang commented 1 year ago

With the latest package file, you get the expected result:

\documentclass{article}
\usepackage[paperheight=6cm,height=3.5cm]{geometry}

\usepackage{xcolor}
\usepackage{tabularray}

\SetTblrStyle{contfoot-text}{font=\Large,fg=red}
\SetTblrStyle{remark}{font=\footnotesize}
\SetTblrStyle{note}{font=\huge,fg=blue}

%\SetTblrStyle{contfoot-text}{\Large\color{red}}
%\SetTblrStyle{remark}{\footnotesize}
%\SetTblrStyle{note}{\huge\color{blue}}

\begin{document}

\begin{longtblr}[
  caption={There is a caption},
  remark{Note 1}={There is a remark.},
  note{a}={There is a note.},
]{
  hline{1,Z}={1pt},
}
  Alpha   & Beta             & Gamma  & Delta & aaa & bbb  \\
  Epsilon & Zeta\TblrNote{a} & Eta    & Theta & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
  Iota    & Kappa            & Lambda & Mu    & aaa & bbb  \\
\end{longtblr}
\end{document}

image

Thank you very much. I can get the expected result now.