Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 42

{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
Accepted

Create a keyword using the newalg package and algkey

The most recent version of the package is from 2005, it doesn’t ship with TeX Live, the documentation is very incomplete and promises “future work” … I don’t think this package is supported any longer …
Konrad Rudolph's user avatar
13 votes

Defining a function in pseudocode

Like Vikram said: use algpseudocode from the algorithmicx package, it’s superior to the other pseudocode packages. Then you can do the following: \begin{algorithm} \begin{algorithmic} \Procedure{You …
Konrad Rudolph's user avatar
1 vote
Accepted

Best solution to present school computing algorithm

Personally, I prefer flowchart diagrams to display algorithms but I don’t know a good way of typesetting them in LaTeX (besides using TikZ or PSTtricks, of course). …
Konrad Rudolph's user avatar
9 votes
Accepted

Problems with algoritmicx package

It’s \ElsIf, not \ElseIf (note the missing e). Furthermore, algorithm pseudocode can (and should, for readability) be indented as usual in LaTeX: \If{$y.p == T.nil$} \State{$T.root = x$} \ElsIf{ …
Konrad Rudolph's user avatar
12 votes

How to nest \Call in algorithmicx?

\Call does some internal checking that messes up formatting in some situations. I’ve redefined \Call in my thesis template to omit these checks. The result works quite well: \renewcommand*\Call[2]{\t …
Konrad Rudolph's user avatar
11 votes
Accepted

Recursive algorithms with the »algorithms« package?

There doesn’t seem to be a way of defining procedures in algorithms but you can use an algorithm environment with an appropriate \caption that names your algorithm. …
Konrad Rudolph's user avatar
105 votes

What is a good package for displaying algorithms?

To produce a list of all algorithms, you can use \listofalgorithms For further information, see the section “The algorithm Environment” in the documentation of the algorithms package. … But I want to stress again that (except for the float environment) the algorithmicx package is superior to algorithms. …
Konrad Rudolph's user avatar