<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Arial, Helvetica, sans-serif;font-size:16px;"><div dir="ltr" data-setdir="false">I am using the docmfp package for a project which has me doing Literate Programming for OpenSCAD and Python, and it's working well, except the index seems odd:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><img title="Inline image" alt="Inline image" src="cid:0fd6df65-b63d-8ae1-f29c-1008ccb16249@yahoo.com" class="yahoo-inline-image" draggable="false" style="max-width: 766px; width: 100%;" data-id="<0fd6df65-b63d-8ae1-f29c-1008ccb16249@yahoo.com>"><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">See the attached MWE.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">at: <a href="https://tex.stackexchange.com/questions/715824/why-does-subitem-appear-in-each-index-entry-for-docmfp-literate-program" rel="nofollow" target="_blank" class="">https://tex.stackexchange.com/questions/715824/why-does-subitem-appear-in-each-index-entry-for-docmfp-literate-program</a></div><div><br></div><div><br></div><div><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I was advised:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);">you should call makeindex with a suitable style, e.g. </span><code style="white-space: pre-wrap; margin: 0px; padding: 1px 5px; border-width: 0px; border-style: none; border-color: currentcolor; font-stretch: inherit; line-height: inherit; font-size-adjust: inherit; vertical-align: baseline; color: rgb(12, 13, 14);">makeindex -s gind.ist mwe</code><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);">.</span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);"><br></span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);">How is that done for pdflatexmk?</span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);"><br></span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);">Is there some other better option?</span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);"><br></span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);">William</span></div><div dir="ltr" data-setdir="false"><span style="color: rgb(12, 13, 14); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; background-color: rgb(254, 254, 251);"><br></span></div></div></body></html>