How do I get my caption below the figure and at the same time aligned with left side of my figure?
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}
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.)
-
1I'm guessing (since it isn't documented):
slc
is an alias forsinglelinecheck
(or the other way around)? – cgnieder 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 thesubcaption
package documentation. (Sorry for the documentation flaws, I already started to write a new and up-to-date documentation for thecaption
package bundle but progress is slow and my cats are demanding... – user2574 Apr 7 '13 at 11:39
\documentclass{...}
and ending with\end{document}
. – jub0bs Apr 7 '13 at 10:25