General ⇒ Page positioning of graphs
Page positioning of graphs
I am writing an official document and I ran across the following problem. When I insert a figure, it is automatically aligned at the top of the page and not at the point where the text flows. The problem is that the figures are associated wit the text and sometimes it is the case that the figures are aligned before the text on the same page, or even on previous pages, which definitely doesn't make much sense.
Can you please tell me how to force a graph to follow the relevant text and not to precede it?
Thank you very much!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Page positioning of graphs
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{[fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{center}
\rule{6.4cm}{3.6cm} % replace this with your graphics file
\captionof{figure}[Dummy figure entry to the ToC]{Dummy figure}\label{fig:dummy}
\end{center}
\blindtext
\end{document}
Best regards and welcome aboard
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10