media_change
  7   ˆl–ßi~” ”Ð?Je@‚ãn\ªbÑ¿�þ[#Y¹G$}¢·)üÿÈ„eïÇÀÅ ?÷     #!/usr/bin/perl
# Debian required shebang above
# Original shebang below
# #!/usr/bin/env perl
# This file is part of the authorindex package for LaTeX + BibTeX.
# Version: 10. August 2008

use warnings 'all';
use strict;

# configuration: apart from the command to invoke perl above you might want to
# change:

my $bstenv="BSTINPUTS";	# Environment Variable holding .bst search path
my $bibenv="BIBINPUTS";	# Env Variable holding search path for BibTeX databases
my $tmp="_autidx_";	# Name base for temporary files
my $cwdpath=".";	# Directory where files are generated
my $pathsep=($^O eq "MSWin32") ? ';' : ":"; # Seperator between paths in a list

# This script takes LaTeX .aux files as input. It extracts all citations made
# with page number information. These, together with the bibliography data base
# extracted from the input and a .bst file are processed by bibtex to get a
# file that associates each citation label with corresponding authors. Together
# with the knowledge of which work is cited on which page, this is used to
# compute which author is cited on which page. This information is written to
# the output in form suitable to be included in a LaTeX document.
# Alternatively, the script can also extract the label that appears in the
# references for each work instead of the pages. Also, output for further
# processing by makeindex can be generated instead of a 'ready' LaTeX file.

# examine command line for options

my %opt;		# hash to contain options found
use Getopt::Std;
getopts('dhikpr',\%opt);

# handle -h option: a short description of the script.

exists $opt{'h'} && die <<END;
Usage: $0 [-d] [-h] [-i] [-k] [-p] [-r] [filename ...]

-d generate additional statistical information as comments
-i generate file (with extension .ain) suitable as input for makeindex
-k keep auxiliary bibliography style file $tmp.bst after script finishes
-h print this help and exit
-r  suppresses  automatic inclusion of .aux generated by \\include-ed files
-p send result to standard output

Any number of file names can be given. If none is given, input is read from
standard input. Otherwise, all files specified are read, after the extension
.aux has been appended to their name where necessary.
END

# Make sure that all input files get .aux extension.

grep(s/$/\.aux/,grep(!/\.aux$/,@ARGV));
my @SAVEARGV=@ARGV;

my $usenum=0;			# default: put page numbers into index
my $PageTypeOrder="rRnAa";	# default order of number types
my $altedit="'skip\$";		# no editors if no authors present
my $addedit="'skip\$";		# no editors if authors present

my $citationcount=0;	# used for statistics
my $workscount=0;
my $explicits=0;
my $authorcount=0;

my $miniindex=0;	# flag: is 1 if mini-index is requested
my $nocompress=0;	# flag: is 1 if page range compression is prohibited

my @bib;		# collect .bib-file names
my %biboccured;		# collect .bib-file names
my %pnlist;		# collect occuring pages/bib.numbers as keys of hash

my $editors=0;		# number: 0 no editors; 1 editors if no authors
			# 2: editors whenever present
my $nameformat="";		# string to format/sort names
my $maxnames=999;	# max. number of author names per entry
my $truncnames=999;	# how many authors to take if max number is exceeded
my $labeltype="labels";	# wether bibliography labels or pages are indexed

my %Lab2Pag;		# for each label gives array of pages where work cited
my %Lab2Num;		# for each label give its bibliography number
my %Lab2Bib;		# ditto, but for occurrence in bibliography
my %Aut2Pag;		# for each author gives array of pages cited/in bilio.
my %Aut2Bib;		# ditto, but only occurrence in bibliography
my %Aut2Lab;		# list of BibTeX entry labels an author occurs in
my %Aut2First;		# list of all 1st authors to which author was coauthor
my %LeadAutPag;		# author -> hash marking pages with work author is 1st

my %printname;		# sort-key -> printed representation of author
my %plainname;		# sort-key -> author name

my %PageTypeOrder;	# Page type code -> number giving relative order
my %PageOrde