I am currently writing a large document (book class divided into several parts) and would like to introduce suitable notation tables at the beginning of each part of the document.
Up to now I have been looking at the documentation of some (standard?) references for making indexes and notation tables such as the package glossaries
or the package nomencl
, but I have not found any indication for automatically generating such notation tables at the beginning of each part or chapter of the text. In particular I am looking for a way to print the list of the relevant symbols used in each part/chapter at the beginning of the same chapter/part possibly repeating symbols already used in previous parts.
The only solution which came to my mind is to manually defining different glossaries for each part/chapter within the glossaries package. However this could be time consuming and not very portable and might lead to issues when cross.referencing for definitions. Is there any better and more flexible solution?
Example of output which I am trying to obtain
Chapter 1
Notation
A .. p.1
B .. p.2
Text containing first occurrence of symbol A and B
Chapter 2
Notation
A … p.1
C … p.11
Text containing first occurrence of symbol C and a tagged occurrence
of symbol A
Best Answer
Here's a possible solution using
datagidx
. This works by inserting a chapter dependent prefix to the location list, and only listing the entries that have the appropriate prefix when using\printterms
. Within\printterms
the location list needs to be adjusted so that only those locations with the appropriate prefix are listed and, finally, the prefix needs to be removed before it's displayed.Edit: Modified to list just first use location.
In the above example, "A" is used on pages 1 and 2 (in the first chapter) and 3 (in the second chapter. "B" is used on page (in the first chapter) and "C" is used on pages 3 and 4 (in the second chapter).
The notation list for the first chapter looks like:
The notation list for the second chapter looks like:
Two or three LaTeX runs are required.
Patch for pre v2.14: