5

Can someone help me with placing the figure at the bottom (centered) of the document in sharelatex. Currently I am using:

\documentclass[final,authoryear,3p,times,twocolumn]{elsarticle}]
\userpackage{graphics}
\begin{document}
\begin{frontmatter}
\graphicspath{}
\begin{figure*}[b!]
  \begin{center}
    \fbox{\includegraphics[width= \textwidth,height= 12cm]{Study_area.PNG}}
      \caption{}
      \label{fig:studysite}
  \end{center}
\end{figure*}
\end{document}
leandriis
  • 62,593
mark
  • 51

1 Answers1

4

The [b] option for figure placement doesn't work in two-columns mode; by default page wide figures are placed at top of pages. The stfloats package (from the sttools bundle) makes it available.

B.t.w., don't use the center environment for figures: it will add an unwanted vertical spacing in addition to the normal vertical spacing of figures.

\PassOptionsToPackage{demo}{graphicx}
 \documentclass[final,authoryear,3p,times, twocolumn]{elsarticle}
\usepackage{stfloats}
\usepackage{lipsum}

  \begin{document}

  \begin{frontmatter}
\lipsum[11]
   \begin{figure*}[b!]
   \centering
   \fbox{\includegraphics[width=\dimexpr \textwidth-2\fboxsep-2\fboxrule\relax, height= 12cm]{Study_area.PNG}}
   \caption{} \label{fig:studysite}
   \end{figure*}
\lipsum
\end{frontmatter}

   \end{document} 

enter image description here

Bernard
  • 271,350