General ⇒ Including *.eps figure in Latex
Including *.eps figure in Latex
Hi,
I need to include a *.eps figure in Latex. I am using the following code:
\begin{figure}[ht]
\centering
\includegraphics[type=eps, read=.eps, width=0.5\textwidth]{LBP_4si.eps}
\caption{abcdefg}
\label{fig:comparisondiagram}
\end{figure}
I have also used \usepackage{graphicx} in the header.
I am getting a blank space for the figure in my output page. but it doesn't show the figure. I have tried to do this with
Latex => PDF
Latex=> PS
Latex=>DVI format.
But got no result in any format. Hope to get some useful tips. Thanks a lot.
BR,
Pavel
I need to include a *.eps figure in Latex. I am using the following code:
\begin{figure}[ht]
\centering
\includegraphics[type=eps, read=.eps, width=0.5\textwidth]{LBP_4si.eps}
\caption{abcdefg}
\label{fig:comparisondiagram}
\end{figure}
I have also used \usepackage{graphicx} in the header.
I am getting a blank space for the figure in my output page. but it doesn't show the figure. I have tried to do this with
Latex => PDF
Latex=> PS
Latex=>DVI format.
But got no result in any format. Hope to get some useful tips. Thanks a lot.
BR,
Pavel
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Including *.eps figure in Latex
Hi Pavel,
welcome to the board!
Do you get any warnings?
Check if you used the draft option for graphicx or for your document class.
Stefan
welcome to the board!
Do you get any warnings?
Check if you used the draft option for graphicx or for your document class.
Stefan
LaTeX.org admin
Re: Including *.eps figure in Latex
Hi,
Even I am encountering similar problem. For me I feel its something to do with my software TeXnic Center, as I had other sample LaTex files and for them also it in not compiling the figures in the file. I am using standard output as PDF, although I tried with PS and DVI too.
Thanks
Even I am encountering similar problem. For me I feel its something to do with my software TeXnic Center, as I had other sample LaTex files and for them also it in not compiling the figures in the file. I am using standard output as PDF, although I tried with PS and DVI too.
Thanks
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Including *.eps figure in Latex
Hi Veeral,
welcome to the board!
What code do you write to include the figure? What format does it have?
Perhaps post your logfile as attachment here, we could try to find the cause by reading it.
Stefan
welcome to the board!
What code do you write to include the figure? What format does it have?
Perhaps post your logfile as attachment here, we could try to find the cause by reading it.
Stefan
LaTeX.org admin
Re: Including *.eps figure in Latex
Thanks Stefan
This one is by all the ones used in the example I am using
\begin{figure}[h]
\centering
\epsfig {file = graphruin.eps}
\label{Risk Process}
\caption{Risk Process}
\end{figure}
I tried this one generated by TC
\begin{figure}
\centering
\includegraphics{graphruin.eps}
\caption{Classical Risk Process}
\label{fig:Risk Process}
\end{figure}
This one is by all the ones used in the example I am using
\begin{figure}[h]
\centering
\epsfig {file = graphruin.eps}
\label{Risk Process}
\caption{Risk Process}
\end{figure}
I tried this one generated by TC
\begin{figure}
\centering
\includegraphics{graphruin.eps}
\caption{Classical Risk Process}
\label{fig:Risk Process}
\end{figure}
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
Including *.eps figure in Latex
Hi Veeral,
I don't use the old epsfig package, I recommend graphicx instead, with \includegraphics like in your second try. The second code snippet looks well. Don't forget
in your preamble. Do yo get an error message? Could you post the logfile as attachment? Messages, warnings and errors listed in the logfile may help to solve this problem.
Stefan
I don't use the old epsfig package, I recommend graphicx instead, with \includegraphics like in your second try. The second code snippet looks well. Don't forget
Code: Select all
\usepackage{graphicx}
Stefan
LaTeX.org admin
Including *.eps figure in Latex
Hi attaching the log file. There are many other errors. Some of which if I remove, it does not give me a proper output. And I think this is the one right now with which we are working.
! LaTeX Error: Unknown graphics extension: .eps.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.59 \includegraphics{graphruin.eps}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
[3]
- Attachments
-
- thesis.log
- (18.51 KiB) Downloaded 596 times
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Including *.eps figure in Latex
Hi Veeral,
pdflatex does not support eps files, that means the output profile LaTeX => PDF is not the right choice. The logfile was produced by pdflatex, that cannot work (only if you convert graphruin.eps to graphruin.pdf using epstopdf or similar tool).
You said you've tried LaTeX => PS => PDF or similar, producing dvi and ps, please show the logfile corresponding to that compilation.
Stefan
pdflatex does not support eps files, that means the output profile LaTeX => PDF is not the right choice. The logfile was produced by pdflatex, that cannot work (only if you convert graphruin.eps to graphruin.pdf using epstopdf or similar tool).
You said you've tried LaTeX => PS => PDF or similar, producing dvi and ps, please show the logfile corresponding to that compilation.
Stefan
LaTeX.org admin
Including *.eps figure in Latex
Thanks a ton Stefan,
In DVI and PS it seems to be working. I think its the change you suggested seems to be working.
Still attaching a similar log file (its not the same but images didnt come up in this one also) just in case if that helps you.
In DVI and PS it seems to be working. I think its the change you suggested seems to be working.
Code: Select all
I recommend graphicx instead, with \includegraphics like in your second try. The second code snippet looks well. Don't forget
Code:
\usepackage{graphicx}
Still attaching a similar log file (its not the same but images didnt come up in this one also) just in case if that helps you.
- Attachments
-
- Thesis.log
- (7.74 KiB) Downloaded 574 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Including *.eps figure in Latex
You still have invalid code in your document which causes an error. The message is very specific.Veeral wrote:[...] Still attaching a similar log file (its not the same but images didnt come up in this one also) just in case if that helps you.
Code: Select all
Section 2.2.
! Undefined control sequence.
l.319 \epsfig
{file=mapping.eps,width=5.0in}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10