Received: by nummer-3.proteosys id <01C19443.A5265BF4@nummer-3.proteosys>; Thu, 3 Jan 2002 11:44:39 +0100 In-Reply-To: Your message of "Tue, 31 Mar 92 21:08:03 +0700." <9203311917.AA07062@CS.UTK.EDU> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C19443.A5265BF4" Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.5 x-vm-v5-data: ([nil nil nil nil nil nil nil nil nil][nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]) Content-class: urn:content-classes:message Subject: Re: index in latex3 Date: Tue, 31 Mar 1992 20:36:04 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: Sender: "LaTeX-L Mailing list" To: "Multiple recipients of" Reply-To: "LaTeX-L Mailing list" Status: R X-Status: X-Keywords: X-UID: 653 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19443.A5265BF4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Frank asks: >Additionally I would urge everybody else who had already done some >work on this or knows of work by others, for example some specialized >macros for generating index entries, or proof mode styles (the famous >margin stuff) to come forward with comments suggestions etc. My book 'TeX by Topic' has three indexes in addition to the table of contents (index by example, control sequence, topic). Since I knew of the frustration of people who did a thesis in LaTeX and needed an index by (for instance) keywords, author, notation, definition; I decided to write some tools that would make creation of indexes easy. Although Frank asks us not to post code, I will still quote a few lines from my macros. 1/ For each index (or whatever name you attach to an external file) there is a command relating the internal name and the filename = extension: \DefineExternalFile:contents=3Dtoc 2/ Commands that have to write to the 'contents' file specify what has to go there: \DefinePageGrid:subject [...] external:contents title external:stop [...] so that everytime the \subject (a subject is a chapter in my book) is called its 'title' argument is written out. 3/ Formatting the index was the biggest problem. This took me a long time to solve. The present solution makes every item into a separate list. The trick of that is that there is a command for popping and pushing list levels, so I can indicate that a 'section' in the toc is on level one, a subsection is on level two, et cetera. Here is what a 'subject' looks like in the toc: \DefineExternalItem:subject file:contents item:left subjectLabel item:stop title Spaces:3 begingroup Style:italic Page endgroup Stop (This says: align left the label, i.e., the number that was written out, taking some default width for the whole label; put the title, and put in italic the page number after three spaces.) Note that it explicitly states that it is in the 'contents' file, so I can specify 'subject' items in several indexes. Hope this was of some use. Victor Eijkhout Department of Computer Science; University of Tennessee at Knoxville 104 Ayres Hall; 1403 Circle Dr.; Knoxville TN 37996-1301 phone: +1 615 974 8298 (secretary 8295; fax 8296); home +1 615 558 3069 ------_=_NextPart_001_01C19443.A5265BF4 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: index in latex3

Frank asks:

>Additionally I would urge everybody else who had = already done some
>work on this or knows of work by others, for = example some specialized
>macros for generating index entries, or proof = mode styles (the famous
>margin stuff) to come forward with comments = suggestions etc.

My book 'TeX by Topic' has three indexes in addition = to the table
of contents (index by example, control sequence, = topic). Since I knew
of the frustration of people who did a thesis in = LaTeX and needed
an index by (for instance) keywords, author, = notation, definition;
I decided to write some tools that would make = creation of indexes
easy.

Although Frank asks us not to post code, I will still = quote a few
lines from my macros.

1/ For each index (or whatever name you attach to an = external file)
there is a command relating the internal name and the = filename extension:

\DefineExternalFile:contents=3Dtoc

2/ Commands that have to write to the 'contents' file = specify what
has to go there:

\DefinePageGrid:subject [...]
    external:contents title = external:stop
    [...]

so that everytime the \subject (a subject is a chapter = in my book)
is called its 'title' argument is written out.

3/ Formatting the index was the biggest problem. This = took me a long
time to solve. The present solution makes every item = into a separate
list. The trick of that is that there is a command = for popping and
pushing list levels, so I can indicate that a = 'section' in the toc
is on level one, a subsection is on level two, et = cetera.

Here is what a 'subject' looks like in the toc:

\DefineExternalItem:subject file:contents
    item:left subjectLabel = item:stop
    title Spaces:3 begingroup = Style:italic Page endgroup
    Stop

(This says: align left the label, i.e., the number = that was written out,
taking some default width for the whole label;
put the title, and put in italic the page number = after three spaces.)

Note that it explicitly states that it is in the = 'contents' file,
so I can specify 'subject' items in several = indexes.

Hope this was of some use.

Victor Eijkhout
Department of Computer Science; University of = Tennessee at Knoxville
104 Ayres Hall; 1403 Circle Dr.; Knoxville TN = 37996-1301
phone: +1 615 974 8298 (secretary 8295; fax 8296); = home +1 615 558 3069


------_=_NextPart_001_01C19443.A5265BF4--