[comp.text] LaTeX and making dictionary style headers?

CCMK@latvax8.lat.oz (Mark Kosten - Computer Centre, La Trobe Uni.) (12/06/89)

Someone I know is using LaTeX to make what is essentially a dictionary.
He would like the first word of the page to appear in the left part
of the header, and the last word to appear in the right half.
Needless to say there are many pages, so it is not really a manual
procedure.

Does anyone have any ideas on how to do this?

Mark Kosten,          ISD: +61 3 479-2767
Computer Centre,      ACSnet/UUCP/Bitnet: ccmk@latvax8.lat.oz
La Trobe University,  X25: 234730000 (ccmk@latrobe.edu.au)
Bundoora,
Victoria 3083
Australia

dougcc@csv.viccol.edu.au (Douglas Miller) (12/08/89)

In article <288@latvax8.lat.oz>, CCMK@latvax8.lat.oz (Mark Kosten - 
Computer Centre, La Trobe Uni.) writes:
> Someone I know is using LaTeX to make what is essentially a dictionary.
> He would like the first word of the page to appear in the left part
> of the header, and the last word to appear in the right half.
> Needless to say there are many pages, so it is not really a manual
> procedure.
> 
> Does anyone have any ideas on how to do this?

There is a thing in TeX called a mark for doing just this.  For example,
suppose your are introducing each item in the dictionary with a macro:

  \Item{aardvark}
     .
     .
     .
  \Item{zoology}

Define \Item something like:

  \def\Item#1{  . . .  #1  . . .  \mark{#1}}

Then include the commands

   \firstmark

and

   \botmark

In your page header to produce the desired effect.

The full story is in the TeXbook, page 258.