0

I have a document with some text, pictures to viszualize and then text to explain the images. This starts over again and again.

I just tried to figure (pun intended..) out how to accomplish that. And I read something about figures, but the amount of information is so overkill to me, that I cannot use it. Is there no simple comment to maintain the order, no matter where the images is placed? Something like\after{imagex}\before{imagey} so latex knows all the following text has to come after a certain image, and before the next one?

the problem is I am using a macro command for images:

\newcommand\includenamedimage[3][]{
    \begin{figure}
      \centering
      \includegraphics[width=#1\textwidth]{#2}
      \caption{#3}
      \label{fig:#2}
    \end{figure}
}

and I do not know how to adjust my .tex file so maintaining the order works.
I am writing my thesis and we kind of have to stick to the template, and this image-adding command is included within it

1 Answer 1

1

Are you able to alter the macro? If yes maybe try to change the \begin{figure} to \begin{figure}[H] just make sure to also add \usepackage{float} in your preamble.

3
  • 2
    Don't do it this. Better is to use [htbp].
    – Zarko
    Sep 8, 2019 at 23:40
  • @Zarko Could you provide a reason for that? Sep 9, 2019 at 7:58
  • Using H destroy floating mechanism, which can cause very bad typography (empty spaces on the bottom of pages).
    – Zarko
    Sep 9, 2019 at 8:24

You must log in to answer this question.

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