Statalist


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

st: AW: Stata graphs in LaTeX


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Stata graphs in LaTeX
Date   Tue, 5 May 2009 14:14:27 +0200

<> 

Well, it is not "my" epspdf program, but part of the mixtex.org package. I
operate in the same environment as you, and have never had a problem getting
Stata graphs into pdfs and then into a LaTeX document. Whether Tex supports
jpg or not is none of our business, as you rightly say. I do believe that
pdflatex can process them... Anyway, here is my template to turn Stata
graphs into pdf...

*************
// to export graphs

// path to folder
local path "C:/Users/`c(username)'/Desktop"

// get your graph
// sysuse auto, clear
// sc pr we

// settings for eps, see -help eps_options-
// graph set eps mag 300
// graph set eps orientation landscape
//for inclusion in dvi
gr export `path'\mygraph.eps, as(eps) preview(off) replace

//pdf export with MIKTEX utility
//!epstopdf `path'\mygraph.eps

//same with ps
gr export `path'\mygraph.ps, as(ps) replace
capt erase mygraph.pdf
!ps2pdf `path'\mygraph.ps
!start `path'\mygraph.pdf

capt erase mygraph.ps

//save in Stata format as well
gr save `path'\mygraph.gph, replace
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Patrick J.
Flaherty
Gesendet: Dienstag, 5. Mai 2009 07:46
An: [email protected]
Betreff: st: Stata graphs in LaTeX

I am using Stata 10.1 fully updated in a Windows environment (Vista).

I do not believe my LaTeX software (or is it my computer) is .eps
compatible.  While Michael Mitchell's graph2tex runs great in Stata it
produces .eps files which my LaTeX can't read.

I try running Martin Weiss' epspdf program but I get an error from
GhostScript that filesize must be less than 2Gb.

Why doesn't Stata export .jpg files?  Or why can't LaTeX (I know this isn't
a LaTeX listserve, I apologize) read .wmf files?

Patrick J. Flaherty
Coventry, Connecticut




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index