New feature: list of algorithms

Issue #37 open
André Miede repo owner created an issue
Try/test and include this fix (=> Thanks to Stefan Behrendt for this suggestion):

classicthesis.sty (after tocloft-Paketes) maybe in classicthesis-config.tex:

% algorithms
\newlistof{algorithms}{loa}{\listalgorithmcfname}%
\renewcommand{\cftalgorithmspresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftalgorithmsfont}{\normalfont}%
\renewcommand{\cftalgorithmspresnum}{\algorithmcfname~}%
\renewcommand{\cftalgorithmspagefont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftalgorithmsleader}{\hspace{1.5em}}%
\renewcommand{\cftalgorithmsafterpnum}{\cftparfillskip}%
}

\newlength{\algorithmslabelwidth}%
\settowidth{\algorithmslabelwidth}{\cftalgorithmspresnum~99}%
\addtolength{\algorithmslabelwidth}{2.5em}%
%\cftsetindents{listings}{0em}{\listingslabelwidth}%
\cftsetindents{algorithms}{0em}{\figurelabelwidth}%
\let\l@algocf\l@algorithms%
\let\lstlistofalgorithms\listofalgorithms%


und in der Contents.tex dann:
%*******************************************************
% List of Algorithms
%*******************************************************
%\phantomsection
\refstepcounter{dummy}
%\addcontentsline{toc}{chapter}{\lstlistlistingname}
\pdfbookmark[1]{\listalgorithmcfname}{loa}
\lstlistofalgorithms

Original issue reported on code.google.com by amiede on 2011-10-18 19:06:55

Official response

Comments (9)

  1. Former user Account Deleted

    ``` I have tried adding the first chunk to the end of classicthesis.sty and classicthesis-config.tex but get errors with both. Which algorithm package is this designed for? ```

    Original issue reported on code.google.com by `bruce.david.jones` on 2012-09-11 21:10:19

  2. Former user Account Deleted
    I used the algorithm2e package as mentioned here
      <http://code.google.com/p/classicthesis/issues/detail?id=15>
    
    plus you need to surround this part
    ...
    \let\l@algocf\l@algorithms%
    \let\lstlistofalgorithms\listofalgorithms%
    ...
    
    with \makeatletter and \makeatother.
    

    Original issue reported on code.google.com by jan.hendrik.nielsen on 2012-10-10 11:43:34

  3. Babil G. Sarwar
    I am using only 'algpseudocode' package and used the following quick-hack to add 'List
    of Algorithms' and a corresponding PDF bookmark.
    
    %----------------------------------------------------------------------------------------
    %   List of Algorithms
    %----------------------------------------------------------------------------------------
    
    
    \refstepcounter{dummy}
    \renewcommand{\lstlistingname}{Algorithm}% 'Listing' becomes 'Algorithm'
    \renewcommand{\lstlistlistingname}{List of \lstlistingname s}% 'List of Listings' becomes
    'List of Algorithms'
    % \addcontentsline{toc}{chapter}{\lstlistlistingname} % Uncomment if you would like
    the list of algorithms to appear in the table of contents
    \pdfbookmark[1]{\lstlistlistingname}{lol} % Bookmark name visible in a PDF viewer
    
    \listofalgorithms
    \addtocontents{loa}{\def\string\figurename{Algorithm}}
    
    \vspace*{8ex}
    \newpage
    

    Original issue reported on code.google.com by gsbabil on 2013-04-03 05:12:17

  4. jbenes
    The status of this issue is accepted, but my copy (2012-08-21, via MiKTeX package manager)
    still has this issue. Apparently, CTAN (http://www.ctan.org/tex-archive/macros/latex/contrib/classicthesis)
    lists 2012-08-11, which is even older and also before this was added/resolved.
    
    A combination of ami...@gmail.com and jan.hend...@gmail.com works for me and fixes
    the list of algorithms appearance (I use algorithm2e).
    
    Is this supposed to be part of the latest version?
    

    Original issue reported on code.google.com by jbenes on 2014-04-27 12:42:29

  5. Former user Account Deleted
    Hi
    
    I added the following
    
    %*************************
    % Algorithms
    %*************************
    %\phantomsection 
    \refstepcounter{dummy} 
    %\addcontentsline{toc}{chapter}{\lstlistlistingname} 
    \pdfbookmark[1]{\listalgorithmcfname}{loa} 
    \listofalgorithms
    
    in the table of content it comes in German as
    
    LISTE DER ALGORITHMEN
    
    how can I get it in english
    
    also
    
    at the caption of each Algorithm again I get German 
    Algorithmus
    
    rather than english Algorithm how can I change this?
    
    many thanks
    

    Original issue reported on code.google.com by andrei.rika on 2014-12-30 08:08:27

  6. Jorge Marcano

    I confirm the solution works by doing the following:

    \renewcommand{\listalgorithmcfname}{List of Algorithms} \renewcommand{Algorithm}%

    It should look like this:

    % algorithms
    \makeatletter
        \newlistof{algorithms}{loa}{\listalgorithmcfname}%
        \renewcommand*{\listalgorithmcfname}{List of Algorithms}%
        \renewcommand*{\algorithmcfname}{Algorithm}%
        \renewcommand{\cftalgorithmspresnum}{\scshape\MakeTextLowercase}%
        \renewcommand{\cftalgorithmsfont}{\normalfont}%
        \renewcommand{\cftalgorithmspresnum}{\algorithmcfname~}%
        \renewcommand{\cftalgorithmspagefont}{\normalfont}%
        \ifthenelse{\boolean{@dottedtoc}}{\relax}%
        {%
        \renewcommand{\cftalgorithmsleader}{\hspace{1.5em}}%
        \renewcommand{\cftalgorithmsafterpnum}{\cftparfillskip}%
        }
    
        \newlength{\algorithmslabelwidth}%
        \settowidth{\algorithmslabelwidth}{\cftalgorithmspresnum~99}%
        \addtolength{\algorithmslabelwidth}{2.5em}%
        %\cftsetindents{listings}{0em}{\listingslabelwidth}%
        \cftsetindents{algorithms}{0em}{\figurelabelwidth}%
        \let\l@algocf\l@algorithms%
        \let\lstlistofalgorithms\listofalgorithms%
    \makeatother
    

    And on the contents file add the code provided by @amiede:

    %*************************
    % List of Algorithms     
    %*************************
    %\phantomsection
    \refstepcounter{dummy}
    %\addcontentsline{toc}{chapter}{\lstlistlistingname}
    \pdfbookmark[1]{\listalgorithmcfname}{loa}
    \lstlistofalgorithms
    
  7. Log in to comment