Specify in runoff.spec which side sheet 1 is on, since it keeps changing
This commit is contained in:
parent
0fa1ab632f
commit
9d7a63e073
2 changed files with 12 additions and 9 deletions
17
runoff
17
runoff
|
@ -58,6 +58,13 @@ perl -e '
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(/sheet1: (left|right)$/){
|
||||||
|
print STDERR "assuming that sheet 1 is a $1 page. double-check!\n";
|
||||||
|
$left = $1 eq "left" ? "13579" : "02468";
|
||||||
|
$right = $1 eq "left" ? "02468" : "13579";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
if(/even: (.*)/){
|
if(/even: (.*)/){
|
||||||
$file = $1;
|
$file = $1;
|
||||||
if(!defined($toc{$file})){
|
if(!defined($toc{$file})){
|
||||||
|
@ -90,17 +97,11 @@ perl -e '
|
||||||
print STDERR "Have no toc for $file\n";
|
print STDERR "Have no toc for $file\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
# this assumes that sheet 1 of code is a right page
|
if($what eq "left" && !($toc{$file} =~ /^\d[$left]$tens/)){
|
||||||
# double-check the PDF. swap the two regexps below
|
|
||||||
# otherwise.
|
|
||||||
if(!$leftwarn++) {
|
|
||||||
print STDERR "assuming that sheet 1 is a right page. double-check!\n";
|
|
||||||
}
|
|
||||||
if($what eq "left" && !($toc{$file} =~ /^\d[02468]$tens/)){
|
|
||||||
print STDERR "$file does not start on a fresh left page [$toc{$file}]\n";
|
print STDERR "$file does not start on a fresh left page [$toc{$file}]\n";
|
||||||
}
|
}
|
||||||
# why does this not work if I inline $x in the if?
|
# why does this not work if I inline $x in the if?
|
||||||
$x = ($toc{$file} =~ /^\d[13579]$tens/);
|
$x = ($toc{$file} =~ /^\d[$right]$tens/);
|
||||||
if($what eq "right" && !$x){
|
if($what eq "right" && !$x){
|
||||||
print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n";
|
print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
sheet1: left
|
||||||
|
|
||||||
# types.h either
|
# types.h either
|
||||||
# param.h either
|
# param.h either
|
||||||
# defs.h either
|
# defs.h either
|
||||||
|
@ -16,7 +18,7 @@ even: main.c
|
||||||
# odd: init.c
|
# odd: init.c
|
||||||
|
|
||||||
# spinlock.h either
|
# spinlock.h either
|
||||||
right: spinlock.c # mild preference
|
left: spinlock.c # mild preference
|
||||||
even: proc.h # mild preference
|
even: proc.h # mild preference
|
||||||
|
|
||||||
# goal is to have two action-packed 2-page spreads,
|
# goal is to have two action-packed 2-page spreads,
|
||||||
|
|
Loading…
Reference in a new issue