7

In my dissertation, I have added a page for list of algorithms, using \listofalgorithms command. However, the title of the page is not in all caps ('List Of Algorithms'), while it's supposed to be in all caps, like the title of 'LIST OF FIGURES'.

Does anyone know how I can work around this? I tried to find a related option in algorithm2e package, but apparently there is no such an option.

Here is the document class, and the packages that I've used:

\documentclass[dissertation,CC-BY-SA]{uathesis}
\usepackage[ruled,boxed,noend]{algorithm2e}
\usepackage{graphicx}
\usepackage{natbib}         
\usepackage{caption}
\usepackage{subcaption}         
\usepackage[bookmarks,colorlinks=true,urlcolor=black,linkcolor=black,citecolor=black]{hyperref}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{framed}
\usepackage[amsmath,framed]{ntheorem}
\usepackage{hhline}
\usepackage{multirow}
\usepackage{colortbl}
\usepackage{rotating}

enter image description here

0

3 Answers 3

6

One possibility is to patch the \listofalgocfs command to use \MakeUppercase for the macro containing the name:

\documentclass{book}
\usepackage{algorithm2e}
\usepackage{xpatch}

\makeatletter
\xpatchcmd{\listofalgocfs}{\algocf@seclistalgo*{\listalgorithmcfname}}{\algocf@seclistalgo*{\MakeUppercase\listalgorithmcfname}}{}{}
\makeatother

\begin{document}

\listofalgorithms

\end{document}

enter image description here

The patching can also be done with the etoolbox package:

\documentclass{book}
\usepackage{algorithm2e}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\listofalgocfs}{\algocf@seclistalgo*{\listalgorithmcfname}}{\algocf@seclistalgo*{\MakeUppercase\listalgorithmcfname}}{}{}
\makeatother

\begin{document}

\listofalgorithms

\end{document}
0
4

For me, adding this worked:

\renewcommand{\listalgorithmname}{LIST OF ALGORITHMS}

(I'm using algorithm rather than algorithm2e)

2
  • But does that apply to algorithm2e, which is what the question is about?
    – Null
    Jul 21, 2016 at 19:55
  • No, but I thought others looking at this question would find this answer helpful. Maybe I should have commented instead
    – asrjarratt
    Jul 22, 2016 at 13:13
0

For the algorithm2e package, a much simpler solution (than the accepted answer) has been provided here. To sum up, just add the following line to the preamble -

\renewcommand{\listalgorithmcfname}{LIST OF ALGORITHMS}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .