Skip to content

Create a newspaper in TeX

My problem: for our wedding i need a small magazine with a foto in front, the flow sheet, some notes for the music and some more additional informations. The decision was to create A5 sheets and print them doublesided on an A4 paper, so you actually need at least 4 A5 sheets to fill one paper.

The first attempt was OpenOffice, but if you have more than one A4 paper, it's really hard to have the sheets in the correct order. For one paper you need sheet 1 and 4 and sheet 2 and 3 adjoin each other. If you have 8 sheets, you need 1 and 8 together, 2 and 7 and so on ...

Thats complicated to do in OpenOffice (maybe there's a way to do this, but i don't know it).

So after some minutes i changed over to Tex, took one of my existing makefiles and modified it a bit. With the following makefile you can just create sheet after sheet in your TeX-file, type 'make' and you get 2 PDFs, one with the odd pages and one with the even pages. Thats all, what you have to do.

Oh, make sure, you have an exact number of pages (4, 8, 12, ...) ;-)


# print the odd pages first (1, 3, 5, ...)

all: $(name)-o.pdf $(name)-e.pdf $(name).pdf clean
acroread $(name)-o.pdf $(name)-e.pdf

allone: $(name)-o.pdf $(name)-e.pdf $(name).pdf clean
acroread $(name).pdf

$(name)-o.pdf: $(name)
ps2pdf14 $(name) $(name)-o.pdf

$(name)-e.pdf: $(name)
ps2pdf14 $(name) $(name)-e.pdf

$(name).pdf: $(name).ps
ps2pdf14 $(name).ps $(name).pdf

$(name).ps: $(name).dvi
dvips $(name).dvi
psbook $(name).ps $(name)
mv $(name) $(name).ps
psnup -Pa5 -2 $(name).ps $(name)
mv $(name) $(name).ps
cat $(name).ps | sed -e 's/DocumentPaperSizes: a5/DocumentPaperSizes: a4/' > $(name)
mv $(name) $(name).ps

$(name) $(name).ps
psselect -o $(name).ps $(name)

$(name) $(name).ps
psselect -r -e $(name).ps $(name)

$(name).dvi: $(name).tex
latex $(name).tex
latex $(name).tex > /dev/null 2>&1

rm -rf $(name).aux $(name).dvi $(name).log $(name).nav $(name).out $(name).ps $(name).snm $(name).toc $(name).vrb $(name) $(name)

cleanall: clean
rm -rf $(name).pdf $(name)-o.pdf $(name)-e.pdf

.PHONY: all $(name).pdf $(name)-o.pdf $(name)-e.pdf clean cleanall


No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
Form options