[Tex/LaTex] Package caption error: left undefined

captionserrors

So I'm in a bit of a rut here, have been working on this file in collaboration with a senior member of my faculty, and the file I have received from him after revisions, posts this error that I have absolutely no explanation for.

So, all other captions, everywhere in the file are working alright, but there's this one at line:292, which doesn't seem to work. Whenever I attempt to compile, the console flashes the error 'Package caption error: left undefined'. The code is something like this.

\begin{figure}[!ht]
\centering
\includegraphics[width=12.5cm]{condweights.pdf}
\caption{Time-varying utility maximizing portfolio weights for risk aversion parameter $c=5$ (and $b=0$). In each period, the sum of the weights is 1. The weights are restricted to the interval $[-0.25,1.25]$.\label{condweights}}
\end{figure}

What's even more upsetting is that even if I remove the entire segment (to the point that there isn't even a line:292 anymore!), the console still flashes the same error on the very same line. Any help would be appreciated. Thanks!

PS: I'm using TexMaker 4.5, btw.

Best Answer

"left" is not a predefined option for the justification key.

According to the user guide of the caption package, the predefined options are justified, centering, centerlast, centerfirst, raggedright, raggedleft as well as (assuming the ragged2e package is loaded) Centering, RaggedRight, and RaggedLeft.

In addition, custom justification methods may be defined using a \DeclareCaptionJustification declaration. See p. 25 of the package's user guide for more information on this subject.

I have a hunch that what you want is justification=raggedright.