#!/usr/bin/env perl =pod Copyleft under the GNU public license @ http://www.gnu.org/copyleft/gpl.htm. Make a file of the AMS refs for your publications. This step is fairly easy if you have a MathSciNet subscription. Go to MathSciNet and do an author search on yourself and display all your entries. Select AMSrefs as an alternate display. At the top of the page is a drop-menu which you should set to Citations(AMSRefs) and then "Retrive First 50", or "Retrive All". You get a page with the AMSRefs for these papers. Copy it to a file. If you have more than 50 papers, it appears you have to mark them by hand and then "Retrive Marked". This may be burdensome once but in the future all you have to do is add new entries to the head of the list. Name the file with your AMSRefs "AMSRefsYOU" with an optional .html. It doesn't have to be an html file but you can make it one by copying the code from AMSRefsTaylor.html. If you do then your Publications-page will have a link to it so people can easily get an entry for citing your papers. Papers are listed in the order they appear in your AMSRefs file hence in the default Math Reviews order unless you change it. This works well - the first papers that appear are the newest and to add new entries just paste into the beginning of the file. You only have to grab all your entries once. UNLIKE Math Reviews, papers are numbered with 1 being your first paper. Your life will be easier if you stick to this scheme. There are two more files you will need to at least consider - YOU.coauthorurl & YOU.papers These two files contain the data for links in your page - neither is necessary. YOU.coauthorurl: This is a hash - %author_url. The key is the name of a coauthor exactly as it appears in the html file. This often results in several entries for the same person. The value of the entry is any link you want. I use the person's homepage but suit yourself. To keep maintenance to a minimum, you can have one entry with the actual url and the others all of the form '*FOO' where FOO is the name of the entry with the actual url. One bit of warning - usually the name key is the name (first last) but if the name has TeX code in it you may have to look at the html page to get the correct form of the name. This file should also have a key 'ME' with your name as you want it to appear in the html file for the title. If this key is missing you get a generic title. YOU.papers: This is a hash - %paper_url - of hashes. The key is the paper number so life is easier if this is constant. The paper number value is also a hash with keys 'url' and 'type'. The value of the 'url' key is a link which I link to a copy of the paper. The value of the 'type' key is the text that appears at the end of the entry that you click on to go to the url. You may also make both the type and the url an array: in this case the array of types appears at the end of the entry and each one if link to the corresonding entry in the url array. I use this to get links to both the journal article and the arXiv version for people without a journal subscription. You may also have one or more entries with keys of 'local...' each with a 'url' field and a 'type' field. The aim of this scheme is to make entering paths to pdf files in your local space as easy as possible. If the url for a paper begins with * it assumed that the entry is *([^\/]*)\/rest_of_path. The 'type' field for each of the 'local ...' entries is examined until one is found that matches. The 'url' field is added to the begining of the url. If all of your files are in one folder, foo-folder, you need one 'local' entry (which can have a key of just 'local'): the 'url' field is "http://..../foo-folder/" and the 'type' field is "". =cut use strict; my($localDir)=substr($0,0,rindex($0,"/")+1); chdir($localDir) or die($!); opendir(DIR,"./") or die($!); my(@files)=readdir(DIR); closedir(DIR); my(@webpages); foreach my $file (sort(@files)) { ## Can do several people at once if their data is all in the same folder if($file=~m/^AMSRefs([A-Za-z]+)/) { print "\n\nMaking page for $1\n\n"; make_a_page($1,$file); } } exit(); sub make_a_page{ my($who)=shift(@_); my($infile)=shift(@_); ## Get AMSRefs open(IN,"$infile") or die($!); my(@amsdata)=; close(IN); my(%papers); my(%data)=('papers'=>\%papers, 'data'=>\@amsdata, 'who'=>$who, 'infile'=>$infile); $data{'number of papers'}=process_AMSRefs_File(\%data); undef(@amsdata);delete($data{'data'}); ## Get coauthor url's my(%author_url); if( -f "./$who.coauthorurl") { open(IN,"./$who.coauthorurl") or die($!); my(@ev)=; close(IN); eval("@ev") or die($!); undef(@ev); } else{ print"\n\nYou should make $who.coauthorurl and fill in the ME field"; print" with the name you want to use in the header data.\n\n"; } $data{'coauthors'}=\%author_url; ## Get links to papers my(%paper_url); if( -f "./$data{'who'}.papers") { open(IN,"./$data{'who'}.papers") or die($!); my(@ev)=; close(IN); eval("@ev") or die($!); undef(@ev); } my(%local); my($hPN)=0; foreach my $xx (keys(%paper_url)) { if($xx=~m/^local/) { %{$local{$hPN++}} = %{$paper_url{$xx}}; delete($paper_url{$xx}); } } $data{'paper_url'}=\%paper_url; $data{'local_dirs'}=\%local; ### Make the html PAGE my($page)=header_stuff(\%data); $data{'current paper number'}=1; $data{'page'}=\$page; foreach my $tag (sort(keys(%papers))) { $data{'current_paper'}=\$papers{$tag}; if(${$papers{$tag}}{'type'}=~m/article/i) { do_article(\%data);$data{'current paper number'}++; } elsif(${$papers{$tag}}{'type'}=~m/collection/i) { do_collection(\%data);$data{'current paper number'}++; } else{ print "Unknown type.\n",$tag," ***",${$papers{$tag}}{'type'},"###\n"; } } ## Add any extra stuff if(-f "./extra.html") { open(IN,"./extra.html") or die($!); my(@extra) = ; close(IN); $page.=join("",@extra); undef(@extra); } ## Add last updated time use Time::localtime; my($today)=Time::localtime::ctime(); $today=~s/:\d\d / /; ## Finish off html code $page.=<



Last updated: $today.
Back EOF ## Save page my($outfile)=$who.".pub.html"; open(OUT,">$outfile") or die($!); print OUT $page; close(OUT); } ### END OF MAIN ROUTINE ###### sub do_article{ my($vars)=shift(@_); my($entry)= item_start($vars); $entry .= ""; $entry.= title_line($vars); $entry .= ".
\n"; $entry .= name_line($vars); $entry .= "\n"; if( exists(${${${$vars}{'current_paper'}}}{'book'}) ) { $entry .= do_book($vars); } else { $entry .= do_non_book($vars); } $entry.= "
\n"; $entry .= MR_line($vars); $entry .= Paper_link($vars); $entry .= "\n

\n"; ## Restore \\, \{ and \} my($xx)=chr(0); $entry=~s/$xx/\\\\/g; $xx=chr(1); $entry=~s/$xx/\\{/g; $xx=chr(2); $entry=~s/$xx/\\}/g; ${${$vars}{'page'}}.=$entry; } sub do_collection{ do_article(@_); } ###### sub item_start{ my($vars)=shift(@_); my($xx)=${$vars}{'number of papers'} - ${$vars}{'current paper number'}; return("[".$xx."] "); } sub do_name{ my($name) = shift(@_); my($author_url) = shift(@_); $name=~m/^([^,]+),(.+)/; my($first)=$2; my($last)=$1; $first=~s/^ +//;$first=~s/ +$//;$first=deTeX($first); $last=~s/^ +//;$last=~s/ +$//;$last=deTeX($last); my($Name)=$first." ".$last; if( exists(${$author_url}{$Name}) && ${$author_url}{$Name} ne "" ){ my($aurl)=${$author_url}{$Name}; if($aurl=~m/^\*(.+)$/){ $aurl=${$author_url}{$1}; } $Name=$first." ".$last.""; } elsif(${$author_url}{$Name} ne "" && $Name!~m/Taylor/) {print"No url for $Name,\n";} return $Name; } sub name_line{ my($vars)=shift(@_); my(%aa)=%{${${$vars}{'current_paper'}}}; my($entry)=""; my(@xeys)=sort(keys(%aa)); my(@names); for( my $ii=0;$ii<=$#xeys;$ii++) { if($xeys[$ii]=~m/^author/) {push(@names,$aa{$xeys[$ii]});} } for( my $ii=0;$ii<=$#names;$ii++) { my($bb) = $names[$ii]; $bb = deTeX($bb); $entry .= do_name($bb,${$vars}{'coauthors'}); if($ii==$#names) {$entry .= ".";} elsif($ii<($#names-1)) { $entry .= ", ";} else{ if($#names>0) { $entry .= " and ";}} } return($entry); } sub title_line{ my($vars)=shift(@_); my($bb)=${${${$vars}{'current_paper'}}}{'title'}; $bb = deTeX($bb); $bb=~s/\$/\#/g; while( $bb=~m/#([^#]+)#/) { my($rr)=$1; my($ss)="#".$rr."#"; my($off)=index($bb,$ss); $rr=~s/ +//g; $bb=substr($bb,0,$off)."\$".$rr."\$".substr($bb,$off+length($ss)); } return($bb); } sub MR_line{ my($vars)=shift(@_); my($aa)=${${${$vars}{'current_paper'}}}{'review'}; my($entry)=""; $aa=~m/\\MR{(.+)}/; my($tt)=$1; if($tt eq "") {return "";} $tt=~m/([^\(]+)\((.+)\)/; my($ss)=$1; my($xx)=$2; $ss=~s/ +//g; $xx=~s/\\//g; $entry .= " MR ".$ss; if( $xx ne "" ) { $entry .= "(".$xx.")";} $entry .= "  \n"; return($entry); } sub do_non_book{ my($vars)=shift(@_); my($data)=${${$vars}{'current_paper'}}; my($entry)=""; $entry .= "".${$data}{'journal'}.", ".${$data}{'volume'}; my($pp)=${$data}{'pages'};$pp=~s/-+/-/; $entry .=", ".$pp.", ".${$data}{'date'}."."; return($entry); } sub do_book{ my($vars)=shift(@_); my($data)=${${$vars}{'current_paper'}}; my($entry)=""; if( exists(${$data}{'conference'}) ) { my($booktitle)=book_title(${${$data}{'conference'}}{'title'}); $entry .="".$booktitle.", "; if(exists(${${$data}{'conference'}}{'editor'})) { ##${$page} .= "ed"; } } if(exists(${${$data}{'book'}}{'series'})) { my($series)=book_title(${${$data}{'book'}}{'series'}); $entry .= $series.", "; if(exists(${${$data}{'book'}}{'volume'})) { $entry .= " ".${${$data}{'book'}}{'volume'}.", "; } } $entry .= deTeX(${${$data}{'book'}}{'publisher'}); $entry .= " (".${$data}{'date'}.") "; my($pp)=${$data}{'pages'};$pp=~s/-+/-/; $entry .= $pp.". "; return($entry); } sub book_title{ my($booktitle)=shift(@_); $booktitle=deTeX($booktitle);$booktitle=~s/ +/ /g; my(@words)=split(" ",$booktitle); my($lowercase)="#and#an#a#on#the#of#"; foreach my $xx (@words) { my($yy)=$xx;$yy=~s/[\(\)]+//g; if($lowercase=~m/#$yy#/) {next;} $xx=ucfirst($xx); } return join(" ",@words); } sub Paper_link{ my($vars)=shift(@_); my($url)=${$vars}{'paper_url'}; my($local)=${$vars}{'local_dirs'}; my($PN)=${$vars}{'number of papers'} - ${$vars}{'current paper number'}; if( exists( ${$url}{$PN}) ) { my($type)=${${$url}{$PN}}{'type'}; if(ref($type) ne "ARRAY") { if($type eq "") {$type="PDF";} my($xurl)=${${$url}{$PN}}{'url'}; foreach my $tt (keys(%{$local})) { my($type)=${${$local}{$tt}}{'type'}; my($URL)=${${$local}{$tt}}{'url'}; if($xurl=~m/^\*$type\//) { $xurl=~s/^\*$type\//$URL/; last; } } return("".$type.""); } else { my(@xx)=@{${${$url}{$PN}}{'type'}}; my(@yy)=@{${${$url}{$PN}}{'url'}}; my($rr)=""; for(my $ii=0;$ii<=$#xx;$ii++) { $rr.="".$xx[$ii].""; if($ii<$#xx) {$rr.="   ";} } return $rr; } } } sub process_AMSRefs_File{ my($var)=shift(@_); my($rawdata)=${$var}{'data'}; my($pn)=1; my($lb)="{";my($rb)="}"; my($entry)=""; for(my $ii=0;$ii<=$#{$rawdata};$ii++) { if(${$rawdata}[$ii]=~m/\\bib$lb/) { if($entry ne "") { amsRef_to_hash($entry,${$var}{'papers'},$pn++); $entry=""; } $entry=s_entry(${$rawdata}[$ii]); $ii++; while(${$rawdata}[$ii]!~m/\\bib$lb/ && $ii<=$#{$rawdata}) { $entry.=s_entry(${$rawdata}[$ii]); $ii++; } $ii--; } } if($entry ne "") { amsRef_to_hash($entry,${$var}{'papers'},$pn++); $entry=""; } return($pn); } sub s_entry{ my($entry)=shift(@_); chomp($entry);$entry=~s/ +/ /g; ## Replace \\, \{ and \} so brace pairing code works my($xx)=chr(0); $entry=~s/\\\\/$xx/g; $xx=chr(1); $entry=~s/\\{/$xx/g; $xx=chr(2); $entry=~s/\\}/$xx/g; return $entry; } sub amsRef_to_hash{ =pod Hashes one \bib entry: a compound field is hashed a repeated field foo has hash foo, foo001, foo002, etc. up to foo999 =cut my($entry)=shift(@_); my($paper_hash)=shift(@_); my($pn)=shift(@_); my($lb)="{";my($rb)="}"; $entry=~s/\\bib$lb[^$rb]*$rb$lb([^$rb]*)$rb//; my($type)=$1; my($field)=substr("00000".$pn,-5); ${${$paper_hash}{$field}}{'type'}=$type; $entry=substr($entry,0,rindex($rb,$entry));## $entry is the stuff between the two {}'s while($entry ne "" && $entry=~s/^ *([^=]+)=// ) { my($item)=$1; $item=~s/ +//g; $item=~s/^[^A-Za-z0-9]*//; { while(substr($entry,0,1) ne $lb && $entry ne "" ){$entry=substr($entry,1);} my($clb)=1;my($jj)=1; while( $clb>0 && $jj0) {$field.=substr("000".$xx,-3);} ${$sub_hash}{$field}=$entry; } else { while($entry ne "") { $entry!~s/^[^A-Za-z]+//; $entry=~s/^ *([^=]+)=//; my($fieldA)=$1; while(substr($entry,0,1) ne $lb && $entry ne "" ){$entry=substr($entry,1);} my($clb)=1;my($jj)=1; while( $clb>0 && $jjHere is an AmsRef version of the list.\n"; $htmlLine.="The order of the entries is the same as below.\n"; } my($auA)=""; my($auB)=""; if(exists(${$authors}{'ME'})) { $auA=": ${$authors}{'ME'}"; $auB=" of ${$authors}{'ME'}"; } my($page)=< Publications$auA

