🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #1379

TeX index program available

#1379
From: Chris Thewalt
Date: Fri, 08 Dec 1989 16:06
75 lines
3232 bytes
I just finished writing a quick little program to convert .idx files
into .ind files that can be included in TeX documents.  It is called
idxtex and some of the features are:
  1) can change fonts for page numbers
  2) collects ranges of pages
  3) supports a simple cross reference scheme
  4) supports multiple indexes (generates mulitple .ind files)
  5) sorts properly even when items contain TeX
  6) can overide the sort key

Basically I added a sublanguage to the index command:
 \index{stuff}

where stuff can be:

 |1 (optional) beginning of item
 |2 beginning of subitem
 |3 begining of subsubitem
 |f font to wrap page in
 |s a "see" cross reference, deletes the current page
 |a a "see also" cross reference, keeps current page
 |u use the following string as the sort key
 |i name of alternate index (default is same root name as the .idx file)

My big question is where do I put it? Labrea or some other place?

Let me know (or maybe post to comp.sources.misc???)

anyway, here's a sample of what it does in case the description above
wasn't clear:

---------------------------------------------------------------------------
data.idx (the input) :
----------------------
\indexentry{topic}{i}
\indexentry{topic}{ii}
\indexentry{topic}{iii}
\indexentry{topic}{1}
\indexentry{topic}{2}
\indexentry{topic}{3}
\indexentry{topic |f \bf}{4}
\indexentry{topic |f \bf}{5}
\indexentry{topic |f \bf}{6}
\indexentry{topic}{7}
\indexentry{topic |f \em}{9}
\indexentry{topic |2 sub1}{10}
\indexentry{topic |2 sub2 with see xref |s other1}{10}
\indexentry{topic |2 sub3 with see xref, but more refs |s other2}{10}
\indexentry{topic |2 sub3 with see xref, but more refs}{11}
\indexentry{topic |2 subitem with see also xref |a other3}{11}
\indexentry{topic |2 sub1 |3 subsub1}{12}
\indexentry{yet another topic}{12}
\indexentry{{\em underst\"{a}nding tex}?}{12}
\indexentry{topic |2 {\bf foobar}}{13}
\indexentry{topic |2 {\bf foobar} |3 {\Large test}}{13}
\indexentry{a test of sortby using "ttt" |u ttt}{15}

data.ind (output after "idxtex data")
-------------------------------------
\item topic, i, ii, iii, 1--3, {\bf 4}--{\bf 6}, 7, {\em 9}
 \subitem {\bf foobar}, 13
  \subsubitem {\Large test}, 13
 \subitem sub1, 10
  \subsubitem subsub1, 12
 \subitem sub2 with see xref. See other1
 \subitem sub3 with see xref, but more refs, 11. See also other2
 \subitem subitem with see also xref, 11. See also other3
\item a test of sortby using "ttt", 15
\item {\em underst\"{a}nding tex}?, 12
\item yet another topic, 12
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Christopher Robin Thewalt		These opinions are not necessarily
thewalt@ce.cmu.edu			shared by my employer...
Carnegie Mellon University
Technical Details
Message-ID: <THEWALT.89Dec8110634@RITZ.ce.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!thewalt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!thewalt
From: thewalt@RITZ.ce.cmu.edu (Chris Thewalt)
Newsgroups: comp.text
Subject: TeX index program available
Message-ID: <THEWALT.89Dec8110634@RITZ.ce.cmu.edu>
Date: 8 Dec 89 16:06:34 GMT
Distribution: comp
Organization: Dept. of Civil Engineering, Carnegie Mellon University,
 Pittsburgh, PA
Lines: 75