#include "LaTeXFeatures.h"
#include "Lexer.h"
#include "MetricsInfo.h"
+#include "output_latex.h"
#include "sgml.h"
#include "TocBackend.h"
///////////////////////////////////////////////////////////////////////
-InsetIndex::InsetIndex(Buffer const & buf, InsetIndexParams const & params)
+InsetIndex::InsetIndex(Buffer * buf, InsetIndexParams const & params)
: InsetCollapsable(buf), params_(params)
{}
int InsetIndex::latex(odocstream & os,
- OutputParams const & runparams) const
+ OutputParams const & runparams_in) const
{
+ OutputParams runparams(runparams_in);
+ runparams.inIndexEntry = true;
+
if (buffer().masterBuffer()->params().use_indices && !params_.index.empty()
&& params_.index != "idx") {
os << "\\sindex[";
// ...and erase that stuff from latexstr
latexstr = latexstr.erase(pos);
// ...and similarly from plainstr
- // FIXME This utterly fails if the "|" is in ERT
- // which is necessary with font encodings other
- // than T1.
size_t ppos = plainstr.find(from_ascii("|"));
if (ppos < plainstr.size())
plainstr.erase(ppos);
// Separate the entires and subentries, i.e., split on "!"
// FIXME This would do the wrong thing with escaped ! characters
- // and with "!" in ERT.
std::vector<docstring> const levels =
getVectorFromString(latexstr, from_ascii("!"), true);
std::vector<docstring> const levels_plain =
}
-docstring InsetIndex::xhtml(odocstream &, OutputParams const &) const
+docstring InsetIndex::xhtml(XHTMLStream &, OutputParams const &) const
{
return docstring();
}
}
-docstring const InsetIndex::buttonLabel(BufferView const & bv) const
-{
- docstring s = _("Idx");
- if (decoration() == InsetLayout::CLASSIC)
- return isOpen(bv) ? s : getNewLabel(s);
- else
- return getNewLabel(s);
-}
-
-
ColorCode InsetIndex::labelColor() const
{
if (params_.index.empty() || params_.index == from_ascii("idx"))
//
///////////////////////////////////////////////////////////////////////
-InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
- : InsetCommand(p, "index_print")
+InsetPrintIndex::InsetPrintIndex(Buffer * buf, InsetCommandParams const & p)
+ : InsetCommand(buf, p, "index_print")
{}
return buffer().masterBuffer()->params().use_indices;
}
-docstring InsetPrintIndex::xhtml(odocstream &, OutputParams const &) const
+
+docstring InsetPrintIndex::xhtml(XHTMLStream &, OutputParams const &) const
{
return docstring();
}