ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <pragma@wxs.nl>
Subject: Re: \seeindex and processors
Date: Sat, 14 Jul 2012 17:05:49 +0200	[thread overview]
Message-ID: <C3B92F4A-B966-42DF-9C93-7435EC3126CD@gmail.com> (raw)
In-Reply-To: <30458FB3-0972-456A-83B8-6818447FC159@imt.uni-luebeck.de>


Am 13.07.2012 um 19:56 schrieb Andreas Mang:

> Dear Hans & Wolfgang,
> 
> Thanks for looking into this. I know that this has quite low priority. As it seems to me processors do not really seem to provide the behaviour I had in mind. Clearly, I should have thought of a better example in the first place:
> 
> %%%%%%%%%%%%%
> \defineprocessor[smallcaps][style=\sc]
> 
> \starttext
> 
> % this works nicely
> {\sc Test}\index{smallcaps->Test}
> 
> % this is what I want it to look like
> % (which does not work for \seeindex[.])
> \index{{\sc Cauchy}||Problem}
> 
> % this is what I tried after you have suggested
> % to use processors, but it does not work (*) 
> {\sc Cauchy}||Problem\index{{smallcaps->Cauchy}||Problem}
> 
> \placeindex[n=1]
> 
> \stoptext
> %%%%%%%%%%%%%
> 
> (*) As you can see I am using smallcaps as an indicator for a "personal name". From looking at the code (I have to admit that I do not know anything about what's beyond the context front end) I think there's no quick solution to get this to work with preprocessors. Am I doing something wrong?


With a simple change of the string type in strc-reg.mkiv you can also use commands/style switches in \seeindex:

\def\strc_registers_insert_see_indeed#1#2#3#4% register key entry seeword
  {\begingroup
   ...
        entries = {
            % we need a special one for xml, this is just a single one
-           "\currentregisterentries", "#2"
+           \!!bs\currentregisterentries\!!es, "#2"
        },
        seeword = {
-           text = "\currentregisterseeword"
+           text = \!!bs\currentregisterseeword\!!es
        },
     }
   }}%
   \endgroup}

Wolfgang

___________________________________________________________________________________
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:[~2012-07-14 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13  7:57 Wolfgang Schuster
2012-07-13 17:23 ` Hans Hagen
2012-07-13 17:56   ` Andreas Mang
2012-07-14 15:05     ` Wolfgang Schuster [this message]

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=C3B92F4A-B966-42DF-9C93-7435EC3126CD@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).