GeneralHow do I show a picture

General information and discussion about TeXnicCenter
Post Reply
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

How do I show a picture

Post by akira32 »

How do I show a picture?

\begin{figure*}[tcb] \centering \includegraphics[width=1.0\textwidth]{result2} \caption{The input test images. Images 7 and 8 are arbitrarily collected in the internet.} \label{fig:result2} \end{figure*}

I had put the result2.eps in the root for directory.
Why can I not see the picture of "result2.eps"?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How do I show a picture

Post by gmedina »

Maybe you are using PDFLaTeX and eps images won't be recognized. Try the following example: copy and paste the below code and process this new document with latex (not PDFlatex) to get a .dvi file:

Code: Select all

\documentclass{report}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.eps}

\begin{document}

\begin{figure}[htb]
   \centering
   \includegraphics[width=.5\textwidth]{result2}
   \caption{test image}
   \label{fig:result2}
\end{figure}

\end{document}
Remarks: 1) make sure that the file resul2.eps is in the same directory as the above .tex file (this restriction can be avoided, but do it this way for the moment).
2) Process the document using latex, not pdflatex.
3) If you want to use pdflatex directly, then you should work with images with extensions .pdf .png .jpg
1,1,2,3,5,8,13,21,34,55,89,144,233,...
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Re: How do I show a picture

Post by akira32 »

\documentclass[12pt]{report}

\usepackage{graphicx}
\DeclareGraphicsExtensions{.eps}

I add the three lines and it appears an error as below:
LaText Error: unkown graphic extension .eps
See the LaTex manual or LaTex Companion for explanation.
Type H <return> for immediate help.
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Re: How do I show a picture

Post by akira32 »

I get the answer that Build Ouput must be "LaTex ==> PS => PDF".
Post Reply