I am trying to use the algorithm2e package. I downloaded the package from CTAN and verified that I can typeset its own documentation (algorithm2e.tex). I then try to write my own document that uses algorithm2e, as follows
\documentclass[12pt]{amsart}
\usepackage{algorithm2e}
\begin{document}
test
\end{document}
This TeX file is in the same directory as all the algorithm2e files that I copied from the web. I blew away all the aux files and other temporaries.
I get Latex error: Missing documentSee the LaTeX manual... etc. I have tried this under TeXWorks, TeXShop, and Texmaker on a Mac Book Pro, all with the same results. I have read the detailed log and output of TeX trying to figure out what TeX thinks is missing, and I haven't found it. Every other document I have tried to typeset works out ok.
If I take out the \usepackage{algorithm2e} command, everything is ok. I also have had no trouble using many other packages, such as
\usepackage[all]{xy}
\usepackage{noindent}
\usepackage{multirow}
\usepackage{amssymb,amsmath,latexsym,amsbsy,comment,pifont}
\usepackage{amscd}
\usepackage{palatino}
\usepackage{stmaryrd}
\usepackage{eulervm}
\usepackage{fullpage}
\usepackage[usenames,dvipsnames]{color}
\usepackage{fancybox}
\usepackage{graphicx}
All ok. The only one that seems to cause problems is algorithm2e, and only in my OWN document. To reiterate, it works great when typesetting its own documentation. I tried putting the following in every position in that block of usepackage commands
\usepackage[vlined]{algorithm2e}
it didn't matter where I put it, it generates the same error.
I've boiled this down into the smallest example I can make and I'm stumped.


localtexmffolder and refreshed the database? – Qrrbrbirlbel Oct 5 '12 at 15:03.texfile in the correct folder. By the way, you can put relative and absolute paths to a\usepackagequite like in an\input, e.g.\usepackage{../algorithm2e},\usepackage{algorithm2e/algorithm2e}or\usepackage{D:/myfu/nnypath/to/algorithm2e}. – Qrrbrbirlbel Oct 5 '12 at 15:12\listfilesto the MWE and get the correct error message (probablyMissing \begin{document}) and also the.logfile to see the position of the error message (line number, what happened before). – Heiko Oberdiek Oct 5 '12 at 15:17texhashafter installing the file? – T. Verron Oct 5 '12 at 16:10