# How to fix this incompatibility between nonfloat and glossaries packages?

In the code below, when I use XeLaTeX, the caption isn't printed in the output. How can I solve the problem?

\documentclass{book}
\usepackage{nonfloat}
\usepackage{glossaries}
\begin{document}
\chapter{A Test}
\begin{center}
\tabcaption{A Caption}
\begin{tabular}{c|c}
a & b
\end{tabular}
\end{center}
\end{document}

• Oh my, nonfloat is from 1999. I suggest to use \captionof{table}{...} instead. – user31729 Dec 25 '15 at 10:26

The incompatibility is with the supertabular package; just load glossaries with the nosuper option.

\documentclass{book}
\usepackage[nosuper]{glossaries}
\usepackage{nonfloat}

\begin{document}

\chapter{A Test}

\begin{minipage}{\columnwidth}
\centering
\tabcaption{A Caption}
\begin{tabular}{c|c}
a & b
\end{tabular}
\end{minipage}

\end{document}


Not the real solution, but a work-around: Use \captionof{table}{foo} instead of \tabcaption{foo} (this requires the caption package, however)

nonfloat hasn't been updated since 1999. The details why this fails has in the meantime found out by egreg, but omitting supertab might not work in any case.

\documentclass{book}
%\usepackage{nonfloat}
\usepackage{caption}
\usepackage{glossaries}
\begin{document}
\chapter{A Test}
\begin{center}
\captionof{table}{A Caption}
\begin{tabular}{c|c}
a & b
\end{tabular}
\end{center}
\end{document}


• it's clear now why, see egreg answer. – touhami Dec 25 '15 at 13:25