The "register" macros in Context only provide for a single level index AFAIK so I have been looking at the use of either makeindex or Xindy in a Context project. I have slightly modified the index.tex file from the Texsis distribution and renamed it indexx.tex. Instructions for use are included in the file. The command sequence is: texexec test.tex makeindex test.idx -o test.ind texexec test.tex. The test.tex file is as follows: \input indexx.tex \markindextrue \starttext Hello \page[yes] \idx{Frisbee} \idx{Saucer} \indexx{foo} \indexx{foo!bar} \page[yes] \input test.ind \stoptext The indexx.tex file can be found at: http://wexfordpress.com/tex/indexx.tex Most parties seem to prefer the more capable Xindy to the old standby makeindex. However The Xindy distribution has a program for translating makeindex raw index files to Xindy raw index files. So the indexx.tex macros can be used as a stopgap method now. I will work on another version that will emit Xindy raw files natively. Questions, comments, suggestions welcome :-) -- John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com
On Mon, 2 Dec 2002 16:20:52 +0000, John wrote:
The "register" macros in Context only provide for a single level index AFAIK so I have been looking at the use of either makeindex or Xindy in a Context project. I have slightly modified the index.tex file
Unless I misunderstand your intentions, you were looking this ConTeXt command: \index{main+sub+subsub} -- groeten, Taco
On Mon, 2 Dec 2002 16:20:52 +0000, John wrote:
The "register" macros in Context only provide for a single level index AFAIK so I have been looking at the use of either makeindex or Xindy in a Context project. I have slightly modified the index.tex file
Unless I misunderstand your intentions, you were looking this ConTeXt command:
\index{main+sub+subsub} Thanks for your correction! It is even in the manual :-] But there are other features found in Makeindex and especially Xindy that are useful. For example attributes attached to the page reference # can be
On Monday 02 December 2002 16:41, Taco Hoekwater wrote: passed through the system. An entry, subentry etc. can be sorted out of order. This also handles elegantly the situation where one needs to put a font change in with the item, e.g.: \index{sortitem@\it Sortitem\rm} The Context manual mentions the "see" form of entry but not the "see also" form, although there is passing reference to another form (not described fully) that allows one to input a "pure ASCII string." Makeindex will automatically collapse a page reference string. If three or more successive pages have the identical index item then "1,2,3" becomes "1-3" etc. Perhaps Context does this also. Xindy will handle appendix references like "A-3" although these are becoming rarer. Both Makeindex and Xindy have style files that allow for customizing of the output. For example the letter headers might be centered in the column, or left justified, in bold or not, capital or lower case, surrounded by em dashes etc. Xindy goes well beyond this, allowing for special headers for e.g. Hungarian which has the letter combination Ly sorted separately. Perhaps as is so often the case, the features are there but not yet described in Context. A Context-only solution would be nice, but in the meantime the power of the existing packages are available. -- John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com
At 01:33 PM 12/3/2002 +0000, you wrote:
useful. For example attributes attached to the page reference # can be passed through the system. An entry, subentry etc. can be sorted out
you can use attributes: Copied from the manual source: Most of the time the layout of a register is rather simple. Some manuals may need some form of differentiating between entries. The definition of several registers may be a solution. However the layout can contribute to a better use of the register: \starttyping \index {entry} \index[key] {entry} \index[form::] {entry} \index[form::key]{entry} \index {form::entry} \index[key] {form::entry} \index[form::] {form::entry} \index[form::key]{form::entry} \stoptyping The first two alternatives are known, but the rest is new and offers some control over the way the entry itself is typeset. The specification between \setchars\ relates to the pagenumber, the specification in front of the entry relates to the entry itself. \starttyping \setupregister[index][form][pagestyle=bold,textstyle=slanted] \stoptyping Without any problems we can use different appearances for pagenumber and entry. \starttyping \setupregister[index][nb][pagestyle=bold] \setupregister[index][hm][pagestyle=slanted] \stoptyping With for example: \starttyping \index[nb::]{squareroot} \index[hm::root]{$\srqt{2}$} \stoptyping Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
At 01:33 PM 12/3/2002 +0000, you wrote:
Makeindex will automatically collapse a page reference string. If three or more successive pages have the identical index item then "1,2,3" becomes "1-3" etc. Perhaps Context does this also.
yes, plus ranges
Xindy will handle appendix references like "A-3" although these are becoming rarer.
this kind of prefixing is possible; also you can ask for registers per chapter, section, etc Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
John Culleton (john@wexfordpress.com) wrote:
Perhaps as is so often the case, the features are there but not yet described in Context. A Context-only solution would be nice, but in the meantime the power of the existing packages are available.
I agree that ConTeXt-only solution would be terrific since it will provide better mechanism for extension & easier maintainance. However, main reason why I had to switch to Xindy (over makeindex) was handling of my national alphabet (Croatian) as well as ability to define my sort order - for Sanskrit transliteration. For example, here is the part of my xindy file which handled Sanskrit diacritics for LaTeX: (define-rule-set "resolve-sanskrit-diacritics" :rules (("\\={(a)}" "\1" :bregexp :again) ("\\={\\i}" "i" :bregexp :again) ("\\={I}" "I" :bregexp :again) ("\\d{(r)}" "ri" :bregexp :again) ("\\d{(t)}" "\1" :bregexp :again) ("\\d{(T)}" "\1" :bregexp :again) ("\\d{(d)}" "\1" :bregexp :again) ("\\d{(n)}" "\1" :bregexp :again) ... )) This snippet just resolve sanskrit diacritics and sort them according to their Latin (or Croatian) counterpart chars without accent. It would be wonderful to be able to do such things with ConTeXt only. Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493
At 04:20 PM 12/2/2002 +0000, you wrote:
The "register" macros in Context only provide for a single level index AFAIK so I have been looking at the use of either makeindex or Xindy in a Context project. I have slightly modified the index.tex file from the Texsis distribution and renamed it indexx.tex. Instructions for use are included in the file. The command sequence is:
hm, actually context provides three levels of indexing and as many independent indexes as you want \index{aa+bb+cc} \defineregister[your][yours] \your{cc+dd+ee} and alike concerning xindy: where can i find a windows version (there hangs only some old dos stuff and all kind fo unix stuff around) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Monday 02 December 2002 16:51, Hans Hagen wrote:
concerning xindy: where can i find a windows version (there hangs only some old dos stuff and all kind fo unix stuff around)
Hans
As you may already know, it comes in compiled versions for various *nix platforms, OS2, and MDOS. There is also a source code file which can theoretically be compiled wherever a Clisp compiler exists. But there are problems with this in a modern environment. Here is a quote from somebody who has walked down that path: ---------------------------- It's a PITA to create xindy from sources. Reasons are IMO -- It wasn't written for current CLISP. -- Usage of external shared libraries (in particular, GNU regex) complicates the build process. Their usage made sense at the time when xindy was created but they could be replaced with more portable Common Lisp code that we didn't know then. -- Too many other non-usual tools are needed for its compilation (e.g., noweb) that are not part of the xindy distribution. -- Too much manual intervention is needed. It doesn't work as "./configure; make; make install". =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: jschrod@acm.org Roedermark, Germany (end quote)----------------------- -- John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com
participants (4)
-
Gour
-
Hans Hagen
-
John Culleton
-
Taco Hoekwater