I have a (float) figure that has a ┓-shape, that is there is a huge blank square at the bottom left.

enter image description here

I'd like to put in this blank the caption of the figure. Is there a way?

My class loads caption and floatrow packages, so I need something that works with floatrow.


What about using TikZ and write your caption over the image?


     \node [draw=black, anchor=south west] at (0,0) {\includegraphics[width=\textwidth]{fig1}};

     \node [draw=black, anchor=south west, text width=.3\textwidth] at (0,0) {\caption{A picture of a X.}};

A \RawFloats after \begin{figure} solves the problem with floatrow.

  • Sorry, but for some reason (?), it does not work with floatrow (which is a requierement). – cjorssen Oct 16 '13 at 15:44
  • 3
    Instead of a manual minipage, you can also use text width=.3\textwidth and let TikZ use its internal version of the minipage environment (which is the same for LaTeX). – Qrrbrbirlbel Oct 16 '13 at 17:10

Here's a very basic, feasible implementation that inserts the caption at the desired location:

enter image description here

\usepackage{graphicx}% http://ctan.org/pkg/graphicx
  \savebox{\graphicsbox}{\includegraphics[width=.7\linewidth]{myfigure}}% Store image
  \leavevmode\rlap{\usebox{\graphicsbox}}% Set image with complete overlap
  \begin{minipage}[b]{.5\wd\graphicsbox}% Insert caption
    \caption{This is my caption. It has a large amount of information, and should
      flow over several lines.}
  \end{minipage}\hspace*{.5\wd\graphicsbox}% Add space to represent figure width

The image is set in a box \graphicsbox in order to calculate its width. This width is used to measure the minipage and subsequent spacing. A [b]ottom-placement ensures that the caption is stacked vertically as it expands. The alignment of the minipage and surrounding spacing can be changed, of course. For example, to add a \columnsep gap between the caption and the image, use

\begin{minipage}[b]{\dimexpr.5\wd\graphicsbox-\columnsep}% Insert caption
  % <caption>
\end{minipage}\hspace*{\dimexpr.5\wd\graphicsbox+\columnsep}% Add space to represent figure width

I made a two-line change to boxhandler's macro \ReciteFigure, and set of few of the package parameters.


        \if T#6%
        \parbox{.5\CaptionBoxWidth}{\bx@caption{#2}}% .5 WAS ADDED
        \hspace{.5\CaptionBoxWidth}%                  THIS LINE WAS ADDED
        \if T#6%

\bxfigure{My caption goes here and may exceed one line}


enter image description here

  • Interesting, thanks. I did not know the boxhandler package. For my use case, I'd like to stick to floatrow. – cjorssen Oct 16 '13 at 19:09

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.