3

I am unable to get my caption to be properly (left) spaced below a figure in a double column document. This is using the Elsevier double-column template. No errors or warnings are present but the placement of the caption is to the right quite a bit, as shown below. The caption is supposed to start at the left edge of the figure. I've tried using \usepackage{caption}, \captionsetup, and a number of other methods through Google-fu.

Caption mis-placed

\documentclass[a4paper,fleqn]{cas-dc}

\usepackage[numbers]{natbib}
\usepackage{graphicx}

\begin{document}

\maketitle

\begin{figure*}[] 
  \includegraphics[width=\textwidth]{Diagram_v4.eps}
  \caption{\label{fig:Prototype_view} Caption stuff.Caption stuff.Caption stuff.Caption stuff.Caption stuff.Caption stuff.Caption stuff.}
\end{figure*}

\end{document}

MWE

3
  • 3
    If I compile this code (I had to add natbib and \maketitle) then the output looks like this. Please edit your code so that when compiled it shows the issue. You can start with your actual document (and replace the text by \lipsum and the picture with example-image) instead of writing an example from scratch. Mar 20, 2020 at 15:29
  • 1
    I updated my MWE with only the code in my actual document. The caption is still off.
    – Shawn
    Mar 20, 2020 at 15:41
  • 2
    Unrelated: don't put the label in the caption, it is a separate command that is put after the caption command is finished.
    – Marijn
    Mar 20, 2020 at 15:54

2 Answers 2

6

If you remove the empty [] after \begin{figure*} the caption should be fine.

1
  • I can't believe it was so simple!
    – Shawn
    Mar 20, 2020 at 15:58
0

Add \AtBeginDocument{\setlength{\FullWidth}{\textwidth}} at the code header to fix the \textwidth length.

Then you can control better your floats: \begin{figure}[h!, align=\flushleft, width=\textwidth]

You must log in to answer this question.

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