# Modify Floatfoot of Floatrow Package and move Rule

From the floatrow package, I am using the floatfoot command to reference sources and similar content.

This MWE produces an output that is quite acceptable:

\documentclass{article}

\usepackage{xcolor}
\usepackage{floatrow}
\floatsetup[figure]%
{%
capbesideposition=right,%
postcode=rule,%
}%
\setlength{\floatfootskip}{0pt}%remove vertical space/skip
\usepackage{caption}
\DeclareCaptionFont{ftfont}{\scriptsize\raggedleft}
\captionsetup[floatfoot]
{%
footfont=ftfont,%
}%
\begin{document}
\begin{figure}
\ffigbox[\FBwidth]
{%
\rule{5cm}{5cm}
}%
{%
\caption{None}%
\floatfoot{Floatfoot}%
}%
\end{figure}
\begin{figure}
\fcapside[\FBwidth]
{%
\rule{5cm}{5cm}
}%
{%
\caption{None}%
\floatfoot{Floatfoot}%
}%
\end{figure}
\begin{table}
\ttabbox
{%
\caption{None}%
\floatfoot{Floatfoot}
}%
{%
\begin{tabular}{ll}
\hline
Number & Name\\
2 & Fred\\
\hline
\end{tabular}
}%
\end{table}
\end{document}


It looks like this:

The Table is inserted for good measure, it looks good as-is. I am concerned about the figures.

I have not been able to find information in the package doc about modifying the floatfoot. Its positional commands (default, caption, bottom) are not what I am looking for.

Additionally, the horizontal rule underneath the float is a nice touch in my mind.

1. As a first step, is there a way to place this rule from postcode above the floatfoot? This cannot be that hard, however I failed. Fiddling with midcode etc. did not solve it.

2. Secondly, a much more advanced question. It might not be reasonable. Is there a way to mold the rule and floatfoot into something like this:

Excuse the sketch.

• Is there a reason for not using \footnotetext instead of \floatfoot ? – Hafid Boukhoulda Feb 13 at 17:01
• I am not aware of what \footnotetext does exactly. Is it not bound to also having a footnote-mark? floatrow makes a distinction there, and offers footnotes but also \floatfoot, for additional, arbitrary explanations. I thought it would fit for my intentions. This question showcases the difference nicely. – Hans Lollo Feb 13 at 17:21

After a hiatus, I have returned to the issue and now solved it like this:

\documentclass{article}
\usepackage{caption}
\DeclareCaptionLabelSeparator{slash}{\ /\ }%
\captionsetup{%
format=plain,%
textformat=period,%
font=small,%all fonts
labelfont={sf,bf},%
labelsep=slash,%
labelformat=simple,%just Name/Number, no period or similar
indention=1em,%
}%
\captionsetup[floatfoot]%
{%
footfont=ftfont,%
}%
\usepackage{floatrow}%
\floatsetup{footnoterule=none}%avoid drawing two rules
\floatsetup[figure]%
{%
capbesideposition=right,%
}%
\usepackage{hyperref}
\newlength{\floatfootruleindent}
\makeatletter
\setlength{\floatfootruleindent}{\caption@indent}
\makeatother
\renewcommand\floatfootskip{2pt\hspace{\floatfootruleindent}\hrulefill}

\begin{document}
\begin{figure}
\ffigbox[\FBwidth]
{%
\caption{My caption which is longer than usual so it spans more than one line}
\floatfoot{This is the float foot}
%           \footnotetext[1]{A footnote.}
}%
{%
\rule{4cm}{4cm}%\mpfootnotemark[1]
}%
\end{figure}
\begin{figure}
\fcapside[\FBwidth]
{%
\caption{My caption which is longer than usual so it spans more than one line}
\floatfoot{This is the float foot}
\footnotetext[1]{A footnote.}
}%
{%
\rule{4cm}{4cm}\mpfootnotemark[1]
}%
\end{figure}
\end{document}


This is a misuse of \floatfootskip as far as I can see, which seems to be intended to just be a length. The first input 2pt provides the length the package expects, but then also inserts all the code behind it.

It works for now. I am an absolute beginner in fiddling with .sty definitions, so I am certain this is an awful way to do it. Especially the way how \floatfootskip is also used for \footnotetext, which results in another \hrulefill to be drawn, even if we don't want this. The default is to draw a shorter line, removed here by footrulerule=none.

Still, I hope people could be interested in this.

The results looks like