From 8e0e64c08eea1f43bec0773633268d2a0144615e Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 28 Sep 2013 12:51:48 +0200 Subject: LaTeX: Fix ToC entries of index/bibliography --- src/cite.cpp | 7 ++++++- src/latexgen.cpp | 7 ++++++- src/translator_en.h | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index 576c4bf..ca0fb1a 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -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"; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 49f06fe..e6a6346 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -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"; diff --git a/src/translator_en.h b/src/translator_en.h index cb933df..0535b6b 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -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() -- cgit v0.12