Graphics, Figures & TablesIncluded Graphics appear without Caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
vkowa
Posts: 4
Joined: Thu Feb 16, 2012 8:22 am

Included Graphics appear without Caption

Post by vkowa »

I am experiencing an annoying problem with including graphics file in LaTeX. I have generated some postscript files in Mathematica.

The first file when inserted into my LaTeX files compiles nicely and appears with the caption heading graph as it should using the includegraphics command. However, when I insert the second postscript file later in the document, the graph appears, but on this occasion there is no caption or label at the bottom of the figure.

In fact the document, which is not large appears on a blank page. Using \clearpage before the inserting the figure does not help much. Later on I insert another postscript file containing a graph. Again the graph appears, but with no caption and on a separate page. Is there anybody who can explain what is going on?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Included Graphics appear without Caption

Post by Stefan Kottwitz »

Hi vkowa,

welcome to the board!

Perhaps show us the code which you are using for including the picture, which means at least the figure environment with \caption, \includegraphics etc. For now, it's a quite theoretical issue. The best would be a Infominimal working example supplemented by the picture as forum post attachment.

Stefan
LaTeX.org admin
vkowa
Posts: 4
Joined: Thu Feb 16, 2012 8:22 am

Included Graphics appear without Caption

Post by vkowa »

Hi Stefan,

I am trying again.
  1. Thanks for offering to look into my problem. Some years ago I had success with the forum with gmedina helping me out. I went to look for old query in 2009, but could not find it. Then I was registered as …¹.
  2. Anyway, to the matter at hand. I have created a smaller version of the latex file that I wrote to you about in my query. The actual file is over 150 LaTeX pages, but this snippet is only a few pages and shows the problem. I have also uploaded the two postscript files that I have produced via Mathematica. If you latex the file and bring up the DVI version, then you'll see that the first file appears with the caption but the other file does not. The second file also appears on its own without any typing before or after as it does in the original.
  3. I hope this will make the problem more clearer for you. I have consulted other users of LaTeX, but they don't seem to know what is going on either.

Cheers,
Victor


¹ E-mail address removed.
Last edited by vkowa on Fri Feb 17, 2012 4:18 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Re: Included Graphics appear without Caption

Post by Stefan Kottwitz »

The attachments are still missing - what did you try?

Go below the edit field, click on "Upload attachment", browse and add your files.

Stefan
LaTeX.org admin
vkowa
Posts: 4
Joined: Thu Feb 16, 2012 8:22 am

Included Graphics appear without Caption

Post by vkowa »

Hi Stefan,

That's what I have been doing. I get into the browser, upload the files from my sub-directory and then send them to you. I am going to try again. ltxforumprob.tex is the sample latex file while the other are the postscript files. I have uploaded all three files in the same manner as the other day and placed them inline.


Cheers,
Victor


Edit: No e-mail addresses in posts!
Attachments
plot2b.ps
Second Postscript File
(143.58 KiB) Downloaded 183 times
JCoeff.eps
First Postscript File
(21.13 KiB) Downloaded 167 times
ltxforumprob.tex
Sample File
(5.42 KiB) Downloaded 145 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Included Graphics appear without Caption

Post by Stefan Kottwitz »

Hi Victor,

your file plot2b.ps is PostScript, but not encapsulated PotScript (EPS). You should produce EPS or convert it to EPS. I attach a converted file, try this. When I used this instead, the caption was printed, in contrast to the situation with the PS file.

Stefan
Attachments
plot2b.eps
(143.62 KiB) Downloaded 168 times
LaTeX.org admin
vkowa
Posts: 4
Joined: Thu Feb 16, 2012 8:22 am

Included Graphics appear without Caption

Post by vkowa »

Guten Tag, Stefan.
  1. Vielen Dank.
  2. Yes, it works when I convert the files to EPS. The JCoeff file was done years ago and is an encapsulated postscript file. That was using done by using an older version of Mathematica. It seems the more recent versions of the software only save files in postscript.
  3. Anyway, it is working quite nicely and even embeds the figures within the text instead of creating a whole new page.
  4. One final thing. I was wondering whether my LaTeX forum query of July-August 2009 is still available. I think it would have come under the headers/footers section, but I am not sure. I was dealing with Gonzalo Medina at the time and eventually it resulted in developing a style file that people could used to create their own books. When I looked the other day, I could not locate it.

Regards,
Victor.
Post Reply