Multiple indices/indexes and Memoir
Jürgen Spitzmüller
jspitzm at gmail.com
Fri Jul 26 07:27:36 UTC 2024
Am Mittwoch, dem 24.07.2024 um 16:23 +0200 schrieb Mathias Girel:
> In my document, if I select multiple indexes, and create an index
> rerum, for example, it generates an error (seen screenshot). I have
> the exact same message even if I'm using a MWE (one paragraph, two
> entries belonging to two indexes).
> My question is: is it a necessary consequence of the Memoir class
> (implying some tricky workaround as explained in the wiki), or is
> there a neat workaround in Lyx, for example by adding something in
> the preamble to avoid this conflict?
> I can live with a single index, if it's too complex to solve, but I
> really like the way multiple indices are integrated in
> LyX, which makes inserting entries so easy.
> Thanks for your help! (and kudos for the great work on 2.4!!)
Memoir's own index implementation is fundamentally incompatible with
splitidx which is used by LyX for multiple indexes. It is possible to
add special support for memoir (I am going to look into that), but
currently you need to refrain from using LyX's multiple index support
and do the second index manually.
Here is some support:
* Store the attached memoir-nomindex.module in your User Directory (see
Help > About LyX) in a sub-folder "layouts"
* put the attached "makeindexall" python script in your PATH and make
it executable
In LyX:
* Tools > Reconfigure and restart
* Load the module "Index of Names for the Memoir Class"
* In Tools > Preferences > Output > LaTeX, change the index processor
to "custom" and enter "makeindexall"
You will now find an inset for name index entries in Insert > Custom
Insets and an inset for the actual inset in Insert >
List/Content/References.
To change the header of the second index, put in TeX mode
\renewcommand{\indexname}{Name Index}
right before it
If you want a different second index than a name index, adjust this
accordingly.
Hope this helps
(I am also updating the wiki and provide these files there)
--
Jürgen
-------------- next part --------------
#\DeclareLyXModule{Index of Names for the Memoir Class}
#DescriptionBegin
#Defines an index inset for names, only suitable for Memoir!
#DescriptionEnd
Format 104
InsetLayout Flex:NameIndex
LyXType custom
LabelString IdxNom
LatexType command
LatexName index[nom]
Decoration classic
Font
Color foreground
Size Small
Family Roman
Shape Up
Series Medium
Misc No_Emph
Misc No_Noun
Misc No_Bar
EndFont
LabelFont
Color red
Size Small
EndFont
MultiPar false
NeedProtect true
Preamble
\makeindex[nom]
EndPreamble
End
Float
Type pagenote
ListName "Name Index"
IsPredefined true
UsesFloatPkg false
ListCommand printindex[nom]
End
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makeindexall
Type: text/x-python
Size: 616 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240726/6f2dd607/attachment.py>
More information about the lyx-users
mailing list