{pseudocode} is a compact and informal description of a computer programming algorithm.

learn more… | top users | synonyms

69
votes
5answers
37k views

What is a good package for displaying algorithms?

I found this page with some examples: http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode I'm wondering which one to use. Any suggestions? I'm using other packages too so whichever is less ...
8
votes
2answers
3k views

Which package to use for writing algorithms?

I am looking for a package that will allow me to write pseudocode of algorithms. The pseudocode may include mathematical symbols, like \forall, \in and subscripts. But I would like also to "talk" ...
11
votes
1answer
5k views

Pseudo code to be spread over multiple pages?

I am writing pseudo code in the algorithmic environment. It is quite long and doesn't fit on one single page. Instead of it continuing on the next page, it is cut off. I tried inserting it into a ...
9
votes
1answer
13k views

Algorithm and IEEEtran

I'm trying to write an algorithm in a IEEEtran LaTeX template and it doesn't work in any way. \usepackage{algorithm} \usepackage{algorithmc} %\begin{algorithm}[H] \begin{algorithm*} \caption{ASGP ...
0
votes
4answers
508 views

Formatting in Latex - Pseudocode [duplicate]

I am trying to create a kind of pseudocode in Latex resembling the one shown below . What I tried is: 1. Convert R to a binary region using the threshold $\theta_{0}$\\ 2. Assume N is the sum of ...
3
votes
1answer
903 views

Line Breaks in Text Mode not Working

This is a follow up from my previous question I am writing a large document in LaTeX, part of which is giving me much grief. Specifically, I have described an algorithm in several numbered steps. I ...
1
vote
1answer
137 views

How can I compile this successfully?

I have to use algpseudocode package to improve my paper look like more professional But I can't compile successfully. \usepackage{amsmath} \usepackage{algorithm} \usepackage[noend]{algpseudocode} ...
21
votes
3answers
528 views

How to write pseudocode similar to code presented in “Beautiful Code” by J. R. Heard

I came across an astonishing piece of text, which is called "Beautiful Code, Compelling Evidence" by J. R. Heard. I was wondering if there is a package or something that allows me to present my code ...
11
votes
2answers
15k views

Beamer and pseudocode

I am preparing a presentation with beamer from a previous paper written in latex. I want to insert in a slide the pseudocode \begin{algorithm} \begin{algorithmic}[1] \FOR{$i=1$ to $N$} ...
7
votes
2answers
5k views

Using Beamer to step through an algorithm written in pseudocode.

I am trying to create a beamer presentation in which I would step through an algorithm, highlighting the current line in the algorithm on each slide. I know it is possible to do with the semiverbatim ...
6
votes
1answer
11k views

do-while loop in pseudo code

The algorithmic package lets me make a while loop as \begin{algorithmic} \While{$u\neq v$} \State Something \EndWhile \end{algorithmic} which results in a while(u is not v) do ...
5
votes
1answer
619 views

Faulty right alignment for comments in algorithmic package

I'm trying to right align comments in a pseudocode environment using the algorithmic package. So I renewed the algorithmiccomment command. There's a different way to create comments for "normal" ...
3
votes
1answer
884 views

Reduce the line number font size of pseudocode?

I have learned from here on how to reduce the font size in the pseudocode. The last thing left for me is to reduce the line number font size as well. The following is my MWE, and it seems that ...
3
votes
1answer
515 views

How to break a pseudocode box between two pages [duplicate]

I am using the method here to generate my pseudocode, however my code is long and after running the tex file, instead of breaking the code box into two parts, it moves the whole code to the next page. ...
2
votes
1answer
808 views

Self-defined Width of the Pseudocode Box with algorithmicx?

This post has beautifully shown how to make the algorithm pseudocode box as wide as one column or two columns. I am now writing a pseudocode with many if layers. So a one-column box cannot suffice. ...
1
vote
1answer
27 views

Define function in pseudocode

Could you help me please how can I write a piece of pseudocode with function in latex? \begin{algorithmic} \STATE $\mathrm{maxWeight} \leftarrow \mathrm{value of e.weight where e has maximum ...
1
vote
1answer
747 views

Long code that needs to wrap

How would I enter this text on an 8.5x11 worksheet with 1.25inch margins all around so wraps around and does not extend onto the margins? Using normalsize text. SolverAdd ...
0
votes
0answers
43 views

Including Mathematica Code, in book type document

I want to include some Mathematica code in my tex file. For that I'm using this solution. As an example: \documentclass[12pt,a4paper]{book} \usepackage{graphicx} \usepackage{bm} ...