I have some L shaped SCfigure. Is there a way to optimize the figure caption position? The space where the caption could extend is marked with a star in the example below.
Here's the relevant MWE
\documentclass{article}
\usepackage{tikz}
\usepackage{sidecap}
\usepackage{lipsum}
\begin{document}
\lipsum[1-3]
\begin{SCfigure}
\begin{tikzpicture}
\fill (0,0) -- ++(6,0) -- ++(0,-1) -- ++(-2,0) -- ++(0,-2) -| cycle;
\node at (5,-2) {$\star$};
\end{tikzpicture}
\caption{Some caption that is not placed optimally}
\end{SCfigure}
\end{document}
Best Answer
You can use the
floatrow
package instead ofsidecap
. We have to declare a new separator between the figure and its beside caption. As such separators, infloatrow
syntax, are just keywords to be defined in preamble, I introduce a\mysep
length to be able to dynamically change the separator mid document. Here is how it goes: