From f51ace84a0c314f67bf894158d482bb9ce2d195f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 7 Nov 2010 17:16:56 +0000 Subject: [PATCH] layout: support fractional page numbers --- layout/README.layout | 2 +- layout/layout | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/README.layout b/layout/README.layout index 32bbae7..a5011ac 100644 --- a/layout/README.layout +++ b/layout/README.layout @@ -222,7 +222,7 @@ Command-line options output is 1/7 actual size) -Px output physical page (,). xp and yp are - integers specifying the number of pages to shift by + numbers specifying the number of pages to shift by in each direction. xp is multiplied by 270mm; yp is multiplied by 190mm. diff --git a/layout/layout b/layout/layout index d1ba717..f373f0d 100755 --- a/layout/layout +++ b/layout/layout @@ -125,7 +125,7 @@ while (@ARGV && $ARGV[0] =~ m/^\-/) { elsif (s/^q//) { $quiet=1; } elsif (s/^l(\d+|\*)//) { $output_layer=$1; } elsif (s/^S([0-9.]+)$//) { $scale= $1 * 1.0; } - elsif (s/^P(\d+)x(\d+)$//) { $page_x= $1; $page_y= $2; } + elsif (s/^P(\d+(?:\.\d+)?)x(\d+(?:\.\d+)?)$//) { $page_x= $1; $page_y= $2; } elsif (s/^Lsubseglw(\w)\=(\d+)$//) { exists $psu_subseglw{$1} or die "unknown -L spec"; $psu_subseglw{$1}= $2*0.1; -- 2.30.2