]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibtex.cpp
Compute and output numbers for numerical citations.
[lyx.git] / src / insets / InsetBibtex.cpp
index 0392b9d233e9efe3f7a1c3f5705ba68265a958c9..1abafd60b3189679a6c57d3a41ba4d47770d3406 100644 (file)
@@ -929,16 +929,24 @@ void InsetBibtex::validate(LaTeXFeatures & features) const
 
 
 int InsetBibtex::plaintext(odocstringstream & os,
-       OutputParams const &, size_t max_length) const
+       OutputParams const & op, size_t max_length) const
 {
+       docstring const reflabel = buffer().B_("References");
+
+       // We could output more information here, e.g., what databases are included
+       // and information about options. But I don't necessarily see any reason to
+       // do this right now.
+       if (op.for_tooltip || op.for_toc || op.for_search) {
+               os << '[' << reflabel << ']' << '\n';
+               return PLAINTEXT_NEWLINE;
+       }
+
        BiblioInfo bibinfo = buffer().masterBibInfo();
        bibinfo.makeCitationLabels(buffer());
        vector<docstring> const & cites = bibinfo.citedEntries();
 
        size_t start_size = os.str().size();
        docstring refoutput;
-       docstring const reflabel = buffer().B_("References");
-
        refoutput += reflabel + "\n\n";
 
        // Now we loop over the entries