0

I am writing a longer article and my pictures keep getting put at the end of my article or spread around. Is there a command which forces LaTeX to compile up to that point before continuing?

    Voorbeelden van hoe de beren onder bepaalde apartheids gebieden.
\import{/}{pictures.tex}

\newpage
We hebben alle vier de opstellingen 500 keer laten lopen en daarvan de gemiddelde stappen en segregatie bepaald.

\begin{tabular}{|c|c c c c|}
\hline
-&\text{Lijn in het midden}&\text{1 veld lengte 4}&\text{1 veld lengte 2}&\text{2 velden lengte 3}\\
\hline
\text{stappen}&12.714&13.564&13.340&12.054\\
\text{S1 voor type groen}&93.872&99.004&91.608&91.824\\
\text{S1 voor type rood}&53.376&51.076&49.564&54.164\\
\text{S2}&19.336&15.578&21.938&19.014\\
\hline
\end{tabular}

The pictures from the imported file are currently put underneath the tabular. Even though I put in a \newpage, I have tried using [!ht] and those things, but nothing worked. Is there another solution?

Stefan Pinnow
  • 29,535
Jan
  • 1
  • Welcome, do not use a figure environment i you want to control where pictures are placed. By using the environment, LaTeX controls the placement. – Johannes_B Apr 09 '17 at 12:26
  • Welcome to TeX.SX! I can only guess since you don't show us a complete document (what does your preamble look like? What does \import do, what is in pictures.tex). Y?ou have probably wrapped your pictures into table or figure environments. Remove the environment, load the package caption or capt-of, and use \captionof{figure}{...} instead of \caption. – gernot Apr 09 '17 at 12:27
  • 1
  • @gernot in addition: If your file uses one of the KOMA-classes, the usage of the caption-package is not necessary. In KOMA-script the command \captionof already exists (as well as \captionbelowof and \captionaboveof). – Skillmon Apr 09 '17 at 12:54
  • 1
    @Skillmon Good point. Again the problem of the missing preamble in OP's code. – gernot Apr 09 '17 at 12:56
  • you haven't shown any relevant code so it is hard to help although [!ht] makes the figure more likely to float to the end as its main effect is to prevent the figure being placed on a float page or at the bottom of a text page. – David Carlisle Apr 09 '17 at 15:38
  • the command that flushes all pending floats is \clearpage so perhaps that is all the answer you need? – David Carlisle Apr 09 '17 at 15:39

1 Answers1

1

If you replace \newpage by \clearpage in your fragment, then no floats will float past that point.

David Carlisle
  • 757,742