latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
126 stars 34 forks source link

Bug with figures at end of section #143

Closed ChrisJefferson closed 2 years ago

ChrisJefferson commented 2 years ago

Compiling the following file results in the 2nd and 3rd figures disappearing, each replaced with two commas. The problem appears to be the babel package (removing it fixes the problem)

\documentclass{article}

\usepackage{babel}

\begin{document}

fds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf dsfds fds fds fdf ds

\begin{figure}[ht]
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
blabla\\
\end{figure}

\begin{figure}[ht]
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
chacha\\
\end{figure}

\begin{figure}[ht]
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
cheese\\
\end{figure}

\end{document}
u-fischer commented 2 years ago

works fine for me. Show your log-file.

ChrisJefferson commented 2 years ago

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.7.16) 18 AUG 2021 17:09 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **thesis-one.tex (./thesis-one.tex LaTeX2e <2020-02-02> patch level 2 L3 programming layer <2020-02-14> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2019/12/20 v1.4l Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2019/12/20 v1.4l Standard LaTeX file (size option) ) \c@part=\count167 \c@section=\count168 \c@subsection=\count169 \c@subsubsection=\count170 \c@paragraph=\count171 \c@subparagraph=\count172 \c@figure=\count173 \c@table=\count174 \abovecaptionskip=\skip47 \belowcaptionskip=\skip48 \bibindent=\dimen134 ) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty Package: babel 2020/02/14 3.40 The Babel package

(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def File: switch.def 2020/02/14 3.40 Babel switching mechanism ) Package babel Info: You haven't specified a language. I'll use 'nil' (babel) as the main language. Reported on input line 572.

(/usr/share/texlive/texmf-dist/tex/generic/babel/nil.ldf Language: nil 2020/02/14 3.40 Nil language

(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def File: babel.def 2020/02/14 3.40 Babel common definitions \babel@savecnt=\count175 \U@D=\dimen135

(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) \bbl@readstream=\read2 \bbl@dirlevel=\count176 ) \l@nil=\language85 )) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode \l__kernel_color_stack_int=\count177 \l__pdf_internal_box=\box45 ) (./thesis-one.aux) \openout1 = `thesis-one.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5.

Underfull \hbox (badness 10000) in paragraph at lines 12--32

[]

Underfull \hbox (badness 10000) in paragraph at lines 36--52

[]

Underfull \hbox (badness 10000) in paragraph at lines 55--71

[]

[1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] Missing character: There is no � in font cmr10! Missing character: There is no � in font cmr10! [2

] Missing character: There is no � in font cmr10! Missing character: There is no � in font cmr10! Missing character: There is no � in font cmr10! Missing character: There is no � in font cmr10!

Overfull \vbox (10.0pt too high) has occurred while \output is active []

(./thesis-one.aux) ) Here is how much of TeX's memory you used: 958 strings out of 481239 14426 string characters out of 5920377 258239 words of memory out of 5000000 16292 multiletter control sequences out of 15000+600000 532338 words of font info for 24 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 25i,4n,19p,431b,99s stack positions out of 5000i,500n,10000p,200000b,80000s </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/ cm/cmr10.pfb> Output written on thesis-one.pdf (2 pages, 11944 bytes). PDF statistics: 15 PDF objects out of 1000 (max. 8388607) 9 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000)

ChrisJefferson commented 2 years ago

Note: github ate my \\, turning them into \, I edited my original post, putting it in a code block, to stop that happening,

davidcarlisle commented 2 years ago

I can't reproduce this with a current latex (you are using texlive 2019, texlive 2021 has been out for some months) but also your log is showing missing (non ascii) characters on the final page, have you got hidden control characters in your original source?

ChrisJefferson commented 2 years ago

I've checked the document using hexdump, and there aren't any strange characters in it.

I'm using texlive 2019 because it's the standard thing distributed with Ubuntu 20.04 LTS. I'll try installing texlive 2021.

ChrisJefferson commented 2 years ago

I can't reproduce this on texlive 2021 -- also the much larger document which I reduced to find this bug also works fine in 2021.

davidcarlisle commented 2 years ago

thanks for checking the latest release.

ChrisJefferson commented 2 years ago

I don't know if it's worth forwarding this to ubuntu (who I imagine will want to maintain texlive 2019 for a few years yet)? I understand not wanting to waste time finding the causes of old bugs when new working versions of packages are out.

FrankMittelbach commented 2 years ago

@ChrisJefferson I doubt it. I still think there is something strange at your end given the log warning about missing font chars you showed.

I tried your file with TL 2019 (LaTeX2e <2020-02-02> patch level 5) and TL 2018 (LaTeX2e <2018-12-01>) and both execute the file correctly. Now this is always the last cut of the TL release so it might be possible that Ubuntu has some intermediate version which is broken, but if you want to open an issue with them I would simply go for "please provide a more recent TeX distribution

jbezos commented 2 years ago

I'm closing this issue because it cannot be reproduced with an up-to-date version.