4

How do I get my caption below the figure and at the same time aligned with left side of my figure?

  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs Apr 7 '13 at 10:25
5

Like this one?

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\captionsetup[figure]{slc=off} % "slc" is an abbreviation for "singlelinecheck"
\begin{document}
\begin{figure}
  \centering
  \captionbox
    {Blah... \label{fig:test}}
    {\includegraphics{test}}
\end{figure}
\end{document}

enter image description here

P.S.: The same effect can be archived using \ffigbox offered by the floatrow package, for example:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{floatrow,caption}
\captionsetup[figure]{slc=off}
\begin{document}
\begin{figure}
  \centering
  \ffigbox[\FBwidth]
    {\caption{Blah...}\label{test}}
    {\includegraphics{test}}
\end{figure}
\end{document}

(For making \captionsetup[figure]{slc=off} work the caption package is needed here additionally.)

  • 1
    I'm guessing (since it isn't documented): slc is an alias for singlelinecheck (or the other way around)? – clemens Apr 7 '13 at 11:06
  • 4
    @cgnieder Yes, I was too lazy to write "singlelinecheck" all the time, therefore I introduced this abbreviation around 2008. BTW: Unfortunately \captionbox isn't documented yet, too, but its syntax is exactly the same as \subcaptionbox as explained in the subcaption package documentation. (Sorry for the documentation flaws, I already started to write a new and up-to-date documentation for the caption package bundle but progress is slow and my cats are demanding... – Axel Sommerfeldt Apr 7 '13 at 11:39

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.