Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: About combination between Stata and Latex


From   "Lynn Lee" <lynn09v@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: About combination between Stata and Latex
Date   Wed, 19 Sep 2012 21:18:57 +0800

Dear Ronnie,

Thank you for your reply. I tried the command on website you provided to me,
but I still can not get the PDF format of graph. The command in latex I
wrote was:
\documentclass[a4paper,12pt]{article}
\usepackage{epstopdf}
\usepackage{graphicx}

\begin{figure}[h]
\begin{centering}
\includegraphics[height=3in]{scatter}
\caption{pic}
\label{fig:scatter}
\end{centering}
\end{figure}

\end{document}

But TeXworks told me “Package epstopdf Warning: No graphics package
`graphic{s,x}' loaded” and  “! LaTeX Error: File `scatter' not found.”
Is there anything wrong with Stata11 path for linkage to Latex? I can not
figure out why I can not generate picture in PDF format.  

I appreciate for any suggestion.

Best Regards,
Lynn Lee


Of it you want to use pdflatex
http://dirkraffel.com/2007/11/19/include-eps-files-in-latex/  
--
010100100110111101101110011011100110100101100101




On Wednesday, September 19, 2012 at 2:23 PM, Ronnie Babigumira wrote:

> Might this help 
> http://amath.colorado.edu/documentation/LaTeX/reference/figures.html
>  
>  
> --
> 010100100110111101101110011011100110100101100101
>  
>  
>  
>  
> On Wednesday, September 19, 2012 at 12:42 PM, Lynn Lee wrote:
>  
> > Dear all,
> >  
> > I am currently working with generating graph in Latex format. The 
> > software I use for Latex is Texmaker downloaded from 
> > http://mirror.neu.edu.cn/CTAN/systems/windows/protext/ with ProTeXt 
> > files.The Latex file installed on my computer is “MiKTeX2.8”. I also 
> > write “\usepackage{graphicx}” in Texmaker preamble. I also typed 
> > “sjlatex update using C:\Users\sony\desktop\Latex” and copy the file 
> > in “C:\Stata11\ado\personal\ stlog” (because when I typed “sjlatex 
> > install using” , Stata11 told me the sjlatex already exists and 
> > C:\Stata11\ado\personal is not a writable file. I thought I 
> > installed this before, and can only update it.)The command I write 
> > in Stata11 is as
> > follows:
> > sysuse auto,clear
> > cd "C:\Users\sony\desktop\Latex " (the path where I stored my Latex
> > files)
> > scatter price mpg
> >  graph2tex, epsfile(scatter) caption(pic) label(scatter) ht(3)
> >  Stata11 gives me the following: % exported graph to scatter.eps
> >  % We can see in Figure \ref{fig:scatter} that
> >  \begin{figure}[h]
> >  \begin{centering}
> >   \includegraphics[height=3in]{scatter}
> >   \caption{pic}
> >   \label{fig:scatter}
> >  \end{centering}
> >  \end{figure}
> > Then, I typed “cd C:\Stata11\ado\personal\stlog”.  
> >  
> > TeXworks gives me the reminder----- “\usepackage{graphicx}”. But I 
> > find the scatter.esp file is in my “Latex” file , but I still can 
> > not get latex format graph. Now, I am stuck here. I really do not know
why.
> >  
> > Any suggestion is greatly appreciated.
> >  
> > Best Regards,
> > Lynn Lee
> >  



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index