[R] off-topic question: Latex and R in industries

David Scott d.scott at auckland.ac.nz
Fri Apr 8 01:48:21 CEST 2005


>
>
> On 7 Apr 2005, at 22:56, Jonathan Baron wrote:
>
>> On 04/07/05 22:46, Donald Ingram wrote:
>>  However LaTeX generated  pdfs sent out as reports are much disliked.
>>
>> Really?  I don't have this problem.  It may have something to do
>> with how you make them.  With TeTeX, I use either pdflatex or
>> dvips followed by dvipdfm.  The latter is required when I have
>> figures in eps.  (ps2pdf is BAD.)
>>

I have played around with these converters a bit and I think I can add 
something important here.

As Jonathan says dvipdfm seems to work very well. The only problem I have 
is that it is not on our unix boxes by default: it is in mikTeX.

ps2pdf in my experience is not the problem in dvi to pdf conversion. I 
used to think that until I delved into it a bit more. The problem as I 
understand it is that fonts can be bitmapped and hence disgusting and 
slow. The trick is to make sure dvips uses Type I fonts. An incantation 
such as

dvips -Pwww -o file.ps file.dvi

followed by

ps2pdf -sPAPERSIZE=a4 -dAutoRotatePages=/None file.ps file.pdf

works for me just as well as dvipdfm


dvipdfm has an advantage over this two-step route to pdf because it knows 
straight off that it is producing a pdf. dvips plus ps2pdf needs tweaking.

US readers will need letter instead of a4 above. The -dAutoRotatePages is 
to avoid pages being rotated to make the longest side of the graph 
coincide with the longest side of the page.

References for this stuff are the LaTeX Graphics Companion and the LaTeX 
Web Companion.

Off-topic a bit I guess, but in my experience very useful to know, 
including when you start playing around with seminar, prosper, beamer, 
pdfscreen etc.

David Scott

_________________________________________________________________
David Scott	Department of Statistics, Tamaki Campus
 		The University of Auckland, PB 92019
 		Auckland	NEW ZEALAND
Phone: +64 9 373 7599 ext 86830		Fax: +64 9 373 7000
Email:	d.scott at auckland.ac.nz


Graduate Officer, Department of Statistics




More information about the R-help mailing list