[NTG-context] How to create an index that refers to multiple other books?

Hans Hagen j.hagen at xs4all.nl
Tue Jan 18 19:26:12 CET 2022


On 1/18/2022 2:16 PM, Joel via ntg-context wrote:
> I am writing a secondary textbook to be used in public schools. In my 
> state, the textbooks must adhere to standards, such as the Common Core 
> State Standards (CCSS). It is typical for a textbook to contain an index 
> for teachers to check where in the textbook which standards are used. 
> I've used the following code to create such an index, if I simply place 
> `\learned{}` somewhere containing the standard's ID, it creates a custom 
> index entry, and `\placelearned` displays that index.
> 
> \defineregister[learned][compress=yes]
> \setupregister[learned][style=sansbold, textstyle=slanted, n=1, 
> pagenumber=yes]
> \starttext
>          \learned{CCSS+W.7.3}
>      \input knuth
>          \learned{CCSS+W.7.3}
>      \input knuth
>          \learned{CCSS+W.7.1}
>      \startchapter[title=Standards]
>          \placelearned
>      \stopchapter
> \stoptext
> 
> This prints an index like this:
> 
> Standards
> c
> CSS
>      W.7.1    1
>      W.7.3    1
> 
> My problem is my textbook also includes four separate workbooks. I need 
> the index to show my publisher that I've covered all 300+ standards, so 
> I need the index at the back of the textbook to also contain details of 
> which pages in each workbook the standards are found. How can I combine 
> the index so it refers to all books? Something like this:
> 
> Standards
> 
> c
> CSS
>      W.7.1    T 1, Wk.1 3-8, 12, Wk.2 8-9, 60-61
>      W.7.3    T 1, Wk.1 3-8, 12, Wk.2 8-9, 60-61, Wk.3 1-2, 54, 70, 90, 
> Wk.4 99, 102, 104
> 
> ...or possibly like this...
> 
> Standards
> c
> CSS
>      W.7.1
>      Textbook: 1
>      Workbook 1: 3-8, 12
>      Workbook 2: 8-9, 60-61
>      W.7.3
>      Textbook: 1
>      Workbook 1: 3-8, 12
>      Workbook 2: 8-9, 60-61
>          Workbook 3: 1-2, 54, 70, 90
>          Workbook 4: 99, 102, 104
> 
> Is there any way to print an index that covers pages across multiple books?
in principle one can load an index but you want some prefixing ... i 
suppose that we can make some more native feature (some weekend 
challenge i guess)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list