diff options
Diffstat (limited to 'src/cite.cpp')
-rw-r--r-- | src/cite.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/cite.cpp b/src/cite.cpp index 91dd1e1..576c4bf 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -88,11 +88,19 @@ static QCString getListOfBibFiles(const QCString &sep,bool namesOnly) void CiteDict::writeLatexBibliography(FTextStream &t) { - if (m_entries.count()==0) return; + if (m_entries.isEmpty()) + return; + QCString style = Config_getString("LATEX_BIB_STYLE"); - if (style.isEmpty()) style="plain"; - t << "\\newpage \\bibliographystyle{" << style << "}" << endl; - t << "\\bibliography{" << getListOfBibFiles(",",TRUE) << "}" << endl; + if (style.isEmpty()) + style="plain"; + t << "% Bibliography\n" + "\\newpage\n" + "\\phantomsection\n" + "\\addcontentsline{toc}{part}{" << theTranslator->trCiteReferences() << "}\n" + "\\bibliographystyle{" << style << "}\n" + "\\bibliography{" << getListOfBibFiles(",",TRUE) << "}\n" + "\n"; } void CiteDict::insert(const char *label) @@ -130,7 +138,7 @@ void CiteDict::generatePage() const f.setName(citeListFile); if (!f.open(IO_WriteOnly)) { - err("error: could not open file %s for writing\n",citeListFile.data()); + err("could not open file %s for writing\n",citeListFile.data()); } FTextStream t(&f); t << "<!-- BEGIN CITATIONS -->" << endl; @@ -153,7 +161,7 @@ void CiteDict::generatePage() const QCString bib2xhtml = bib2xhtml_pl; if (!f.open(IO_WriteOnly)) { - err("error: could not open file %s for writing\n",bib2xhtmlFile.data()); + err("could not open file %s for writing\n",bib2xhtmlFile.data()); } f.writeBlock(bib2xhtml, bib2xhtml.length()); f.close(); @@ -164,7 +172,7 @@ void CiteDict::generatePage() const f.setName(doxygenBstFile); if (!f.open(IO_WriteOnly)) { - err("error: could not open file %s for writing\n",doxygenBstFile.data()); + err("could not open file %s for writing\n",doxygenBstFile.data()); } f.writeBlock(bstData, bstData.length()); f.close(); @@ -198,7 +206,7 @@ void CiteDict::generatePage() const } else if (!fi.exists()) { - err("Error: bib file %s not found!\n",bibFile.data()); + err("bib file %s not found!\n",bibFile.data()); } bibdata = citeDataList.next(); } @@ -218,7 +226,7 @@ void CiteDict::generatePage() const f.setName(citeListFile); if (!f.open(IO_ReadOnly)) { - err("error: could not open file %s/citelist.doc for reading\n",outputDir.data()); + err("could not open file %s/citelist.doc for reading\n",outputDir.data()); } bool insideBib=FALSE; @@ -285,7 +293,7 @@ void CiteDict::generatePage() const } else { - err("Error: bib file %s not found!\n",bibFile.data()); + err("bib file %s not found!\n",bibFile.data()); } bibdata = citeDataList.next(); } |