0

The compilation of the following MCE:

\documentclass[varwidth=15cm,float=false]{standalone}
\usepackage{floatrow}
\begin{document}
\begin{figure}[ht]
  \centering
  A nice graphic!
  \caption{What a nice graphic!}
\end{figure}
\end{document}

fails with the following error:

[...]
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/mathcolor.ltx))
! Extra }, or forgotten \endgroup.
\@endfloatbox ...pagefalse \outer@nobreak \egroup 
                                                  \color@endbox 
l.8 \end{figure}

?

Are the standalone class and the floatrow package irrevocably incompatible?

Denis Bitouzé
  • 9,652
  • 4
  • 27
  • 85
  • 3
    why would you want a float in standalone? – David Carlisle May 22 '23 at 13:25
  • @DavidCarlisle Sorry, I should have specified that I use standalone with its float=false option. I'll edit my question. – Denis Bitouzé May 22 '23 at 13:34
  • 1
    I also tried [class=article] with no success. I suspect that whatever code standalone uses for figure (which in earlier versons had been undefined) is incompatible with the changes made by floatrow. Then again, not being able to use floatrow is hardly a loss. – John Kormylo May 22 '23 at 14:30
  • @DavidCarlisle About the floats in standalone (class), I have to insert figures with captions. – Denis Bitouzé May 22 '23 at 19:55
  • @JohnKormylo Why not being able to use floatrow is hardly a loss? It provides nice features, despite its age. – Denis Bitouzé May 22 '23 at 19:55
  • Floatrow does nothing that can't be done without it (albeit with a little more effort) and it has nasty side effects. – John Kormylo May 23 '23 at 02:42
  • @JohnKormylo Taking in account the numerous and not obvious features of floatrow, “little” in “little more effort” looks optimistic, isn't it? :) About the nasty side effects, none I'm aware of but pointers are welcome. – Denis Bitouzé May 23 '23 at 07:17
  • 1
    See https://tex.stackexchange.com/questions/403661/how-to-prevent-floatrow-from-moving-the-caption?r=SearchResults&s=4%7C29.8901. https://tex.stackexchange.com/questions/643659/how-to-subreference-in-floatrow-package-hyperref/643703?r=SearchResults&s=5%7C29.1599#643703, https://tex.stackexchange.com/questions/410836/vertical-alignment-of-table-and-figure-placed-side-by-side-in-two-column-mode/410902?r=SearchResults&s=8%7C25.3734#410902 and https://tex.stackexchange.com/questions/591115/how-to-put-side-caption-in-a-figure-that-is-wrapped-inside-a-a-text. Other links too long for comment. – John Kormylo May 23 '23 at 12:29

0 Answers0