mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Rename subindex to subentry
Makes more sense, and distinguishes it better from printsubindex
This commit is contained in:
parent
fba3dace9e
commit
077ccf905d
@ -195,7 +195,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
Primary
|
Primary
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -226,7 +226,7 @@ SortedPrimary
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
Primary
|
Primary
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -248,7 +248,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
Primary
|
Primary
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -258,7 +258,7 @@ Secondary
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
@ -110,7 +110,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
Primary
|
Primary
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -132,7 +132,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
Primary
|
Primary
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -142,7 +142,7 @@ Secondary
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
@ -118,7 +118,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
A
|
A
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -143,7 +143,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
A
|
A
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -153,7 +153,7 @@ B
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -178,7 +178,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
A
|
A
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -203,7 +203,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
E
|
E
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
@ -112,7 +112,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
A
|
A
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -137,7 +137,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
A
|
A
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -147,7 +147,7 @@ B
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -172,7 +172,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
A
|
A
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
@ -197,7 +197,7 @@ status open
|
|||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
E
|
E
|
||||||
\begin_inset IndexMacro subindex
|
\begin_inset IndexMacro subentry
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
@ -9,10 +9,10 @@ changes happened in particular if possible. A good example would be
|
|||||||
|
|
||||||
2022-10-29 Jürgen Spitzmüller <spitz@lyx.org>
|
2022-10-29 Jürgen Spitzmüller <spitz@lyx.org>
|
||||||
* Format incremented to 610: InsetIndexMacros and new IndexInset params:
|
* Format incremented to 610: InsetIndexMacros and new IndexInset params:
|
||||||
- \begin_inset IndexMacro [see|seealso|subindex|sortkey], relating to
|
- \begin_inset IndexMacro [see|seealso|subentry|sortkey], relating to
|
||||||
\index{...|see{content}} -- see
|
\index{...|see{content}} -- see
|
||||||
\index{...|seealso{content}} -- seealso
|
\index{...|seealso{content}} -- seealso
|
||||||
\index{...!subindex} -- subindex
|
\index{...!subentry} -- subentry
|
||||||
\index{sortkey@...} -- sortkey
|
\index{sortkey@...} -- sortkey
|
||||||
see and see also are mutually exclusive
|
see and see also are mutually exclusive
|
||||||
- \begin_inset Index
|
- \begin_inset Index
|
||||||
|
@ -456,9 +456,9 @@ InsetLayout IndexMacro:sortkey
|
|||||||
LabelString "Sort as"
|
LabelString "Sort as"
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout IndexMacro:subindex
|
InsetLayout IndexMacro:subentry
|
||||||
CopyStyle IndexMacro:see
|
CopyStyle IndexMacro:see
|
||||||
LabelString "Subindex"
|
LabelString "Subentry"
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Box
|
InsetLayout Box
|
||||||
|
@ -4461,15 +4461,15 @@ def revert_index_macros(document):
|
|||||||
if j == -1:
|
if j == -1:
|
||||||
document.warning("Malformed LyX document: Can't find end of index inset at line %d" % i)
|
document.warning("Malformed LyX document: Can't find end of index inset at line %d" % i)
|
||||||
continue
|
continue
|
||||||
# We search for all possible subindexes in turn, store their
|
# We search for all possible subentries in turn, store their
|
||||||
# content and delete them
|
# content and delete them
|
||||||
see = []
|
see = []
|
||||||
seealso = []
|
seealso = []
|
||||||
subindex = []
|
subentry = []
|
||||||
subindex2 = []
|
subentry2 = []
|
||||||
sortkey = []
|
sortkey = []
|
||||||
# Two subindexes are allowed, thus the duplication
|
# Two subentries are allowed, thus the duplication
|
||||||
imacros = ["seealso", "see", "subindex", "subindex", "sortkey"]
|
imacros = ["seealso", "see", "subentry", "subentry", "sortkey"]
|
||||||
for imacro in imacros:
|
for imacro in imacros:
|
||||||
iim = find_token(document.body, "\\begin_inset IndexMacro %s" % imacro, i, j)
|
iim = find_token(document.body, "\\begin_inset IndexMacro %s" % imacro, i, j)
|
||||||
if iim == -1:
|
if iim == -1:
|
||||||
@ -4491,8 +4491,8 @@ def revert_index_macros(document):
|
|||||||
seealso = icont[1:]
|
seealso = icont[1:]
|
||||||
elif imacro == "see":
|
elif imacro == "see":
|
||||||
see = icont[1:]
|
see = icont[1:]
|
||||||
elif imacro == "subindex":
|
elif imacro == "subentry":
|
||||||
# subindexes might hace their own sortkey!
|
# subentries might hace their own sortkey!
|
||||||
xiim = find_token(document.body, "\\begin_inset IndexMacro sortkey", iimpl, iimple)
|
xiim = find_token(document.body, "\\begin_inset IndexMacro sortkey", iimpl, iimple)
|
||||||
if xiim != -1:
|
if xiim != -1:
|
||||||
xiime = find_end_of_inset(document.body, xiim)
|
xiime = find_end_of_inset(document.body, xiim)
|
||||||
@ -4510,10 +4510,10 @@ def revert_index_macros(document):
|
|||||||
xicont = document.body[xiimpl:xiimple]
|
xicont = document.body[xiimpl:xiimple]
|
||||||
xxicont = document.body[iimpl:xiimpl] + document.body[xiimple+1:iimple]
|
xxicont = document.body[iimpl:xiimpl] + document.body[xiimple+1:iimple]
|
||||||
icont = xicont + put_cmd_in_ert("@") + xxicont[1:]
|
icont = xicont + put_cmd_in_ert("@") + xxicont[1:]
|
||||||
if len(subindex) > 0:
|
if len(subentry) > 0:
|
||||||
subindex2 = icont[1:]
|
subentry2 = icont[1:]
|
||||||
else:
|
else:
|
||||||
subindex = icont[1:]
|
subentry = icont[1:]
|
||||||
elif imacro == "sortkey":
|
elif imacro == "sortkey":
|
||||||
sortkey = icont
|
sortkey = icont
|
||||||
# Everything stored. Delete subinset.
|
# Everything stored. Delete subinset.
|
||||||
@ -4538,10 +4538,10 @@ def revert_index_macros(document):
|
|||||||
document.body[ple:ple] = put_cmd_in_ert("|" + pagerange + "seealso{") + seealso + put_cmd_in_ert("}")
|
document.body[ple:ple] = put_cmd_in_ert("|" + pagerange + "seealso{") + seealso + put_cmd_in_ert("}")
|
||||||
elif pageformat != "default":
|
elif pageformat != "default":
|
||||||
document.body[ple:ple] = put_cmd_in_ert("|" + pagerange + pageformat)
|
document.body[ple:ple] = put_cmd_in_ert("|" + pagerange + pageformat)
|
||||||
if len(subindex2) > 0:
|
if len(subentry2) > 0:
|
||||||
document.body[ple:ple] = put_cmd_in_ert("!") + subindex2
|
document.body[ple:ple] = put_cmd_in_ert("!") + subentry2
|
||||||
if len(subindex) > 0:
|
if len(subentry) > 0:
|
||||||
document.body[ple:ple] = put_cmd_in_ert("!") + subindex
|
document.body[ple:ple] = put_cmd_in_ert("!") + subentry
|
||||||
if len(sortkey) > 0:
|
if len(sortkey) > 0:
|
||||||
document.body[pl:pl+1] = document.body[pl:pl] + sortkey + put_cmd_in_ert("@")
|
document.body[pl:pl+1] = document.body[pl:pl] + sortkey + put_cmd_in_ert("@")
|
||||||
|
|
||||||
|
@ -633,7 +633,7 @@ Menuset
|
|||||||
End
|
End
|
||||||
|
|
||||||
Menu "context-edit-index"
|
Menu "context-edit-index"
|
||||||
OptItem "Insert Subentry|b" "indexmacro-insert subindex"
|
OptItem "Insert Subentry|b" "indexmacro-insert subentry"
|
||||||
OptItem "Insert Sortkey|k" "indexmacro-insert sortkey"
|
OptItem "Insert Sortkey|k" "indexmacro-insert sortkey"
|
||||||
OptItem "Insert See Reference|e" "indexmacro-insert see"
|
OptItem "Insert See Reference|e" "indexmacro-insert see"
|
||||||
OptItem "Insert See also Reference|a" "indexmacro-insert seealso"
|
OptItem "Insert See also Reference|a" "indexmacro-insert seealso"
|
||||||
|
@ -534,7 +534,7 @@ Menuset
|
|||||||
End
|
End
|
||||||
|
|
||||||
Menu "index_properties"
|
Menu "index_properties"
|
||||||
OptItem "Subentry|b" "indexmacro-insert subindex"
|
OptItem "Subentry|b" "indexmacro-insert subentry"
|
||||||
OptItem "Sortkey|k" "indexmacro-insert sortkey"
|
OptItem "Sortkey|k" "indexmacro-insert sortkey"
|
||||||
OptItem "See|e" "indexmacro-insert see"
|
OptItem "See|e" "indexmacro-insert see"
|
||||||
OptItem "See also|a" "indexmacro-insert seealso"
|
OptItem "See also|a" "indexmacro-insert seealso"
|
||||||
|
@ -2311,7 +2311,7 @@ void LyXAction::init()
|
|||||||
* \var lyx::FuncCode lyx::LFUN_INDEXMACRO_INSERT
|
* \var lyx::FuncCode lyx::LFUN_INDEXMACRO_INSERT
|
||||||
* \li Action: Inserts special Index macros into the document.
|
* \li Action: Inserts special Index macros into the document.
|
||||||
* \li Syntax: indexmacro-insert <type>
|
* \li Syntax: indexmacro-insert <type>
|
||||||
* \li Params: <type>: see, seealso, subindex, sortkey.
|
* \li Params: <type>: see, seealso, subentry, sortkey.
|
||||||
* \li Origin: spitz, 20 Feb 2022
|
* \li Origin: spitz, 20 Feb 2022
|
||||||
* \endvar
|
* \endvar
|
||||||
*/
|
*/
|
||||||
|
@ -163,8 +163,8 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
|
|||||||
case LFUN_INDEXMACRO_INSERT: {
|
case LFUN_INDEXMACRO_INSERT: {
|
||||||
string const arg = cmd.getArg(0);
|
string const arg = cmd.getArg(0);
|
||||||
if (arg != "see" && arg != "seealso"
|
if (arg != "see" && arg != "seealso"
|
||||||
&& arg != "subindex" && arg != "sortkey") {
|
&& arg != "subentry" && arg != "sortkey") {
|
||||||
LYXERR0("LFUN_IPAMACRO_INSERT: wrong argument");
|
LYXERR0("LFUN_INDEXMACRO_INSERT: wrong argument");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return new InsetIndexMacro(buf, arg);
|
return new InsetIndexMacro(buf, arg);
|
||||||
|
@ -582,8 +582,8 @@ void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
|
|
||||||
case LFUN_PARAGRAPH_BREAK: {
|
case LFUN_PARAGRAPH_BREAK: {
|
||||||
// Since this inset in single-par anyway, let's use
|
// Since this inset in single-par anyway, let's use
|
||||||
// return to enter subindexes
|
// return to enter subentryes
|
||||||
FuncRequest fr(LFUN_INDEXMACRO_INSERT, "subindex");
|
FuncRequest fr(LFUN_INDEXMACRO_INSERT, "subentry");
|
||||||
lyx::dispatch(fr);
|
lyx::dispatch(fr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -620,7 +620,7 @@ bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_PARAGRAPH_BREAK:
|
case LFUN_PARAGRAPH_BREAK:
|
||||||
return macrosPossible("subindex");
|
return macrosPossible("subentry");
|
||||||
|
|
||||||
case LFUN_INDEXMACRO_INSERT:
|
case LFUN_INDEXMACRO_INSERT:
|
||||||
return macrosPossible(cmd.getArg(0));
|
return macrosPossible(cmd.getArg(0));
|
||||||
@ -675,7 +675,7 @@ void InsetIndex::getSubentries(otexstream & os, OutputParams const & runparams)
|
|||||||
if (inset.lyxCode() == INDEXMACRO_CODE) {
|
if (inset.lyxCode() == INDEXMACRO_CODE) {
|
||||||
InsetIndexMacro const & iim =
|
InsetIndexMacro const & iim =
|
||||||
static_cast<InsetIndexMacro const &>(inset);
|
static_cast<InsetIndexMacro const &>(inset);
|
||||||
if (iim.params().type == InsetIndexMacroParams::Subindex) {
|
if (iim.params().type == InsetIndexMacroParams::Subentry) {
|
||||||
++i;
|
++i;
|
||||||
if (i > 2)
|
if (i > 2)
|
||||||
return;
|
return;
|
||||||
@ -700,7 +700,7 @@ std::vector<docstring> InsetIndex::getSubentriesAsText(OutputParams const & runp
|
|||||||
if (inset.lyxCode() == INDEXMACRO_CODE) {
|
if (inset.lyxCode() == INDEXMACRO_CODE) {
|
||||||
InsetIndexMacro const & iim =
|
InsetIndexMacro const & iim =
|
||||||
static_cast<InsetIndexMacro const &>(inset);
|
static_cast<InsetIndexMacro const &>(inset);
|
||||||
if (iim.params().type == InsetIndexMacroParams::Subindex) {
|
if (iim.params().type == InsetIndexMacroParams::Subentry) {
|
||||||
++i;
|
++i;
|
||||||
if (i > 2)
|
if (i > 2)
|
||||||
break;
|
break;
|
||||||
@ -819,7 +819,7 @@ bool hasInsetWithCode(const InsetIndex * const inset_index, const InsetCode code
|
|||||||
|
|
||||||
bool InsetIndex::hasSubentries() const
|
bool InsetIndex::hasSubentries() const
|
||||||
{
|
{
|
||||||
return hasInsetWithCode(this, INDEXMACRO_CODE, {InsetIndexMacroParams::Subindex});
|
return hasInsetWithCode(this, INDEXMACRO_CODE, {InsetIndexMacroParams::Subentry});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -838,7 +838,7 @@ bool InsetIndex::hasSortKey() const
|
|||||||
bool InsetIndex::macrosPossible(string const type) const
|
bool InsetIndex::macrosPossible(string const type) const
|
||||||
{
|
{
|
||||||
if (type != "see" && type != "seealso"
|
if (type != "see" && type != "seealso"
|
||||||
&& type != "sortkey" && type != "subindex")
|
&& type != "sortkey" && type != "subentry")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Paragraph const & par = paragraphs().front();
|
Paragraph const & par = paragraphs().front();
|
||||||
@ -854,8 +854,8 @@ bool InsetIndex::macrosPossible(string const type) const
|
|||||||
&& (iim.params().type == InsetIndexMacroParams::See
|
&& (iim.params().type == InsetIndexMacroParams::See
|
||||||
|| iim.params().type == InsetIndexMacroParams::Seealso))
|
|| iim.params().type == InsetIndexMacroParams::Seealso))
|
||||||
return false;
|
return false;
|
||||||
if (type == "subindex"
|
if (type == "subentry"
|
||||||
&& iim.params().type == InsetIndexMacroParams::Subindex) {
|
&& iim.params().type == InsetIndexMacroParams::Subentry) {
|
||||||
++subidxs;
|
++subidxs;
|
||||||
if (subidxs > 1)
|
if (subidxs > 1)
|
||||||
return false;
|
return false;
|
||||||
|
@ -52,7 +52,7 @@ InsetIndexMacroTranslator const init_insetindexmacrotranslator()
|
|||||||
{
|
{
|
||||||
InsetIndexMacroTranslator translator("see", InsetIndexMacroParams::See);
|
InsetIndexMacroTranslator translator("see", InsetIndexMacroParams::See);
|
||||||
translator.addPair("seealso", InsetIndexMacroParams::Seealso);
|
translator.addPair("seealso", InsetIndexMacroParams::Seealso);
|
||||||
translator.addPair("subindex", InsetIndexMacroParams::Subindex);
|
translator.addPair("subentry", InsetIndexMacroParams::Subentry);
|
||||||
translator.addPair("sortkey", InsetIndexMacroParams::Sortkey);
|
translator.addPair("sortkey", InsetIndexMacroParams::Sortkey);
|
||||||
return translator;
|
return translator;
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ InsetIndexMacroTranslatorLoc const init_insetindexmacrotranslator_loc()
|
|||||||
{
|
{
|
||||||
InsetIndexMacroTranslatorLoc translator(_("See"), InsetIndexMacroParams::See);
|
InsetIndexMacroTranslatorLoc translator(_("See"), InsetIndexMacroParams::See);
|
||||||
translator.addPair(_("See also"), InsetIndexMacroParams::Seealso);
|
translator.addPair(_("See also"), InsetIndexMacroParams::Seealso);
|
||||||
translator.addPair(_("Subindex"), InsetIndexMacroParams::Subindex);
|
translator.addPair(_("Subentry"), InsetIndexMacroParams::Subentry);
|
||||||
translator.addPair(_("Sort as"), InsetIndexMacroParams::Sortkey);
|
translator.addPair(_("Sort as"), InsetIndexMacroParams::Sortkey);
|
||||||
return translator;
|
return translator;
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ void InsetIndexMacro::read(Lexer & lex)
|
|||||||
|
|
||||||
void InsetIndexMacro::getLatex(otexstream & os, OutputParams const & runparams) const
|
void InsetIndexMacro::getLatex(otexstream & os, OutputParams const & runparams) const
|
||||||
{
|
{
|
||||||
if (params_.type == InsetIndexMacroParams::Subindex) {
|
if (params_.type == InsetIndexMacroParams::Subentry) {
|
||||||
if (hasSortKey()) {
|
if (hasSortKey()) {
|
||||||
getSortkey(os, runparams);
|
getSortkey(os, runparams);
|
||||||
os << "@";
|
os << "@";
|
||||||
@ -374,7 +374,7 @@ bool InsetIndexMacro::insetAllowed(InsetCode code) const
|
|||||||
case INDEX_CODE:
|
case INDEX_CODE:
|
||||||
return false;
|
return false;
|
||||||
case INDEXMACRO_SORTKEY_CODE:
|
case INDEXMACRO_SORTKEY_CODE:
|
||||||
return (params_.type == InsetIndexMacroParams::Subindex
|
return (params_.type == InsetIndexMacroParams::Subentry
|
||||||
&& !hasSortKey());
|
&& !hasSortKey());
|
||||||
default:
|
default:
|
||||||
return InsetCollapsible::insetAllowed(code);
|
return InsetCollapsible::insetAllowed(code);
|
||||||
|
@ -27,7 +27,7 @@ public:
|
|||||||
enum Type {
|
enum Type {
|
||||||
See,
|
See,
|
||||||
Seealso,
|
Seealso,
|
||||||
Subindex,
|
Subentry,
|
||||||
Sortkey
|
Sortkey
|
||||||
};
|
};
|
||||||
///
|
///
|
||||||
|
@ -1563,7 +1563,7 @@ void parse_index_entry(Parser & p, ostream & os, Context & context, string const
|
|||||||
p.get_token();
|
p.get_token();
|
||||||
os << "\\begin_layout Plain Layout\n";
|
os << "\\begin_layout Plain Layout\n";
|
||||||
} else {
|
} else {
|
||||||
begin_inset(os, "IndexMacro subindex");
|
begin_inset(os, "IndexMacro subentry");
|
||||||
os << "\nstatus collapsed\n";
|
os << "\nstatus collapsed\n";
|
||||||
}
|
}
|
||||||
// Check for (level-specific) sortkey
|
// Check for (level-specific) sortkey
|
||||||
@ -1583,7 +1583,7 @@ void parse_index_entry(Parser & p, ostream & os, Context & context, string const
|
|||||||
main = false;
|
main = false;
|
||||||
}
|
}
|
||||||
if (!main) {
|
if (!main) {
|
||||||
begin_inset(os, "IndexMacro subindex");
|
begin_inset(os, "IndexMacro subentry");
|
||||||
os << "\nstatus collapsed\n";
|
os << "\nstatus collapsed\n";
|
||||||
}
|
}
|
||||||
// Final level
|
// Final level
|
||||||
@ -1626,7 +1626,7 @@ void parse_index_entry(Parser & p, ostream & os, Context & context, string const
|
|||||||
os << "\n\\end_layout\n";
|
os << "\n\\end_layout\n";
|
||||||
} else {
|
} else {
|
||||||
if (post.empty() && !startrange && !endrange) {
|
if (post.empty() && !startrange && !endrange) {
|
||||||
parse_text_in_inset(p, os, FLAG_BRACE_LAST, false, context, "IndexMacro subindex");
|
parse_text_in_inset(p, os, FLAG_BRACE_LAST, false, context, "IndexMacro subentry");
|
||||||
p.dropPosition();
|
p.dropPosition();
|
||||||
} else {
|
} else {
|
||||||
// Handle post-argument
|
// Handle post-argument
|
||||||
|
Loading…
Reference in New Issue
Block a user