ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to add data from another PDF in index?
       [not found] <2021680421.176841.1677217381054.ref@mail.yahoo.com>
@ 2023-02-24  5:43 ` Joel via ntg-context
  2023-02-25  3:14   ` Alan Braslau via ntg-context
  2023-02-26 18:45   ` Alan Braslau via ntg-context
  0 siblings, 2 replies; 4+ messages in thread
From: Joel via ntg-context @ 2023-02-24  5:43 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 1265 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 3085 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add data from another PDF in index?
  2023-02-24  5:43 ` How to add data from another PDF in index? Joel via ntg-context
@ 2023-02-25  3:14   ` Alan Braslau via ntg-context
  2023-02-26 18:45   ` Alan Braslau via ntg-context
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Braslau via ntg-context @ 2023-02-25  3:14 UTC (permalink / raw)
  To: Joel via ntg-context; +Cc: Alan Braslau

We are currently working on fixing cross-references as well as shared
register information between products in a ConTeXt project structure.
Much is possible, but not all is fully worked out.

My current use is a multi-volume book, sharing Tables of Contents
between the two volumes. As a teaser,

    \placelist [part,chapter,section,subsection]
               [criterium=product,reference=VolumeII]

will include the TOC of VolumeII in product VolumeI.

Once we have this figured-out, I will have to create a wiki page.

Alan


On Fri, 24 Feb 2023 05:43:01 +0000 (UTC)
Joel via ntg-context <ntg-context@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! ;-)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add data from another PDF in index?
  2023-02-24  5:43 ` How to add data from another PDF in index? Joel via ntg-context
  2023-02-25  3:14   ` Alan Braslau via ntg-context
@ 2023-02-26 18:45   ` Alan Braslau via ntg-context
  2023-02-26 19:02     ` Joel via ntg-context
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Braslau via ntg-context @ 2023-02-26 18:45 UTC (permalink / raw)
  To: Joel via ntg-context; +Cc: Alan Braslau

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@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! ;-)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add data from another PDF in index?
  2023-02-26 18:45   ` Alan Braslau via ntg-context
@ 2023-02-26 19:02     ` Joel via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Joel via ntg-context @ 2023-02-26 19:02 UTC (permalink / raw)
  To: Joel via ntg-context, Alan Braslau; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 2997 bytes --]

 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@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@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! ;-)
  

[-- Attachment #1.2: Type: text/html, Size: 6966 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-26 19:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2021680421.176841.1677217381054.ref@mail.yahoo.com>
2023-02-24  5:43 ` How to add data from another PDF in index? Joel via ntg-context
2023-02-25  3:14   ` Alan Braslau via ntg-context
2023-02-26 18:45   ` Alan Braslau via ntg-context
2023-02-26 19:02     ` Joel via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).