Graphics, Figures & Tableseps document lost all of its text and doesn't get converte

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
math8
Posts: 9
Joined: Fri Oct 05, 2012 11:19 pm

eps document lost all of its text and doesn't get converte

Post by math8 »

I was able to include a figure in my Latex document using a Matlab figure that I had previously converted into .eps format. However, the figure in latex has lost all of its text and the axis do not have labels and numbers anymore. I have checked using an eps viewer if my eps figure was complete, and yes, it was.

Another problem I run into, is that since I am using \usepackage{epstopdf}, I was expecting to find a pdf file with the same name as my eps figure in the directory, but it's not there. Any idea of what is going on, and how to fix this problem?

The header part looks like this:

Code: Select all

\documentclass{article}
\usepackage[all]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amscd}
\usepackage{eucal}

\usepackage[dvips]{epsfig}
\usepackage{graphicx}
\usepackage{epstopdf}

\usepackage{ulem}
\usepackage{wrapfig}
\addtolength{\hoffset}{-2cm} \addtolength{\topmargin}{-2.8cm}
\addtolength{\textwidth}{3 cm} \addtolength{\textheight}{6.2 cm}
and the figure is given by:

Code: Select all

\begin{figure}
\centering
\includegraphics{Feas_region_TEST1}
\caption{Fig. 5.1}
\end{figure}

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

math8
Posts: 9
Joined: Fri Oct 05, 2012 11:19 pm

Re: eps document lost all of its text and doesn't get conver

Post by math8 »

Turns out all text is there (when I open the pdf file directly from my documents folder, I can see everything just fine), it was just that I couldn't see it in the latex pdf viewer. However, the pdf file with the same name as the eps file was not created , and I am still not sure why.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

eps document lost all of its text and doesn't get converte

Post by Stefan Kottwitz »

So the first problem was an previewer issue.

Regarding epstopdf, it's for use with pdfLaTeX, not with LaTeX in DVI mode. Ensure that you directly compile to PDF (via pdfLaTeX), remove \usepackage[dvips]{epsfig}.

Stefan
LaTeX.org admin
Post Reply