46

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?

\documentclass[12pt]{article}
\usepackage{algorithm2e}

\begin{document}

\end{document}        
4
  • algorithm2e was the first one I heard of (recommended by professor)
    – Benjamin
    Feb 28, 2012 at 22:01
  • @KonradRudolph: Superior how, exactly? Just curious.
    – Dervin Thunk
    Feb 29, 2012 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. Feb 29, 2012 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, 2012 at 19:51

1 Answer 1

69

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
1
  • 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. Aug 20, 2019 at 18:15

You must log in to answer this question.

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