2

I like to have different caption text on the first and other page spanned by long table longtblr. If possible a text which is intended to LoT and inserted longtblr by entry={short caption text>}). How to achieve this?

For example, in the following MWE I like to have in the second caption the text Short version of the caption (Continued):

\documentclass{article}
\usepackage{newtxtext}
\usepackage{microtype}

\usepackage{tabularray}

\usepackage{lipsum}

\begin{document} \listoftables

\begin{longtblr}[ caption = {Longtable captions which span three lines and not appear in LoT. How to prevent that this text will not be shown on the next pages of this table but rather some shorter text, preferable content of \texttt{entry} option?}, entry = {Short version of the caption}, label = {longtable}, ]{rowhead=1, hlines, vlines, colspec = {X[0.2,j] X[0.3,j] X[0.53,j]}, colsep=4pt, row{1} = {font=\small\bfseries}, } % column headers Left column & Midle column & Long Column \ % table body \lipsum[66] & \lipsum[11]
& \lipsum[1] \ \lipsum[66] & \lipsum[11] & \lipsum[1] \ \end{longtblr} \end{document}

enter image description here

Zarko
  • 296,517

1 Answers1

2

Define a Template that uses the entry parameter in the continuation caption (capcont), and a theme to specify its use.

\documentclass{article}
\usepackage{newtxtext}
\usepackage{microtype}

\usepackage{tabularray}

\usepackage{lipsum}

\begin{document} \listoftables

\DefTblrTemplate {caption-text}{short}{\InsertTblrText{entry}}

\DefTblrTemplate{capcont}{short}{% \par\centering \UseTblrTemplate {caption-tag}{default}% \UseTblrTemplate {caption-sep}{default}% \UseTblrTemplate {caption-text}{short} \UseTblrTemplate {conthead-text}{default} \par } \NewTblrTheme{shortcaption}{% \SetTblrTemplate{capcont}{short}% }

\begin{longtblr}[theme = shortcaption, caption = {Longtable captions which span two lines and not appear in LoT. How to prevent that not be shown on the next pages of this table?}, entry = {Short version of the caption}, label = {longtable}, ]{rowhead=1, hlines, vlines, colspec = {X[0.2,j] X[0.3,j] X[0.53,j]}, colsep=4pt, row{1} = {font=\small\bfseries}, } % column headers Left column & Midle column & Long Column \ % table body \lipsum[66] & \lipsum[11]
& \lipsum[1] \ \lipsum[66] & \lipsum[11] & \lipsum[1] \ \end{longtblr} \end{document}

enter image description here

enter image description here