#include "InsetList.h"
#include "LaTeX.h"
#include "LaTeXFeatures.h"
-#include "Lexer.h"
#include "MetricsInfo.h"
#include "xml.h"
#include "texstream.h"
#include "support/debug.h"
#include "support/docstream.h"
#include "support/gettext.h"
+#include "support/Lexer.h"
#include "support/lstrings.h"
#include "support/Translator.h"
{
InsetIndexMacroTranslator translator("see", InsetIndexMacroParams::See);
translator.addPair("seealso", InsetIndexMacroParams::Seealso);
- translator.addPair("subindex", InsetIndexMacroParams::Subindex);
+ translator.addPair("subentry", InsetIndexMacroParams::Subentry);
translator.addPair("sortkey", InsetIndexMacroParams::Sortkey);
return translator;
}
{
InsetIndexMacroTranslatorLoc translator(_("See"), InsetIndexMacroParams::See);
translator.addPair(_("See also"), InsetIndexMacroParams::Seealso);
- translator.addPair(_("Subindex"), InsetIndexMacroParams::Subindex);
+ translator.addPair(_("Subentry"), InsetIndexMacroParams::Subentry);
translator.addPair(_("Sort as"), InsetIndexMacroParams::Sortkey);
return translator;
}
void InsetIndexMacro::getLatex(otexstream & os, OutputParams const & runparams) const
{
- if (params_.type == InsetIndexMacroParams::Subindex) {
+ if (params_.type == InsetIndexMacroParams::Subentry) {
if (hasSortKey()) {
getSortkey(os, runparams);
os << "@";
+ InsetText::latex(os, runparams);
} else {
odocstringstream ourlatex;
otexstream ots(ourlatex);
}
+bool InsetIndexMacro::hasNoContent() const
+{
+ return paragraphs().front().empty();
+}
+
+
void InsetIndexMacro::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action()) {
case INDEX_CODE:
return false;
case INDEXMACRO_SORTKEY_CODE:
- return (params_.type == InsetIndexMacroParams::Subindex
+ return (params_.type == InsetIndexMacroParams::Subentry
&& !hasSortKey());
default:
return InsetCollapsible::insetAllowed(code);