Commit 8e0e64c0 authored by Dimitri van Heesch's avatar Dimitri van Heesch

LaTeX: Fix ToC entries of index/bibliography

parent bf8ecf77
......@@ -94,10 +94,15 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
QCString style = Config_getString("LATEX_BIB_STYLE");
if (style.isEmpty())
style="plain";
QCString unit;
if (Config_getBool("COMPACT_LATEX"))
unit = "section";
else
unit = "chapter";
t << "% Bibliography\n"
"\\newpage\n"
"\\phantomsection\n"
"\\addcontentsline{toc}{part}{" << theTranslator->trCiteReferences() << "}\n"
"\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n"
"\\bibliographystyle{" << style << "}\n"
"\\bibliography{" << getListOfBibFiles(",",TRUE) << "}\n"
"\n";
......
......@@ -525,10 +525,15 @@ static void writeDefaultFooter(FTextStream &t)
Doxygen::citeDict->writeLatexBibliography(t);
// Index
QCString unit;
if (Config_getBool("COMPACT_LATEX"))
unit = "section";
else
unit = "chapter";
t << "% Index\n"
"\\newpage\n"
"\\phantomsection\n"
"\\addcontentsline{toc}{part}{" << theTranslator->trRTFGeneralIndex() << "}\n"
"\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n"
"\\printindex\n"
"\n"
"\\end{document}\n";
......
......@@ -1825,7 +1825,7 @@ class TranslatorEnglish : public Translator
/*! Header for the page with bibliographic citations */
virtual QCString trCiteReferences()
{ return "Bibliographic References"; }
{ return "Bibliography"; }
/*! Text for copyright paragraph */
virtual QCString trCopyright()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment