Skip to content

Commit ba922f4

Browse files
committed
Avoid \ExpandArgs to better support older LaTeX version
1 parent bcb7cc7 commit ba922f4

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

templates/latex/doxygen.sty

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -383,20 +383,25 @@
383383
#5
384384
\end{tblr}%
385385
}% 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
396387
% 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
398393
#5
399394
\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%
400405
}{% no end marker needed anymore
401406
}%
402407

@@ -405,13 +410,12 @@
405410
% - #1: number of columns
406411
% - #2: 1=table has a heading row, 0=no heading row
407412
\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
413413
% 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
415419
}{% no end marker needed anymore
416420
\end{tblr}
417421
}%

0 commit comments

Comments
 (0)