Tagged Questions
2
votes
2answers
31 views
Change caption number of an algorithm
I am wondering if I can manually set the caption number of an algorithm, or let the caption number of the algorithms in an article start from 2. The following is a MWE.
...
2
votes
1answer
72 views
How to put algorithm and figure side by side in two column document?
I want to put two figures and an algorithm side by side in a two-column document, and the figures and the algorithm should span two columns.
I have surveyed previously asked questions such as How to ...
3
votes
2answers
74 views
How to avoid printing the algorithm number in algorithm captions?
I am using the algorithm2e package to write algorithms. However, when i write three algorithms one after another, the algorithms are automatically numbered 1,2 and 3 in the caption. I am using ...
3
votes
0answers
59 views
Referring to function name in an algorithm
I have a LaTeX code which looks similar to the following example.
\documentclass{article}
\usepackage{amsmath,algorithm,algpseudocode}
\begin{document}
\begin{algorithm}
\caption{My Algo.}
...
3
votes
2answers
127 views
How to remove “Algorithm #” caption prefix but keep list of algorithms?
I am using the algorithm-package and would like to name my algorithms without any generated prefix. So I would like to remove "Algorithm #" as prefix from my caption, but still keep the list of ...
5
votes
1answer
195 views
How to localize label using algorithm and algorithmic packages
I am writing a paper in Italian and I need to include pseudo code in my latex document so I am currently using the algorithm and algorithmic packages. At the top of every algorithm the label Algorithm ...
5
votes
2answers
197 views
Phantom malfunction in algorithm caption
I am trying to use \phantom in the context of an algorithm caption. I am using the algorithm and algorithmic packages. \phantom will work properly in normal text in my document, but not in a caption. ...
2
votes
0answers
133 views
\caption* does not work properly [closed]
I have a problem with using the command \caption* (from the caption package) together with the algorithm environment. Instead of parsing the \caption* as a single command, it is parsed like \caption ...
2
votes
1answer
579 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}% ...
1
vote
1answer
81 views
Order of `float` and `caption` packages in preamble
I am using float and caption packages in my document, and also packages like tabularx, listings, algorithm... that (as far as I know) define floating elements or elements that have captions ...
5
votes
1answer
368 views
How to change listing caption?
I have some listings that contain pseudo-code of algorithms. And I use this:
\lstset{caption={Descriptive Caption Text},label=DescriptiveLabel}
to add captions to them.
My problem is that the ...
4
votes
1answer
2k views
Algorithm Caption
I want algorithm to NOT show the number in caption. How can i do that? Below is the code:
\begin{algorithm}
\begin{algorithmic}
\caption{ My Algorithm}
\IF
\ELSE
\end{algorithmic}
\end{algorithm}
...
6
votes
1answer
796 views
Algorithms package ignores caption package
I'm using the algorithms package in my document to get a floating environment for algorithms to live in.
\usepackage{algorithm}
I'm using the caption package to make the captions on my figures ...
8
votes
2answers
520 views
How to put an algorithm and a tikz drawing (objects of different type) side-by-side in the same float environment?
I am trying to put an algorithm and a tikz' drawing side-by-side inside a figure environment. I am aware of this question but I would like to have a single caption for them. For instance, in the text, ...
1
vote
0answers
596 views
Why do I get the error “\caption outside float” with the algorithm / algorithmic package? [closed]
I have an algorithm in my document
It looks like this:
\begin{algorithm}
\caption{Merge Digest: Insert\label{mergeDigestInsert}}
\begin{algorithmic}[1]
[....algorithm is ...
3
votes
1answer
278 views
Additional separation between require and algorithm
\usepackage{algorithm}
\usepackage{algorithmic}
...
\begin{algorithm}
\caption{A good name}
\begin{algorithmic}
\REQUIRE something usefull
\STATE $i \leftarrow 1$
\end{algorithmic}
...
4
votes
3answers
1k views
How to create an unnumbered algorithm with a caption?
I want to do something like:
\begin{algorithm*}
\caption{My unnumbered algorithm}
% etc. etc.
\end{algorithm*}
or
\begin{algorithm}
\nonumbercaption{My unnumbered algorithm}
% etc. etc.
...
25
votes
2answers
826 views
Why does an environment's label have to appear after the caption?
\documentclass{article}
\usepackage{algorithm}
\begin{document}
\setcounter{section}{54}
\section{A section with no label}
\begin{algorithm}
\label{myalg}
\caption{An algorithm with the label ...
5
votes
1answer
432 views
Removing the borders from algorithm listings
I am relatively new to LaTeX. If I use standard algorithm and algorithmic environment for my algorithm listings I'm getting the borders displayed around the table with the pseudocode. How to remove ...
2
votes
1answer
2k views
Adjust spacing of algorithm float caption
Background
Using the algorithm package to display source code listings.
Problem
The LaTeX (LyX) code (test.lyx) is at: http://pastebin.com/QRWDhA7E
An example graphics (query.png) file is at: ...
5
votes
1answer
2k views
Floating an algorithm?
I'm typesetting an algorithm using the algorithmx package as follows:
\begin{algorithm}
\caption{\textsc{Whatever}}
\begin{algorithmic}[1]
...
\end{algorithm}
However, I would like it to ...