Note: This question differs from other similar custom-list questions because each of my environments-of-interest can have multiple keywords, and I only want to generate a list pertaining to one keyword at a time.
In my dissertation's appendix I'm including PDFs via \includegraphics. These PDFs are questions I've administered to students. There are dozen of these questions. Some were administered multiple times in different quarters to different students. For example, question version 35 might be administered in spring 2011 and autumn 2013, and summer 2014. In the caption of each figure I'll include the quarter(s) in which it was administered.
However, I want to also provide for the reader a list of figures that are sorted by quarter. For example, I want the reader to see a list of all the questions administered in spring 2011. The tricky part is I want to have this automated in some way.
Can I somehow include a keyword like spring-2011 inside all of my \begin{figure} environments corresponding to a particular quarter, and then automatically generate a list of figures that contain a given keyword?
This list should automatically pull only the figures that have a certain keyword (and each figure itself can have multiple keywords).
If it makes any difference, I want to include this list of figures in the appendix itself. And I would prefer to be able to easily customize the formatting/look of the list.
So here's what I want to be able to do:
\documentclass{book}
\usepackage{graphicx}
\newcommand{\makeMyCustomQuarterList}[2]{
%#1 = quarter tag, e.g. "winter-2013"
%#2 = title of custom list, e.g. "Winter 2013"
%
%How do I implement this?
%
}
\newcommand{\questionQuarterTag}{ %This is placed inside \figure environments
%How do I implement this?
}
\begin{document}
\chapter{A chapter}
Here's the body of the document. Pretty short, eh?
\appendix
\chapter{An appendix}
Each question administered to students is included only once.
The quarters it which each question was administered are found in the corresponding captions.
For convenience, a list of questions organized by quarter is included here:
% Produce list of questions administered in winter 2013
\makeMyCustomQuarterList{winter-2013}{Winter 2013}
Maybe I want text here.
% And other list for spring 2013:
\makeMyCustomQuarterList{spring-2013}{Spring 2013}
%The above \makeMyCustomQuarterList commands should produce two separate
% mini-tocs, each of which looks like:
%Questions administered in #2
%Figure A.1 ................ pg. 34
%Figure A.5 ................ pg. 38
%Figure A.6 ................ pg. 39
% Here is one of the questions that I want to tag with a quarter.
\begin{figure}
\rule{5in}{7in}
\caption{Administered in quarters X, Y, and Z}
\label{myfig}
\questionQuarterTag{winter-2013}
\questionQuarterTag{winter-2014} %Note multiple tags!
\end{figure}
\end{document}
After looking at @JohnKormylo's link in the comment below, I decided to implement an index from splitidx. I think this format will actually work better for the reader.


\documentclass{...}and ending with\end{document}. – Sep 15 '14 at 18:20