Please answer to lyx-users.

Hans Kunkell wrote:
> > This is strange. tex2lyx adds this command to the preamble for me.
>
> I am running LyX/Mac. Can it perhaps be the problem?

I don't think so.

> >> but when adding the usepackage statement in the
> >> preamble I get the error "Undefined control sequence" for
> >> \includegraphics.
> >
> > Isn't the graphic imported natively? If it is imported as ERT, you need
> > to add \usepackage{graphicx} to the preamble.
>
> Yes, you are right. But after adding that I get the error: "Can not
> determine size of graphic in /Users/hans/bild.png". It is a file which I
> know works in LyX when I insert it the ordinary way.

You are using a png graphic. Ordinary latex cannot deal with that format (only 
pdflatex can). If you use LyX's graphic insertion method, LyX converts the 
graphic to eps automatically before running latex.

Jürgen

Reply via email to