summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index fa6a104..45e26e7 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1199,7 +1199,7 @@ void LatexGenerator::addIndexItem(const char *s1,const char *s2)
}
-void LatexGenerator::startSection(const char *lab,const char *,bool sub)
+void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
{
if (Config_getBool("PDF_HYPERLINKS"))
{
@@ -1208,15 +1208,29 @@ void LatexGenerator::startSection(const char *lab,const char *,bool sub)
t << "\\";
if (Config_getBool("COMPACT_LATEX"))
{
- if (sub) t << "subsubsection{"; else t << "subsection{";
+ switch(type)
+ {
+ case SectionInfo::Page: t << "subsection"; break;
+ case SectionInfo::Section: t << "subsubsection"; break;
+ case SectionInfo::Subsection: t << "paragraph"; break;
+ default: ASSERT(0); break;
+ }
+ t << "{";
}
else
{
- if (sub) t << "subsection{"; else t << "section{";
+ switch(type)
+ {
+ case SectionInfo::Page: t << "section"; break;
+ case SectionInfo::Section: t << "subsection"; break;
+ case SectionInfo::Subsection: t << "subsubsection"; break;
+ default: ASSERT(0); break;
+ }
+ t << "{";
}
}
-void LatexGenerator::endSection(const char *lab,bool)
+void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
{
t << "}\\label{" << lab << "}" << endl;
}
@@ -1259,7 +1273,7 @@ void LatexGenerator::writeSectionRef(const char *ref,const char *,
void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
const char *title)
{
- t << "\\contentsline{section}{";
+ t << "\\item \\contentsline{section}{";
docify(title);
t << "}{\\ref{" << lab << "}}{}" << endl;
}
@@ -1942,3 +1956,17 @@ void LatexGenerator::endParamList()
t << "\\end{Desc}" << endl;
}
+void LatexGenerator::startSectionRefList()
+{
+ t << "\\footnotesize" << endl;
+ t << "\\begin{multicols}{2}" << endl;
+ t << "\\begin{CompactList}" << endl;
+}
+
+void LatexGenerator::endSectionRefList()
+{
+ t << "\\end{CompactList}" << endl;
+ t << "\\end{multicols}" << endl;
+ t << "\\normalsize" << endl;
+}
+