nasmdoc.texi: nasmdoc.dip
: Generated by side effect
-nasmdoc.ps: nasmdoc.dip nasmlogo.eps genps.pl psfonts.ph pswidth.ph head.ps
- $(PERL) $(srcdir)/genps.pl nasmdoc.dip > nasmdoc.ps
+nasmdoc.ps: nasmdoc.dip nasmlogo.eps ../version \
+ genps.pl psfonts.ph pswidth.ph head.ps
+ $(PERL) $(srcdir)/genps.pl -subtitle "version `cat ../version`" \
+ nasmdoc.dip > nasmdoc.ps
nasmdoc.pdf: nasmdoc.ps
$(PS2PDF) nasmdoc.ps nasmdoc.pdf
$psbool{$parm} = $true;
} elsif ( $true && defined($psconf{$parm}) ) {
$psconf{$parm} = shift(@ARGV);
+ } elsif ( $parm =~ /^(title|subtitle|year|author|license)$/ ) {
+ $metadata{$parm} = shift(@ARGV);
} else {
die "$0: Unknown option: $arg\n";
}
# Title page
ps_start_page();
-$title = $metadata{'title'};
+$title = $metadata{'title'} || '';
$title =~ s/ \- / $emdash /;
-$pstitle = ps_string($title);
+
+$subtitle = $metadata{'subtitle'} || '';
+$subtitle =~ s/ \- / $emdash /;
# Print title
+print "/ti ", ps_string($title), " def\n";
+print "/sti ", ps_string($subtitle), " def\n";
print "lmarg pageheight 2 mul 3 div moveto\n";
print "tfont0 setfont\n";
-print "/title linkdest ${pstitle} show\n";
+print "/title linkdest ti show\n";
print "lmarg pageheight 2 mul 3 div 10 sub moveto\n";
print "0 setlinecap 3 setlinewidth\n";
-print "pagewidth lmarg sub rmarg sub 0 rlineto stroke\n";
+print "pagewidth lmarg sub rmarg sub 0 rlineto currentpoint stroke moveto\n";
+print "hfont1 setfont sti stringwidth pop neg ",
+ -$HeadFont{leading}, " rmoveto\n";
+print "sti show\n";
# Print logo, if there is one
# FIX: To be 100% correct, this should look for DocumentNeeded*