ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Quick way to proofread / check index entries?
@ 2022-09-03 18:51 Bruce Horrocks via ntg-context
  2022-09-04  6:53 ` Richard Mahoney via ntg-context
  2022-09-04 16:35 ` Bruce Horrocks via ntg-context
  0 siblings, 2 replies; 4+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-09-03 18:51 UTC (permalink / raw)
  To: ntg-context mailing list; +Cc: Bruce Horrocks

My own fault for not thinking head :-) but I have a largeish text with a lot of \index{...} entries. To make life easier for the proofreader I would like to temporarily redefine \index to wrap it or replace it with something that will highlight indexed items in the text where they occur, e.g. change their colour.

I could do this with a global find and replace (across many files) to replace \index with \MyIndex, say, and then define a \MyIndex that understands the various parameter options but this is a hassle. Before I do this, is there anything already pre-built?

The ultimate aim is to enable a proofreader to see each indexed term where it appears in order to judge whether the term deserves to be in the index at all. (Working backwards from the index itself is possible but clicking a page number, trying to find the term on the page, then reading the context to make a decision is quite hard work - much easier to read through and deal with the terms as they appear.)

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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: Quick way to proofread / check index entries?
  2022-09-03 18:51 Quick way to proofread / check index entries? Bruce Horrocks via ntg-context
@ 2022-09-04  6:53 ` Richard Mahoney via ntg-context
  2022-09-04  8:35   ` Mikael Sundqvist via ntg-context
  2022-09-04 16:35 ` Bruce Horrocks via ntg-context
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Mahoney via ntg-context @ 2022-09-04  6:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Richard Mahoney


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

Bruce,

Did something of the sort a while back: redefined the index command to something short, in capitals; then adjusted the syntax highlighting to pick up the code. This was for emacs + auctex, so it was just a case of adjusting one of the stock auctex files. I think Scite may let one do something similar. 

Richard


--
*T* +6433121699  *M* +64210640216
rmahoney@indica-et-buddhica.org
https://indica-et-buddhica.org/

*Indica et Buddhica*
Littledene  Bay Road  Oxford  NZ
NZBN: 9429041761809


----- Original message -----
From: Bruce Horrocks via ntg-context <ntg-context@ntg.nl>
To: ntg-context mailing list <ntg-context@ntg.nl>
Cc: Bruce Horrocks <ntg@scorecrow.com>
Subject: [NTG-context] Quick way to proofread / check index entries?
Date: Sunday, 4 September 2022 06:51

My own fault for not thinking head :-) but I have a largeish text with a lot of \index{...} entries. To make life easier for the proofreader I would like to temporarily redefine \index to wrap it or replace it with something that will highlight indexed items in the text where they occur, e.g. change their colour.

I could do this with a global find and replace (across many files) to replace \index with \MyIndex, say, and then define a \MyIndex that understands the various parameter options but this is a hassle. Before I do this, is there anything already pre-built?

The ultimate aim is to enable a proofreader to see each indexed term where it appears in order to judge whether the term deserves to be in the index at all. (Working backwards from the index itself is possible but clicking a page number, trying to find the term on the page, then reading the context to make a decision is quite hard work - much easier to read through and deal with the terms as they appear.)

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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
___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 4002 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: Quick way to proofread / check index entries?
  2022-09-04  6:53 ` Richard Mahoney via ntg-context
