{algorithm2e} is a package providing a floating algorithm environment with algorithmic keywords.

learn more… | top users | synonyms

1
vote
0answers
271 views

Missing $ inserted in algorithm2e [closed]

I got an error "Missing $ inserted" for the following code: \begin{algorithm}[ht!] \If{cond2}{ second if\; second if\; } \caption{Algorithm MyAlgo()}\label{algo:synConstraint} \end{algorithm} What ...
5
votes
2answers
2k views

Mutliple inputs with line breaking

I am trying to write an algorithm with multiple inputs in algorithm2e. The result I would like to have is something like Algorithm ------------------- Input: Input number 1 Input number 2 ...
5
votes
1answer
1k views

How to customize the number in the caption of an algorithm in algorithm2e

In algorithm2e, if you use the "ruled" option, the caption of algorithms are automatically numbered. E.g. if you write 2 algorithms in one document, the first one will be titled Algorithm 1 and the ...
5
votes
1answer
759 views

Create separator lines for algorithm captions in algorithm2e

How I can generate separator lines for captions as follows in algorithm2e? Algorithm 1: Generate Separator Line
2
votes
1answer
720 views

Can't use underscore in algorithm2e caption?

I have a LaTeX document using the algorithm2e package. It used to work before I upgraded to texlive (it's the Debian version 2012.20120516-1 -- some snapshot from 2012, if I understand correctly). ...
13
votes
1answer
2k views

Is it possible to have connecting loop lines (like algorithm2e) in algorithmic?

I am using the algorithmic package to typeset an algorithm. I would like to have connecting lines between the beginning and end of a loop or conditional like in the algorithm2e package. Is there an ...
15
votes
1answer
2k views

Background coloring with overlay specification in algorithm2e + beamer package

I want to highlight some portion of my pseudo codes in my slides during the course of presentation. It's easy in powerpoint and I've made a sample slide: However, I couldn't manage to get a similar ...
11
votes
2answers
2k views

How can I put a curly brace inside an algorithm to group code lines?

I am using the algorithmic package (or even algorithm2e is fine). Is it possible to use curly braces to group some lines in the algorithm so as to be able to put an explanation to the right?
4
votes
1answer
712 views

algorithm2e-Drawing vertical dashed rules

In the following code, I would like to produce dashes lines instead of normal ones. The three HERE indicate where the code draws the lines. \documentclass{article} \usepackage[utf8]{inputenc} ...
4
votes
1answer
2k views

labeling lines of algorithms inside figure environment

I am having trouble labeling lines of algorithms that are inside the figure environment. For example, in the following code the label "\lnl{loop}" gives compilation error. This works perfectly in ...
1
vote
1answer
802 views

BibTeX, Natbib, and Algorithm2e

I'm trying to prepare a journal submission, and I'm having trouble getting natbib to play nicely. When I include natbib in my document, it gives me the following error: ! Undefined control sequence ...
2
votes
1answer
931 views

Line of dots in the \listofalgorithms

I've been working with the ToC, LoF, LoT and more recently with the LoA (List of Algorithms) of my dissertation. I'm using the tocloft package so I can set their styles the way I want. My first ...
1
vote
1answer
9k views

Package algorithm2e on Ubuntu

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) ...
8
votes
1answer
3k views

List of Algorithms Using algorithm2e

According to the documentation, I can add an entry in the ToC for the list of algorithms created using the algorithm2e package by including dotocloa as a package option. When I do this I receive an ...
10
votes
1answer
407 views

algorithm2e with ruled but with customized rule thickness

I would like to present an algorithm in my work and I used the package algorithm2e. I wonder if there is a way to control hrule thickness with ruled option, so one can use thicker line pre-caption or ...
1
vote
1answer
4k views

Change the algorithm enumeration in the algorithm2e package

I would like to translate the algorithm enumeration into another language, it is always printed in English: Algorithm 1 [Title] Algorithm 2 [Title] ... I am using the algorithm2e package.
7
votes
2answers
3k views

Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns

I want to arrange four algorithms set with the algorithm2e package in two rows and two columns, as shown in the figure below. I've tried the subfigure package and have also read several related ...
8
votes
2answers
3k views

Linebreak in Package algorithm2e

I'm using the algorithm2e package for pseudocode. I got some very long lines that needed to be wrapped. Is there a way to indent the following (breaked) lines and/or put a mark at the first line to ...
3
votes
2answers
947 views

Misunderstood error with algorithm2e in LateX

I'm using LaTeX for homework in algorithms, but I have an error that I can't solve. I think the error comes from Algorithm2e which doesn't like multiple nested if(?) Runaway argument? { \eIf ...
3
votes
1answer
780 views

cleveref, hyperref and algorithm2e package produce wrong hyperlink (though correct page reference)

I'm using the packages as stated above in their latest version (also oberdiek-package is up-to-date). The following code produces the wrong pdf-link to a float environment (refers to the same page as ...
4
votes
1answer
821 views

LuaLaTeX and algorithm2e

The algorithm2e package seems to be not compatible with LuaLaTeX. For example, compiling the following code produces an error. \documentclass{article} \usepackage{fontspec} \usepackage{algorithm2e} ...
5
votes
2answers
3k views

How to typeset gotos and labels using LaTeX pseudocode environments?

Is there any way to typeset gotos and labels using LaTeX pseudocode environments (algorithmic, pseudocode, clrscode, algorithm2e, etc.)? Automatic and correct indentation of labels would also be ...
7
votes
2answers
896 views

