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

learn more… | top users | synonyms

3
votes
0answers
330 views

algorithm2e-like vertical lines for loops in listings package [closed]

Is there any way to set vertical lines for loops in pseudo-algorithms written with listings package, in an algorithm2e style? As an example, see here: http://csweb.ucc.ie/~dongen/LAF/Algorithms.pdf ...
5
votes
0answers
55 views

Review of algorithm-related packages? [duplicate]

Possible Duplicate: Print programs with its proper syntax Where can I find (if it exists) an updated review of the most relevant packages for handling with algorithms (pseudocode or code ...
3
votes
1answer
2k views

Align comments in algorithm with package algorithm2e

I am using the package algorithm2e. When using comments like this \documentclass[11pt,a4paper,twoside,openright]{book} \usepackage[algochapter,linesnumbered,ruled,lined,boxed]{algorithm2e} ...
1
vote
1answer
380 views

Remove chapter number on algorithm numbers (scrbook)

I write my bachelor thesis using a document class provided by our institute based on scrbook. I write pseudo-codes using algorithm2e which I put in the appendix since otherwise they would "interrupt" ...
3
votes
2answers
155 views

Referencing a line starting with a keyword in algorithm2e

I want to describe parts of an algorithm, by linking to specific lines. I found that the package algorithm2e is great for typesetting algorithms, and it seems it is also able to handle labels. ...
6
votes
2answers
2k views

multiple algorithm2e algorithms in two column documents

I tried this example Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns on two column documents. It doesn't work. The error message is ! LaTeX Error: [H] ...
2
votes
1answer
299 views

algorithm2e - Unwanted vertical space

Last days I met a strange behavior with algorithm2e which produces an unwanted space after an IF-block. I put here one MWE which shows that the problem really comes from my customization and not from ...
2
votes
1answer
616 views

Putting multiple algorithm2e procedures in figure

I want to put some algorithm2e procedures into a figure like: \begin{figure} \begin{procedure} some code \; \caption{abc (n).} \end{procedure} \begin{procedure} some code \; \caption{abc (n).} ...
1
vote
1answer
126 views

algorithm2e - Unwanted warnings when apply commands to content block

In this page, Andrew Swann points me a way to make verbose formatting of algorithms (I need this only for pedagogical reasons). The problem with this solution is that it produces unwanted warnings ...
3
votes
1answer
3k views

algorithm2e - Apply commands to content block of IF … THEN … ELSE

In the following picture, I use a verbose but very pedagogical style for algorithms. I would like to automatically use macros that act on the content of block like in the first example but with ...
4
votes
1answer
485 views

algorithm2e - Different ending words for switch and case blocks

In the following MWE, I would like the end of switch to be different from the ends of case and other. Is it possible ? \documentclass{article} \usepackage{algorithm2e} \begin{document} ...
4
votes
1answer
1k views

Frame for pieces of algorithms

I would like to put frames around pieces of algorithms like in the following picture. If the background of the rectangle can be changed, it would be nice. Here is the LaTeX code used for the ...
5
votes
2answers
486 views

Algorithm2e - Unwanted semi-colon

With the following code, I have an unwanted semi-colon at the end of the loop condition. Here is MWE. \documentclass{article} \usepackage[lined]{algorithm2e} \begin{document} ...
2
votes
1answer
615 views

algorithm2e and enumerate

I would like to put one algorithm inside one enumerated list like in the following code. \documentclass[10pt,a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage{amsmath} ...
2
votes
1answer
142 views

How to put a reference into nlset command of algorithm2e package

I would like to provide an alternative version of only some part of already existing algorithm, using the algorithm2e package. My source looks like: \begin{algorithm}[t] \dots \; ...
2
votes
1answer
779 views

algorithm2e missing document mystery

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 ...
1
vote
0answers
20 views

Translate the caption label “algorithm” in algorithm2e [duplicate]

Possible Duplicate: Renaming Algorithm to Heuristic in algorithm2e package i want to get the caption label "algorithm" translated into my language, so that the caption is like: Algorithmus ...
2
votes
1answer
1k views

Nested If and For in algorithm2e

I have the following code in algorithm2e with boxruled, vlined, and linesnumbered options. pdflatex gives me an empty line at the end of both the for loops inside the ifs. Can someone please suggest a ...
4
votes
2answers
2k views

Revtex4-1 and algorithm2e indentation clash

there seems to exists a clash between revtex4-1 and the algorithm2e package. Whenever I try to insert an algorithm block when using the revtex4-1 document class, the tabulation is not working ...
3
votes
1answer
289 views

How to combine the listings and algorithm2e packages to be used with List of Listings

I want to make a "List of Algorithms and Listings" that contains both listings made with \begin{lstlisting}... (listings package) and algorithms \begin{algorithm}... (algorithm2e package). I also ...
4
votes
1answer
193 views

How to insert line before if/while-clause using Algorithms2e?

When I insert more than one new line before the if-clause of an algorithm; or a new line between two if-clauses in an Algorithms-section, I get the following error: [] ! LaTeX Error: There's no line ...
3
votes
1answer
3k views

Is there a way to reference the line number in algorithm 2e?

Say I have algorithm appear as followed Is it possible to reference the line number using ~\ref or any other possiblities?
1
vote
0answers
245 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
1k 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
631 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
638 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). ...
12
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
1k 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 ...
10
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
665 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
755 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
854 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
8k 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
366 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
2k 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
848 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
719 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
772 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} ...
4
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 ...
6
votes
2answers
826 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
327 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?
6
votes
1answer
2k 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} ... ...