ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Robert Blackstone <blackstone.robert@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Index items (additional question)
Date: Sun, 19 Apr 2015 09:47:10 +0200	[thread overview]
Message-ID: <899DB073-E895-4B95-A02A-25D0CAA0ECA4@gmail.com> (raw)
In-Reply-To: <mailman.128.1429191487.8971.ntg-context@ntg.nl>


On 16 Apr 2015, at 15:38 , Hans Hagen <pragma@wxs.nl> gave me the following:

> \startluacode
> 
>     document.indexentries = {
>         ["rule"]          = [[Rule(s)]],
>         ["ruleimperfect"] = [[+ \quote{imperfect to perfect, from}]],
>         ["galilei"]       = [[Galilei, Vincenzo]],
>     }
> 
>     function document.getindexentry(n)
>         context("\\index[%s]{%s}",n,document.indexentries[n] or ("<" .. 
> n .. ">"))
>     end
> 
> \stopluacode
> 
> \unexpanded\def\InEn[#1]%
>   {\ctxlua{document.getindexentry("#1")}}
> 
> \starttext
> That this rule
> \InEn[rule]
> \InEn[ruleimperfect] was not applied by everybody is for example shown 
> in {\em Fronimo}%
> \InEn[galilei]
> 
> etc etc

Hi Hans,
sorry to bother you again on this topic.

This code works beautifully in this way, with only a few index entries  at the top of the file, before \starttext. 
But how can I deal with the thousand or more index items in my project, which I have collected in four separate dedicated files with indexentries, like the three shown in the example-code.

I have really no idea  what else should be in these files,  what sort of name they should have, in particular extension,  and how and where I can input them.
I use TeXShop as my texteditor but that is probably not relevant here.

Can you give me some guidance, please?

Thanks in advance.

Best regards,
Robert Blackstone


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2015-04-19  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.128.1429191487.8971.ntg-context@ntg.nl>
2015-04-16 18:08 ` Index items Robert Blackstone
2015-04-19  7:47 ` Robert Blackstone [this message]
2015-04-19  9:50   ` Index items (additional question) Hans Hagen
     [not found] <mailman.159.1429437332.8971.ntg-context@ntg.nl>
2015-04-19 18:30 ` Robert Blackstone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=899DB073-E895-4B95-A02A-25D0CAA0ECA4@gmail.com \
    --to=blackstone.robert@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).