|
383 | 383 | #5 |
384 | 384 | \end{tblr}% |
385 | 385 | }% end of sbox0 |
386 | | -\ifdim\wd0>\linewidth% table spans entire width of the page, use flexible columns |
387 | | - \edef\DoxyTableColSpec{X[-1]}% |
388 | | -\else% table width is smaller than the page width, use minimal left aligned columns |
389 | | - \edef\DoxyTableColSpec{l}% |
390 | | -\fi% |
391 | | -\edef\DoxyTableOptions{hlines,vlines,% automatically set horizontal and vertical cell lines |
392 | | - measure=vbox,% needed to allow nested lists and tables |
393 | | - colspec={*{#1}{\DoxyTableColSpec}},% set column type for all columns |
394 | | - rowhead=#4,% set which row is the header (0=disable, 1=enable) |
395 | | - row{#4}={bg=\tableheadbgcolor,font=\noexpand\bfseries}}% set header background color and font weight |
| 386 | +\ifdim\wd0>\linewidth% use flexible columns |
396 | 387 | % now render the table for real |
397 | | -\ExpandArgs{nV}\begin{longtblr}\DoxyTableOptions% |
| 388 | +\begin{longtblr}{hlines,vlines,% automatically set horizontal and vertical cell lines |
| 389 | + measure=vbox,% needed to allow nested lists and tables |
| 390 | + colspec={*{#1}{X[-1]}},% set column type for all columns |
| 391 | + rowhead=#4,% set which row is the header (0=disable, 1=enable) |
| 392 | + row{#4}={bg=\tableheadbgcolor,font=\bfseries}}% set header background color and font weight |
398 | 393 | #5 |
399 | 394 | \end{longtblr}% |
| 395 | +\else% use fixed left aligned columns |
| 396 | +% now render the table for real |
| 397 | +\begin{longtblr}{hlines,vlines,% automatically set horizontal and vertical cell lines |
| 398 | + measure=vbox,% needed to allow nested lists and tables |
| 399 | + colspec={*{#1}{l}},% set column type for all columns |
| 400 | + rowhead=#4,% set which row is the header (0=disable, 1=enable) |
| 401 | + row{#4}={bg=\tableheadbgcolor,font=\bfseries}}% set header background color and font weight |
| 402 | +#5 |
| 403 | +\end{longtblr}% |
| 404 | +\fi% |
400 | 405 | }{% no end marker needed anymore |
401 | 406 | }% |
402 | 407 |
|
|
405 | 410 | % - #1: number of columns |
406 | 411 | % - #2: 1=table has a heading row, 0=no heading row |
407 | 412 | \NewDocumentEnvironment{DoxyTableNested}{m m}{% |
408 | | -\edef\DoxyTableOptions{hlines,vlines,% automatically set horizontal and vertical cell lines |
409 | | - measure=vbox,% needed to allow nested lists and tables |
410 | | - colspec={*{#1}{X[-1]}},% set column type for all columns |
411 | | - rowhead=#2,% set which row is the header (0=disable, 1=enable) |
412 | | - row{#2}={bg=\tableheadbgcolor}}% set header background color |
413 | 413 | % now render the table for real |
414 | | -\ExpandArgs{nV}\begin{tblr}\DoxyTableOptions% |
| 414 | +\begin{tblr}{hlines,vlines,% automatically set horizontal and vertical cell lines |
| 415 | + measure=vbox,% needed to allow nested lists and tables |
| 416 | + colspec={*{#1}{X[-1]}},% set column type for all columns |
| 417 | + rowhead=#2,% set which row is the header (0=disable, 1=enable) |
| 418 | + row{#2}={bg=\tableheadbgcolor,font=\bfseries}}% set header background color and font weight |
415 | 419 | }{% no end marker needed anymore |
416 | 420 | \end{tblr} |
417 | 421 | }% |
|
0 commit comments