[NTG-context] How to add data from another PDF in index?
Joel
uaru99 at yahoo.com
Sun Feb 26 20:02:19 CET 2023
Fantastic! Exactly what I needed. My publisher was gong to ask for the information of this index soon, so its great that already works!
--Joel
On Sunday, February 26, 2023 at 11:45:48 AM MST, Alan Braslau <alan.braslau at icloud.com> wrote:
Hans needs to confirm, "In the next update..."
Test files (MWEs):
% index-1.tex
\setupinteraction[state=start]
\starttext
  test \index{entry  WB.1} \page empty \page
  test \index{another WB.1} \page empty \page
  test \index{onemore WB.1} \page empty \page
  test \index{whatever WB.1} \page empty \page
  test \index{common}    \page empty \page
  \placeregister[index]
\stoptext
% index-2.tex
\setupinteraction[state=start]
\defineregister[xedni]
\useregister[workbook][index-1][index][WB ]
\starttext
  test \index{onemore TB.1} \page
  test \index{another TB.1} \page
  test \index{entry TB.1} \page
  test \index{common}   \page
  test \xedni{onemore TB.2} \page
  test \xedni{another TB.2} \page
  test \xedni{entry TB.2} \page
  test \xedni{common}   \page
  \placeregister[index,xedni,workbook]
\stoptext
This seems to work well - I have applied it to a long and complicated
multi-volume book project to great success!
We need to thank Hans for the quick implementation.
Alan
On Fri, 24 Feb 2023 05:43:01 +0000 (UTC)
Joel via ntg-context <ntg-context at ntg.nl> wrote:
> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
> Â Â Â \txt{} \getvalue{#1}
> Â Â Â \learnedshort{#1}
> Â Â Â \learnedlong{#1}
> }
> \define[1]\learned{%
> Â Â Â \learnedshort{#1}
> Â Â Â \learnedlong{\getvalue{#1}}
> }
>
> \starttext
>
> \learnedis{blah blah}
>
> \input knuth
>
> \learnedis{some more}
>
>
> Â Â Â \startchapter[title=Standards]
> Â Â Â Â Â Â \placelearnedshort
> Â Â Â \stopchapter
> Â Â Â
> \stoptext
>
>
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
>
> For instance, the Textbook index currently looks like this:
> -------------
> Standards
> blah blah 1
> some more 2
> --------------
> With the data in the Workbook it might look like this:
>Â Standards
> blah blah 1, WB: 1, 3-8
>
> some more 2, WB: 8-9
> yet more WB: 10, 12
>
> --------------
> Is this possible to merge index information like this?
> --Joel
--
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957
Conserve energy! ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20230226/65905828/attachment.htm>
More information about the ntg-context
mailing list