sábado, 19 de junho de 2010

Veja desenvolve novo método para testar indenpência de duas variáveis aleatórias.

Na edição de 16 de Junho de 2010, a Veja mostra um novo método para testar indenpência de duas variáveis aleatória, no caso em questão, aplicado para analisar a independência das Eleições e Copa do Mundo.

in reference to: Eleições: Equilíbrio inédito na corrida presidencial - Edição 2169 - Revista VEJA (view on Google Sidewiki)

segunda-feira, 14 de junho de 2010

Create your own booklets

Here is a easy way to create your own booklets and print'em... easy and fast.
You just have to put the paper, run the script, and change the paper when asked to.
(*note: there is no need to reorder the pages... the script does it automatically)

Here is a script to do it all:

pdf2ps $file /tmp/${file%%.pdf}.ps
psbook /tmp/${file%%.pdf}.ps /tmp/out.ps
psnup -2 /tmp/out.ps /tmp/out2up.ps
ps2pdf /tmp/out2up.ps ${file%%.pdf}-booklet.pdf
echo Do you want to print the booklet now? \(y\)es or \(n\)no:
read PRINT
if [ "$PRINT" = "y" ]; then
lp -o page-set=odd ${file%%.pdf}-booklet.pdf
echo change paper now! \(no need to reorder pages\)
read PRINT
lp -o page-set=even -o outputorder=reverse ${file%%.pdf}-booklet.pdf

you may download it here.

quarta-feira, 2 de junho de 2010


Go to official pdfposter website here.

This tool is very simple and good. You can split a PDF document into several to create a poster. See the example bellow:

pdfposter -p 4x4a4 /tmp/drawing.pdf /tmp/out.pdf

input: 1 page, A0, pdf file:

output: 16 pages, A4, pdf file:

But there is a problem... printers usually have a printable area, so you need to add a margin to your document in order to don't lose anything when you print it. Here is how I did it for the example above.

First, use pdfposter to create a smaller version (160x247mm, that means 2.5mm of top, bottom, left and right margins).

pdfposter -m160x247mm -pA0 drawing.pdf out.pdf

After that, create a TeX document that will include this pdf, place each page inside a A4 page and include cropping marks. Here is the source code:

% Support for PDF inclusion
% Support for PDF scaling
% Globals: include all pages, don't auto scale

And... voilà! Here is the final pdf. And it page will be like this: