[Tex/LaTex] Restyling the caption in an algorithm created with algorithm2e

algorithm2ecaptions

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?

Best Answer

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}

enter image description here