Bug#711491: texlive-extra-utils: texcount fails with some \verb delimiters
Package: texlive-extra-utils
Version: 2013.20130530-1
Severity: normal
Tags: upstream patch
If texcount is used on a file that includes a \verb command with certain
delimiters (e.g. +), the script fails.
To reproduce: create a simple latex document, and include the line
\verb+this is verbatim+
in the body. Try to run texcount on the file. The perl script will crash with
the complaint:
Quantifier follows nothing in regex; marked by <-- HERE in m/^([^+]*)(+ <--
HERE )/ at /usr/bin/texcount line 1544.
This problem is already fixed upstream, but a simple patch is attached anyway,
to be applied to
/usr/share/texlive/texmf-dist/scripts/texcount/texcount.pl
-- 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.
*** The Debian TeX Team is *no* 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 1389 Jun 7 18:32 /var/lib/texmf/ls-R
-rw-rw-r-- 1 root root 80 May 14 16:07 /usr/local/share/texmf/ls-R
lrwxrwxrwx 1 root root 29 May 12 22:11 /usr/share/texmf/ls-R -> /var/lib/texmf/ls-R-TEXMFMAIN
lrwxrwxrwx 1 root root 31 May 30 14:57 /usr/share/texlive/texmf-dist/ls-R -> /var/lib/texmf/ls-R-TEXLIVEDIST
lrwxrwxrwx 1 root root 31 May 30 14:57 /usr/share/texlive/texmf-dist/ls-R -> /var/lib/texmf/ls-R-TEXLIVEDIST
lrwxrwxrwx 1 root root 31 Oct 4 2012 /usr/share/texlive/texmf/ls-R -> /var/lib/texmf/ls-R-TEXLIVEMAIN
######################################
Config files
lrwxrwxrwx 1 root root 40 May 30 14:57 /usr/share/texmf/web2c/texmf.cnf -> ../../texlive/texmf-dist/web2c/texmf.cnf
-rw-r--r-- 1 root root 3840 Jun 7 18:32 /var/lib/texmf/web2c/fmtutil.cnf
lrwxrwxrwx 1 root root 32 May 30 14:57 /usr/share/texmf/web2c/updmap.cfg -> /var/lib/texmf/updmap.cfg-DEBIAN
-rw-r--r-- 1 root root 3731 Jun 7 18:32 /var/lib/texmf/tex/generic/config/language.dat
######################################
Files in /etc/texmf/web2c/
total 8
-rw-r--r-- 1 root root 283 Feb 28 2010 mktex.cnf
-rw-r--r-- 1 root root 475 Jun 7 18:31 texmf.cnf
######################################
md5sums of texmf.d
ca40c66f144b4bafc3e59a2dd32ecb9c /etc/texmf/texmf.d/00debian.cnf
-- System Information:
Debian Release: 7.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages texlive-extra-utils depends on:
ii dpkg 1.16.9 Debian package management system
ii luatex 0.70.1.20120524-3 next generation TeX engine
ii python 2.7.3-3 interactive high-level object-orie
ii tex-common 4.03 common infrastructure for building
ii texlive-base 2013.20130530-1 TeX Live: Essential programs and f
ii texlive-binaries 2013.20130529.30792-1 Binaries for TeX Live
ii texlive-latex-base 2013.20130530-1 TeX Live: LaTeX fundamental packag
Versions of packages texlive-extra-utils recommends:
ii ghostscript 9.05~dfsg-6.3 interpreter for the PostScript lan
ii ruby 4.9 Interpreter of object-oriented scr
ii ruby1.9.1 [ruby-interpre 1.9.3.194-8 Interpreter of object-oriented scr
ii texlive-latex-recommende 2013.20130530-1 TeX Live: LaTeX recommended packag
Versions of packages texlive-extra-utils suggests:
pn chktex <none> (no description available)
pn dvidvi <none> (no description available)
ii dvipng 1.14-1+b1 convert DVI files to PNG graphics
pn fragmaster <none> (no description available)
pn lacheck <none> (no description available)
pn latexdiff <none> (no description available)
ii latexmk 1:4.24-1 Perl script for running LaTeX the
pn purifyeps <none> (no description available)
pn xindy <none> (no description available)
Versions of packages tex-common depends on:
ii debconf [debconf-2.0] 1.5.46 Debian configuration management sy
ii dpkg 1.16.9 Debian package management system
ii ucf 3.0025+nmu1 Update Configuration File: preserv
Versions of packages texlive-extra-utils is related to:
ii tex-common 4.03 common infrastructure for building
ii texlive-binaries 2013.20130529.30792-1 Binaries for TeX Live
-- debconf information excluded
--- texcount.orig 2013-06-07 18:56:00.000000000 +1200
+++ texcount.new 2013-06-07 18:55:36.000000000 +1200
@@ -1541,7 +1541,7 @@
}
my $dlm=$&;
print_style($dlm,'command');
- if (!($tex->{'line'} =~ s/^([^$dlm]*)($dlm)// )) {
+ if (!($tex->{'line'} =~ s/^([^$dlm]*)([$dlm])// )) {
error($tex,'Invalid \verb: could not find ending delimiter ('.$dlm.').');
}
print_style($1,'ignore');
Reply to: