Re: packages algorithm and tocbibind
- From: "Dan" <luecking@xxxxxxxx>
- Date: 18 Oct 2005 09:12:45 -0700
Joachim Reichel wrote:
> [CC: Rogério Brito <rbrito@xxxxxxxxxx>, maintainer of algorithm]
>
> Dan wrote:
>
> > Ralf Stubner wrote:
> >
> >>Joachim Reichel <joachim.reichel@xxxxxx> writes:
> >>
> >>>Has anyone any insight why the list of algorithms is messed up?
> >>
> >>I can't offer an explanation, but a workaround. If you replace book.cls
> >>by scrbookcls as well as tocbibind.sty and the redefinition of
> >>\listofalgorithms by the documentclass option 'liststotoc', your example
> >>from <3r3tfuFhipbkU1@xxxxxxxxxxxxxx> works with packages from teTeX 3.0¹
> >>(without the things from algpseudocode.sty which I don't have
> >>installed).
> >
> > I can offer an explanation: the formating command \l@agorithm has not
> > been defined. The following works:
> > \makeatletter
> > \let\l@algorithm\l@figure
> > \makeatother
>
> Thanks Dan, it works for me (although I don't understand why the toc
> entry influences the loa formatting and why the above commands fix that).
>
> Is this a bug in the algorithm or tocbibind package? Or should the
> documentation for tocbibind be extended?
The algorithm package's definition of \listofalgorithms invokes
\listof{algorithm} (\listof is from the float package), which defines
\l@algorithm (among other things), but does not do anything to put the
list into the TOC.
The basic classes define \l@figure and \l@table. So tocbibind leaves
that alone, redefining *only* enough to get those list into the TOC.
The \l@blah commands are invoked by \contentsline to format the lines
in the list-of-blah. If that command is undefined it is silently
ignored.
Thus the algorithm package's \listofalgorithms defines \l@algorithm and
the formating is correct, but doesn't emit the code needed to get that
list into the TOC. The code suggested for tocbibind does the latter but
not the former.
I think the most reasonable approach (my opinion only) would be for the
float package to put the definition of \l@blah into the \newfloat{blah}
code instead of in \listof{blah}. In that case, basic redefinitions of
\listofblahs would stand less chance of breaking. Alternatively,
float.sty or tocbibind.sty (or both) could be changed to recognize the
other.
Dan
.
- References:
- packages algorithm and tocbibind
- From: Joachim Reichel
- Re: packages algorithm and tocbibind
- From: Ralf Stubner
- Re: packages algorithm and tocbibind
- From: Dan
- Re: packages algorithm and tocbibind
- From: Joachim Reichel
- packages algorithm and tocbibind
- Prev by Date: Changing Decimal Comma into a Decimal Point
- Next by Date: Re: runaway argumet while scanning
- Previous by thread: Re: packages algorithm and tocbibind
- Next by thread: suppressing new column for sections after a bibliography
- Index(es):
Relevant Pages
|