docs/diploma

changeset 372:6477e7827617

added scripts for improved index generation and complete bibtex generation
author meillo@marmaro.de
date Sat, 31 Jan 2009 20:07:58 +0100
parents 44a3188bf6d2
children d51894e48762
files thesis/latexmkrc thesis/scripts/complete-bibtex.sh thesis/scripts/improve-index.awk thesis/scripts/improve-index.sh
diffstat 4 files changed, 58 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/thesis/latexmkrc	Sat Jan 31 20:07:58 2009 +0100
     1.3 @@ -0,0 +1,2 @@
     1.4 +$makeindex = './scripts/improve-index.sh';
     1.5 +$bibtex = './scripts/complete-bibtex.sh';
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/thesis/scripts/complete-bibtex.sh	Sat Jan 31 20:07:58 2009 +0100
     2.3 @@ -0,0 +1,16 @@
     2.4 +#!/bin/sh
     2.5 +#
     2.6 +# run bibtex also on the web bib
     2.7 +
     2.8 +echo "complete-bibtex.sh"
     2.9 +echo "@: $@"
    2.10 +
    2.11 +if [ $# -eq 0 ] ; then
    2.12 +	echo "usage: $0 <bibinput> ..."
    2.13 +	exit 1
    2.14 +fi
    2.15 +
    2.16 +for i in "$@" web ; do
    2.17 +	echo "processing $i"
    2.18 +	bibtex "$i"
    2.19 +done
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/thesis/scripts/improve-index.awk	Sat Jan 31 20:07:58 2009 +0100
     3.3 @@ -0,0 +1,21 @@
     3.4 +#!/usr/bin/awk -f
     3.5 +#
     3.6 +# improve the index
     3.7 +
     3.8 +BEGIN{
     3.9 +	ie["mta"] = "mail transfer agent (\\MTA)";
    3.10 +	ie["mua"] = "mail user agent (\\MUA)";
    3.11 +	ie["smtp"] = "simple mail transfer protocol (\\SMTP)";
    3.12 +	ie["ietf"] = "Internet Engineering Task Force (\\NAME{IETF})";
    3.13 +}
    3.14 +
    3.15 +{
    3.16 +	cur = $0
    3.17 +	sub("[^{]*{", "", cur);
    3.18 +	sub("[}!].*", "", cur);
    3.19 +	if (ie[cur]) {
    3.20 +		#print ie[cur];
    3.21 +		sub("{[^}!]*", "{" ie[cur]);
    3.22 +	}
    3.23 +	print;
    3.24 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/thesis/scripts/improve-index.sh	Sat Jan 31 20:07:58 2009 +0100
     4.3 @@ -0,0 +1,19 @@
     4.4 +#!/bin/sh
     4.5 +#
     4.6 +# improve index source data and generate the index
     4.7 +
     4.8 +echo "improve-index.sh"
     4.9 +echo "@: $@"
    4.10 +
    4.11 +if [ $# -eq 0 ] ; then
    4.12 +	echo "usage: $0 <idxinput> ..."
    4.13 +	exit 1
    4.14 +fi
    4.15 +
    4.16 +for i in "$@" ; do
    4.17 +	echo "processing $i.idx"
    4.18 +	mv "$i.idx" "$i.unprocessed.idx"
    4.19 +	<"$i.unprocessed.idx" `dirname $0`/improve-index.awk >"$i.idx"
    4.20 +done
    4.21 +
    4.22 +makeindex "$@"