Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: st: RTF issues.


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: Re: st: RTF issues.
Date   Mon, 07 Jan 2013 15:42:48 -0500


On the topic of RTF, I too found -rtfutil- helpful, as well as inspiring - I ended up writing a number of additional modules for working with RTF.

One problem (or solution rather) which continues to elude me, however, is how to render a Stata graphics file in such a way that when MS Word opens the file, the size is known. Other RTF readers recognize dimension tags, but MS Word does not; however, my purpose is to use Adobe Acrobat to convert RTF to PDF, and for some reason it relies on Word to render the RTF before converting to PDF.

I was about to post on this last week, but wasn't sure until now if I had the right audience. But on reflection, it is perhaps a Stata issue. For example, if I create a Stata graph, and export it, and then insert a link into the RTF file, the file is displayed the same dimension regardless of how I create it or export it. Or so it seems. I have experimented with different formats, and found that

   graph export graph.emf

is always rendered at 4" by 5" in Word, whereas

   graph export graph.png, width(X)

is always rendered at 4.7" x 6" in Word, regardless of X. Larger, but poorer resolution. I have experimented with different export formats - not all will link into RTF - with different parameters and nothing seems to work.

Has anyone found a way to export a Stata graph in an image format that is RTF/Word compatible *and* has known dimensions?

thanks,
Jeph



On 1/7/2013 2:54 PM, Roger B. Newson wrote:
Thanks for the appreciation. My definitive RTF programming book, for
people like me who do not have the time and/or inclination to read the
Microsoft documentation, is Burke (2003), as recommended in -help
rtfutil-. The accompanying Web page contains some quick reference material.

I hope this helps. Let me know if you have any further queries.

Best wishes

Roger

References

Burke S. M.  2003.  RTF Pocket Guide.  Sebastopol, CA: O'Reilly
Associates Inc.  Download more information from Sean Burke's RTF web
page at
http://search.cpan.org/~sburke/RTF-Writer/lib/RTF/Cookbook.pod


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/


Opinions expressed are those of the author, not of the institution.

On 07/01/2013 18:14, Amadou DIALLO wrote:
Hi,

I am using the rtfutil commands (thanks to the author for this amazing
tool as it saves me a lot of efforts !!!) but get stuck in doing the
following things (I googled but the answers found are not working):

- how do I color some text or areas in my rtf file
- how do I insert headers and footers
- how do I insert page numbers, footnotes and paragraph/section numbering
- how do I put my text in italic and underline
- how do I put some text or an image in a box
- etc.

Can someone recommends me a good rtf programming book?

Thanks in advance.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index