]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.cpp
Compute and output numbers for numerical citations.
[lyx.git] / src / insets / InsetIndex.cpp
index 043f58eeb90d79603872a0ef59077e1c5438c8d9..57c0d07a3a496e100ab7bacebfe0b42a4aa6c285 100644 (file)
@@ -689,17 +689,24 @@ docstring InsetPrintIndex::xhtml(XHTMLStream &, OutputParams const & op) const
        if (toc.empty())
                return docstring();
 
-       // Collection the index entries in a form we can use them.
+       // Collect the index entries in a form we can use them.
        Toc::const_iterator it = toc.begin();
        Toc::const_iterator const en = toc.end();
        vector<IndexEntry> entries;
        for (; it != en; ++it)
-               entries.push_back(IndexEntry(it->str(), it->dit()));
+               if (it->isOutput())
+                       entries.push_back(IndexEntry(it->str(), it->dit()));
+
+       if (entries.empty())
+               // not very likely that all the index entries are in notes or
+               // whatever, but....
+               return docstring();
+
        stable_sort(entries.begin(), entries.end());
 
        Layout const & lay = bp.documentClass().htmlTOCLayout();
        string const & tocclass = lay.defaultCSSClass();
-       string const tocattr = "class='index tochead " + tocclass + "'";
+       string const tocattr = "class='index " + tocclass + "'";
 
        // we'll use our own stream, because we are going to defer everything.
        // that's how we deal with the fact that we're probably inside a standard