ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Michael Saunders <odradek5@gmail.com>
To: ntg-context@ntg.nl
Subject: register confusion
Date: Fri, 7 May 2010 01:49:41 -0500	[thread overview]
Message-ID: <j2l54d7f5601005062349w611a5bd9q30f8032568a378ff@mail.gmail.com> (raw)

Finding simple \at[] statements inadequate for glossaries (where there
might be zero, one, or several page references per entry), I'm
experimenting with registers, but I'm not getting the expected
results:

\defineregister[glind][glinds]
\setupregister[glind][style=\it]
\setupinteraction[state=start]

\starttext
double\glind[double]{}
\page
single\glind[single]{}
\page
double\glind[double]{}
\page

single should read, '2':  (p.\placeglind[single])

double should read, '1, 3':  (pp.\placeglind[double])

zero should be blank:  (\placeglind[zero])
\stoptext

Note the problems:

1. \placeglind[label] doesn't point to the label, it points to any label.
2. Context forces a linebreak before and after the numbers.
3. The numbers aren't italic.

Also, it would be nice to set 'p.', 'pp.', or nothing automatically,
depending on whether there was one, several or zero instances of the
label in the text.

Is register not the mechanism to do this?  If not, I don't know what is.
___________________________________________________________________________________
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
___________________________________________________________________________________


                 reply	other threads:[~2010-05-07  6:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=j2l54d7f5601005062349w611a5bd9q30f8032568a378ff@mail.gmail.com \
    --to=odradek5@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).