LyXFigure on separate page

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
baropalma
Posts: 14
Joined: Fri Apr 05, 2013 11:25 pm

Figure on separate page

Post by baropalma »

Hi all,

I'm having a problem placing a figure into my document. I am using a modified dissertation class, which must be part of the problem.

When I insert an image, no matter how small I make it, the figure always prints as a separate page (the page following the text where the figure float is placed). I would prefer it to just take half of the page, with the text continuing below it.

Does anyone know what could be forcing the page break around the figure? I looked in the TeX code of the class file, and couldn't seem to find anything. Any ideas?

Thanks!

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Figure on separate page

Post by Johannes_B »

Hi,

hard to tell with so little information. You mention floats, so i guess you are very aware of the mechanism.
Have you checked if the picture has some additional white space? Easy if you put an \fbox around it.

If it is really related to the class file, you need to prepare a little test case and post it along with the class file you are using.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
baropalma
Posts: 14
Joined: Fri Apr 05, 2013 11:25 pm

Re: Figure on separate page

Post by baropalma »

Thanks for your reply.

However, I'd rather not post the class file, and I don't really know how to make a test case.

The strange thing is: the figure is in a child document, and when I compile the child document (using article), the image shares the page with the text. When I compile the parent document (using this dissertation class), the image appears on its own separate page.

I was hoping there would be an easy fix: some command to make it clear that figures shouldn't be separated onto their own pages.

Thanks anyway!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Figure on separate page

Post by Johannes_B »

There is always the [H]ammer method. That means preventing the figure from floating around, but this will lead to big wholes in the document, it will look like swizz cheeze.

You can export your minimal document to LaTeX. That document should be minimal in a way, that it still shows the problem and should be rather short.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
baropalma
Posts: 14
Joined: Fri Apr 05, 2013 11:25 pm

Re: Figure on separate page

Post by baropalma »

Well, I solved my own problem. For those interested, it was based on a dumb mistake: not resizing the image appropriately. For those who want their figures to share the page with text: the image has to be small enough to fit on one half of the page, no bigger (I believe).
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Figure on separate page

Post by Johannes_B »

It needs to be just a bit smaller than the available space.

Glad to hear that you could resolve your problem.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply