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) ...@@ -94,10 +94,15 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
QCString style = Config_getString("LATEX_BIB_STYLE"); QCString style = Config_getString("LATEX_BIB_STYLE");
if (style.isEmpty()) if (style.isEmpty())
style="plain"; style="plain";
QCString unit;
if (Config_getBool("COMPACT_LATEX"))
unit = "section";
else
unit = "chapter";
t << "% Bibliography\n" t << "% Bibliography\n"
"\\newpage\n" "\\newpage\n"
"\\phantomsection\n" "\\phantomsection\n"
"\\addcontentsline{toc}{part}{" << theTranslator->trCiteReferences() << "}\n" "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n"
"\\bibliographystyle{" << style << "}\n" "\\bibliographystyle{" << style << "}\n"
"\\bibliography{" << getListOfBibFiles(",",TRUE) << "}\n" "\\bibliography{" << getListOfBibFiles(",",TRUE) << "}\n"
"\n"; "\n";
......
...@@ -525,10 +525,15 @@ static void writeDefaultFooter(FTextStream &t) ...@@ -525,10 +525,15 @@ static void writeDefaultFooter(FTextStream &t)
Doxygen::citeDict->writeLatexBibliography(t); Doxygen::citeDict->writeLatexBibliography(t);
// Index // Index
QCString unit;
if (Config_getBool("COMPACT_LATEX"))
unit = "section";
else
unit = "chapter";
t << "% Index\n" t << "% Index\n"
"\\newpage\n" "\\newpage\n"
"\\phantomsection\n" "\\phantomsection\n"
"\\addcontentsline{toc}{part}{" << theTranslator->trRTFGeneralIndex() << "}\n" "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n"
"\\printindex\n" "\\printindex\n"
"\n" "\n"
"\\end{document}\n"; "\\end{document}\n";
......
...@@ -1825,7 +1825,7 @@ class TranslatorEnglish : public Translator ...@@ -1825,7 +1825,7 @@ class TranslatorEnglish : public Translator
/*! Header for the page with bibliographic citations */ /*! Header for the page with bibliographic citations */
virtual QCString trCiteReferences() virtual QCString trCiteReferences()
{ return "Bibliographic References"; } { return "Bibliography"; }
/*! Text for copyright paragraph */ /*! Text for copyright paragraph */
virtual QCString trCopyright() 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