@ Frede:

Thanks!
Although scale with bb still give me the "loading" text in figure
region, your method works like a charm for the second one, I change M-n P to
pdflatex in your way, now it works fine. Thanks a lot!
Btw: Do you know how to view the pdf by some key-binding, after I hit M-n P
in sweave. I know in Tex mode, I can use C-c C-c, or C-c C-v to do that.

@Stephen and Richard:
Thanks a lot for those nice suggestions.

Tengfei

On Tue, Sep 21, 2010 at 12:58 AM, Frede Aakmann Tøgersen
<frtog@vestas.com>wrote:

> Hi
>
> In case you're using M-n l (that is latex) besides to the bb= options to
> \includegraphics use a scale={a number between 0 and 1} option in order to
> get rid of the overfull hbox.
>
> But it is much easier just to use M-n P (pdflatex). To get the pdflatex
> instead of texi2pdf, see the ess-swv-pdflatex-commands variable.
>
> Try C-h v ess-swv-pdflatex-commands [RETURN] with the cursor in a .tex or .
> Rnw buffer. It should give something like this (this is my customized
> definition on a linux box):
>
> ***********************************************************************
> ess-swv-pdflatex-commands is a variable defined in `ess-custom.el'.
> Its value is
> ("pdflatex" "texi2pdf" "make")
>
>
>
> Documentation:
> Commands to run a version of pdflatex in  M-x ess-swv-PDF;
> the first entry is the default command.
>
> You can customize this variable.
> **********************************************************************
>
> As it says in the help for this variable you can customize it. Either by
> clicking the relevant link in the help page or by doing
>
> M-x customize-variable [RETURN] ess-swv-pdflatex-commands [RETURN]
>
> Hope that helps.
>
>
> Yours sincerely / Med venlig hilsen
>
>
> Frede Aakmann Tøgersen
> Statistician, M.Sc., Ph.D.
> Modeling, Statistics and Risk Analysis
>
> Vestas Technology R&D
> T +45 9730 5135
> M +45 2547 6050
> frtog@vestas.com
> http://www.vestas.com
>
> Company reg. name: Vestas Wind Systems A/S
> This e-mail is subject to our e-mail disclaimer statement.
> Please refer to www.vestas.com/legal/notice
> If you have received this e-mail in error please contact the sender.
>
>
>
> > -----Original Message-----
> > From: ess-help-bounces@stat.math.ethz.ch
> > [mailto:ess-help-bounces@stat.math.ethz.ch] On Behalf Of Tengfei Yin
> > Sent: 21 September 2010 06:47
> > To: RICHARD M. HEIBERGER
> > Cc: ess-help@stat.math.ethz.ch
> > Subject: Re: [ESS] cannot explicitly include graphics in ESS
> > when write seave file
> >
> > Hi Richard,
> >
> > Thanks,
> >
> > The error message disappears, but shows information
> >
> > %%%
> > Overfull \hbox (37.63333pt too wide) in paragraph at lines 83--85 %%%
> >
> > If I try to view latex, the figure region keep showing "loading".
> >
> > I guess I am using ESS in the wrong way, when I try to use
> >
> > M-n s: to generate tex file
> > M-n P: then input 'pdflatex' and press enter key, the pdf
> > file looks good.
> > and no error message shows up
> >
> > if I run like this
> > M-n s: to generate tex file
> > M-n l: latex shows error message here
> > M-n p: if ignore the error message, shows a abnormal output....
> >
> > Maybe I should skip M-n i and use M-n P plus pdflatex
> > instead, another question is that , I don't know how to bind
> > M-n P to pdflatex, not texi2pdf
> >
> > Thanks again
> >
> > Tengfei
> >
> >
> >
> > On Mon, Sep 20, 2010 at 11:04 PM, RICHARD M. HEIBERGER
> > <rmh@temple.edu>wrote:
> >
> > > give it a bounding box.
> > >
> > > On Windows, you can get it by hovering over the filename in Windows
> > > Explorer.  If for example it says
> > >   Dimensions: 183 x 50
> > > then use
> > > \includegraphics[bb=0 0 183 50]{filename.png}
> > >
> > > Other operating systems will also be able to give you the
> > information.
> > >
> > > On Mon, Sep 20, 2010 at 11:05 PM, Tengfei Yin
> > <yintengfei@gmail.com>wrote:
> > >
> > >> HI dear all,
> > >>
> > >> Today I want to include graphics from outside in my sweave file by
> > >> using
> > >>
> > >> \includegraphics
> > >>
> > >> in a .Rnw file.
> > >>
> > >> When I type M-n s, it's ok
> > >> when I type M-n l, this give me a latex error message
> > >>
> > >> ! LaTeX Error: Cannot determine size of graphic in design.png (no
> > >> BoundingBox).
> > >>
> > >> Any work around or suggestion for this kind of issues?
> > >>
> > >> Thanks
> > >>
> > >> Tengfei
> > >>
> > >>
> > >>
> > >> --
> > >> Tengfei Yin
> > >> MCDB PhD student
> > >> 1620 Howe Hall, 2274,
> > >> Iowa State University
> > >> Ames, IA,50011-2274
> > >> Homepage: www.tengfei.name
> > >>
> > >>        [[alternative HTML version deleted]]
> > >>
> > >> ______________________________________________
> > >> ESS-help@stat.math.ethz.ch mailing list
> > >> https://stat.ethz.ch/mailman/listinfo/ess-help
> > >>
> > >
> > >
> >
> >
> > --
> > Tengfei Yin
> > MCDB PhD student
> > 1620 Howe Hall, 2274,
> > Iowa State University
> > Ames, IA,50011-2274
> > Homepage: www.tengfei.name
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > ESS-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/ess-help
> >
>



-- 
Tengfei Yin
MCDB PhD student
1620 Howe Hall, 2274,
Iowa State University
Ames, IA,50011-2274
Homepage: www.tengfei.name

	[[alternative HTML version deleted]]

