title: Making an algorithm more readable using LaTeX
body: <p>I'm trying to make my algorithm more readable in LaTeX:</p>
  
  <pre><code>\documentclass{IEEEtran}
  
  \usepackage{algpseudocode}
  \usepackage{algorithm}
  
  \begin{document}
  
      \begin{algorithm}[H]
      \caption{Detecta \textit{Slowloris}}
      \begin{algorithmic}[1]
  
          \Function{Divide\_slices\_1min }{Arquivo PCAP}
          \State \Return \textit{sliceAtual}
          \EndFunction
          \Function{Separa\_IP\_Origem\_Destino}{sliceAtual}
          \State \Return $ArquivoIPs$
          \EndFunction
          \Function{Calcula\_entropia\_IP\_Origem\_Destino}{ArquivoIP}
          \State \Return $EntroSliceAtualIP$
          \EndFunction
          \Function{PVS}{sliceAtual}
          \State \Return $PVS_SliceAtual$
          \EndFunction
  
          \Function{FCS}{sliceAtual}
          \State \Return $FCS_SliceAtual$
          \EndFunction
  
          \If {$entropiaSliceAtual$ &gt; $entropiaSemAtaq$ + 0,10*$entropiaSemAtaq$}
          \If {$PVS_SliceAtual$ &gt; $PVS_SemAtaq$ + 0.60*$PVS_SemAtaq$}  
          \If {$FCS_SliceAtual$ &gt; $FCS_SemAtaq$ - 0.40*$FCS_SemAtaq$}
  
          \State \Return $Ataque$
          \Else
          \State \Return $SemAtaques$
          \EndIf
          \EndIf
          \EndIf
  
      \end{algorithmic}
      \end{algorithm}
  \end{document}
  </code></pre>
  
  <p>The result was not so good:</p>
  
  <p><a href="https://i.stack.imgur.com/i5Bb3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i5Bb3.png" alt="enter image description here"></a></p>
  
  <p>I would like it to appear just the call to the functions without the lot of endif.</p>
  
  <p>I would like something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/8CLbi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8CLbi.png" alt="I would like something like this"></a></p>
  
  <p>Any suggestion? I am trying hard!
  The classe IEEEtran is : <a href="https://ctan.org/pkg/ieeetran?lang=en" rel="nofollow noreferrer">https://ctan.org/pkg/ieeetran?lang=en</a></p>