5

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}
  • 1
    Oh my, nonfloat is from 1999. I suggest to use \captionof{table}{...} instead. – user31729 Dec 25 '15 at 10:26
4

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}

enter image description here

5

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}

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.