[Tex/LaTex] Algorithm caption size reduction

algorithm2e

Wants to reduce the caption size of the Algorithm. \scriptsize, \footnotesize works for the body of the algorithm but not for the caption/title.

\documentclass[10pt,journal,compsoc]{IEEEtran}    
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}  
\usetikzlibrary{fit,matrix,positioning, decorations.pathreplacing,calc,shapes,arrows,shadows,patterns}
\hyphenation{op-tical net-works semi-conduc-tor}
\newdimen\zerolinewidth

\begin{document}    
\begin{algorithm}           
    \scriptsize
    \caption{Algorithm title}       
\end{algorithm} 
\end{document}

Also, how to change 'Algorithm' to 'Algo'

Best Answer

Form the package documentation:

\SetAlgorithmName{algorithmname}{algorithmautorefname}{list of algorithms name} which rede fines name of the algorithms and the sentence list of algorithms. ... omissis ... Second argument is the name that \autoref, from hyperref package, will use.

\SetAlCapFnt{<font>} sets the font used for {algorithm: } in caption of algorithm (default is set to \relax).

\SetAlCapNameFnt{<font>} sets the font used by caption text. Default is \relax and text is kept as it is.

\documentclass[10pt,journal,compsoc]{IEEEtran}   
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
\SetAlCapNameFnt{\scriptsize}
\SetAlCapFnt{\scriptsize}
\SetAlgorithmName{Algo}{Algo}{List of Algorithms}
\begin{document}  
\begin{algorithm}           
    \scriptsize
    \caption{Algorithm title}       
\end{algorithm} 
\end{document}

enter image description here

Related Question