# Restyling the caption in an algorithm created with algorithm2e

In the caption of an algorithm created with algorithm2e,

\documentclass{article}

\usepackage[ruled]{algorithm2e}

\begin{document}

\begin{algorithm}[H]
\caption{Caption.}
pseudocode
\end{algorithm}

\end{document}


"Algorithm 1:" comes out bold. How could I change its font, say, to small caps?

Also, how could I make "Algorithm 1." appear instead?

The algorithm2e package offers \SetAlgoCaptionSeparator to change the caption separator and \AlCapFnt to control the font for the label of the caption:

\documentclass{article}
\usepackage[ruled]{algorithm2e}

\SetAlgoCaptionSeparator{.}
\renewcommand\AlCapFnt{\normalfont\scshape}

\begin{document}

\begin{algorithm}[H]
\caption{Caption.}
pseudocode
\end{algorithm}

\end{document}


• @MSC \renewcommand{\AlCapSty}{\textsc} is wrong and it will produce errors, since \textsc expects an argument. Using the font switch \scshape, as in my answer, is the right way to do the redefinition. – Gonzalo Medina May 14 '13 at 15:51