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:

#!/bin/bash
file=$1
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
fi


you may download it here.

quarta-feira, 2 de junho de 2010

pdfposter



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:
drawing.pdf


output: 16 pages, A4, pdf file:
out.pdf


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:

\documentclass{article}
% Support for PDF inclusion
\usepackage[final]{pdfpages}
% Support for PDF scaling
\usepackage{graphicx}
\usepackage[dvips=false,pdftex=false,vtex=false]{geometry}
\geometry{
paperwidth=160mm,
paperheight=247mm,
margin=2.5mm,
top=2.5mm,
bottom=2.5mm,
left=2.5mm,
right=2.5mm,
nohead
}
\usepackage[cam,a4,center,dvips]{crop}
\begin{document}
% Globals: include all pages, don't auto scale
\includepdf[pages=-,pagecommand={\thispagestyle{plain}}]{/tmp/out.pdf}
\end{document}


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