1

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.

  • 1
    Welcome to TeX.SE. The error message you report indicates that one or more options passed to the caption package weren't set correctly. Please do tell us how the caption package is loaded. If you have a \captionsetup instruction, do let us know what its argument is. – Mico Feb 13 '17 at 11:39
  • Hi @Mico, that would be \usepackage[justification=left,font=footnotesize,width=10cm]{caption}. I do not see a problem there. But please let me know if I am doing something wrong. – Chirag Shekhar Feb 13 '17 at 12:07
  • 2
    left is not a standard option for justification in caption. Do you mean raggedleft or have you defined your own justification style? – Andrew Swann Feb 13 '17 at 13:01
1

"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.

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.