summaryrefslogtreecommitdiff
path: root/doc/doc-docbook/PageLabelPDF
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-04-04 14:03:49 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-04-04 14:03:49 +0000
commit4f5788623ab3e8456ad254883b6cc018079aab96 (patch)
tree7a0d0f19d4687941f80d25cab01e9c8ddb2fac25 /doc/doc-docbook/PageLabelPDF
parentbd8aa2d172edfb841402caf8c2524628505df8ea (diff)
Update documentation for 4.61 and some of the preparation tools.
Diffstat (limited to 'doc/doc-docbook/PageLabelPDF')
-rwxr-xr-xdoc/doc-docbook/PageLabelPDF15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/doc-docbook/PageLabelPDF b/doc/doc-docbook/PageLabelPDF
index aa144e208..5819d11c4 100755
--- a/doc/doc-docbook/PageLabelPDF
+++ b/doc/doc-docbook/PageLabelPDF
@@ -1,20 +1,21 @@
#! /usr/bin/perl -w
-# $Cambridge: exim/doc/doc-docbook/PageLabelPDF,v 1.1 2006/02/01 11:01:01 ph10 Exp $
+# $Cambridge: exim/doc/doc-docbook/PageLabelPDF,v 1.2 2006/04/04 14:03:49 ph10 Exp $
# Program to add page label information to the PDF output file. I have not
# found a way of automatically discovering the number of frontmatter pages
-# in the document. It is therefore screwed in as 12 in the next statement.
+# in the document. It is therefore taken as an argument to be inserted into the
+# next statement.
$add = "/PageLabels << /Nums [ 0 << /S /r >>\n" .
- " 12 << /S /D >>\n" .
+ " $ARGV[0] << /S /D >>\n" .
" ]\n" .
" >>\n";
$extra = length $add;
$before = 0;
-while (<>)
+while (<STDIN>)
{
print;
$before += length($_);
@@ -23,13 +24,13 @@ while (<>)
print $add;
-while (<>)
+while (<STDIN>)
{
print;
last if $_ =~ /^xref$/;
}
-while (<>)
+while (<STDIN>)
{
if (/^(\d{10}) (.*)/)
{
@@ -40,7 +41,7 @@ while (<>)
elsif (/^startxref/)
{
print;
- $_ = <>;
+ $_ = <STDIN>;
if (/^(\d+)/)
{
print $1 + $extra, "\n";