Graphics, Figures & Tablesquestion about graphicx

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
magician87
Posts: 4
Joined: Thu Nov 04, 2010 7:52 pm

question about graphicx

Post by magician87 »

Hi,
I am a beginner with LaTeX and I encountered a problem like this

Code: Select all

\usepackage{graphicx}
...
\begin{figure}[hbt]
\centering\includegraphics{products}
\caption{}\label{Fi:products}
\end{figure}
according to all the sources that I found on the webs, this piece of code should work (the figure file is products.eps, and is in the same folder with the tex file). However, my LaTex Editor (LEd build 0.536501) doesn't recognize \includegraphs as a command of TeX/LaTeX.
I didn't know if graphicx was installed correctly or not, so I searched, and found that graphicx is kind of an 'extended' package of graphics. So it should be installed already with graphics. Is this right?
Anyway, the \includegraphs command is not recognized. Did any of you have experience on this, please help me. Thanks a lot.
Btw, I am using MikTeX 2.8.
Last edited by magician87 on Fri Nov 05, 2010 5:44 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
coachbennett1981
Posts: 269
Joined: Fri Feb 05, 2010 10:15 pm

Re: question about graphicx

Post by coachbennett1981 »

Have you tried using the \usepackage{graphics) also?
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

question about graphicx

Post by localghost »

magician87 wrote:[…] However, my LaTex Editor (LEd build 0.536501) doesn't recognize \includegraphs as a command of TeX/LaTeX. […] Anyway, the \includegraphs command is not recognized. […]
The command is called \includegraphics. See the graphicx manual for details.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
magician87
Posts: 4
Joined: Thu Nov 04, 2010 7:52 pm

question about graphicx

Post by magician87 »

coachbennett1981 wrote:Have you tried using the \usepackage{graphics) also?
I tried that, too. But it doesn't work, either.
The command \includegraphics is still not recognized.
localghost wrote:The command is called \includegraphics. See the graphicx manual for details.
It's just my mistake in writing, I used \includegraphics in my code.

Anyone has any idea?

P.S: I also have some confusion: in the manual of graphicx, the download link is that of graphics. Does this mean if I install graphics, graphicx is also installed? If not then where and how can I find the package graphicx and install it manually?
I used MiKTeX 2.8 Package Manager to remove and install package graphics again from the repository http://tug.ctan.org and some other repository, so I guess the package that I have should be the one updated recently. Why still is the command not recognized? Is the command included in the lastest version of the package? or what wrong did I do that made the command unrecognized by LEd?
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

question about graphicx

Post by meho_r »

So, have you tried to compile your document from Command Prompt directly or by using another editor (e.g. TeXWorks, Texmaker or any other)?

As you can see from here, graphicx is part of graphics bundle, so you should have it installed.

Your code from above works for me:

Code: Select all

\documentclass{article}

\usepackage[demo]{graphicx}

\begin{document}
\begin{figure}[hbt]
\centering\includegraphics{products}
\caption{}\label{Fi:products}
\end{figure}
\end{document}
magician87
Posts: 4
Joined: Thu Nov 04, 2010 7:52 pm

question about graphicx

Post by magician87 »

meho_r wrote:So, have you tried to compile your document from Command Prompt directly or by using another editor (e.g. TeXWorks, Texmaker or any other)?

As you can see from here, graphicx is part of graphics bundle, so you should have it installed.
I'm using LaTex Editor (LEd build 0.536501) as editor.
I tried both compling from Command Prompt & the editor. The results are the same T_T
The code should work because I just retype it from a book, so I guess the problem is my installations.
I first installed MiKTex 2.8, and then LEd (last version). When the \includegraphics command is not recognized, I tried remove and reinstalled the package graphics using MiKTeX Package Manager. Could you think of anything wrong that might happen in my installations?
Another question: Did you guys ever have to install graphics package manually, or it was already included in your program and worked properly?


*** Problem solved ***
Thanks guys, it turned out that it was not my MiKTeX or LEd or any package installation's problem. It was the problem of configuring DVI viewer in LEd. I found the solution here.
In sum, everything was actually OK, the figure was inserted; the command \includegraphics was not recognized because I did not tick the option for TeX/LaTeX - Packages graphics and graphicx in the Options>Application>Group definitions; the figure was not shown on the DVI viewer built in LEd, but could be seen on the DVI viewer provided by MiKTeX or when printed into PDF, which can be fixed by following the link above.
Post Reply