Vertical Lines in Algorithms not appearinglabeling lines of algorithms inside figure environmentAlgorithms in...
How do I use long payment IDs in CLI v0.14 / GUI v0.14?
How far is Brahmaloka from our Earth?
Unnormalized Log Probability - RNN
What does "^L" mean in c?
Do US professors/group leaders only get a salary, but no group budget?
Why is indicated airspeed rather than ground speed used during the takeoff roll?
If "dar" means "to give", what does "daros" mean?
How do hiring committees for research positions view getting "scooped"?
What can I do if I am asked to learn different programming languages very frequently?
Official degrees of earth’s rotation per day
Employee lack of ownership
PTIJ What is the inyan of the Konami code in Uncle Moishy's song?
Energy of photons of given frequency and number
World War I as a war of liberals against authoritarians?
Four married couples attend a party. Each person shakes hands with every other person, except their own spouse, exactly once. How many handshakes?
Bash - pair each line of file
Does multi-classing into Fighter give you heavy armor proficiency?
Print a physical multiplication table
How can I wire 7 outdoor posts correctly?
Is this an example of a Neapolitan chord?
Deletion of copy-ctor & copy-assignment - public, private or protected?
Is it correct to say "which country do you like the most?"
How to generate binary array whose elements with values 1 are randomly drawn
Difference between 戦争 and 戦火 in this exchange
Vertical Lines in Algorithms not appearing
labeling lines of algorithms inside figure environmentAlgorithms in front of the text!Indentation lines in algorithm packagecaption outside float. AlgorithmsPublication style for AlgorithmsHow to remove vertical lines representing a block in algorithm2eHow to reinitialize the lines counter for algorithms?Vertical lines in algpseudocodeSpacing between list of algorithms inconsistenFunction numbering in algorithms
I am using documentclass[5p]{elsarticle}
and packages usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
There is no error but did not get the vertical lines in loops and if conditions. Following is sample:
documentclass[5p]{elsarticle}
usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
begin{document}
section{Intro}
Text here
begin{algorithm}
caption{title of algo}
label{alg:algo1}
begin{quote}
{bf Input:} Input 1, Input 3
{bf Output:} Output here
begin{algorithmic} `[`1`]`
STATE Initialize variable
FORALL{1st for loop }
FORALL{2st for loop }
FORALL{3rd for loop}
IF {1st IF condition}
STATE statements
ELSIF{elseif condition}
STATE statements
ENDIF
STATE statements
IF {if condition}
STATE statement
ENDIF
ENDFOR
ENDFOR
ENDFOR
STATE Update the list
end{algorithmic}
end{quote}
end{algorithm}
end{document}
Thanks in advance for the help!
The output file is as shown below:
pdftex algorithm2e algorithmic
bumped to the homepage by Community♦ 2 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am using documentclass[5p]{elsarticle}
and packages usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
There is no error but did not get the vertical lines in loops and if conditions. Following is sample:
documentclass[5p]{elsarticle}
usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
begin{document}
section{Intro}
Text here
begin{algorithm}
caption{title of algo}
label{alg:algo1}
begin{quote}
{bf Input:} Input 1, Input 3
{bf Output:} Output here
begin{algorithmic} `[`1`]`
STATE Initialize variable
FORALL{1st for loop }
FORALL{2st for loop }
FORALL{3rd for loop}
IF {1st IF condition}
STATE statements
ELSIF{elseif condition}
STATE statements
ENDIF
STATE statements
IF {if condition}
STATE statement
ENDIF
ENDFOR
ENDFOR
ENDFOR
STATE Update the list
end{algorithmic}
end{quote}
end{algorithm}
end{document}
Thanks in advance for the help!
The output file is as shown below:
pdftex algorithm2e algorithmic
bumped to the homepage by Community♦ 2 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am using documentclass[5p]{elsarticle}
and packages usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
There is no error but did not get the vertical lines in loops and if conditions. Following is sample:
documentclass[5p]{elsarticle}
usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
begin{document}
section{Intro}
Text here
begin{algorithm}
caption{title of algo}
label{alg:algo1}
begin{quote}
{bf Input:} Input 1, Input 3
{bf Output:} Output here
begin{algorithmic} `[`1`]`
STATE Initialize variable
FORALL{1st for loop }
FORALL{2st for loop }
FORALL{3rd for loop}
IF {1st IF condition}
STATE statements
ELSIF{elseif condition}
STATE statements
ENDIF
STATE statements
IF {if condition}
STATE statement
ENDIF
ENDFOR
ENDFOR
ENDFOR
STATE Update the list
end{algorithmic}
end{quote}
end{algorithm}
end{document}
Thanks in advance for the help!
The output file is as shown below:
pdftex algorithm2e algorithmic
I am using documentclass[5p]{elsarticle}
and packages usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
There is no error but did not get the vertical lines in loops and if conditions. Following is sample:
documentclass[5p]{elsarticle}
usepackage{algorithmic}
usepackage[ruled, vlined, longend, linesnumbered]{algorithm2e}
begin{document}
section{Intro}
Text here
begin{algorithm}
caption{title of algo}
label{alg:algo1}
begin{quote}
{bf Input:} Input 1, Input 3
{bf Output:} Output here
begin{algorithmic} `[`1`]`
STATE Initialize variable
FORALL{1st for loop }
FORALL{2st for loop }
FORALL{3rd for loop}
IF {1st IF condition}
STATE statements
ELSIF{elseif condition}
STATE statements
ENDIF
STATE statements
IF {if condition}
STATE statement
ENDIF
ENDFOR
ENDFOR
ENDFOR
STATE Update the list
end{algorithmic}
end{quote}
end{algorithm}
end{document}
Thanks in advance for the help!
The output file is as shown below:
pdftex algorithm2e algorithmic
pdftex algorithm2e algorithmic
edited Feb 15 at 15:04
Kurt
39.4k850164
39.4k850164
asked Feb 15 at 13:55
FaaizFaaiz
63
63
bumped to the homepage by Community♦ 2 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The vertical lines between the start and end of blocks is a feature of the algorithm2e
package. You've used the algorithmic
environment and syntax from the algorithmic
package, so you cannot expect the lines to appear as the algorithmic
does not have such a feature.
I don't think you should be loading both packages - both define the the algorithm
environment and I can find no evidence to indicate that the two are compatible (with regards to how you have tried to mix them).
Seen as you want the vertical lines, my advice would be to remove usepackage{algorithmic}
and re-write your algorithm using the algorithm2e
package.
A good comparison on the different packages for writing algorithms can be found on the Wikibooks: LaTeX/Algorithms.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f475025%2fvertical-lines-in-algorithms-not-appearing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The vertical lines between the start and end of blocks is a feature of the algorithm2e
package. You've used the algorithmic
environment and syntax from the algorithmic
package, so you cannot expect the lines to appear as the algorithmic
does not have such a feature.
I don't think you should be loading both packages - both define the the algorithm
environment and I can find no evidence to indicate that the two are compatible (with regards to how you have tried to mix them).
Seen as you want the vertical lines, my advice would be to remove usepackage{algorithmic}
and re-write your algorithm using the algorithm2e
package.
A good comparison on the different packages for writing algorithms can be found on the Wikibooks: LaTeX/Algorithms.
add a comment |
The vertical lines between the start and end of blocks is a feature of the algorithm2e
package. You've used the algorithmic
environment and syntax from the algorithmic
package, so you cannot expect the lines to appear as the algorithmic
does not have such a feature.
I don't think you should be loading both packages - both define the the algorithm
environment and I can find no evidence to indicate that the two are compatible (with regards to how you have tried to mix them).
Seen as you want the vertical lines, my advice would be to remove usepackage{algorithmic}
and re-write your algorithm using the algorithm2e
package.
A good comparison on the different packages for writing algorithms can be found on the Wikibooks: LaTeX/Algorithms.
add a comment |
The vertical lines between the start and end of blocks is a feature of the algorithm2e
package. You've used the algorithmic
environment and syntax from the algorithmic
package, so you cannot expect the lines to appear as the algorithmic
does not have such a feature.
I don't think you should be loading both packages - both define the the algorithm
environment and I can find no evidence to indicate that the two are compatible (with regards to how you have tried to mix them).
Seen as you want the vertical lines, my advice would be to remove usepackage{algorithmic}
and re-write your algorithm using the algorithm2e
package.
A good comparison on the different packages for writing algorithms can be found on the Wikibooks: LaTeX/Algorithms.
The vertical lines between the start and end of blocks is a feature of the algorithm2e
package. You've used the algorithmic
environment and syntax from the algorithmic
package, so you cannot expect the lines to appear as the algorithmic
does not have such a feature.
I don't think you should be loading both packages - both define the the algorithm
environment and I can find no evidence to indicate that the two are compatible (with regards to how you have tried to mix them).
Seen as you want the vertical lines, my advice would be to remove usepackage{algorithmic}
and re-write your algorithm using the algorithm2e
package.
A good comparison on the different packages for writing algorithms can be found on the Wikibooks: LaTeX/Algorithms.
answered Feb 15 at 19:00
Pippip19Pippip19
1,6438
1,6438
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f475025%2fvertical-lines-in-algorithms-not-appearing%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