Package: texlive-latex-extra
Version: 2024.20241115-1
Severity: normal

Dear Maintainer,

When I tried to accept the changes introduced into the LaTeX source with changes package, I found that the caption of one of my figures got corrupted. After some experimenting I have found that the problem
occurs when the caption is defined in multiple lines of the LaTeX file.

Below are the results of running the pyMergeChanges on two LaTeX files. The first one with caption in a single line, and the second with caption split into two lines.

======================
$ /usr/share/texlive/texmf-dist/scripts/changes/pyMergeChanges.py -a merges_correctly.tex merged_correctly.tex Accepting all added, deleted and replaced

******** In Line 7 :
\caption{\label{fig:f1} Example figure based on~\cite{cited_work_1}. \added{As proven in~\cite{cited_work_1}, the system may be simplified.}}


** add commit ** \added{As proven in~\cite{cited_work_1}, the system may be simplified.}
Accepted.

Result: \caption{\label{fig:f1} Example figure based on~\cite{cited_work_1}. As proven in~\cite{cited_work_1}, the system may be simplified.}

$ /usr/share/texlive/texmf-dist/scripts/changes/pyMergeChanges.py -a merges_incorrectly.tex merged_incorrectly.tex Accepting all added, deleted and replaced

******** In Line 7 :
\caption{\label{fig:f1} Example figure based on~\cite{cited_work_1}. \added{As proven in~\cite{cited_work_1},

** add commit ** \added{As proven in~\cite{cited_work_1}
Accepted.

Result: \caption{\label{fig:f1} Example figure based on~\cite{cited_work_1}. As proven in~\cite{cited_work_1,
=====================

As you can see, in the second case, the pyMergeChanges.py incorrectly identified the closing brace of the \added{} section.

I attach the archive with both source files and the results of merging.

-- Package-specific info:
IMPORTANT INFORMATION: We will only consider bug reports concerning
the packaging of TeX Live as relevant. If you have problems with
combination of packages in a LaTeX document, please consult your
local TeX User Group, the comp.text.tex user group, the author of
the original .sty file, or any other help resource.
In particular, bugs that are related to up-upstream, i.e., neither
Debian nor TeX Live (upstream), but the original package authors,
will be closed immediately.

*** The Debian TeX Team is *not* a LaTeX Help Desk ***

If you report an error when running one of the TeX-related binaries (latex, pdftex, metafont,...), or if the bug is related to bad or wrong
output, please include a MINIMAL example input file that produces the
error in your report.

Please run your example with
(pdf)latex -recorder ...
(or any other program that supports -recorder) and send us the generated
file with the extension .fls, it lists all the files loaded during
the run and can easily explain problems induced by outdated files in
your home directory.

Don't forget to also include minimal examples of other files that are needed, e.g. bibtex databases. Often it also helps
to include the logfile. Please, never send included pictures!

If your example file isn't short or produces more than one page of
output (except when multiple pages are needed to show the problem),
you can probably minimize it further. Instructions on how to do that
can be found at

http://www.minimalbeispiel.de/mini-en.html (english)

or
http://www.minimalbeispiel.de/mini.html (german)

##################################
minimal input file


##################################
other files

######################################
List of ls-R files

-rw-r--r-- 1 root root 2021 Dec 30 02:44 /var/lib/texmf/ls-R
lrwxrwxrwx 1 root root 29 Oct 12 2022 /usr/share/texmf/ls-R -> /var/lib/texmf/ls-R-TEXMFMAIN lrwxrwxrwx 1 root root 31 Nov 16 22:33 /usr/share/texlive/texmf-dist/ls-R -> /var/lib/texmf/ls-R-TEXLIVEDIST lrwxrwxrwx 1 root root 31 Nov 16 22:33 /usr/share/texlive/texmf-dist/ls-R -> /var/lib/texmf/ls-R-TEXLIVEDIST
######################################
Config files
-rw-r--r-- 1 root root 475 May 24 2024 /etc/texmf/web2c/texmf.cnf
lrwxrwxrwx 1 root root 33 Nov 16 22:33 /usr/share/texmf/web2c/fmtutil.cnf -> /var/lib/texmf/fmtutil.cnf-DEBIAN lrwxrwxrwx 1 root root 32 Nov 16 22:33 /usr/share/texmf/web2c/updmap.cfg -> /var/lib/texmf/updmap.cfg-DEBIAN -rw-r--r-- 1 root root 3653 Dec 30 02:42 /var/lib/texmf/tex/generic/config/language.dat
######################################
Files in /etc/texmf/web2c/
total 8
-rw-r--r-- 1 root root 283 Apr 1 2019 mktex.cnf
-rw-r--r-- 1 root root 475 May 24 2024 texmf.cnf
######################################
md5sums of texmf.d
ca40c66f144b4bafc3e59a2dd32ecb9c /etc/texmf/texmf.d/00debian.cnf

-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.6-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages texlive-latex-extra depends on:
ii libcommons-logging-java 1.3.0-1
ii libpdfbox-java 1:1.8.16-5
ii preview-latex-style 13.2-1
ii python3 3.12.8-1
ii tex-common 6.18
ii texlive-base 2024.20241115-1
ii texlive-binaries 2024.20240313.70630+ds-5+b1
ii texlive-latex-recommended 2024.20241115-1
ii texlive-pictures 2024.20241115-1

Versions of packages texlive-latex-extra recommends:
ii default-jre 2:1.21-76
ii libspreadsheet-parseexcel-perl 0.6600-1
ii texlive-fonts-recommended 2024.20241115-1
ii texlive-plain-generic 2024.20241115-1

Versions of packages texlive-latex-extra suggests:
ii icc-profiles 2.1-2
ii libfile-which-perl 1.27-2
ii python3-pygments 2.18.0+dfsg-1
ii texlive-latex-extra-doc 2024.20241115-1
ii texlive-science 2024.20241115-1

Versions of packages tex-common depends on:
ii ucf 3.0046

Versions of packages tex-common suggests:
ii debhelper 13.23

Versions of packages texlive-latex-extra is related to:
ii tex-common 6.18
ii texlive-binaries 2024.20240313.70630+ds-5+b1

-- no debconf information

Attachment: bug_demo.tar.gz
Description: application/gzip

Reply via email to