## text.box example ## source('http://biostat.mc.vanderbilt.edu/twiki/pub/Main/TatsukiRcode/TatsukiRcode3.r') pdf('textboxmanual.pdf', width=7.5, height=11) plot(0,0, type='n', las=1, xlab='',ylab='',xlim=c(0,1),ylim=c(0,1)) text1 <- c( '

PITTSBURGH While Jason Bay continues to enjoy his postseason run with the Red Sox,', 'the former Pirates left fielder quietly received one more bit of recognition in the city where he established himself as an All-Star caliber outfielder.

', '

Bay was voted as the ChuckTannerAward winner for 2008, an honor that recognizes the Pirates player whose professionalism,', 'cooperation and availability to and with Major League writers best assists them in carrying out daily responsibilities.', 'The award is voted upon annually by members of the >Pittsburgh chapter of the Baseball Writers Association of America.

' ) text2 <- c( '

The award is named for Tanner, a former Pirates manager and current special assistant to general manager Neal Huntington', 'who has long been known for being accessible and helpful to those who have covered the club.

', '

Mr.<~>Bay, who joined the organization in 2003, played in Pittsburgh until the end of July.', 'He was dealt to Bostonas part of a >three-team trade that landed the Pirates four young players in return.', 'Bay hit .282 with 22 homers and 64 RBI<*>s for Pittsburgh this season,', 'as he bounced back from an injury-plagued 2007 campaign' ) default <- list(family='serif', font=1, cex=.8, col=1) w1 <- text.box(text1, default, x=c(.1,.9),y=1, x.padding=.05,y.padding=c(.02,.1), vertical.stretch=2, paragraph.break=1.5, justify=T, bkgr.col='powderblue', slide.quote=T, after.=1.5) ny <- get.next.y(w1) w2 <- text.box(text2, default, x=c(.1,.8), y=ny[2], x.padding=c(.1,.05), y.padding=c(.0, 10), vertical.stretch=2, paragraph.break=2, justify=F, bkgr.col='powderblue', slide.quote=T, after.=5) dev.off()