Re: Customizing the index

2000-07-27 Thread Thomas Henlich

Customizing the index can been be made even more comfortable than Herbert
describes:

make a script 'lyx' in your ~/bin directory:

#!/bin/bash
export PATH=~/lyxbin:$PATH
/usr/bin/lyx -width 900 -height 700 $*


make a script 'makeindex' in the ~/lyxbin directory:

#!/bin/bash
# wrapper script for makeindex (to be called from lyx)

# copy the indexstyle (document_base_name.mst) to the directory $INDEXSTYLE.
# if this file does not exist, $ISTDEFAULT is used instead.
# if this also does not exist, no style file is used.
# The .idx file can be filtered through a program named $FILTER.

INDEXSTYLE=~/indexstyles
ISTDEFAULT=default.ist
FILTER=cat
MAKEINDEX=/usr/bin/makeindex
# LyX (1.1.5fix1) calls makeindex with "makeindex -c -q idxfile"
IDXFILE=$3
BASE=`basename $IDXFILE .idx`
INDFILE=$BASE.ind
MSTFILE=$BASE.mst
ILGFILE=$BASE.ilg
[ -f $INDEXSTYLE/$ISTDEFAULT ]  STYLE="-s $ISTDEFAULT"
[ -f $INDEXSTYLE/$MSTFILE ]  STYLE="-s $MSTFILE"
export INDEXSTYLE
$FILTER $IDXFILE | $MAKEINDEX -c -q $STYLE -o $INDFILE -t $ILGFILE


Now you can customize everything in the new 'makeindex' script.
The minimum is to create a file ~/indexstyles/default.ist, which changes the
index layout for _all_ documents.

-- 
Thomas Henlich



Re: Customizing the index

2000-07-27 Thread Thomas Henlich

On Thu, Jul 27, 2000 at 01:42:50PM +, Herbert Voss wrote:
 Thomas Henlich wrote:
  
  make a script 'lyx' in your ~/bin directory:
  
  #!/bin/bash
  export PATH=~/lyxbin:$PATH
  /usr/bin/lyx -width 900 -height 700 $*
 
 good idea! but for those who have root access:
 
 1. delete /usr/bin/makeindex
 this is only a link! have a look at it ...
 
 2. create a executable file makeindex in /usr/bin  or /usr/local/bin
 
 --
 #/bin/bash
 /usr/share/texmf/teTeX/bin/i386-linux-glibc/makeindex -s StyleFile -c -q
 $3
 --

Not so good idea, because:
1. after the next upgrade of your LaTeX packages you lose these changes
2. you have to modify this script whenever you want to use another style for
a document.
3. You can't use makeindex (e.g. for LaTeX) anymore like you used to.
4. If there are any other users besides you on this machine who use
makeindex, they will go mad before they realize what has happend :-S

-- 
Thomas Henlich



Re: Customizing the index

2000-07-27 Thread Thomas Henlich

Customizing the index can been be made even more comfortable than Herbert
describes:

make a script 'lyx' in your ~/bin directory:

#!/bin/bash
export PATH=~/lyxbin:$PATH
/usr/bin/lyx -width 900 -height 700 $*


make a script 'makeindex' in the ~/lyxbin directory:

#!/bin/bash
# wrapper script for makeindex (to be called from lyx)

# copy the indexstyle (document_base_name.mst) to the directory $INDEXSTYLE.
# if this file does not exist, $ISTDEFAULT is used instead.
# if this also does not exist, no style file is used.
# The .idx file can be filtered through a program named $FILTER.

INDEXSTYLE=~/indexstyles
ISTDEFAULT=default.ist
FILTER=cat
MAKEINDEX=/usr/bin/makeindex
# LyX (1.1.5fix1) calls makeindex with "makeindex -c -q idxfile"
IDXFILE=$3
BASE=`basename $IDXFILE .idx`
INDFILE=$BASE.ind
MSTFILE=$BASE.mst
ILGFILE=$BASE.ilg
[ -f $INDEXSTYLE/$ISTDEFAULT ]  STYLE="-s $ISTDEFAULT"
[ -f $INDEXSTYLE/$MSTFILE ]  STYLE="-s $MSTFILE"
export INDEXSTYLE
$FILTER $IDXFILE | $MAKEINDEX -c -q $STYLE -o $INDFILE -t $ILGFILE


