# Figures missing from document, replaced with commas

In my document, some figures are replaced with two commas (,,), without any error output. It's hard to predict when this will happen, but it seems to happen near the end of Chapters / near a page flush / end of document.

Here is an example showing the problem:

\documentclass{article}
\usepackage{babel}
\begin{document}

example text

\begin{figure}[ht]
a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\ENDA
\end{figure}

\begin{figure}[ht]
a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\ENDB
\end{figure}

\begin{figure}[ht]
a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\a\\ENDC
\end{figure}

\end{document}

• While this might be a rare bug, I just spent a long time trying to track it down, so I thought I'd make a question (and answer) for other people to find, if they have the same issue! Aug 18, 2021 at 16:52
• Welcome to TSE. I don't think that anyone will be able to help you if you don't post a minimal working example. Aug 18, 2021 at 16:59
• I have now included an example. I'm not sure if it's something anyone can help me "fix" (I'm fairly sure it's a bug in tex/babel 2019, which is fixed by upgrading, although I can't find mention of it anywhere. Aug 19, 2021 at 11:55

This bug appears to be caused by the Babel package ( discussion here: https://github.com/latex3/babel/issues/143 )

The bug was observed in TeX Live 2019, it appears to be fixed in TeX Live 2021, so update to the latest version of LaTeX and hopefully your document will compile correctly.