Skip to content

Commit 9637460

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 8dcfa3b + b127a35 commit 9637460

File tree

3 files changed

+73
-36
lines changed

3 files changed

+73
-36
lines changed

addon/doxmlparser/doxmlparser/compound.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9344,7 +9344,7 @@ class docInternalS5Type(GeneratedsSuper):
93449344
__hash__ = GeneratedsSuper.__hash__
93459345
subclass = None
93469346
superclass = None
9347-
def __init__(self, para=None, sect5=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
9347+
def __init__(self, para=None, sect6=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
93489348
self.gds_collector_ = gds_collector_
93499349
self.gds_elementtree_node_ = None
93509350
self.original_tagname_ = None
@@ -9355,11 +9355,11 @@ def __init__(self, para=None, sect5=None, valueOf_=None, mixedclass_=None, conte
93559355
else:
93569356
self.para = para
93579357
self.para_nsprefix_ = None
9358-
if sect5 is None:
9359-
self.sect5 = []
9358+
if sect6 is None:
9359+
self.sect6 = []
93609360
else:
9361-
self.sect5 = sect5
9362-
self.sect5_nsprefix_ = None
9361+
self.sect6 = sect6
9362+
self.sect6_nsprefix_ = None
93639363
self.valueOf_ = valueOf_
93649364
if mixedclass_ is None:
93659365
self.mixedclass_ = MixedContainer
@@ -9395,22 +9395,22 @@ def insert_para_at(self, index, value):
93959395
self.para.insert(index, value)
93969396
def replace_para_at(self, index, value):
93979397
self.para[index] = value
9398-
def get_sect5(self):
9399-
return self.sect5
9400-
def set_sect5(self, sect5):
9401-
self.sect5 = sect5
9402-
def add_sect5(self, value):
9403-
self.sect5.append(value)
9404-
def insert_sect5_at(self, index, value):
9405-
self.sect5.insert(index, value)
9406-
def replace_sect5_at(self, index, value):
9407-
self.sect5[index] = value
9398+
def get_sect6(self):
9399+
return self.sect6
9400+
def set_sect6(self, sect6):
9401+
self.sect6 = sect6
9402+
def add_sect6(self, value):
9403+
self.sect6.append(value)
9404+
def insert_sect6_at(self, index, value):
9405+
self.sect6.insert(index, value)
9406+
def replace_sect6_at(self, index, value):
9407+
self.sect6[index] = value
94089408
def get_valueOf_(self): return self.valueOf_
94099409
def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
94109410
def hasContent_(self):
94119411
if (
94129412
self.para or
9413-
self.sect5 or
9413+
self.sect6 or
94149414
(1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
94159415
self.content_
94169416
):
@@ -9453,9 +9453,9 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='',
94539453
for para_ in self.para:
94549454
namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
94559455
para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
9456-
for sect5_ in self.sect5:
9457-
namespaceprefix_ = self.sect5_nsprefix_ + ':' if (UseCapturedNS_ and self.sect5_nsprefix_) else ''
9458-
sect5_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect5', pretty_print=pretty_print)
9456+
for sect6_ in self.sect6:
9457+
namespaceprefix_ = self.sect6_nsprefix_ + ':' if (UseCapturedNS_ and self.sect6_nsprefix_) else ''
9458+
sect6_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect6', pretty_print=pretty_print)
94599459
def build(self, node, gds_collector_=None):
94609460
self.gds_collector_ = gds_collector_
94619461
if SaveElementTreeNode:
@@ -9485,16 +9485,16 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec
94859485
self.add_para(obj_.value)
94869486
elif hasattr(self, 'set_para'):
94879487
self.set_para(obj_.value)
9488-
elif nodeName_ == 'sect5':
9488+
elif nodeName_ == 'sect6':
94899489
obj_ = docSect6Type.factory(parent_object_=self)
94909490
obj_.build(child_, gds_collector_=gds_collector_)
94919491
obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
9492-
MixedContainer.TypeNone, 'sect5', obj_)
9492+
MixedContainer.TypeNone, 'sect6', obj_)
94939493
self.content_.append(obj_)
9494-
if hasattr(self, 'add_sect5'):
9495-
self.add_sect5(obj_.value)
9496-
elif hasattr(self, 'set_sect5'):
9497-
self.set_sect5(obj_.value)
9494+
if hasattr(self, 'add_sect6'):
9495+
self.add_sect6(obj_.value)
9496+
elif hasattr(self, 'set_sect6'):
9497+
self.set_sect6(obj_.value)
94989498
if not fromsubclass_ and child_.tail is not None:
94999499
obj_ = self.mixedclass_(MixedContainer.CategoryText,
95009500
MixedContainer.TypeNone, '', child_.tail)

templates/latex/doxygen.sty

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@
4545
}
4646
}
4747
\ExplSyntaxOff
48+
49+
\ExplSyntaxOn
50+
\dim_new:N \doxytablewidth
51+
\NewDocumentCommand \doxycalculatetablewidth {}
52+
{
53+
\cs_set_protected:Nn \__tblr_build_whole:
54+
{
55+
\__tblr_get_table_width:
56+
\dim_gset:Nn \doxytablewidth { \tablewidth }
57+
}
58+
}
59+
\ExplSyntaxOff
60+
4861
\RequirePackage{fancyvrb}
4962
\RequirePackage{tabularx}
5063
\RequirePackage{multicol}
@@ -414,12 +427,15 @@
414427
\SetTblrOuter[longtblr]{theme=DoxyTableCaptionTheme,caption={#2},label={#3}}% set table caption and label
415428
\fi%
416429
\fi%
417-
\sbox0{% first render the table in a savebox to calculate the width of the table which will be stored in \wd0
430+
\begingroup
431+
\doxycalculatetablewidth
432+
\sbox0{% first render the table in a savebox to calculate the width of the table which will be stored in \doxytablewidth
418433
\begin{tblr}{hlines,vlines,measure=vbox,colspec={*{#1}{l}}}%
419434
#5
420435
\end{tblr}%
421436
}% end of sbox0
422-
\ifdim\wd0>\linewidth% use flexible columns
437+
\endgroup
438+
\ifdim\doxytablewidth>\linewidth% use flexible columns
423439
% now render the table for real
424440
\begin{longtblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
425441
measure=vbox,% needed to allow nested lists and tables
@@ -443,15 +459,33 @@
443459
% parameters:
444460
% - #1: number of columns
445461
% - #2: 1=table has a heading row, 0=no heading row
446-
\NewDocumentEnvironment{DoxyTableNested}{m m}{%
462+
\NewDocumentEnvironment{DoxyTableNested}{m m +b}{%
463+
\begingroup
464+
\doxycalculatetablewidth
465+
\sbox0{% first render the table in a savebox to calculate the width of the table which will be stored in \doxytablewidth
466+
\begin{tblr}{hlines,vlines,measure=vbox,colspec={*{#1}{l}}}%
467+
#3
468+
\end{tblr}%
469+
}% end of sbox0
470+
\endgroup
471+
\ifdim\doxytablewidth>\linewidth% use flexible columns
447472
% now render the table for real
448473
\begin{tblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
449-
measure=vbox,% needed to allow nested lists and tables
450-
colspec={*{#1}{X[-1]}},% set column type for all columns
451-
rowhead=#2% set which row is the header (0=disable, 1=enable)
452-
}
474+
measure=vbox,% needed to allow nested lists and tables
475+
colspec={*{#1}{X[-1]}},% set column type for all columns
476+
rowhead=#2} % set which row is the header (0=disable, 1=enable)
477+
#3
478+
\end{tblr}%
479+
\else% use fixed left aligned columns
480+
% now render the table for real
481+
\begin{tblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
482+
measure=vbox,% needed to allow nested lists and tables
483+
colspec={*{#1}{l}},% set column type for all columns
484+
rowhead=#2} % set which row is the header (0=disable, 1=enable)
485+
#3
486+
\end{tblr}%
487+
\fi%
453488
}{% no end marker needed anymore
454-
\end{tblr}
455489
}%
456490

457491
% Defines a parameter table
@@ -462,14 +496,17 @@
462496
% #4: Body
463497
\NewDocumentCommand{\DoxyParamTable}{m m +m +m}{%
464498
\SetTblrOuter[longtblr]{theme=DoxyTableBareTheme,entry=none}% set table caption and label
465-
\sbox0{% render table off-screen first to capture its width in \wd0
499+
\begingroup
500+
\doxycalculatetablewidth
501+
\sbox0{% render table off-screen first to capture its width in \doxytablewidth
466502
\begin{tblr}{measure=vbox,colspec={*{#1}{|l}|}}%
467503
\SetCell[c=#1]{l} \tf{#3} \\[1ex]%
468504
\hline%
469505
#4
470506
\end{tblr}%
471507
}%
472-
\ifdim\wd0>\linewidth%
508+
\endgroup
509+
\ifdim\doxytablewidth>\linewidth% use flexible columns
473510
\edef\DoxyTableColSpec{#2X[-1]}%
474511
\else%
475512
\edef\DoxyTableColSpec{#2l}%

templates/xml/compound.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@
497497
<xsd:complexType name="docInternalS5Type" mixed="true">
498498
<xsd:sequence>
499499
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
500-
<xsd:element name="sect5" type="docSect6Type" minOccurs="0" maxOccurs="unbounded" />
500+
<xsd:element name="sect6" type="docSect6Type" minOccurs="0" maxOccurs="unbounded" />
501501
</xsd:sequence>
502502
</xsd:complexType>
503503

0 commit comments

Comments
 (0)