General ⇒ Binding
-
- Posts: 92
- Joined: Fri Apr 24, 2009 8:02 pm
Binding
Thanks,
-The Doctor (Michael)
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Binding

Except with the pages at the top upside down, so that when folded, you get something akin to a greeting card?
Am I right in thinking that you'd need them to be arranged:
1 4
2 3
?
And is your document only four pages? (The page layout gets more complicated if you're going to have one of these little booklets inside another.) You're not planning on cutting anything are you?
Anyway, I made the above with the pdfpages package, which does have options for rearranging a flipping pages, but getting exactly what you want might be difficult or require multiple pass-throughs if using pdfpages alone.
Perhaps someone will know of better options.
-
- Posts: 92
- Joined: Fri Apr 24, 2009 8:02 pm
Re: Binding
2 3
layout; but my document IS more than one page. So, what r my options again?
-The Doctor
-
- Posts: 92
- Joined: Fri Apr 24, 2009 8:02 pm
Binding
You'd first compile your file to a pdf, then run
[scriptname] mypdf.pdf ##
where ## is the number of pages in the document. (With more time, I could have it calculate that, but I'm too lazy at the moment.)
The output would be a file called 4.pdf, arranged as you wanted.
It gives you
1 4
2 3
then
5 8
6 7
But I'm not sure if that's how you'd bind it. (You have to put one folded piece of paper after another rather than inside one another. If you want them inside one another, it's a bit more complicated, but I could probably script that too.)
Code: Select all
#!/bin/bash
fn="$1"
pps="$2"
i="1"
S="S"
if [ -f $fn ]
then
cp $fn tempin.pdf
else
echo "File not found."
exit 1
fi
runcmd="pdftk tempin.pdf cat"
while [ $i -le $pps ]
do
runcmd="$runcmd $i$S"
if [ $((i+3)) -le $pps ]
then
runcmd="$runcmd $((i+3))$S"
fi
if [ $((i+1)) -le $pps ]
then
runcmd="$runcmd $((i+1))"
fi
if [ $((i+2)) -le $pps ]
then
runcmd="$runcmd $((i+2))"
fi
i=$[$i+4]
done
runcmd="$runcmd output prepareout.pdf"
$runcmd
echo "" > 4out.tex
echo "\\documentclass{article}" >> 4out.tex
echo "\\usepackage{pdfpages}" >> 4out.tex
echo "\\begin{document}" >> 4out.tex
echo "\\includepdf[nup=2x2,pages=-]{prepareout.pdf}" >> 4out.tex
echo "\\end{document}" >> 4out.tex
pdflatex -interaction=nonstopmode 4out.tex
rm 4out.tex
rm prepareout.pdf
rm tempin.pdf
Binding
There is a number of latex packages that can be used: pdfpages, booklet, quire (part of midnight package), pgfpages (distributed with pgf package) and perhaps others. Look them up and see which one has the features you want.thedoctor818 wrote:So, what r my options again?
Cheers,
Tomek