3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
12 #include "insetindex.h"
14 #include "dispatchresult.h"
15 #include "funcrequest.h"
17 #include "LaTeXFeatures.h"
18 #include "metricsinfo.h"
21 #include "support/std_ostream.h"
27 InsetIndex::InsetIndex(InsetCommandParams const & p)
28 : InsetCommand(p, "index")
32 // InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
33 // : InsetCommand(p, false)
37 string const InsetIndex::getScreenLabel(Buffer const &) const
40 return lyx::to_utf8(_("Idx"));
44 int InsetIndex::docbook(Buffer const &, ostream & os,
45 OutputParams const &) const
47 os << "<indexterm><primary>" << sgml::escapeString(getContents())
48 << "</primary></indexterm>";
53 InsetBase::Code InsetIndex::lyxCode() const
55 return InsetBase::INDEX_CODE;
60 InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
61 : InsetCommand(p, string())
65 // InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
66 // : InsetCommand(p, false)
70 string const InsetPrintIndex::getScreenLabel(Buffer const &) const
73 return lyx::to_utf8(_("Index"));
77 void InsetPrintIndex::validate(LaTeXFeatures & features) const
79 features.require("makeidx");
83 InsetBase::Code InsetPrintIndex::lyxCode() const
85 return InsetBase::INDEX_PRINT_CODE;