1

I have downloaded the package float in order to help in placing figures where I would like them. At the moment, 'All' figures are placed at the 'end' of document.

I have run the script 'float.dtx.

Subsequently, the [H] option has been inserted as seen below example; however, nothing has changed and the figures still appear at the end of document.

Does any one have an idea as to what is needed to activate the float programs appropriately or as to how to implement them?

Thank you.

%%%%% Inserting figure %%%%%%%%%%%%%%

\begin{figure}[H] 
\begin{center}
 \maketitle {\bf Title}
  \includegraphics[scale=0.9]{Figure}
 \caption{Explanatory statement}
\label{}
 \end{center} 
\end{figure}

marked as duplicate by user13907, Mico, Paul Gaborit, Zarko, Tom Bombadil Nov 22 '15 at 11:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Hi and welcome! Please provide a minimal working example (MWE). – MattAllegro Nov 22 '15 at 8:18
  • 1
    Welcome Anna, what is \maketitle supposed to do in the figure environment? It usually typesets the dcuments title including your name and the date. – Johannes_B Nov 22 '15 at 8:42
  • Apart from that, the command \bf is obsolete and should be replaced by \bfseries. The center environment adds extra vertical space, that you most likely not want. You can replace it by \centering. – Johannes_B Nov 22 '15 at 8:43
  • 1
    Did you put \usepackage{float} after documentclass? – Johannes_B Nov 22 '15 at 8:45
  • @Johannes_B no:-) – David Carlisle Nov 22 '15 at 10:52
2

Why do you need the float package ?

First read about figure placement and try with the following:

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}[!htbp] 
  \centering
  \textbf{Your title}\\
  \includegraphics[width=.5\textwidth]{fig}
  \caption{Explanatory statement \label{fig:fig1}}
\end{figure}

\end{document}
  • 2
    that does not ensure that the figure is placed exactly here. – Johannes_B Nov 22 '15 at 8:44
  • Yes, but the main problem here was I quote: "All' figures are placed at the 'end' of document", therefore it preferably not advised to use H ... if 'exactly here' is needed then why use a floating env ? see here: tex.stackexchange.com/a/8631/75098 – neok Nov 22 '15 at 9:19
  • @neok H floats wil never go to the end of the document if H is defined. So the OP had not loaded the float package. – David Carlisle Nov 22 '15 at 10:52
1

Your demand is against to basic rule of TeX/LaTeX: figures and tables (and similar object) should be in float environments that can be moved to place, where the best fit into the text ...

To achieve, what you like, is the simplest way not to use floats. Just put figure directly in text and for caption use \captionof from package caption or small package captionof when you like to use caption formatting facility of used document class:

\documentclass{article}
    \usepackage{graphicx}
    \usepackage{capt-of}

    \usepackage{lipsum}

\begin{document}
    \lipsum[1]
\begin{center}
    \includegraphics[width=0.5\textwidth]{example-image}
\captionof{figure}{My caption}
    \label{fig:mc-1}
\end{center}
See Fig.~\ref{fig:mc-1} ...
    \lipsum[2]
\end{document}

enter image description here

  • s/captionof/capt-of/ in the middle of the text ;-) – Johannes_B Nov 22 '15 at 10:10
0

You can use the [!h] instead of [H] to make it better,

  \begin{figure}[!h]
    \centering
      \includegraphics[width=\textwidth]{pictures/mypicture.png}
    \caption{mypicture}
    \label{fig:mypicture}
  \end{figure}

Not the answer you're looking for? Browse other questions tagged or ask your own question.