I have the code:

\documentclass[a4paper, 11pt]{article}
\usepackage{comment} % enables the use of multi-line comments (\ifx \fi) 
\usepackage{fullpage} % changes the margin

\KwIn{Objects $O1...On$}
\KwOut{$true$, falls Mehrheitsvotum besteht, sonst $false$}

\For {$i=1$ \thinspace to n}{
    \For {$j=1$ \thinspace to n}{
     \If {$O_1=O_j$}{
     $counter \leftarrow counter+1$}
\If {$counter\geq n/2$}{
return $true$}
\Else {return $false$}

When compiled, there are some vertical lines for every for or if and it says "end" when the loop is over. Can I get rid of the lines and the end? Thanks


1 Answer 1


As the manual, section 7.4 says:

  • ok thanks. Where can I find this manual?
    – Cherry
    Oct 25, 2017 at 11:54
  • @Cherry Run texdoc algorithm2e in a terminal/command prompt on your computer, download it from CTAN, or find it on texdoc.net. Oct 25, 2017 at 11:55
  • @Cherry By the way, if you get answers to your questions that solve your problem, consider accepting one of them, by clicking the checkmark next to it (tex.meta.stackexchange.com/questions/1852/…). Oct 25, 2017 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .