My question is about adding a properly formatted \listofalgorithms
(and later \listoflistings
) to the pittetd
class.
I don't think it's possible to \renewcommand
on \listofalgorithms
to get consistent formatting (or is it?), so I'm trying to duplicate some of the \listoffigures
and \listoftables
code. Here is what I have so far:
\newcommand\listofalgos{\clearpage
\typeout{List of Algorithms}%
\@ifundefined{@outlinefile}{}{%
\hypertarget{prelim.7}{}%
\protected@write\@outlinefile{}{%
\protect\BOOKMARK
[0][]{prelim.7}{LIST OF ALGORITHMS}{}%
\protect\begingroup\protect\makeatletter
\protect\prepare@bookmarks7
\protect\@input{\jobname.loa}
\protect\endgroup}}
\null\vskip 1in
{\normalfont\bfseries\centering
LIST OF ALGORITHMS\par}
\par\vspace{54\p@}%
\@starttoc{loa}\newpage%
\@enable{preface}{the first chapter}}
The problems are now that
- there isn't proper spacing between the caption text and the page number,
- there shouldn't be paragraph-style indentation for each entry, and
- each entry isn't on a new line:
Is there a problem with the loa
file?
\defcounter {refsection}{0}\relax
\contentsline {algorithm}{\numberline {1}{\ignorespaces Backpropagation for computing weight updates in a fully-connected neural network, going over one line}}{1}{algorithm.1}
\defcounter {refsection}{0}\relax
\contentsline {algorithm}{\numberline {2}{\ignorespaces Static linear response approach within fragment-localized formalism.}}{3}{algorithm.2}
\defcounter {refsection}{0}\relax
\contentsline {algorithm}{\numberline {3}{\ignorespaces Continuation of algorithm\nobreakspace {}\ref {alg:solve-linear-response}}}{4}{algorithm.3}
It should look like the following (ignore the different coloring, that's just hyperref):
Can it be simplified in a manner similar to the following?
\renewcommand{\listalgorithmname}{LIST OF ALGORITHMS}
\renewcommand{\listofalgorithms}{\listof{algorithm}{\listalgorithmname}}
- What is wrong with the above code (placed after
\let\l@figure\l@table
inpittetd.cls
)? - Is there a similar approach for a
\listoflistings
?