3

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'

4

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

  • Buon guorno! Our answers crossed ;-) – user121799 Jun 9 '18 at 5:25
  • @marmot You're always faster than me! – CarLaTeX Jun 9 '18 at 5:26
  • Don't worry, I can remove my answer.... – user121799 Jun 9 '18 at 5:26
  • @marmot You're a gentleman... ops gentlemarmot – CarLaTeX Jun 9 '18 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.