#!/usr/bin/perl
$lines = 0;
$fontsize = 12;
$linespace = 4;
$totheight = 5 * 72;
while (<>) {
	chop;
	s/\\/\\\\/g;
	s/\(/\\(/g;
	s/\)/\\)/g;
	$text[$lines] = $_;
	$lines++;
}
printf "%% Got $lines lines\n";
$textheight = ($lines * $fontsize) + (($lines - 1) * $linespace);
printf "%% Text height is $textheight points\n";
$spareheight = $totheight - $textheight;
$elevation = $totheight - ($spareheight / 2) - $fontsize;
$leftpoint = 36;
printf "(Courier) findfont $fontsize scalefont setfont\n";
foreach $line (@text) {
	printf "$leftpoint $elevation moveto\n";
	printf "($line) show\n";
	$elevation -= $fontsize + $linespace;
}







