[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#367261: marked as forwarded (listings-style fails to continue counting correctly)



Your message dated Tue, 16 May 2006 12:00:17 +0200
with message-id <20060516100017.GA4115@thinkpad>
has caused the Debian Bug report #367261,
regarding listings-style fails to continue counting correctly
to be marked as having been forwarded to the upstream software
author(s) Brooks Moses <bmoses@stanford.edu>.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Hi Brooks,

down here in the Debian bug tracking system a user reported that
linstings.sty version 1.3b 2004/10/17 as shipped with teTeX 3.0 does not
count the lines correctly, when firstnumber=last is used. The relevant
discussion is at <URL:http://bugs.debian.org/367261>. It looks as if
explicit use of \lstinline interferes with the line numbering, too. With
firstnumber=auto and identical [name=...] options one does not exhibit
this problem. We are unsure as to how page 14 of the listings
documentation is to be interpreted. To me it looks as if this bug
manifests itself in the example on that page.

For your convenience, I am attaching the two testcases that have been
provided by the bug reporter.

Thanks for taking over the maintaince of listings.

cheerio
ralf
\documentclass[a4paper]{article}

\usepackage[latin1]{inputenc}
\usepackage[german]{babel}
\usepackage{listings}

\begin{document}

\lstset{numbers=left, firstnumber=last}
\begin{lstlisting}
Line 1
Line 3
\end{lstlisting}

Bla Bla

BlaBlaBla
\begin{lstlisting}
Line 3
Line 4
\end{lstlisting}

Even more blabla
Even more blabla

Even more blabla
Even more blabla
Even more blabla
\begin{lstlisting}
Line 5
Line 6
\end{lstlisting}
\end{document}
\documentclass[a4paper]{article}

\usepackage[latin1]{inputenc}
\usepackage[german]{babel}
\usepackage{listings}

\begin{document}

\lstset{numbers=left, firstnumber=last}

\begin{lstlisting}
rueber    (x,y) = (x+1,y)
runter    (x,y) = (x,y+1)
ruerunter (x,y) = (x+1,y+1)
hoch      (x,y) = (x,y-1)
links     (x,y) = (x-1,y)

\end{lstlisting}

Maybe the problem is the use of lstinline in  \lstinline.doeach. as one empty line is documented, but several should not be needed. But it seems that every \lstinline-lstinline- reduces the count\ldots
\begin{lstlisting}
doeach f []      = []
doeach f (x:xs)  = ((f x):xs) : (map (x:) (doeach f xs))
\end{lstlisting}

\end{document}

--- End Message ---

Reply to: