In the poetry anthology I'm compiling, the poems are fairly unsorted (and since it followed hand-written notes, that can't be changed). I would like to create a handful of groups, such as War, Love, Birthdays, Misc, and then have one List of Poems for each of them.
The package specifies a way of adding groups to the LoP, but it seems this is mostly done for cases where the poems are arranged according to the group. That is, first all War poems, then all Love poems, etc.
So, is there a way to create tags and then print custom list of poems?
MWE below. I have not implemented any groupings, and honestly, I don't really understand how to use that part of the package. I'm very grateful for the help in this forum!
UPDATED! I've changed the MWE to look like what I'm trying to achieve -- that is, the sections "Limericks" and "Songs" at the end are now written manually, but I'd want a way to achieve them automatically. Please excuse the ugliness of repeated dots, I didn't want to enlarge the MWE by using proper tables or similar.
\documentclass[]{article}
\usepackage{poetry}\poemlinenumsfalse
\begin{document}
\poemfirstline{In a cavern} % Tag: Song
\addtolop{Clementine}
\section*{Clementine}\vspace{-0.5cm}
\begin{poem}
In a cavern\\
In a canyon\\-
\end{poem}
\poemfirstline{Imagine there's no heaven} % Tag: Song
\addtolop{Imagine}
\section*{Imagine}\vspace{-0.5cm}
\begin{poem}
Imagine there's no heaven\\
It's easy if you try\\-
\end{poem}
\poemfirstline{There once was a man from Nantucket} % Tag: Limerick
\addtolop{The man from Nantucket}
\section*{The man from Nantucket}\vspace{-0.5cm}
\begin{poem}
There once was a man from Nantucket\\
Who kept all his cash in a bucket\\-
\end{poem}
\poemfirstline{Is this the real life?} % Tag: Song
\addtolop{Bohemian Rhapsody}
\section*{Bohemian Rhapsody}\vspace{-0.5cm}
\begin{poem}
Is this the real live?\\
Is this just fantasy?\\-
\end{poem}
\poemfirstline{There once was a lady from Riga} % Tag: Limerick
\addtolop{The tiger ride}
\section*{The tiger ride}\vspace{-0.5cm}
\begin{poem}
There once was a lady from Riga\\
Who went for a ride on a tiger\\-
\end{poem}
\section*{Index}
\listofpoems
\section*{Limericks}
The man from Nantucket..................1\\
The tiger ride.....................................1
\section*{Songs}
Clementine ...................................1\\
Imagine........................................1\\
Bohemian Rhapsody.......................1
\printiofl
\end{document}