ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Steffen Wolfrum <context@st.estfiles.de>
Subject: Re: index (again)
Date: Wed, 2 Aug 2006 10:14:06 +0200	[thread overview]
Message-ID: <2792A097-1B1F-48FC-9C8D-B25ED6CCCEEB@st.estfiles.de> (raw)
In-Reply-To: <44D05BC8.9070707@elvenkind.com>

Am 02.08.2006 um 10:01 schrieb Taco Hoekwater:
> Steffen Wolfrum wrote:
>> Hi,
>>
>> I need to know if the following is possible in ConTeXt.
>>
>> If it's not, please don't hesitate to tell me, so I can think of a
>> work-around.
>> It it is possible, it would be great to tell me how!
>
> Is this is inside a register or keyed directly into your document?
>
> Taco


It's like this:

\unprotect

\def\dosetpageregisterentrya#1#2%
   {\edef\currententrylevel{1}%
    \global\let\c!entryb\relax
    \global\let\c!entryc\relax
    \gdef\c!entrya
      {\iffirstregisterentry\else\endgraf\fi % new
       \global\firstregisterpagetrue
       \hangindent1em\noindent\c!entryreference
       \dohandleregisterentry{\executeifdefined
         {\??id#1\c!deeptextcommand}\firstofoneargument{#2}}%
       \global\firstregisterentryfalse
       \global\firstsubentrytrue
       \global\firstsubsubentrytrue}}

\def\HowUgly#1{\doHowUgly#1\relax}

\def\doHowUgly#1#2\relax{\iffirstregisterentry{\bf#1}\else#1\fi#2}

\setupregister[index][indicator=no,deeptextcommand=\HowUgly]

\starttext

\chapter{First Chapter}
Some text...\index{word}

\section {First Section}
Some text...\index{word}
Some text...\index{another entry}
Some text...\index{ansi}
Some text...\index{another entry}

\page[yes]

\completeindex

\stoptext


... but in my real document looking like this:

Ministererlaubnis 12, 15, 16, 17,
18, 29, 30, 31, 32, 33, 34, 35,
37, 38, 39, 75, 82, 83, 84, 85, 86,
87, 159, 222, 222, 222, 227, 228,
228, 228, 228, 229, 231, 232,
233, 234, 235, 236, 238, 239,
248, 260, 261, 265, 277, 278,
279, 280, 282, 283, 286, 289,
304, 311, 318, 323, 324, 328,
330, 333, 335, 339, 343


Steffen

  reply	other threads:[~2006-08-02  8:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <44C7D5DB.8040208@wxs.nl>
     [not found] ` <82C5BFF6-5E29-461C-91CC-BB31FD070E94@st.estfiles.de>
     [not found]   ` <44C9C6C6.1020206@wxs.nl>
2006-08-01 18:05     ` Steffen Wolfrum
2006-08-02  8:01       ` Taco Hoekwater
2006-08-02  8:14         ` Steffen Wolfrum [this message]
2006-08-02  9:47           ` Taco Hoekwater
     [not found]             ` <7803723D-2697-41C9-A50A-BF655D7333D0@st.estfiles.de>
     [not found]               ` <44D12279.7090708@wxs.nl>
2006-08-04 11:19                 ` Steffen Wolfrum
2006-08-04 12:17                   ` Hans Hagen
2006-08-04 15:25                     ` Steffen Wolfrum
2006-08-04 19:54                       ` Hans Hagen
     [not found]                         ` <6CAFC6BC-1D19-439D-8CDC-FEAB1A588C5F@st.estfiles.de>
2006-08-06 14:43                           ` Hans Hagen
     [not found] <6C1EABCC-98B2-4158-A671-19C384FA050A@st.estfiles.de>
2006-08-31  7:47 ` Steffen Wolfrum

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=2792A097-1B1F-48FC-9C8D-B25ED6CCCEEB@st.estfiles.de \
    --to=context@st.estfiles.de \
    --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).