Skip to content

Commit c312576

Browse files
authored
Merge pull request doxygen#11651 from albert-github/feature/bug_latex_explicit
Removing explicit tables code from source code
2 parents 968a677 + 4134d5f commit c312576

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/latexdocvisitor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,11 +1256,11 @@ void LatexDocVisitor::writeStartTableCommand(const DocNodeVariant *n,size_t cols
12561256
{
12571257
if (isTableNested(n))
12581258
{
1259-
m_t << "{\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}";
1259+
m_t << "\n\\begin{DoxyTableNested}{" << cols << "}\n";
12601260
}
12611261
else
12621262
{
1263-
m_t << "\\tabulinesep=1mm\n\\begin{longtabu}spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
1263+
m_t << "\n\\begin{DoxyTable}{" << cols << "}\n";
12641264
}
12651265
//return isNested ? "TabularNC" : "TabularC";
12661266
}
@@ -1269,11 +1269,11 @@ void LatexDocVisitor::writeEndTableCommand(const DocNodeVariant *n)
12691269
{
12701270
if (isTableNested(n))
12711271
{
1272-
m_t << "\\end{tabularx}}\n";
1272+
m_t << "\\end{DoxyTableNested}\n";
12731273
}
12741274
else
12751275
{
1276-
m_t << "\\end{longtabu}\n";
1276+
m_t << "\\end{DoxyTable}\n";
12771277
}
12781278
//return isNested ? "TabularNC" : "TabularC";
12791279
}

templates/latex/doxygen.sty

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,20 @@
346346
\end{DoxyDesc}%
347347
}
348348

349+
\newenvironment{DoxyTable}[1]{%
350+
\tabulinesep=1mm%
351+
\begin{longtabu}spread 0pt [c]{*{#1}{|X[-1]}|}%
352+
}{%
353+
\end{longtabu}%
354+
}
355+
356+
\newenvironment{DoxyTableNested}[1]{%
357+
\par\noindent
358+
\tabularx{\linewidth}{|*{#1}{>{\raggedright\arraybackslash}X|}}%
359+
}{%
360+
\endtabularx
361+
}
362+
349363
% Used by parameter lists
350364
\newenvironment{DoxyParams}[2][]{%
351365
\tabulinesep=1mm%

0 commit comments

Comments
 (0)