Skip to main content

Questions tagged [algorithms]

{algorithms} is about the presentation, numbering, and layout of algorithms or pseudocode in documents. Popular packages are algorithms, {algorithmicx}, {algorithm2e} and {listings}. For questions about the specific package, use the appropriate tag instead.

1 vote
1 answer
125 views

I am writing the pseudocode with latex.I need to find a way to make multiple lines of require.Basically, I tried to use \\ but it does not work. Please help me do that. Here is my code. \begin{...
Ricky W.'s user avatar
0 votes
0 answers
60 views

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
1 vote
1 answer
66 views

I wrote this code: \begin{algorithm} \caption{SBX Operator}\label{alg:sbx} \begin{algorithmic} \State $\eta_{SBX} \gets 5$ \For{i=1:L} \State sample $u \in [0,1]$ ...
David Peña's user avatar
3 votes
1 answer
181 views

I am very new to LaTeX and its surrounding infrastructure. I am trying to write a technical paper on LaTeX using the TikZ package. However, I am finding it difficult to draw the images in the format I ...
Towfiq Ahmed's user avatar
1 vote
2 answers
58 views

I am writing an algorithm where some parts slightly change depending on the variant, but are mostly the same. I have found a very clear way to do this is with side by side lines, colour coded for the ...
spectabilis's user avatar
3 votes
1 answer
73 views

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
4 votes
1 answer
204 views

I've noticed an apparent regression when using cleveref to reference lines of algorithms with the combination of algorithm and algcompatible. Below is an example: \documentclass{article} \usepackage{...
Bruno's user avatar
  • 2,193
0 votes
0 answers
69 views

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
1 vote
1 answer
45 views

For my course material, I "abuse" the algorithm floats, since my knowledge of LaTeX is too poor to do this "better". I hope you can forgive me for that 😉. (Actually, I'm all doing ...
Stef Pillaert's user avatar
0 votes
1 answer
60 views

can you help me fix the error, also please help me make two algorithm consistent in format (with line number) for the second algorithm I don't know why it render number 0 after update lambda. I'm so ...
jupyter's user avatar
  • 147
1 vote
1 answer
64 views

I am using the algorithmic environment in LaTeX and want to color both the line numbers and the corresponding content of specific lines. Here's the code snippet I'm working on: \Procedure{\writetxn}{$...
Eagle Bear's user avatar
0 votes
1 answer
75 views

We need the box with dotted rules around the algorithm. I tried using \usepackage[boxruled]{algorithm2e}. The rule comes as solid rule instead of dotted what I required. Can you please check and ...
Rajasekar's user avatar
2 votes
1 answer
124 views

I am currently working with the algorithmic package and need to modify the output of an algorithm such that each line starts with the word Step followed by the step number. The goal is to have the ...
Vivek Harshey's user avatar
1 vote
0 answers
34 views

Good evening, I got an error when using algorithm in latex: \documentclass[oneside,a4paper,14pt]{extreport} \usepackage{mathtools} % Font tiếng Việt \usepackage[T5]{fontenc} \usepackage[utf8]{inputenc}...
jupyter's user avatar
  • 147
3 votes
1 answer
224 views

Update: My issue is solved, thanks to Marijn (see the first answer below)! I leave my question below. I use the package cryptocode to write algorithms, in particular the \procedure command that I use ...
user8622655's user avatar

15 30 50 per page
1
2 3 4 5
78