0

How to insert image in abstract with wrap around text. I have tried wrapfigure package, cutwin package without any luck. Wrapfigure is throwing warnings (WARNING1: wrapfigure used inside a conflicting environment ,WARNING 2:Stationary wrapfigure forced to float) and not working as expected. I am getting this error only when my document class is

\documentclass[journal=aamick,manuscript=article]{achemso}

Here is the sample code (with wrapfigure as commented out):


\documentclass[journal=aamick,manuscript=article]{achemso}
\usepackage{graphicx}
\usepackage{tikz,graphics,color,fullpage,epsf,caption,subcaption}
\usepackage{wrapfig}
\usepackage{lipsum}

\newcommand*\mycommand[1]{\texttt{\emph{#1}}}


\author{Author 1}
\affiliation{Department of University 1}
\email{[email protected]}
\author{Author 2}
\affiliation{Department of University 2}
\author{Author3}
\affiliation{Department of University 3}
\author{Author4}
\affiliation{Department of University 4}


\title {Xxxxxxxxx xx xxx xxxx xxxxxxxxxx xxxxxxx xxxx xxxxxxxx xxxxxxxx xxxxxxx xxxxxxxx xxxx xxxx}


\abbreviations{To be added as comma separted list if all abbr.}
\keywords{Ketword 1, Ketword 2, Ketword 3, Ketword 4, Ketword 5}

\begin{document}
\begin{abstract}

% \begin{wrapfigure}{r}{0.5\textwidth}
%     \begin{center}
%         \includegraphics[width=0.48\textwidth]{Images/Graphical_Abstract.jpeg}
%     \end{center}
%     \caption{Birds}
%     \end{wrapfigure}

 \includegraphics[width=0.58\textwidth]{Images/Graphical_Abstract.jpeg}

\lipsum[1]
\end{abstract}
\end{document}

This allows me to insert image in the abstract however the text is not wrapped around the image. I wish to achieve followings:

  1. Insert image in the abstract with wrap around text
  2. Abstract should not start in a new page but rather in it should start immediately after the authors details
  3. [preferably] Image should appear after 3-4 lines of abstract, inserted image should be right aligned and should have width as 40% of linewidth.

Can you please help me solve this. I have basic knowledge of latex only.

1
  • Welcome to TeX.SE!
    – Mensch
    Apr 25, 2022 at 20:01

1 Answer 1

2

wrapfigure doesn't work inside lists (and the abstract is using the same mechanism internally).

Instead you can use the plain (not LaTeX) package insbox (hence using \input, not \usepackage):

\documentclass[journal=aamick,manuscript=article]{achemso}
\usepackage{graphicx}
\usepackage{tikz,graphics,color,fullpage,epsf,caption,subcaption}
\usepackage{wrapfig}
\usepackage{lipsum}

\newcommand*\mycommand[1]{\texttt{\emph{#1}}}


\author{Author 1}
\affiliation{Department of University 1}
\email{[email protected]}
\author{Author 2}
\affiliation{Department of University 2}
\author{Author3}
\affiliation{Department of University 3}
\author{Author4}
\affiliation{Department of University 4}


\title {Xxxxxxxxx xx xxx xxxx xxxxxxxxxx xxxxxxx xxxx xxxxxxxx xxxxxxxx xxxxxxx xxxxxxxx xxxx xxxx}


\abbreviations{To be added as comma separted list if all abbr.}
\keywords{Ketword 1, Ketword 2, Ketword 3, Ketword 4, Ketword 5}

\input{insbox}

\begin{document}
\begin{abstract}
  \InsertBoxR{3}{\includegraphics[width=0.4\linewidth]{example-image-duck}}
  \lipsum[1]
\end{abstract}
\end{document}

enter image description here

3
  • Thanks ! It worked seamlessly.
    – Pankaj
    Apr 26, 2022 at 3:19
  • Very nice, this code also worked great for me. But I need to put a \caption{}, a caption below the figure. How do I please? this code does not accept the \caption Jan 13, 2023 at 12:02
  • @LúciaBrandão if you loaded the caption package in your preamble or are using one of the KOMA classes (scrartcl etc.) you can use \captionof{figure}{Something very important}. If you get an undefined command error from \captionof load the capt-of package.
    – Skillmon
    Jan 13, 2023 at 18:52

You must log in to answer this question.

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