0

I am writing a lab report and I want to display the a table underneath my Results section. This is my code:

code

However, the result looks like this:

output

Why is this the case? Thanks!

  • 2
    It would be great if you would post code as code, using text instead of an image. – Stefan Kottwitz Apr 17 '15 at 6:54
  • What document class are you using? As you haven't defined where the float can go it'll go to the default defined by the document class. This might help. – Christopher Apr 17 '15 at 6:54
  • I'm using \documentclass[a4paper,12pt]{article} – Andy Apr 17 '15 at 7:11
  • Then as you can see from the link I posted the default positions are [tbp] which makes sense as your table is at the top of the page. If you don't want it to float then you don't need to use a floating environment (table). If you do then tell it where the float can be placed. – Christopher Apr 17 '15 at 7:28
  • 1
    A little tip about the table layout: load the package booktabs and replace your \hline with booktab's \toprule. The spacing is far better. – JBantje Apr 17 '15 at 8:56
1

The issue here is that you haven't specified where the float can actually go. This means that it will go to the default position defined by the document class. As you're using the article class that means the default is [tbp].

Your table appears to be at the top of the page. So you can either tell it to go somewhere else with, for example, h or arguably if you don't want it to float then don't use the table environment altogether.

You can use the \captionof command as described here to keep your caption if you want to remove the table environment.

|improve this answer|||||

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