@ 2022-09-04  8:35   ` Mikael Sundqvist via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Mikael Sundqvist via ntg-context @ 2022-09-04  8:35 UTC (permalink / raw)
  To: Richard Mahoney, mailing list for ConTeXt users; +Cc: Mikael Sundqvist


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

Den sön 4 sep. 2022 08:59Richard Mahoney via ntg-context <ntg-context@ntg.nl>
skrev:

> Bruce,
>
> Did something of the sort a while back: redefined the index command to
> something short, in capitals; then adjusted the syntax highlighting to pick
> up the code. This was for emacs + auctex, so it was just a case of
> adjusting one of the stock auctex files. I think Scite may let one do
> something similar.
>
> Richard
>
>
> --
> *T* +6433121699  *M* +64210640216
> rmahoney@indica-et-buddhica.org
> https://indica-et-buddhica.org/
>
> *Indica et Buddhica*
> Littledene  Bay Road  Oxford  NZ
> NZBN: 9429041761809
>
>
> ----- Original message -----
> From: Bruce Horrocks via ntg-context <ntg-context@ntg.nl>
> To: ntg-context mailing list <ntg-context@ntg.nl>
> Cc: Bruce Horrocks <ntg@scorecrow.com>
> Subject: [NTG-context] Quick way to proofread / check index entries?
> Date: Sunday, 4 September 2022 06:51
>
> My own fault for not thinking head :-) but I have a largeish text with a
> lot of \index{...} entries. To make life easier for the proofreader I would
> like to temporarily redefine \index to wrap it or replace it with something
> that will highlight indexed items in the text where they occur, e.g. change
> their colour.
>
> I could do this with a global find and replace (across many files) to
> replace \index with \MyIndex, say, and then define a \MyIndex that
> understands the various parameter options but this is a hassle. Before I do
> this, is there anything already pre-built?
>
> The ultimate aim is to enable a proofreader to see each indexed term where
> it appears in order to judge whether the term deserves to be in the index
> at all. (Working backwards from the index itself is possible but clicking a
> page number, trying to find the term on the page, then reading the context
> to make a decision is quite hard work - much easier to read through and
> deal with the terms as they appear.)
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

Not by the computer, so cannot test, but I found these in an old document
of mine:

\enabletrackers[nodes.destinations]
\enabletrackers[nodes.references]
\usemodule[references-show]

I hope it helps.

/Mikael

>

[-- Attachment #1.2: Type: text/html, Size: 6121 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: Quick way to proofread / check index entries?
  2022-09-03 18:51 Quick way to proofread / check index entries? Bruce Horrocks via ntg-context
  2022-09-04  6:53 ` Richard Mahoney via ntg-context
@ 2022-09-04 16:35 ` Bruce Horrocks via ntg-context
  1 sibling, 0 replies; 4+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-09-04 16:35 UTC (permalink / raw)
  To: ntg-context mailing list; +Cc: Bruce Horrocks



> On 3 Sep 2022, at 19:51, Bruce Horrocks via ntg-context <ntg-context@ntg.nl> wrote:
> 
> My own fault for not thinking head :-) but I have a largeish text with a lot of \index{...} entries. To make life easier for the proofreader I would like to temporarily redefine \index to wrap it or replace it with something that will highlight indexed items in the text where they occur, e.g. change their colour.
> 
> I could do this with a global find and replace (across many files) to replace \index with \MyIndex, say, and then define a \MyIndex that understands the various parameter options but this is a hassle. Before I do this, is there anything already pre-built?
> 
> The ultimate aim is to enable a proofreader to see each indexed term where it appears in order to judge whether the term deserves to be in the index at all. (Working backwards from the index itself is possible but clicking a page number, trying to find the term on the page, then reading the context to make a decision is quite hard work - much easier to read through and deal with the terms as they appear.)

Thanks for the suggestions Richard and Mikael.

For the benefit of the list I went with the following quick'n'dirty™ approach which will be good enough:

\def\index{\dosingleempty\debugIndex}
\def\debugIndex[#1]#2{%
  \iffirstargument
    \null% Ignore it for now
  \else
    \inmargin[color=blue,stack=yes,style=ssxx]{#2}%
  \fi
}

\def\startregister{\dotripleempty\debugStartRegister}
\def\debugStartRegister[#1][#2][#3]#4{%
    \inmargin[color=darkgreen,stack=yes,style=ssxx]{↓ #2}%
    }

\def\stopregister[#1][#2]{\inmargin[color=darkred,stack=yes,style=ssxx]{↑ #2}}

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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:[~2022-09-04 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-03 18:51 Quick way to proofread / check index entries? Bruce Horrocks via ntg-context
2022-09-04  6:53 ` Richard Mahoney via ntg-context
2022-09-04  8:35   ` Mikael Sundqvist via ntg-context
2022-09-04 16:35 ` Bruce Horrocks 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).