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

st: AW: Stata graphs in LaTeX

From   "Martin Weiss" <>
To   <>
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 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'\, as(ps) replace
capt erase mygraph.pdf
!ps2pdf `path'\
!start `path'\mygraph.pdf

capt erase

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


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Patrick J.
Gesendet: Dienstag, 5. Mai 2009 07:46
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:

*   For searches and help try:

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