repo.or.cz
/
ccbib.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Wir: Layout und Tennmuster überarbeitet
[ccbib.git]
/
skripts
/
booklet_duplex
blob
aa8d9492bf02c03f3843369a8baf457f9912ce5b
1
#!/bin/sh
2
3
if
[
-z
"
$2
"
];
then
4
output
=
$
(
basename
$1
)
5
else
6
output
=
$2
7
fi
8
9
bbox
() {
10
x
=
$1
11
y
=
$2
12
w
=
$3
13
h
=
$4
14
}
15
16
bbox $
(
sed
-n -e
"s/^%%BoundingBox: //p"
$1
)
17
18
new_bb
=
"0 0
$h
$((2*
$w
))"
19
20
psbook
$1
| pstops
"4:0L(
$h
,0)+1L(
$h
,
$w
),2L(
$h
,0)+3L(
$h
,
$w
)"
| strippagesize
"
$new_bb
"
>
d_
$output