[PATCH] LaTeX: Fix ToC entries of index/bibliography
Markus Geimer <[email protected]> Sat, 28 Sep 2013 12:14:28 +0200
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi folks, Please find a small patch attached addressing some inconsistencies with the index and bibliography ToC entries in generated LaTeX output. Cheers, Markus ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Doxygen-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/doxygen-develop
fix_latex_toc_entries.patch
(text/x-patch, 2.6 KB)
>From 3c8596ec834a82c146cebd2984eb846b3245008d Mon Sep 17 00:00:00 2001 From: Markus Geimer <[email protected]> Date: Sat, 28 Sep 2013 11:58:00 +0200 Subject: [PATCH] LaTeX: Fix ToC entries of index/bibliography Select an appropriate font size for index/bibliography ToC entries in LaTeX output depending on the COMPACT_LATEX configuration setting ('section' if COMPACT_LATEX=yes, 'chapter' otherwise). Use 'Bibliography' instead of 'Bibliographic References' in ToC entry for consistency (English only). --- 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() -- 1.7.2.5