Graphics, Figures & Tables ⇒ Position of Table within the Text
Position of Table within the Text
Hello I am new to the world of LaTeX! Would like your help for a problem I have! I place the table between the text, but when I compile, the table is in another position!Any idea what's going on?
Thank you1
Thank you1
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Position of Table within the Text
Hi,
welcome to the board!
tables are intended to float to good positions in the text, for optimal page breaking. This is automatically done by LaTeX and a great help when writing very big documents, such as books.
New users often wonder, especially when writing small documents and when they are used to word processor software, which places a table or figure exactly where it's written, no matter if half of the page would remain empty because it doesn't fit to the page and goes to the next one.
Well, I guess you use a table environment. So start it this way, for most relaxed positioning:
or use the
float package and the
Or don't use a
caption package.
Stefan
welcome to the board!
tables are intended to float to good positions in the text, for optimal page breaking. This is automatically done by LaTeX and a great help when writing very big documents, such as books.
New users often wonder, especially when writing small documents and when they are used to word processor software, which places a table or figure exactly where it's written, no matter if half of the page would remain empty because it doesn't fit to the page and goes to the next one.
Well, I guess you use a table environment. So start it this way, for most relaxed positioning:
Code: Select all
\begin{table}[!htbp]

H
option:Code: Select all
\usepackage{float}% in the preamble
...
\begin{table}[H]
table
environment at all, tabular
itself would already work. If you need numbering and a caption, you could do this with \captionof
of the 
Stefan
LaTeX.org admin
Re: Position of Table within the Text
Thanks a lot my friend!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Position of Table within the Text
Putting a table into a float environment and then prevent this environment from floating somehow doesn't make sense to me. I'd prefer one of the given alternatives and drop this option completely.Stefan_K wrote:[…] or use thefloat package and the
H
option:
[…]Code: Select all
\usepackage{float}% in the preamble ... \begin{table}[H]
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Position of Table within the Text
Hmm i think that i have the same problem with figures 

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Position of Table within the Text
And it has exactly the same solution(s) as proposed by Stefan.pape_4 wrote:Hmm i think that i have the same problem with figures :?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Position of Table within the Text
could you tell me what changes should i do in my code please?
Code: Select all
\begin{table}[h]
{renewcommand{\arraystretch}{1/3}
\footnotesize
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\textbf{epoch} &\multicolumn{2}{|c|){first}....\\
\hline
1&.. &.. &.. &..& & &
2&.. &.. &.. &..& & &
.
.
.
50&
\end{tabular}
}
\end{table}
Re: Position of Table within the Text
Since you don't use \caption, and don't want your table to float around, you can simple drop the table environment.