3

I'm writing document in Latex with Texmaker. My document looks like something that:

\subsection{Title 1}
\qquad Some text....
\\ Some text....

Some text:
\begin{itemize}
\item item1
\item item2
\item item3
\item item4
\end{itemize}

Some text:
\begin{itemize}
\item item1
\item item2
\item item3
\item item4
\end{itemize}

Some text...

\begin{figure}[h]
\centering
\includegraphics{czynnosci_serwer.jpg}
\caption{text}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[scale=0.7]{czynnosci_klient.jpg}
\caption{text}
\end{figure} 

\newpage
\subsection{Title 2}
\qquad Some text

\begin{figure}[h]
\includegraphics[scale=0.8]{klasy_serwer.jpg}
\caption{text}
\end{figure}
\begin{figure}[h]
\includegraphics[scale=0.75]{klasy_klient.jpg}
\caption{text}
\end{figure}

\newpage
\subsection{Title 3}
\qquad some text

And the problem is that graphics are put after all text, on the last page. I don't know where is a problem. I always put image in this way and have no problem. My header:

\documentclass[12pt, a4paper]{mwart}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage{ftnxtra}
\usepackage{graphicx}
\usepackage{listings} 
4
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    May 17, 2014 at 13:46
  • Your figures float away, i.e. LaTeX positions them at places where is enough space for it. If you do not want this behaviour, remove the figure environment and write \captionof{figure}{text}. Do not forget to \usepackage{caption} for this to work.
    – user31729
    May 17, 2014 at 13:47
  • 1
    Never use [h] that is explicitly saying the figure can not go at the top, botom or on a page on its own, so you get a warning from latex and it probably goes to end of document. use [htp] also do not start your sections with \qquad! If you want initial paragraphs indented use \usepackage{indentfirst} The normal LaTeX style is to suppress indentation after a heading (\quuad will not insert the same indentation as other paragraphs, but it would be the wrong markup even if it made the correct space) May 17, 2014 at 13:53
  • @DavidCarlisle It works! Thank you very much :)
    – Artek
    May 18, 2014 at 10:45

3 Answers 3

5

Never use [h] that is explicitly saying the figure can not go at the top, bottom or on a page on its own, so you get a warning from latex and it probably goes to end of document.

Use [htp]

Also do not start your sections with \qquad! If you want initial paragraphs indented use

\usepackage{indentfirst} 

The normal LaTeX style is to suppress indentation after a heading (\quuad will not insert the same indentation as other paragraphs, but it would be the wrong markup even if it made the correct space)

0
0

I have another problem with display graphic. I have code

\newpage
\subsection{Title}
Text 1
\\ Text 2:
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image1.jpg}
\caption{Caption 1} 
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image2.jpg}
\caption{Caption 2}
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image3.jpg}
\caption{Caption 3} 
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image4.jpg}
\caption{Caption 4}
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image5.jpg}
\caption{Caption 5}
\end{figure}

Text 3
\begin{figure}[htp]
\centering
\includegraphics{image6.jpg}
\caption{Caption 6}
\end{figure}
\begin{figure}
\centering
\includegraphics{image7.jpg}
\caption{Caption 7}
\end{figure}
\begin{figure}
\centering
\includegraphics{image8.jpg}
\caption{Caption 8}
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics{image9.jpg}
\caption{Caption 9}
\end{figure}
\begin{figure}
\centering
\includegraphics{image10.jpg}
\caption{Caption 10}
\end{figure}
\begin{figure}
\centering
\includegraphics{image11.jpg}
\caption{Caption 11}
\end{figure}'

And Text 3 is displaying after image1, not image5. Where is the problem?

0
0

For your second question,

Latex puts figures where it think is the best fit. If you want to force a figure not to go beyond a certain point, you can use \FloatBarrier from the package placeins.

Also please try to ask 1 question per topic.

Edit:

Try this

\newpage
\subsection{Title}

\FloatBarrier 

Text 1
\\ Text 2:
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image1.jpg}
\caption{Caption 1} 
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image2.jpg}
\caption{Caption 2}
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image3.jpg}
\caption{Caption 3} 
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image4.jpg}
\caption{Caption 4}
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{image5.jpg}
\caption{Caption 5}
\end{figure}

\FloatBarrier

Text 3

\FloatBarrier

\begin{figure}
...
4
  • I put \FloatBarrier after image5 and it works. But now I have something like that: link. But I want this: link. Sorry that I wrote another question in this topic.
    – Artek
    May 18, 2014 at 18:54
  • See my edit. Does this work?
    – Trefex
    May 18, 2014 at 18:58
  • Unfortunately it doesn't work. Nothing change.
    – Artek
    May 18, 2014 at 19:02
  • Please post a new question with a fully working MWE.
    – Trefex
    May 18, 2014 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .