I am having some trouble getting a LaTeX document to compile. I would like to use the package algorithm2e. I am working on a machine running Ubuntu. I tried using Texmaker and Gummi (LaTeX editors) and got same errors on both:

! LaTeX Error: File `algorithm2e.sty' not found.

Type X to quit or  to proceed,
or enter new name. (Default extension: sty)

Also I have texlive distribution. When I did this on my windows machine (with MiKTeX) it worked like a charm. Suggestions?




migrated from stackoverflow.com Feb 29 '12 at 18:50

This question came from our site for professional and enthusiast programmers.

  • algorithm2e was the first one I heard of (recommended by professor) – Benjamin Feb 28 '12 at 22:01
  • @KonradRudolph: Superior how, exactly? Just curious. – Dervin Thunk Feb 29 '12 at 2:40
  • @Dervin (1) Markup: I don’t particularly like the curly braces,; I hate the \;, it renders the markup unreadable. Also, why is there \lIf etc? The many abbreviations in macro names, too, make readability worse. And all these comments to control indent, newlines, etc. don’t have a place – it feels way more “low-level” than algorithmicx. (2) Typesetting: I never liked the Cormen pseudocode typesetting, which this package is emulating. The lines connecting block delimiters are nice, but noisy. (3) Configurability: Look at my linked example to see how extensively I configure my pseudocode. – Konrad Rudolph Feb 29 '12 at 8:06
  • 1
    Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – Werner Feb 29 '12 at 19:51

You probably have not installed the full TeX Live but only a decent selection of it. To get the package you are after you can either

  • install the full distribution, or
  • just install the package texlive-science which contains algorithm2e (the same package also contains algorithmicx).

To install the latter you can issue the following in a terminal:

sudo apt-get install texlive-science
  • Do you know how to fix this in Fedora? The corresponding sudo dnf install texlive-science didn't work. I also don't want to install the full TeX Live. – Ekanshdeep Gupta Aug 20 at 18:15

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.