Now you can customize everything in the new 'makeindex' script.
The minimum is to create a file ~/indexstyles/default.ist, which changes the
index layout for _all_ documents.

-- 
Thomas Henlich



Re: Customizing the index

2000-07-27 Thread Thomas Henlich

On Thu, Jul 27, 2000 at 01:42:50PM +, Herbert Voss wrote:
 Thomas Henlich wrote:
  
  make a script 'lyx' in your ~/bin directory:
  
  #!/bin/bash
  export PATH=~/lyxbin:$PATH
  /usr/bin/lyx -width 900 -height 700 $*
 
 good idea! but for those who have root access:
 
 1. delete /usr/bin/makeindex
 this is only a link! have a look at it ...
 
 2. create a executable file makeindex in /usr/bin  or /usr/local/bin
 
 --
 #/bin/bash
 /usr/share/texmf/teTeX/bin/i386-linux-glibc/makeindex -s StyleFile -c -q
 $3
 --

Not so good idea, because:
1. after the next upgrade of your LaTeX packages you lose these changes
2. you have to modify this script whenever you want to use another style for
a document.
3. You can't use makeindex (e.g. for LaTeX) anymore like you used to.
4. If there are any other users besides you on this machine who use
makeindex, they will go mad before they realize what has happend :-S

-- 
Thomas Henlich



Re: Customizing the index

2000-07-27 Thread Thomas Henlich

Customizing the index can been be made even more comfortable than Herbert
describes:

make a script 'lyx' in your ~/bin directory:

#!/bin/bash
export PATH=~/lyxbin:$PATH
/usr/bin/lyx -width 900 -height 700 $*


make a script 'makeindex' in the ~/lyxbin directory:

#!/bin/bash
# wrapper script for makeindex (to be called from lyx)

# copy the indexstyle (document_base_name.mst) to the directory $INDEXSTYLE.
# if this file does not exist, $ISTDEFAULT is used instead.
# if this also does not exist, no style file is used.
# The .idx file can be filtered through a program named $FILTER.

INDEXSTYLE=~/indexstyles
ISTDEFAULT=default.ist
FILTER=cat
MAKEINDEX=/usr/bin/makeindex
# LyX (1.1.5fix1) calls makeindex with "makeindex -c -q idxfile"
IDXFILE=$3
BASE=`basename $IDXFILE .idx`
INDFILE=$BASE.ind
MSTFILE=$BASE.mst
ILGFILE=$BASE.ilg
[ -f $INDEXSTYLE/$ISTDEFAULT ] && STYLE="-s $ISTDEFAULT"
[ -f $INDEXSTYLE/$MSTFILE ] && STYLE="-s $MSTFILE"
export INDEXSTYLE
$FILTER $IDXFILE | $MAKEINDEX -c -q $STYLE -o $INDFILE -t $ILGFILE


Now you can customize everything in the new 'makeindex' script.
The minimum is to create a file ~/indexstyles/default.ist, which changes the
index layout for _all_ documents.

-- 
Thomas Henlich



Re: Customizing the index

2000-07-27 Thread Thomas Henlich

On Thu, Jul 27, 2000 at 01:42:50PM +, Herbert Voss wrote:
> Thomas Henlich wrote:
> > 
> > make a script 'lyx' in your ~/bin directory:
> > 
> > #!/bin/bash
> > export PATH=~/lyxbin:$PATH
> > /usr/bin/lyx -width 900 -height 700 $*
> 
> good idea! but for those who have root access:
> 
> 1. delete /usr/bin/makeindex
> this is only a link! have a look at it ...
> 
> 2. create a executable file makeindex in /usr/bin  or /usr/local/bin
> 
> --
> #/bin/bash
> /usr/share/texmf/teTeX/bin/i386-linux-glibc/makeindex -s StyleFile -c -q
> $3
> --

Not so good idea, because:
1. after the next upgrade of your LaTeX packages you lose these changes
2. you have to modify this script whenever you want to use another style for
a document.
3. You can't use makeindex (e.g. for LaTeX) anymore like you used to.
4. If there are any other users besides you on this machine who use
makeindex, they will go mad before they realize what has happend :-S

-- 
Thomas Henlich