summaryrefslogtreecommitdiff
path: root/lib/sbin/FixPageNumbersInPostscript.pl
diff options
context:
space:
mode:
authorjthorn <jthorn@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-07-06 11:11:30 +0000
committerjthorn <jthorn@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-07-06 11:11:30 +0000
commitda065185156fe5a17cff274437fa2039610be0d3 (patch)
treeb1f164cf19354108bbdc1a0f92d276529018ce86 /lib/sbin/FixPageNumbersInPostscript.pl
parent635975881ba5341c2a3f2b14b728ffc54561af16 (diff)
# @desc Fix "previous line in file was end of previous page"
# to also recognize the slightly different dvips output of # dvips(k) 5.92b (part of the teTeX 2.01 distribution) git-svn-id: http://svn.cactuscode.org/flesh/trunk@3253 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/FixPageNumbersInPostscript.pl')
-rwxr-xr-xlib/sbin/FixPageNumbersInPostscript.pl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/sbin/FixPageNumbersInPostscript.pl b/lib/sbin/FixPageNumbersInPostscript.pl
index 444b830a..0c9bdcfc 100755
--- a/lib/sbin/FixPageNumbersInPostscript.pl
+++ b/lib/sbin/FixPageNumbersInPostscript.pl
@@ -8,7 +8,14 @@
# Cactus UsersGuide, ThornGuide, and MaintGuide
# @enddesc
# @version $Header$
-#@@*/
+# @history
+# @date Sat Jul 5 17:55:07 CEST 2003
+# @author Jonathan Thornburg <jthorn@aei.mpg.de>
+# @desc Fix "previous line in file was end of previous page"
+# to also recognize the slightly different dvips output of
+# dvips(k) 5.92b (part of the teTeX 2.01 distribution)
+# @endhistory
+# @@*/
# $part counts the parts (chapters) in the postscript file
$part = 0;
@@ -31,7 +38,9 @@ while (<>)
while (<>)
{
- if ($last_line =~ /eop$/ && /^%%Page: (\d+) (\d+)$/)
+ my $previous_line_was_eop
+ = (($last_line =~ /eop$/) || ($last_line =~ /eop end$/));
+ if ($previous_line_was_eop && (/^%%Page: (\d+) (\d+)$/))
{
$part++ if ($1 == 1);
$_ = "%%Page: ${part_letters[$part]}$1 $2\n"