Details:
- I want my
\tableofcontentsto actually appear as table - i am using latex
- i traced what the command
\tableofcontentsdoes, and in the end,
i found that the\contentslinemacro chain do not save the\thechapterand\chapternameas different entities - ... so, the modification of it to table seems difficult to me atm
- this is also mentioned in the manual of package[a]
tocloftat page 24)
For the purposes at hand it is generally impossible to treat the typesetting of a title and its number separately, as both are bundled into the <title> argument within \contentsline.
MWE
Minimum Working Examples (as asked here):
Default:
\documentclass{report}
\begin{document}
\tableofcontents
\chapter{First sdddsssss %
sssssssssssssssssssss ssssssssssssss ssssssss sssssss %
ssssssssss sssssssssss sssssssssssssss ssssss ssssssss %
sssssssssssss sssssssss}
\chapter{Second}
\end{document}
Target
(well, somewhat! as the package tabularray, nice name, doesn't seem orthogonal in its implementation of functions to me, so, i am still unable to properly define all the things in it, but this will work)
\documentclass{report}
\usepackage{tabularray}
\begin{document}
%\begin{tblr}{| m{1em} | m{9cm} | m{2cm} |}
\begin{tblr}{| c | m{9cm} | m{2cm} |}
\hline
\bfseries thechapter & \bfseries chaptername & \bfseries comments \
\hline
1 & First sdddsssss %
sssssssssssssssssssss ssssssssssssss ssssssss sssssss %
ssssssssss sssssssssss sssssssssssssss ssssss ssssssss %
sssssssssssss sssssssss & \
\hline
2 & Second & \
\hline
\end{tblr}
\end{document}
PS:
On the orthogonality of tabularray:
I wanted to specify following options:
- horizontal arrangement (l,c,r)
- vertical arrangement (t,m,b,h,f)
update: i thinkt,m,bconcern with relative alignment of the specified base?lines of the columncells across their whole row; whereash,fconcern with the absolute alignment in individual cell - columnwidth
- special vertical alignment for the header row
- row formatting for the header


