0

I am a new user of LaTeX. I am writing a document in Texmaker. I want to write algorithms with algorithm. The problem is that gives me the error:

! LaTeX Error: File `algorithm.sty' not found.
! LaTeX Error: File `algorithmic.sty' not found.

A minimal example:

\documentclass[10pt]{article}
%\usepackage{algorithm}
\usepackage{algorithmic}
\begin{document}
\section{Algorithm in \LaTex}
\begin{algorithm}
\begin{algorithmic}
\STATE sort the input set $s_i$
\STATE search for $x_i$ in $s_i$
\end{algorithmic}
\end{algorithm}
\end{document}

Should I download algorithm package? If yes then how can I?
I am using Texmaker on Windows XP. I googled it but did not find solutions regarding this.

0

If you work on windows, you have a package manager like MiKTeX. TeXmaker is only an editor of your .tex files. Another software is called by TeXmaker to compile your files and obtain .pdf files.

You have to follow this instructions How to get the algorithm2e package? to update your package manager with algorithm2e or algorithmic package.

| improve this answer | |

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.