Below is my latex:

    $I \gets \text{Images of objects' plane}$\newline
    $Detector \gets \text{Define detector}$\newline
    $Descriptor \gets \text{Define Descriptor}$\newline

But the first line is un aligned


Line-ends within an algorithm environment under algorithm2e require the use of \;, not \newline.

enter image description here




  $I \gets \text{Images of objects' plane}$\;
  $\text{Detector} \gets \text{Define detector}$\;
  $\text{Descriptor} \gets \text{Define Descriptor}$\;


If you don't like the semicolons printed, then add


somewhere after loading algorithm2e.

| improve this answer | |
  • Would \DontPrintSemicolon remove all the semicolons in the text or just in the algorithm section? – paul-shuvo Feb 20 at 2:46
  • 1
    @paul-shuvo: Just the semicolons associated with \; within the algorithm environment. – Werner Feb 20 at 2:47

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.