How can I left align the text in the figure/table caption? This is the text I am using to add an image


If you can get used to specifying figures with commands, rather than environments, boxhandler will solve this, assuming you mean left-align to the figure and not the margin. (It can left align to margin, too, but you don't need boxhandler for just that)


By default, boxhandler gives this

\bxfigure[ht]{This is the caption which, by default is idented wrt the
figure identifier}

But by changing the caption style with \verb|\captionStyle{n}{l}|, one
gets the following:


\bxfigure[ht]{This is the caption which, by default is idented wrt the
figure identifier}


enter image description here


A caveat in using the boxhandler environment is that it doesn't allow for including a sub-caption. For example, I got into the situation of needing a main caption centered above the figure, and another one below it and left-aligned to the picture.

Although it's not the state-of-the-art solution, I managed to find a workaround for it using a minipage environment inside the figure environment:

\begin{figure}[h] \label{fig:caption-example}
    \caption{Example figure}
    \centering  \includegraphics{MyPicture.png} \par
        Source: the Author (2018)

The solution for the proper alignment was finetuning the minipage's width to match the figure's width.

  • You can store the figure width an reuse it in the minipage. See e.g. my answer tex.stackexchange.com/a/422360/2975 – Martin Scharrer Apr 26 '18 at 5:45
  • @MartinScharrer thanks for the tip, it worked just fine! Just had to use a \raggedleft command in the text content of the \adjustbox command argument. – Henrique Baron Apr 27 '18 at 12:26

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.