Problems with the listings package

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Jan 25 10:42:06 CET 2025


Am 24.01.25 um 22:55 schrieb Karl Berry:
> Hi Jobst,
> 
>      The question is, whether I should fix the error after such a long time
> 
> I think it's good to fix errors, yes.
> 
>      and how can I assure compatibility with the current user
>      documents/package documentation?
> 
> Of course it's your choice, but my gut reaction is that isn't
> significant enough to warrant a new package option to preserve the old
> behavior. Instead, you could make it possible for people to use the
> LaTeX rollback feature to get the old behavior if they really want
> it. I can't say what, exactly, but there is doc and examples around on
> the rollback stuff.
> 
> My further hunch is that most users would be happy to have the options
> work as originally intended/documented and not be worried about the
> change in output. But who knows.
> 
> Maybe others here have better ideas ... --thanks, karl.
> 

given that (as I understand what you wrote) it is a real coding error, 
even if it is one that is fairly old, I would just fix it to match 
documentation and behavior.

If you think it is important to allow preserving the error in old 
documents I would use the \DeclareRelease mechanism. With it any user 
can rollback to a certain version if that is necessary for an old 
document. E.g., array.sty has

\DeclareRelease{}{1994-06-01}{array-2016-10-06.sty}
\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
\DeclareRelease{v2.5}{2023-11-01}{array-2023-11-01.sty}
\DeclareCurrentRelease{}{2024-06-01}

\NeedsTeXFormat{LaTeX2e}[2024/06/01]
\ProvidesPackage{array}
          [2024/10/17 v2.6g Tabular extension package (FMi)]


so you can do

\usepackage{array}[=v2.4]

or

\usepackage{array}[=2022-10-01]  % or whatever date in the relevant time
                                  % span

to get what is stored in array-2020-02-10.sty instead of the current 
version.

What I wouldn't do is to introduce an option that users need to add just 
to get the correct result

frank


More information about the tex-live mailing list.