Thanks, Gavin. Will the line macro play nicely with indexing commands such as @subentry and @seeentry?
Benjamin Kalish Cataloger / Technology Librarian Forbes Library Technical Services [email protected] 413-587-1011 Support Forbes Library: - Consider giving a gift <https://forbeslibrary.org/giving/donate-online/> to Forbes Library - Vote for the Friends of Forbes in the Florence Bank Community Grant Program <https://www.florencebank.com/vote>. - Join the Friends of Forbes today <https://forbeslibrary.org/friends/>! Currently reading: *Water Moon *by Samantha Sotto Yambao and *Lake of Souls* by Anne Leckie For information about accessibility at the library, please see: http://forbeslibrary.org/accessibility/ On Fri, Nov 7, 2025 at 1:59 PM Gavin Smith <[email protected]> wrote: > On Fri, Nov 07, 2025 at 07:29:51AM -0500, Benjamin Kalish wrote: > > How can I print a special index by itself and also include its entries in > > the concept index? So that I could have something like: > > > > @node Function Index > > @appendix Function Index > > > > @printindex fn @c print just function index > > > > @node Index > > @appendix Index > > > > @printindex cp @c print combined index > > My exact use case is a little different (I need indexes for particular > > sections and also the combined index at the end) but this makes for a > > concise example and the solution should be the same. > > > > @synindex allows the combined index as desired, but also appears to empty > > the original index so it can't be printed. > > As you state the problem, it is not possible, for the reason that you > have explained. > > > I'd rather not have to write each indexing command twice. It seems like > > there must be a better way. > > You could do it with a macro: > > @linemacro indexfn {entry} > @findex \entry\ > @cindex \entry\ > @end linemacro > > Then instead of writing this: > > @findex foo > > - you write this: > > @indexfn foo > > That will put the "foo" index entry into both indices, with a single line > in the Texinfo source. > >
