5
votes
1answer
38 views

How to add the algorithm block in textblock

I'm creating a poster and I have a problem to adjust the algorithm block inside of textblock. My code is in below with the packages and the code. \documentclass[a0,portrait]{a0poster} ...
1
vote
0answers
565 views

Algorithm spanning two columns error with \prevdepth [closed]

I am trying to use the algorithm command to display an algorithm that spans two columns in a two column document. However, I am getting an error message with \prevdepth that I do not understand. Below ...
2
votes
1answer
766 views

Writing Pseudocode in LaTeX

I cannot seem to get any of the LaTeX pseudocode packages to work correctly on my computer. For example, if I run this block of code: \documentclass{article} \usepackage{algorithm}% ...
3
votes
1answer
117 views

Runaway argument in algorithm

\begin{algorithm} \caption{Partial Sum Update Algorithm}\label{alg:usline} \begin{algorithmic}[1] \State $\mathcal{N}^*\gets$ bitreverse$(\mathcal{N})$ \If{$i(s)=0$}\Comment{The $s^{th}$ LSB in the ...
12
votes
2answers
1k views

Coloring lines in an algorithm

I am using Beamer for creating a presentation and I am trying to highlight some lines in an algorithm. I am actually using algcompatible. I found a solution here and created a couple of new commands ...
4
votes
1answer
2k views

Algorithms \And boolean operator casuing “Undefined Control Sequence” error

I'm writing some algorithms using the algorithmicx package. I'm trying to create an if statement with an And boolean operator but using \And is causing an Undefined Control Sequence error ...
3
votes
1answer
918 views

Problems with algoritmicx package

However I turn and twist it, for some reason I can't get the two lines I have commented out to work. It keeps giving me the error: "Undefined control sequence." \begin{algorithm} ...
0
votes
1answer
2k views

Why am I getting this “Missing $ inserted” error in an algorithm figure just like all my other algorithm figures?

I'm writing a paper in LaTeX, and I'm getting a strange "Missing $ inserted" error when I try to compile the paper using pdflatex, but only if it contains the following code. \begin{algorithm*}[tbh] ...
3
votes
1answer
2k views

LaTeX algorithmic package: Undefined Control Sequence in for-Loop

I'm trying to specify an algorithm in pseudocode in a LaTeX document, but I'm having trouble with the for-Loop. My statement: \for{$bin=0 to binCount$} \item blablabla \endfor keeps on generating ...
6
votes
2answers
14k views

How to use algorithmicx package?

I found the algorithmicx package on this page, and tried to compile this example from the pdf file. \documentclass{article} \usepackage{algorithmicx} \begin{document} \begin{algorithm} ...
5
votes
2answers
1k views

How to nest \Call in algorithmicx?

I tried to show something like: Min(Right(x)), when I input the following in my LaTeX manuscript: \begin{algorithmic}[1] ... \State \Return \Call{Min}{\Call{Right}{$x$}} ... \end{algorithmic} it ...