# longtable and floatrow: font commands ignored

If I load both longtable (ltxtable) and floatrow, then \sffamily is ignored and the table is typeset in roman. If I disable floatrow everything works as expected. floatrows \RawFloats command does not work here as a solution. I had only error messages when I inserted it.

Here is the example code:

\documentclass[]{scrbook}

\usepackage{ltxtable} %
\usepackage{filecontents} %
\usepackage{floatrow}
\usepackage{caption} %

\listfiles

\begin{document}

% Creation of the table in a separate file
\begin{filecontents}{content/longtable.tex}
\begin{longtable}{>{\itshape}l*{2}{X}}
\captionabove{longtable tabular with tabularx columns} \\
\hline
title & title \\ \hline
\hline
\endlastfoot
description   & content & \\
\end{longtable}
\end{filecontents}

{
\small\renewcommand{\arraystretch}{1.4}\sffamily
\LTXtable{\textwidth}{content/longtable.tex}
}
\end{document}


Which results in the following

Any idea how to get the sans serif font in the table back?

-

The floatrow package controls the font of float object contents and also of longtables, so you'll have to add \floatsetup[table]{font=sf} to your preamble (and may remove \sffamily from the redefinition of \arraystretch). See section 3.1.2 of the manual for details.

\documentclass[]{scrbook}

\usepackage{ltxtable} %
\usepackage{filecontents} %
\usepackage{floatrow}
\floatsetup[table]{font=sf}
\usepackage{caption} %

\listfiles

\begin{document}

% Creation of the table in a separate file
\begin{filecontents}{longtable.tex}
\begin{longtable}{>{\itshape}l*{2}{X}}
\captionabove{longtable tabular with tabularx columns} \\
\hline
title & title \\ \hline
\hline
\endlastfoot
description   & content & \\
\end{longtable}
\end{filecontents}

{
\small\renewcommand{\arraystretch}{1.4}
\LTXtable{\textwidth}{longtable.tex}
}
\end{document}


EDIT: Should you also want to change the caption fonts, use the \captionsetup macro provided by the caption package:

\captionsetup[table]{labelfont=sf,font=sf}


-
It works that way - but I wonder if this was a good design decisions. I think of floatrow as a caption and figure/tabular alignment tool that provides float extension. And it can causes problems in normal latex code if the floatrow extensions are not used... – Matthias Pospiech Jan 15 '12 at 13:10