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

Bug#752773: Bug report: the new listings.sty yields failures



Dear Jobst,

a Happy New Year 2015!

On Wed, 09 Jul 2014, Hoffmann, Jobst wrote:
> > one more thing: On the TeX Live mailing list Qing Lee send a fix:
> 
> I've checked that fix, but it breaks the previous applied fix. I will
> investigate that after my holidays.

Did you have any chance to look into this problem?

Debian is already frozen and will be released sooner or later,
and we would like to have a fix for this in the next release.

Thanks for your help

Norbert

> > It seems that listings used brace trick in a wrong way since 2014/03/04 v1.5c:
> > ...
> >     % \lstthanks{Luc~Van~Eycken}{Luc.VanEycken@esat.kuleuven.be}{2014/01/22}
> >     % reported, that the experimental implementation of |\lstinline| with
> >     % braces instead of characters surrounding the source code resulted in an
> >     % error if used in a tabular environment. He found that this error comes
> >     % from the master counter (cf. appendix D (Dirty Tricks), item 5. (Brace
> >     % hacks), of the TeXbook (p. 385-386)). Adding the following line remedies
> >     % the wrong behaviour.
> > 
> > A quick fix is
> > 
> >     \makeatletter
> >     \renewcommand\lstinline[1][]{%
> >         \leavevmode\bgroup % \hbox\bgroup --> \bgroup
> >           \def\lst@boxpos{b}%
> >           \lsthk@PreSet\lstset{flexiblecolumns,#1}%
> >           \lsthk@TextStyle
> >           \ifnum\iffalse{\fi`}=\z@\fi
> >           \@ifnextchar\bgroup{%
> >             \ifnum`{=\z@}\fi%
> >             \afterassignment\lst@InlineG \let\@let@token}{%
> >             \ifnum`{=\z@}\fi\lstinline@}}
> >     \makeatother
> > Details: http://tex.stackexchange.com/a/10371
> > 
> > *********************
> > 
> > 
> > Hope that helps
> > 
> > 
> > Norbert
> > 
> > On Sat, 28 Jun 2014, Norbert Preining wrote:
> > > Dear Jobst,
> > > 
> > > here at Debian we got a bug report concerning the latest listings
> > > package, and I can confirm that it is the same on TeX Live
> > > original.
> > > 
> > > The minimal file that worked with previous version but not
> > > anymore is:
> > > 
> > > --------------------
> > > \documentclass{article}
> > > \usepackage{listings}
> > > \newcommand\foo{\lstinline{t}}
> > > \begin{document}
> > > \begin{tabular}{l}
> > > \foo
> > > \end{tabular}
> > > \end{document}
> > > --------------------
> > > 
> > > The error is:
> > > ! Missing { inserted.
> > > <inserted text> 
> > >                 {
> > > l.7 \end{tabular}
> > >                  
> > > ? 
> > > 
> > > The original reporter (in Cc) also provided an analysis:
> > > 
> > > > \newcommand\lstinline[1][]{%
> > > >     \leavevmode\bgroup % \hbox\bgroup --> \bgroup
> > > >       \def\lst@boxpos{b}%
> > > >       \lsthk@PreSet\lstset{flexiblecolumns,#1}%
> > > >       \lsthk@TextStyle
> > > >       \@ifnextchar\bgroup{%
> > > >         \ifnum`{=0}\fi%
> > > >         \afterassignment\lst@InlineG \let\@let@token}%
> > > >                          \lstinline@}
> > > > 
> > > > and it is the "\ifnum`{=0}\fi%" line (added in this new version) that
> > > > triggers the error.

------------------------------------------------------------------------
PREINING, Norbert                               http://www.preining.info
JAIST, Japan                                 TeX Live & Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0  ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------


Reply to: