listings.sty version doesn't compile with KOMA classes in texlive 2007-13

Bug #245810 reported by Stefan Kottwitz
4
Affects Status Importance Assigned to Milestone
texlive-base (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: texlive-latex-recommended

Binary package hint: texlive-latex-recommended 2007-13 in ubuntu hardy
Source package hint: texlive-base 2007-13 (source) in ubuntu hardy

listings.sty version 1.3 of 2004/09/07 doesn't work with KOMA classes, tested with scrartcl, scrbook and scrreprt, using texlive 2007-13 on Ubuntu 8.04 (hardy), confirmed on standard x86 and amd64 installation.

The compilation stops with an error message when calling \lstlistoflistings. Minimal example:

\documentclass[a4paper,10pt]{scrartcl}
\usepackage{listings}
\begin{document}
\lstlistoflistings
\end{document}

Error message:
! Undefined control sequence.
\lstlistoflistings ...\lol@heading \@parskipfalse
                                                  \@parskip@indent \@startto...
l.5 \lstlistoflistings

\@parskip was used by older KOMA script versions but not by the KOMA classes included in texlive 2007-13.
The compilation of the example above works with listings.sty version 1.4 of 2007/02/22. I recommend to include at least version 1.4 in texlive further on.

Revision history for this message
Andreas Göb (agoeb) wrote :

Problem (and solution) confirmed for me on Hardy amd64. Version 1.4 of 2007/02/22 is the latest available from http://www.ctan.org/tex-archive/macros/latex/contrib/listings/ and works with the KOMA classes included in texlive 2007-13.

For those who do not want to manually install the new version manually, there is a workaround. You can redefine the \lstlistoflistings command like this in your document header:

\makeatletter%
\renewcommand*{\lstlistoflistings}{%
  \begingroup
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \lol@heading
    \setlength{\parskip}{\z@}%
    \setlength{\parindent}{\z@}%
    \setlength{\parfillskip}{\z@ \@plus 1fil}%
    \@starttoc{lol}%
    \if@restonecol\twocolumn\fi
  \endgroup
}
\makeatother

(taken from http://www.komascript.de/node/477)

Revision history for this message
Stefan Kottwitz (stefan.k) wrote :

Confirmed by Nina Feyh and Andreas Göb as written on 2008-08-19.

Changed in texlive-base:
status: New → Confirmed
Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

I really wish launchpad had a paypal integrated bounty system so we could pay to have bugs fixed. 16 months and two ubuntu releases later we're still running a 3.5 year old package that was bugfixed 2 years 8 months ago.

Boxed listings also fail to render.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{listings}
\usepackage{calc}
\usepackage{babel}

\begin{document}
%
\framebox{\begin{minipage}[t]{1\columnwidth}%

\begin{lstlisting}
hello
\end{lstlisting}
%
\end{minipage}}
\end{document}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.