Selected Publications
These documents are protected by various copyright laws, but in each case
I am allowed to distribute copies to individuals for personal, research
use. Your click on any of the links below constitutes your request to me
for a personal copy of the linked article, and my delivery of a personal
copy. Any other use is prohibited.
Sort by Topic
Sort by Year
= $data2['year']) ? -1 : 1;
}
else { // sort by topic
if ($data1['topicorder'] == $data2['topicorder']){ // same topic? then sort by year
if ($data1['year'] == $data2['year']) return strcmp($data1['namesorter'], $data2['namesorter']); // same year? sort by name
return ($data1['year'] >= $data2['year']) ? -1: 1;
}
return ($data1['topicorder'] <= $data2['topicorder']) ? -1 : 1;
}
}
// load the publications list from the text file publications.txt
$file= file("Research/Selected Publications/publications.txt");
$abbrevs = array();
for ($i=0; $i < count($file); $i++){
$line = $file[$i];
$tmp = preg_split('/[ ]+/', $line);
if (count($tmp) == 1) break; //blank line
$abbrevs[$tmp[0]] = trim(substr($line, strlen($tmp[0]))); //ABBREV Full name....
}
$data = array();
$cur = 0;
while ($i < count($file)){
$isblank = true;
do {
$line = $file[$i];
$tmp = preg_split('/[ ]+/', $line);
if (count($tmp) == 1) $i++;
else $isblank = false;
} while ($isblank);
if ($i >= count($file)) break;
$line1 = preg_split('/[ ]+/', $file[$i++]);
$abbrev = $line1[0];
$isnew = false;
if (count($line1) == 3) $isnew = true;
$location = trim($line1[count($line1)-1]);
//read the possibly multiline citation
$citation = "";
$isblank = false;
do {
$line = $file[$i];
$tmp = preg_split('/[ ]+/', $line);
if (count($tmp) > 1){
$citation .= $line;
$i++;
}
else $isblank = true;
} while (!$isblank);
//determine publication year by regular expression
preg_match("([0-9]{4})", $citation, $matches);
$year = 0;
if (count($matches) > 0) $year = $matches[0];
else {
preg_match("(submitted|Submitted)", $citation, $matches2);
if (count($matches2) > 0) $year = 9999; //found a submitted, special flag of -1
else {
preg_match("(in press|In Press)", $citation, $matches3);
if (count($matches3) > 0) $year = 99999;
}
}
if ($isnew) $newtxt = '';
$junk = array_keys($abbrevs);
if (!strcmp(substr($location,0,5),'http:') || !strcmp(substr($location,0,6),'https:')) {
$linkcitation = $newtxt . ''.trim($citation).'';
}
else {
$linkcitation = $newtxt.''.trim($citation).'';
}
$data[] = array('topic' => $abbrevs[$abbrev], 'namesorter' => trim($citation), 'topicorder' => array_search($abbrev, $junk), 'citation' => $linkcitation, 'year' => $year);
$newtxt = "";
}
usort($data, "comparison");
$prev = "";
foreach ($data as $datum){
if ($sortByYear && $prev != $datum['year']){
if ($prev != "") echo "";
echo "
".$datum['year']."
";
}
else if (!$sortByYear && $prev != $datum['topic']){
if ($prev != "") echo "
";
echo "
".$datum['topic']."
";
}
echo "- ".$datum['citation']."
";
if ($sortByYear) $prev = $datum['year'];
else $prev = $datum['topic'];
}
echo "
";
?>