0
\documentclass[journal=jpcld,manuscript=letter]{achemso}
\usepackage[english]{babel}
\renewcommand{\thefigure}{S\arabic{figure}}
\title{Supporting Information}
\newpage
\begin{document}



%% Snapshots of mixture simulation at various times 

\center\Large \textbf{Simulation A5 : Mixture of $\alpha$ \& $\beta$ aspartyl in 1:2 ratio}

\begin{figure}[h!]

\begin{center}

\fbox{\includegraphics[width=0.7\linewidth]{./supporting_info/mixture/snapshot_0ns}}\\

\vspace{0.5cm}

\fbox{\includegraphics[width=0.7\linewidth]{./supporting_info/mixture/snapshot_250ns}}\\

\vspace{0.5cm}

\fbox{\includegraphics[width=0.7\linewidth]{./supporting_info/mixture/snapshot_500ns}}\\

\end{center}

\caption{Snapshots showing the protein and the ligands (CPK representation) around it at various times of the simulation}

\end{figure}

\newpage

\center\Large \textbf{Simulation A3, Ligand : $\alpha$-aspartyl}

\begin{figure}[h!]

\begin{center}

\fbox{\includegraphics[width=0.7\linewidth]
{./supporting_info/alpha_aspartyl/snapshot_alpha_0ns}}\\
\vspace{0.5cm}

\fbox{\includegraphics[width=0.7\linewidth]{./supporting_info/alpha_aspartyl/snapshot_alpha_250ns}}\\
\vspace{0.5cm}

\fbox{\includegraphics[width=0.7\linewidth]{./supporting_info/alpha_aspartyl/snapshot_alpha_520ns}}\\
\caption{Snapshots from the simulation A3 at 0, 250 and 520 ns}

\end{center}

\end{figure}

\end{document}

By running this script I am getting two separate pages of text and after that two pages of figures.

Is there any way to get the figure right after the next?

  • 1
    please use example-image as the image so people can run the example and see the issue, as it is it is impossible to run it and see where the float goes. Note that \center should be \centering or \begin{center}, the form \center should never be used in a document it is just half the implementation of the center environment. Also [h!] usually generates a warning and is changed to ht is there a reason that you are preventing the figure being placed above text by removing the default possibility of t for a top float? – David Carlisle Jan 6 at 19:24
  • Yeah, I need the text to be top of the figure, it's like a heading. Thank you – Adupa Vasista Jan 7 at 5:12
  • But the problem is the text and the first figure were too close even I give \bigskip command. Is there any way to avoid it. I even tried using \vspace{}, reducing the size of images, but it didn't work. Thank you – Adupa Vasista Jan 7 at 5:22
  • Spacing between lines does the trick. Thank you – Adupa Vasista Jan 7 at 5:45
0

Place the text inside the figure environment.

\documentclass[journal=jpcld,manuscript=letter]{achemso}
\usepackage[english]{babel}
\renewcommand{\thefigure}{S\arabic{figure}}

\title{Title}
\author{Author}
\affiliation{Somewhere}
\email{A@S}

\begin{document}

%% Snapshots of mixture simulation at various times 

\begin{figure}[htp!]
\centering\Large

\textbf{Simulation A5: Mixture of $\alpha$ \& $\beta$ aspartyl in $1{:}2$ ratio}

\bigskip

\fbox{\includegraphics[width=0.4\textwidth]{example-image}}

\bigskip

\fbox{\includegraphics[width=0.4\textwidth]{example-image}}

\bigskip

\fbox{\includegraphics[width=0.4\textwidth]{example-image}}

\caption{Snapshots showing the protein and the ligands (CPK representation) 
around it at various times of the simulation}

\end{figure}

\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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