summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/latexdocvisitor.cpp4
-rw-r--r--templates/latex/doxygen.sty7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 5e7278c..b8c2efe 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -114,7 +114,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name,
if (hasCaption)
{
- t << "\n\\caption{";
+ t << "\n\\doxyfigcaption{";
}
}
@@ -947,7 +947,7 @@ void LatexDocVisitor::visitPre(DocHtmlTable *t)
if (t->hasCaption())
{
DocHtmlCaption *c = t->caption();
- m_t << "\\caption{";
+ m_t << "\\doxyfigcaption{";
visitCaption(this, c->children());
m_t << "}";
m_t << "\\label{" << stripPath(c->file()) << "_" << c->anchor() << "}";
diff --git a/templates/latex/doxygen.sty b/templates/latex/doxygen.sty
index 3f21871..687a1af 100644
--- a/templates/latex/doxygen.sty
+++ b/templates/latex/doxygen.sty
@@ -475,3 +475,10 @@
% Color used for table heading
\newcommand{\tableheadbgcolor}{lightgray}%
+
+% Define caption that is also suitable in a table
+\makeatletter
+\def\doxyfigcaption{%
+\refstepcounter{figure}%
+\@dblarg{\@caption{figure}}}
+\makeatother