0

This is a follow up question of Tabularray with footnotes from where the MWE is taken. The solution is great and I get the footnote in the table. however I cannot use it together with the package hvfloat which causes two errors:

  1. ! LaTeX Error: Control sequence \fpAdd already defined.
  2. ! LaTeX Error: Control sequence \fpSub already defined.
\documentclass{scrbook}
\usepackage[a4paper]{geometry}

\usepackage{hvfloat}

\usepackage{tabularray} \UseTblrLibrary{counter} \UseTblrLibrary{functional}

\makeatletter \IgnoreSpacesOn \tlNew \gFootNoteTl \intNew \gFootNoteInt \prgNewFunction \footNote {m} { \tlPutRight \gFootNoteTl { \stepcounter{footnote} \footnotetext{#1} } \prgReturn {\footnotemark{}} } \AddToHook{env/tblr/before}{ \intSetEq \gFootNoteInt \c@footnote \tlClear \gFootNoteTl } \AddToHook{env/tblr/after}{ \intSetEq \c@footnote \gFootNoteInt \tlUse \gFootNoteTl } \IgnoreSpacesOff \makeatother

\begin{document}

Some note\footnote{some note} before.

\bigskip

\begin{tblr}[evaluate=\footNote]{colspec={ll},hlines} a line & a text\footNote{with a note} in the middle\ another line & another text\footNote{with another note} in the middle \end{tblr}

\bigskip

\begin{tblr}[evaluate=\footNote]{colspec={ll},hlines} a line & a text\footNote{with a note} in the middle\ another line & another text\footNote{with another note} in the middle \end{tblr}

\bigskip

Another note\footnote{another note} after.

\end{document}

Ok, I found out that a solution is to load hvfloat after tabularray. But is there a better option?

lukascbossert
  • 3,015
  • 1
  • 16
  • 37
  • there is a clear naming conflict, the functional library tries to overwrite a (documented) command from multido. Loading hvfloat later can work, as long as your code doesn't try to use the \fpAdd from the library. Another option is to rewrite the footnote code and not to use the library. That is quite probably possible but I didn't check. – Ulrike Fischer Feb 29 '24 at 10:34

0 Answers0