summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-05-21 09:37:42 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-05-21 09:37:42 (GMT)
commitba30b13cfd4910a5913f080a039fc429ec8a7e3f (patch)
tree21a3f69741314fdb29dc076c11b83d9e1e27788d /src/definition.cpp
parentdf0d9c3df44dbce633c38e99d33be4de06706f7b (diff)
downloadDoxygen-ba30b13cfd4910a5913f080a039fc429ec8a7e3f.zip
Doxygen-ba30b13cfd4910a5913f080a039fc429ec8a7e3f.tar.gz
Doxygen-ba30b13cfd4910a5913f080a039fc429ec8a7e3f.tar.bz2
Enable in page table of contents for LaTeX
currently the \tableofcontents command is only supported for HTML. In this patch: - enable in page table of contents for LaTeX: \tableofcontents['{'[option][,option]*'}'] where option can be 'HTML, and 'LaTeX' (side effect: possibility to have options with, nearly, all commands.)
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index 92baf0c..2f40e56 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1613,10 +1613,12 @@ void Definition::writeNavigationPath(OutputList &ol) const
}
// TODO: move to htmlgen
-void Definition::writeToc(OutputList &ol)
+void Definition::writeToc(OutputList &ol, int localToc)
{
SectionDict *sectionDict = m_impl->sectionDict;
if (sectionDict==0) return;
+ if (localToc & Definition::Html)
+ {
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.writeString("<div class=\"toc\">");
@@ -1675,6 +1677,15 @@ void Definition::writeToc(OutputList &ol)
ol.writeString("</ul>\n");
ol.writeString("</div>\n");
ol.popGeneratorState();
+ }
+
+ if (localToc & Definition::Latex)
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Latex);
+ ol.writeString("\\localtableofcontents\n");
+ ol.popGeneratorState();
+ }
}
//----------------------------------------------------------------------------------------