Graphics, Figures & TablesImage appearing in wrong Place

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Tom_24601
Posts: 10
Joined: Tue Dec 27, 2011 3:37 pm

Image appearing in wrong Place

Post by Tom_24601 »

Hi everybody,

this is a problem that it is difficult to produce a minimum worked example for as there are many other examples in my code that work perfectly and yet this one, that to me seems to be identical, is giving me problems - however, if it is absolutely necessary I will try to build an MWE.

Basically, I am including an image in the header of the first page of my document which is called by an absolute path (this is in my custom document class). In the main body of text of the ordinary document, I include another image (but not in a float environment as I am using the multicols package). This is really the only relevant code:

Code: Select all

\includegraphics[width=\columnwidth]{Picture of the month}
as everything around this is just text.

However, as well as showing up where this code appears, it also replaces the image in the header of the first page. I have other images throughout the document, but when I comment out the input for this one image everything works as it should, so it is obviously not a general problem.

Has anybody seen anything like this before or have any idea what is going on? Many thanks.
Last edited by Tom_24601 on Mon Jan 09, 2012 8:01 pm, edited 1 time in total.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Image appearing in wrong Place

Post by localghost »

Tom_24601 wrote:[…] this is a problem that it is difficult to produce a minimum worked example for as there are many other examples in my code that work perfectly and yet this one, that to me seems to be identical, is giving me problems - however, if it is absolutely necessary I will try to build an MWE. […]
I'm afraid there is no way round.


Thorsten
Tom_24601
Posts: 10
Joined: Tue Dec 27, 2011 3:37 pm

Re: Image appearing in wrong Place

Post by Tom_24601 »

I think I've sorted it, looking through the log - I was inputting a few different files and the compiler seemed to choose a random one to use to load the image in the header. And if that particular file happens to contain an image already, it will happily replace the image that is supposed to go in the header with that image.

So I've just changed the order of the files being input and it seems to be behaving itself. It would still be interesting to know why it does things that way and whether there's any way around it though.
Post Reply