# Style problem in algorithmic package

I'm using algorithmic package and I write algorithms. It seems OK but the operators, like IF, ELSE, FOR, ENDIF, etc., are not bold.

Is there anyone that has an idea?

Here is an example:

\begin{algorithm}
\caption{Tournament algorithm}
\label{alg:algoTournament}
\begin{boxedminipage}{155mm}
\begin{algorithmic}[1]
\STATE $fitness \leftarrow 0$
\STATE $groupIndex \leftarrow -1$
\FOR {$i \leftarrow 1$ to $tournamentSize$}
\STATE Select a random group G1
\IF {$G1$ in $selectedGroups$}
\STATE Select another group for G1
\ENDIF
\IF {$fitness < fitnessOfSelectedGroup$}
\STATE {$fitness=fitnessOfSelectedGroup$}
\STATE {$groupIndex=indexOfSelectedGroup$}
\ELSE
\STATE continue
\ENDIF
\STATE Add $G1$ to $selectedGroups$
\ENDFOR
\STATE return $groupIndex$
\end{algorithmic}
\end{boxedminipage}
\vskip17.5pt
\end{algorithm}

-

• Use a font which provides a bold typeface

• Check your log file for font warnings

This minimal example shows bold operators in your code:

\documentclass{article}
\usepackage[hmargin=3cm]{geometry}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{boxedminipage}
\begin{document}
\begin{algorithm}
\caption{Tournament algorithm}
\label{alg:algoTournament}
\begin{boxedminipage}{155mm}
\begin{algorithmic}[1]
\STATE $fitness \leftarrow 0$
\STATE $groupIndex \leftarrow -1$
\FOR {$i \leftarrow 1$ to $tournamentSize$}
\STATE Select a random group G1
\IF {$G1$ in $selectedGroups$}
\STATE Select another group for G1
\ENDIF
\IF {$fitness < fitnessOfSelectedGroup$}
\STATE {$fitness=fitnessOfSelectedGroup$}
\STATE {$groupIndex=indexOfSelectedGroup$}
\ELSE
\STATE continue
\ENDIF
\STATE Add $G1$ to $selectedGroups$
\ENDFOR
\STATE return $groupIndex$
\end{algorithmic}
\end{boxedminipage}
\vskip17.5pt
\end{algorithm}
\end{document}


-
Thanks a lot. I've checked log file and as you guessed there was a Font warning. It was about my style file. I commented some lines about winfonts package and now it works OK! –  small_ticket Jul 2 '11 at 16:45