If I insert an image, then it is shown at the next page. Why do Latex a page break?

My code is:

 1208. \\ 
  • Perhaps it's at the bottom of the page. You need to give at least some clues, preferably a complete small document that shows the problem. The \\ are almost certainly not helping. – David Carlisle Jun 17 '13 at 11:13
  • 1
    Note figure is a floating environment, it's main purpose is to allow the system to move the figure, usually to the top of this or the next page. – David Carlisle Jun 17 '13 at 11:15

If you want to force the picture to be printed where you want, you might be looking for the float package. It provides the new option H to the figure placement which prevents the picture to be moved elsewhere.

\documentclass{article}% or whatever
\usepackage{float}% provides the H option to figure environment
\begin{figure}[H]% Specify the H option to force the placement exactly where figure enviromnent is called
  • why use [H] why not simply remove `figure' ? – David Carlisle Jun 17 '13 at 11:48
  • I guess for instance if you want to add a caption then the figure environment is needed. Anyway, this is the solution I personally have been using so far. – AndreasT Jun 17 '13 at 11:56
  • 2
    I wish I had never implemented [H] :-) – David Carlisle Jun 17 '13 at 12:32
  • 1
    Note that the [H] location directive does not (and cannot) guarantee that the float will be on the same page as the immediately preceding material; if there's not enough space left on the current page, the float will have to be placed on the following page. – Mico Jun 17 '13 at 12:34
  • My opinion is that if an illustration doesn't need a caption, it shouldn't be placed in a figure environment, but probably inside center. If it requires a caption, then leave it float. – egreg Jun 17 '13 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.