X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Finsets%2FInsetBibtex.cpp;h=3bfc5930130b575825ba7c3cebf4832abb839a8e;hb=a6b07608d8e9de24;hp=15953e1cded7dec4a6455e55c8c18e05df1e02ce;hpb=9cec35697ae8429d8c2d6579fbd6351930a63e4c;p=lyx.git diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 15953e1cde..3bfc593013 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -28,6 +28,7 @@ #include "LaTeXFeatures.h" #include "output_latex.h" #include "output_xhtml.h" +#include "xml.h" #include "OutputParams.h" #include "PDFOptions.h" #include "texstream.h" @@ -1008,7 +1009,7 @@ int InsetBibtex::plaintext(odocstringstream & os, refoutput += "[" + entry.label() + "] "; // FIXME Right now, we are calling BibInfo::getInfo on the key, // which will give us all the cross-referenced info. But for every - // entry, so there's a lot of repitition. This should be fixed. + // entry, so there's a lot of repetition. This should be fixed. refoutput += bibinfo.getInfo(entry.key(), buffer(), ci) + "\n\n"; } os << refoutput; @@ -1019,7 +1020,7 @@ int InsetBibtex::plaintext(odocstringstream & os, // FIXME // docstring InsetBibtex::entriesAsXHTML(vector const & entries) // And then here just: entriesAsXHTML(buffer().masterBibInfo().citedEntries()) -docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const +docstring InsetBibtex::xhtml(XMLStream & xs, OutputParams const &) const { BiblioInfo const & bibinfo = buffer().masterBibInfo(); bool const all_entries = getParam("btprint") == "btPrintAll"; @@ -1034,10 +1035,10 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const ci.richtext = true; ci.max_key_size = UINT_MAX; - xs << html::StartTag("h2", "class='bibtex'") + xs << xml::StartTag("h2", "class='bibtex'") << reflabel - << html::EndTag("h2") - << html::StartTag("div", "class='bibtex'"); + << xml::EndTag("h2") + << xml::StartTag("div", "class='bibtex'"); // Now we loop over the entries vector::const_iterator vit = cites.begin(); @@ -1049,27 +1050,27 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const BibTeXInfo const & entry = biit->second; string const attr = "class='bibtexentry' id='LyXCite-" - + to_utf8(html::cleanAttr(entry.key())) + "'"; - xs << html::StartTag("div", attr); + + to_utf8(xml::cleanAttr(entry.key())) + "'"; + xs << xml::StartTag("div", attr); // don't print labels if we're outputting all entries if (!all_entries) { - xs << html::StartTag("span", "class='bibtexlabel'") + xs << xml::StartTag("span", "class='bibtexlabel'") << entry.label() - << html::EndTag("span"); + << xml::EndTag("span"); } // FIXME Right now, we are calling BibInfo::getInfo on the key, // which will give us all the cross-referenced info. But for every // entry, so there's a lot of repitition. This should be fixed. - xs << html::StartTag("span", "class='bibtexinfo'") - << XHTMLStream::ESCAPE_AND + xs << xml::StartTag("span", "class='bibtexinfo'") + << XMLStream::ESCAPE_AND << bibinfo.getInfo(entry.key(), buffer(), ci) - << html::EndTag("span") - << html::EndTag("div") - << html::CR(); + << xml::EndTag("span") + << xml::EndTag("div") + << xml::CR(); } - xs << html::EndTag("div"); + xs << xml::EndTag("div"); return docstring(); }