Disable algorithm numbers for only certain algorithms in a document
up vote
2
down vote
favorite
I have the following MWE
documentclass[runningheads]{llncs}
usepackage{algorithm}
usepackage{algorithmic}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
renewcommand{thealgorithm}{}
floatname{algorithm}{Not an algorithm but want the layout}
caption{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
which produces this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?
EDIT I don't want to use any other algorithm environment.
numbering algorithms algorithmic
add a comment |
up vote
2
down vote
favorite
I have the following MWE
documentclass[runningheads]{llncs}
usepackage{algorithm}
usepackage{algorithmic}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
renewcommand{thealgorithm}{}
floatname{algorithm}{Not an algorithm but want the layout}
caption{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
which produces this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?
EDIT I don't want to use any other algorithm environment.
numbering algorithms algorithmic
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have the following MWE
documentclass[runningheads]{llncs}
usepackage{algorithm}
usepackage{algorithmic}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
renewcommand{thealgorithm}{}
floatname{algorithm}{Not an algorithm but want the layout}
caption{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
which produces this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?
EDIT I don't want to use any other algorithm environment.
numbering algorithms algorithmic
I have the following MWE
documentclass[runningheads]{llncs}
usepackage{algorithm}
usepackage{algorithmic}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
renewcommand{thealgorithm}{}
floatname{algorithm}{Not an algorithm but want the layout}
caption{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
which produces this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?
EDIT I don't want to use any other algorithm environment.
numbering algorithms algorithmic
numbering algorithms algorithmic
edited 9 hours ago
asked 9 hours ago
User525412790
16410
16410
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Step down the counter:
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
newcommand{altcaption}[1]{%
addtocounter{algorithm}{-1}%
renewcommandthealgorithm{unskip}%
floatname{algorithm}{#1}%
caption
}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
altcaption{Not an algorithm but want the layout}{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
Neat-O! Thanks!
– User525412790
9 hours ago
1
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
@User525412790renewcommandthealgorithm{unskip}
– egreg
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Step down the counter:
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
newcommand{altcaption}[1]{%
addtocounter{algorithm}{-1}%
renewcommandthealgorithm{unskip}%
floatname{algorithm}{#1}%
caption
}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
altcaption{Not an algorithm but want the layout}{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
Neat-O! Thanks!
– User525412790
9 hours ago
1
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
@User525412790renewcommandthealgorithm{unskip}
– egreg
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
add a comment |
up vote
2
down vote
accepted
Step down the counter:
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
newcommand{altcaption}[1]{%
addtocounter{algorithm}{-1}%
renewcommandthealgorithm{unskip}%
floatname{algorithm}{#1}%
caption
}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
altcaption{Not an algorithm but want the layout}{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
Neat-O! Thanks!
– User525412790
9 hours ago
1
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
@User525412790renewcommandthealgorithm{unskip}
– egreg
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Step down the counter:
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
newcommand{altcaption}[1]{%
addtocounter{algorithm}{-1}%
renewcommandthealgorithm{unskip}%
floatname{algorithm}{#1}%
caption
}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
altcaption{Not an algorithm but want the layout}{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
Step down the counter:
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
newcommand{altcaption}[1]{%
addtocounter{algorithm}{-1}%
renewcommandthealgorithm{unskip}%
floatname{algorithm}{#1}%
caption
}
begin{document}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
altcaption{Not an algorithm but want the layout}{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}
end{document}
edited 9 hours ago
answered 9 hours ago
egreg
700k8518633138
700k8518633138
Neat-O! Thanks!
– User525412790
9 hours ago
1
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
@User525412790renewcommandthealgorithm{unskip}
– egreg
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
add a comment |
Neat-O! Thanks!
– User525412790
9 hours ago
1
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
@User525412790renewcommandthealgorithm{unskip}
– egreg
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
Neat-O! Thanks!
– User525412790
9 hours ago
Neat-O! Thanks!
– User525412790
9 hours ago
1
1
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
@User525412790 I made a small change to remove the added space.
– egreg
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
What's the change? I don't see anything different.
– User525412790
9 hours ago
@User525412790
renewcommandthealgorithm{unskip}
– egreg
9 hours ago
@User525412790
renewcommandthealgorithm{unskip}
– egreg
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
Oh I guess I saw the modified version directly.
– User525412790
9 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462037%2fdisable-algorithm-numbers-for-only-certain-algorithms-in-a-document%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown