From 1d77a4ed407aaa24eae53f501d1a5ce38b352504 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 15 Jan 2016 20:01:19 +0100 Subject: PDF generation stops when image with caption is included in a table. - patch should only be applied to images. - added doxyfigcaption to manual.sty for completeness, when in future a table with an image and caption might appear in the documentation. --- doc/manual.sty | 7 +++++++ src/latexdocvisitor.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/manual.sty b/doc/manual.sty index 80fbda6..643bd40 100644 --- a/doc/manual.sty +++ b/doc/manual.sty @@ -31,3 +31,10 @@ \fancyfoot[CO]{\fancyplain{}{}} \fancyfoot[RO]{\fancyplain{}{}} +% Define caption that is also suitable in a table +\makeatletter +\def\doxyfigcaption{% +\refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother + diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index b8c2efe..e8bb119 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -947,7 +947,7 @@ void LatexDocVisitor::visitPre(DocHtmlTable *t) if (t->hasCaption()) { DocHtmlCaption *c = t->caption(); - m_t << "\\doxyfigcaption{"; + m_t << "\\caption{"; visitCaption(this, c->children()); m_t << "}"; m_t << "\\label{" << stripPath(c->file()) << "_" << c->anchor() << "}"; -- cgit v0.12