Publications$auB



The Math Reviews links (MR) will work only if you have a subscription to MathSciNet.

After the MR entry there is usually another link on the line. It is either a link to one of the archives, arXiv (arXiv.org), JSTOR (jstor.org), GT (Geometry and Topology), GDZ (The archive at Goettingen), NUMDAM (The NUMDAM project) or to somewhere else. A reprint is a copy of the reprint sent to an author; a preprint is some version of the paper before publication - the published version is the definitive one. A link of \$\$\$ means that all I could find was a link that will let you purchase the article. Some papers have more than one link to a source.
$htmlLine

The perl script that generates this page can be found here.

\n
\n
\n
EOF return $page; } sub deTeX{ my($ee) = shift(@_); my($lb)="{";my($rb)="}"; while($ee=~m/\\([A-Za-z]+)/) { my($cc)="\\\\".$1; my($xx)=""; if($cc eq "\\\\sb") {$xx="_";} elsif($cc eq "\\\\sp") {$xx="^";} elsif($cc eq "\\\\cprime") {$cc.=" ";} elsif($cc eq "\\\\Lambda") {$xx.="Λ";} $ee=~s/$cc/$xx/; } while($ee=~m/\\\"([A-Za-z]+)/) { my($uu)=$1;my($vv)=$uu; my($ww)=substr($uu,-0,1); if($ww eq "o") {$uu="ö".substr($uu,1);} elsif($ww eq "a") {$uu="ä".substr($uu,1);} my($cc)="\\\\\"".$vv; $ee=~s/$cc/$uu/; } while($ee=~m/\\\,/) { my($cc)="\\\\\,"; $ee=~s/$cc//; } $ee=~s/$lb//g;$ee=~s/$rb//g; return $ee; }