GeneralUrgent -- Insert an image

LaTeX specific issues not fitting into one of the other forums of this category.
Annieken
Posts: 17
Joined: Tue Aug 19, 2008 3:41 pm

Urgent -- Insert an image

Post by Annieken »

Hi

I'm already trying for hours to insert a figure into my LaTeX-file. I've searched for almost whole internet but with the code everyone's giving me, I can't force to make it to a succes.

My code:

Code: Select all

\begin{figure}[t]
\centering
\includegraphics{Layout.eps}
\caption{}
\label{fig:}
\end{figure}
I've already converted the .JPEG-file into a .eps-file (with a convertor).

In my main-file I've got next code

Code: Select all

\documentclass[11pt, a4paper, makeidx]{memoir}
\input{style.tex}
\usepackage{graphicx}
\begin{document}
The picture I want to insert is in the file of my LEdprojects.

I hope someone can help me!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Urgent -- Insert an image

Post by Stefan Kottwitz »

Hi Annieken,

first, I would not convert jpg to eps, I would use the jpg file and compily directly to pdf by pdflatex, to keep good quality. Or is there a reason not to use pdflatex, to use eps/ps instead?
Please post your logfile as attachment, with information contained in the log we hopefully could give advice that helps.

Stefan
LaTeX.org admin
Annieken
Posts: 17
Joined: Tue Aug 19, 2008 3:41 pm

Re: Urgent -- Insert an image

Post by Annieken »

Hi

No, there is no reason, but I've read it that I should do it.
Attachments
Eindwerk.log
(24.74 KiB) Downloaded 296 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Urgent -- Insert an image

Post by Stefan Kottwitz »

Hi Annieken,

the logfile is incomplete.
Did you see warnings, error messages? After a quick view into the logfile, I recommend: try

Code: Select all

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
because there are a lot of font warnings.

Try to use pdflatex (output profile: LaTeX => PDF, not LaTeX=>PS=>PDF etc.) and use the jpg file, after that post the new logfile.

Stefan
LaTeX.org admin
Annieken
Posts: 17
Joined: Tue Aug 19, 2008 3:41 pm

Urgent -- Insert an image

Post by Annieken »

I've did what you said:
In the main

Code: Select all

\documentclass[11pt, a4paper, makeidx]{memoir}
\input{style.tex}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\begin{document}
In the chap:

Code: Select all

\begin{figure}[t]
\centering
\includegraphics{Algoritme.JPEG}
\caption{}
\label{fig:}
\end{figure}
First I pressed F9 after that I tried to make a PDF (it's got 1 page, but there are 34pages)
Attachments
Eindwerk.log
(24.78 KiB) Downloaded 269 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Urgent -- Insert an image

Post by Stefan Kottwitz »

Check if the filename is correct: Algoritme.JPEG, of if it's called Algoritme.JPG or Algoritme.jpg or different. That file cannot be found.

Stefan
LaTeX.org admin
Annieken
Posts: 17
Joined: Tue Aug 19, 2008 3:41 pm

Re: Urgent -- Insert an image

Post by Annieken »

Everything is written exactly the same.
The picture is stored in C:/Users/An/Documens/LEdprojects/Algoritme.JPEG

By the way: when I held my cursor on the word "\includegraphics", it says unknown TeX/LaTeX command...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Urgent -- Insert an image

Post by Stefan Kottwitz »

Additionaly, check your preamble and the file style.tex, if you find the option dvips like in

Code: Select all

\usepackage[dvips]{graphicx}
or

Code: Select all

\usepackage[dvips]{color}
remove the dvips from every options. With it pdflatex cannot work.

Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Urgent -- Insert an image

Post by Stefan Kottwitz »

Annieken wrote: when I held my cursor on the word "\includegraphics", it says unknown TeX/LaTeX command...
No problem, because \includegraphics is not a basic LaTeX command, it's defined by the package graphicx/graphics.

Stefan
LaTeX.org admin
Annieken
Posts: 17
Joined: Tue Aug 19, 2008 3:41 pm

Urgent -- Insert an image

Post by Annieken »

In my style.tex I didn't found it:
(only those)

Code: Select all

\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{booktabs}
\usepackage{stmaryrd}
\usepackage{url}
\usepackage{longtable}
\usepackage[figuresright]{rotating}
And I don't understand preamble but I think it's my Eindwerk.tex and there is also no code what you're saying.

Do you want to have all the files?
Post Reply