Graphics, Figures & TablesGraphics are not where I want them to be

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Celleb
Posts: 3
Joined: Mon Jun 04, 2012 3:06 pm

Graphics are not where I want them to be

Post by Celleb »

Hi,

I have started to work with Latex by using a template provided by my university department. Unfortunately I am running into problems with graphics. I use this code to implement a picture:

Code: Select all

Durch grafische Lösung ergeben gerade Wellenfunktionen aus dem ersten Fall die Schnittpunkte P, die ungeraden Wellenfunktionen aus dem zweiten Fall die Schnittpunkte I:
\begin{figure}[h]
  \centering
    \includegraphics[width=0.90\textwidth]{Figures/Bilder/grafische_Loesung.jpg}
\end{figure}
and it works just fine as I want it to be:
good.JPG
good.JPG (46.74 KiB) Viewed 4272 times
But on other occasions Latex just puts it somewhere else:

Code: Select all

\section{Potentialtopf}

\subsection{Töpfe mit endlicher Tiefe}
\begin{figure}[h]
  \centering
    \includegraphics[width=0.50\textwidth]{Figures/Bilder/Topf_endlich.jpg}
\end{figure}

\subsubsection{Fall $E>0$}
Dieser Fall kann gerechnet werden wie der Potentialwall mit $E>V_0$.
And the picture is somewhere at the bottom:
bad.JPG
bad.JPG (43.23 KiB) Viewed 4272 times
I thought the [h] after {figure} would put the picture just where the code is? I don't care if this results in a pagebreak.

Can somebody please help me? Thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

Graphics are not where I want them to be

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Graphics are not where I want them to be

Post by Stefan Kottwitz »

Johannes Links are very good. Just a small minor addition for keeping figures within (sub)sections: Wie kann ich das Gleiten von Abbildungen und Tabellen auf den Abschnitt begrenzen? (as I see that you write in German). You are also welcome to post on our German partner site TeXwelt.de.

Stefan
LaTeX.org admin
Celleb
Posts: 3
Joined: Mon Jun 04, 2012 3:06 pm

Re: Graphics are not where I want them to be

Post by Celleb »

Thanks guys. H instead of h did the job!
Post Reply