Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latex help needed, about text between 2 images

Tags:
  1. Mar 5, 2014 #1

    fluidistic

    User Avatar
    Gold Member

    Latex "help" needed, about text between 2 images

    I'm having troubles to place a text between 2 images.
    The code looks like this:

    Code (Text):
    \begin{figure}[ht]
    \begin{minipage}[b]{0.45\linewidth}
    \centering
    \includegraphics[width=\textwidth]{vvalue}
    \caption{value1}
    \label{test1}
    \end{minipage}
    \hspace{0.0cm}
    \begin{minipage}[b]{0.45\linewidth}
    \centering
    \includegraphics[width=\textwidth]{wvalue}
    \caption{value2}
    \label{test2}
    \end{minipage}
    \end{figure}

    Some text here.

    \centerline{\includegraphics[scale=0.36, resolution=900]{test126}}


     
    What is displayed is: "Some text here", then the first image and then the last image. I would like the "Some text here" to be placed in between the two images.

    I have tried google and some suggestions, such as using \usepackage{float} and adding an "[H]" at the end of the \centerline line.
    Also tried \par \bigskip in between the two images. No luck so far.
     
  2. jcsd
  3. Mar 6, 2014 #2

    fluidistic

    User Avatar
    Gold Member

    Problem "fixed".
    I added more text prior to this part of the document in such a way that now the images and the text are displayed in the middle of a page. The text is now "magically" displayed between the 2 images...
     
  4. Mar 6, 2014 #3

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    That's not a good fix. Add more text elsewhere and the problem will reappear. Your first figure is a figure: It's a float. It goes where LaTeX thinks it should go. Your second figure is not a figure. It's just part of the document. It goes where you put it.

    Aside: It looks like you are using cargo cult techniques with your LaTeX. Why do you have two captions for that figure environment?

    There are a number of ways to "fix" this problem. I'd suggest making the whole enchilada one big "figure". Make a long descriptive caption that describes all three images that comprise the figure. It's common to have very long captions. This might create a new problem if you have a list of figures in your front matter. That long, descriptive caption looks out of place in the list of figures. Use the optional argument to caption to fix this new problem:

    \caption[Short title]{Short title. Detailed description of what's shown …}\label{fig:fig42}
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Latex help needed, about text between 2 images
  1. I need help with Latex (Replies: 15)

  2. Latex help needed (Replies: 4)

Loading...