Amsart with algorithm2e introduces extraneous text into pdf file with Texlive 2011

I just removed the default Ubuntu TexLive 2009 installation and installed TexLive 2011 using install-tl. However, now I am facing problems with the amsart and algorithm2e packages. Specifically, when ...
2
votes
2answers
1k views

Changing caption numbering for algorithm in algorithm2e

I am trying to define a new environment that uses the algorithm environment from algorithm2e. I want to use a separate caption counter for this new environment. As of now, this is what I have, but I ...
3
votes
2answers
3k views

Squeezing space around algorithm construct

I am using algorithm2e for developing algorithm constructs in my LaTeX document. However, if I want to use [!t] or [!b] to place the algorithm construct in an appropriate place, sometimes the ...
4
votes
2answers
2k views

Setting caption/rule width in Algorithm2e algs

Many of the algorithms I have with the algorithm2e package do not extend across the page width. If I use the package's boxruled or ruled options, the result is a box or rule that extends the pagewidth ...
2
votes
1answer
329 views

What environment to use in writing functions

I am beginner of LaTeX, and wondering how to write functions or procedures in pseudocode. Is there any existing environment for that?
7
votes
1answer
3k views

Renaming Algorithm to Heuristic in algorithm2e package

I am trying to write some heuristics for a problem using the algorithm2e package. However as you may know, when you write : \begin{algorithm} \caption{Heuristic 1: Name of Heuristic} ... ...
3
votes
2answers
4k views

Undefined control sequence in algorithm package

I am using Ubuntu 11.04 with TeXmaker and TeX Live. There is a \newenvironment definition in my LaTeX file: \newenvironment{algo}[1]{% \begin{algorithm}[#1] \SetTitleSty{textsc}{normalsize} ...
3
votes
1answer
3k views

algorithm2e split over several pages

Is there an option in algorithm2e to split the algorithm over several pages? Please no answer with "use algorithmic or listings packages". algorithm2e is the best package for algorithms in latex, so I ...
2
votes
1answer
787 views

Export algorithm as pdf

I use algorithm2e package for my algorithms and want to export my algorithm as pdf and could not find a way to do it. Is there any way to do this? The reason is that I use a style file provided to me ...
10
votes
1answer
1k views

titlesec, hyperref, algorithm2e, and \appendix

When I use titlesec, hyperref, and algorithm2e together, sections after an \appendix are not numbered properly. \documentclass{article} \usepackage{titlesec} \usepackage{hyperref} ...
3
votes
1answer
295 views

Strange interaction between natbib and algorithm2e

Here's a minimal example. \documentclass{article} \usepackage{titlesec} \usepackage{algorithm2e} \usepackage{natbib} \begin{document} \bibliographystyle{plainnat} \begin{thebibliography}{1} ...
5
votes
2answers
2k views

“\Ualgocf@original@chapter” undefined when using algorithm2e with natbib

Is it possible to just use plainnat without using the package natbib? When I do so, multiple author references don't work too well. I get [author et al (year)auhtor1, author2 and author3] when ...
7
votes
1answer
1k views

How to split algorithm2e over two pages

I'm using algorithm2e package but my algorithm does not fit in only one page. Is there any way to split it over two pages, even if manually? If doing it manually, we can use two algorithm ...
0
votes
1answer
448 views

Algorithm not displayed under correct section

I'm using the algorithm2e package to put algorithm in my LaTeX documents. In my document, I have something like this : \section My algorithms \subsection Algo 1 code for first algorithm ... ...
5
votes
1answer
2k views

Latex : algorithm not display under correct section

I'm using the algorithm2e package to put algorithm in my Latex documents. In my document, I have something like this : \section My algorithms \subsection Algo 1 code for first algorithm ... ...
3
votes
1answer
1k views

hyphen in function name using algorithm2e package

I'm trying to put a hyphen into a function name using the algorithm2e package, though it doesn't seem to like it. Minimal example: \begin{algorithm} \SetKwFunction{NOHYPHEN}{NOHYPHEN} ...
3
votes
2answers
4k views

Strange errors in MikTeX when using algorithm2e

I am trying to use the algorithm2e package in MikTeX, but when I put these commands: \dontprintsemicolon \SetLine it doesn't recognize them. I do not understand why; I have used these commands ...
11
votes
1answer
988 views

cleveref and algorithm2e

I'm currently working on a document where I was using algorithm+algorithmic along with cleveref. With this everything worked perfectly. Now I had to replace algorithm+algorithmic with algorithm2e. ...
4
votes
2answers
1k views

ending statements in algorithm2e environment

I am using the package algorithm2e. Is there a way to end with period instead of semicolon, or end with simply newline? I don't like the semicolons on the sentences. If I just try putting a period it ...
4
votes
2answers
2k views

LaTeX: UTF8 and algorithm2e clash

I have this input file in utf8 encoding: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{algorithm2e} \begin{document} \begin{procedure} foo \caption{ö()} \end{procedure} ...
2
votes
2answers
1k views

Is it possible to change the way a list of algorithms is generated to include the word “Algorithm” before each element in the list?

I've tried using both algorithm2e and algorithmic to generate a list of algorithms, but they both do it this way: List of Algorithms 1 BFS ..... 1 2 DFS ..... 2 ... When I'd like to it to be: ...