Consider the following document:
\documentclass{article}
\usepackage{subcaption}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\caption{A caption.}
\end{figure}
Some text after the figure.
\end{document}
Until recently, this compiled fine on my Devuan Beowulf (~= Debian Buster) system. Then after an apt-get dist upgrade a month and a half ago, it stopped compiling, complaining about the H placement:
LaTeX Error: Unknown float option `H'.
However, on my laptop, with Ubuntu 18.04.3 (Bionic) - it continues to work.
Why could this be happening? And - how can I circumvent this?
Notes:
Effect of source tweaking
- If I remove the
\usepackage{subcaption}- it works. - If I move the
\usepackage{subcaption}after the float - it still doesn't work. - If I replace
[H]with[h]- it works.
TeXLive versions
- New broken system: 2018.20190227-2
- Working laptop system: 2017.20180305-1
Full log:
Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex --shell-escape -recorder "a.tex" -file-line-error -synctex=1'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
\write18 enabled.
entering extended mode
(./a.tex
LaTeX2e <2018-12-01>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty) (./a.aux)
! LaTeX Error: Unknown float option `H'.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.5 \begin{figure}[H]
?
float.sty. Try removing that. Well, you were, now you edited it out... – LaTeXer Oct 04 '19 at 12:01apt-get dist-upgradeed... is there anyway I could verify the "version integrity" of what I have? – einpoklum Oct 04 '19 at 12:07/usr/share/texlive/texmf-dist/tex/latex/float/float.stysomewhere so we can check against our versions... – Phelype Oleinik Oct 04 '19 at 12:08apt list --installed | grep -v /stableto show packages which belong to other branches than stable – Sergei Golovan Oct 04 '19 at 12:14floathas not been changed in quite a while. – einpoklum Oct 04 '19 at 12:17\begin{figure}[H]is like a mine canary for me. – einpoklum Oct 04 '19 at 12:24floatpackage checks for anHimmediatelly following the[. If it's not found, everything is passed to LaTeX's float mechanism which will behave as if there was nofloatpackage. It looks to me thatfloatisn't seeing theH(for some reason), and then passing thatHto LaTeX, which then complains. Really stupid, but try deleting the\begin{figure}[H]line and typing it again to make sure no weird character comes between[andH... – Phelype Oleinik Oct 04 '19 at 12:28subcaption(andcaptionandcaption3) on pastebin too? – Phelype Oleinik Oct 04 '19 at 12:36\tracingmacros1as the first line of the test file above you should get a 3Mb log file which you could zip up and send to me (google my name for a gmail address) (oh or pastebin is OK) – David Carlisle Oct 04 '19 at 12:39.logand the.texfile). Also emailed it to you. – einpoklum Oct 04 '19 at 13:16captionandcaption3as well?subcaptionis just a thin wrapper around those and doesn't help much here. (Also, I think David meant the.logfile withH, noth.) – Phelype Oleinik Oct 04 '19 at 13:21Hand the failure rather than the success. – einpoklum Oct 04 '19 at 13:25