Skip to main content

Questions tagged [algorithm2e]

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

2 votes
2 answers
74 views

Box around algorithm left vertical line alone

In alogorithm2e, output have a boxed frame, but I need a left vertical line alone. How can we achieve this. I have attached a screenshot as expected. MWE: \documentclass{article} \usepackage{...
Devi Gangadharan TNQ Software's user avatar
2 votes
1 answer
37 views

Create a new environment based on `algorithm2e` with an independent counter and correct `hyperref` links

I'm trying to create a new LaTeX environment, let's call it algprocedure, for typesetting procedures. I want it to look and feel exactly like the algorithm environment from the algorithm2e package, ...
pchappy's user avatar
  • 135
0 votes
1 answer
43 views

Algorithm formatting in JMLR LaTeX template with algorithm2e (missing horizontal lines and indented caption)

I am preparing a submission using the JMLR LaTeX template (link to template), and I am running into some formatting issues with algorithm2e. When I compile the following code: \begin{algorithm} \...
user1234567890's user avatar
0 votes
0 answers
60 views

Displaybreak for algorithms

I have the following problem. I have a relatively long pseudocode, and when I have text before it, either 1) there is a lot of white space, or 2) the text on the previous page is stretched out, or the ...
Iris Der's user avatar
2 votes
1 answer
107 views

In algorithm2e, how to stack the function parameters vertically

Suppose I have this textual code: foo(a, b, c) I want to typeset it such that in the result .pdf file it appears this way: foo(a, b, c) In addition, ChatGPT provides a "solution" ...
coderodde's user avatar
  • 645
3 votes
1 answer
72 views

Aligning equation numbers correctly in an algorithm

I am writing an article in which I use the algorithm environment. When I put a numbered equation in the algorithm (sorry computer science people), the equation number is not aligned properly. Very ...
seaver's user avatar
  • 595
3 votes
0 answers
34 views

Put vertical rule to outside of code block in algorithm2e

I am trying to write the following pseudocode: In text form: citește n,x,y (numere naturale nenule, x≤n, y≤n) nr←0 ┌pentru i←n,1,-1 execută │┌dacă i%x=0 și i%y≠0 atunci ││ nr←nr+1 ││altfel ││┌dacă i%...
stalecu64's user avatar
5 votes
1 answer
113 views

imperfect alignment of middle lines' number compared with the first and last one in algorithm2e package

Documentation: As the title, if we texdoc algorithm2e, in the documentation of Page 5, the example of "Algorithm 2: disjoint decomposition", we zoom in and the last line's number is not ...
Explorer's user avatar
  • 7,775
0 votes
0 answers
66 views

Indentation Lines of algpseudocodex does not work in RTL cases

I am trying to create a template for algorithms in Persian. I have the following piece of code, where I am using algpseudocode along with algorithm package. This setup works nicely; however, I would ...
Hosein Rahnama's user avatar
2 votes
1 answer
34 views

algorithm2e package: print caption without text "Algorithm <number>:"

When I add a caption to my algorithms, it appears on the top, just as I want, however, it is always preceded by a text like "Algorithm 1:". For example, this code \documentclass{beamer} \...
Hilder Vitor Lima Pereira's user avatar
3 votes
1 answer
194 views

Line numbers outside the box in algorithm2e

I'm new to LaTeX and I'm facing a problem while writing my proposal through Overleaf. As this pic, the line numbers of my alg are outside the box. Is there anyway to solve this problem? Here is my ...
evelyn's user avatar
  • 71
2 votes
1 answer
64 views

Change color of vertical line in algorithm2e with \SetAlgoVlined

I am looking for a method to change the color of the vertical line between while statements, for loops, and so on in the algorithm2e package, similar to the answers proposed in this question, but ...
Bart Wolleswinkel's user avatar
0 votes
1 answer
35 views

Algorithm2e draw vertical line separator after line numbers

Is it possible to draw a vertical line as a separator between the line numbers and algorithm? The line height and position should be automatic and not hard coded and adjust to algorithm height. There ...
Simon's user avatar
  • 191
1 vote
1 answer
144 views

How do I escape usage of algorithm2e (incompatible with tagpdf) within a document

Some of the algorithm passes the compilation process. Rest throws an error !Package tagpdf Error: The number of automatic begin (21) and end (18) (tagpdf) text-unit para hooks differ! Is there a ...
Senthil's user avatar
  • 117
3 votes
1 answer
83 views

Horizontal line in algorithm2e Environment

I am trying to put a line in algorithm2e: \documentclass{IEEEtran} \usepackage[ruled,linesnumbered]{algorithm2e} \begin{document} \IncMargin{1.5em} \begin{algorithm} algorithm here\; \hrule ...
Simon's user avatar
  • 191

15 30 50 per page
1
2 3 4 5
49