Dear R Users, I have three questions. 1) Is there a way to get the output tex file to include \documentclass{report} \begin{document} and \end{document} so I can generate a PDF straight away. (I am trying to generate hundreds of these and don't want to have to manually type this in every time I load a tex file). 2) When I have have a table of greater than 9 columns, the columns to the right tend to get cut off (see attached PDF "SNA cutoff"). Is it possible to specify that if the number of columns >9, continue the table below (see attached PDF "Desired result". Excuse my crude editing skills but you get the idea). 3) This is not so related to R but I thought someone may know the answer. Is there a way to maintain the image quality when I copy these tables into a word document? The file "Desired result" shows how copying from the original pdf ("SNA cutoff") drastically reduces the quality (note the word doc was re-converted to a PDF for posting). Regards, James http://www.nabble.com/file/p22191035/SNA%2Bcutoff.pdf SNA+cutoff.pdf http://www.nabble.com/file/p22191035/Desired%2Bresult.pdf Desired+result.pdf -- View this message in context: http://www.nabble.com/Help-with-Latex-%28Hmisc%29-tp22191035p22191035.html Sent from the R help mailing list archive at Nabble.com.
jimdare wrote:> Dear R Users, > > I have three questions. > > 1) Is there a way to get the output tex file to include > > \documentclass{report} > \begin{document} > > and > > \end{document} > > so I can generate a PDF straight away. (I am trying to generate hundreds of > these and don't want to have to manually type this in every time I load a > tex file).See the dvi and dvips function in Hmisc under the help file for latex. You could use these functions as models to write a dvipdf function.> > 2) When I have have a table of greater than 9 columns, the columns to the > right tend to get cut off (see attached PDF "SNA cutoff"). Is it possible > to specify that if the number of columns >9, continue the table below (see > attached PDF "Desired result". Excuse my crude editing skills but you get > the idea).use the longtable option and landscape mode> > 3) This is not so related to R but I thought someone may know the answer. > Is there a way to maintain the image quality when I copy these tables into a > word document? The file "Desired result" shows how copying from the > original pdf ("SNA cutoff") drastically reduces the quality (note the word > doc was re-converted to a PDF for posting).It depends on how you copy. By all means use Insert ... Picture ... from file and directly insert pdf. In OpenOffice you can directly insert encapsulated postscript. Frank> > Regards, > James > > http://www.nabble.com/file/p22191035/SNA%2Bcutoff.pdf SNA+cutoff.pdf > http://www.nabble.com/file/p22191035/Desired%2Bresult.pdf Desired+result.pdf-- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
Frank E Harrell Jr <f.harrell <at> vanderbilt.edu> writes: ... Word and pdf> It depends on how you copy. By all means use Insert ... Picture ... > from file and directly insert pdf.Please, tell me how you got this to work. Dieter
Dieter Menne wrote:> Frank E Harrell Jr <f.harrell <at> vanderbilt.edu> writes: > > ... Word and pdf > >> It depends on how you copy. By all means use Insert ... Picture ... >> from file and directly insert pdf. > > Please, tell me how you got this to work. > > Dieter >On Word 2003 there was no pdf option but I just used Insert ... Picture ... From File ... encapsulated postscript. We need to check that Word did not convert this to bitmap though. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
on 02/25/2009 07:52 AM Frank E Harrell Jr wrote:> Dieter Menne wrote: >> Frank E Harrell Jr <f.harrell <at> vanderbilt.edu> writes: >> >> ... Word and pdf >> >>> It depends on how you copy. By all means use Insert ... Picture ... >>> from file and directly insert pdf. >> >> Please, tell me how you got this to work. >> >> Dieter >> > > On Word 2003 there was no pdf option but I just used Insert ... Picture > ... From File ... encapsulated postscript. We need to check that Word > did not convert this to bitmap though.That is still the case with Office 2007, that is, no PDF import. If you import an EPS file and there is no pre-existing preview image, a bitmapped preview image will be generated upon import. It is the bitmapped image that you will see visually on the display and this is the image that will be printed by default, as Office does not natively render EPS. As I recall, older versions of Office would just leave you with a box-like placeholder for the EPS image, with no other indication of the content. You need to print to a PS compatible printer in order for the EPS image to be used. The same general situation is in place for OO.org relative to EPS images. There is a beta version of an OO.org PDF import filter available here: http://extensions.services.openoffice.org/project/pdfimport however, my experience with it last fall was less than enthusiastic and it still has a ways to go. It looks like there have been no updates for a while. There are commercial applications available that can enable you to import a PDF file into Office and a Google search will yield many options. I have not tried any of them, so buyer beware. HTH, Marc Schwartz