How to format the algorithm Announcing the arrival of Valued Associate #679: Cesar Manara ...
What is the origin of 落第?
Understanding p-Values using an example
Mechanism of oxidative dearomatisation with hypervalent iodine
Random body shuffle every night—can we still function?
What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?
The Nth Gryphon Number
Does the Black Tentacles spell do damage twice at the start of turn to an already restrained creature?
Why are vacuum tubes still used in amateur radios?
Positioning dot before text in math mode
What does Turing mean by this statement?
How could we fake a moon landing now?
Why do early math courses focus on the cross sections of a cone and not on other 3D objects?
why did the subset and factor influenced coefficients of logistic regression in R
Is multiple magic items in one inherently imbalanced?
Project Euler #1 in C++
How often does castling occur in grandmaster games?
How were pictures turned from film to a big picture in a picture frame before digital scanning?
How to ternary Plot3D a function
Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?
Is there public access to the Meteor Crater in Arizona?
Google .dev domain strangely redirects to https
Strange behavior of Object.defineProperty() in JavaScript
How to force a browser when connecting to a specific domain to be https only using only the client machine?
How much damage would a cupful of neutron star matter do to the Earth?
How to format the algorithm
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)algorithm, algorithmic, algorithmicx, algorithm2e, algpseudocode = confusedTitle of the theoremFormatting table border and text alignment in LaTeX tablecleveref counter and ref label number format with padding zeroesImpossible to select text and, then, autoformat it with Emacs+AUCtexIs it possible to get the leading spaces in copy/paste from PDF?Alternately format wordsUsing Leftbar in an algorithm table where am i going wrong?How to move image upwards to fit on slideCustom Theorem StyleCover and body need to have different line spacing
I have the text for the algorithm, I am unable to format it, with the numbers and spacing as in the image:
$COVERABILITY-GRAPH((S,T,F,M_0))$\
$(V,E,v_0):=({M_0},emptyset,M_0);$\
Work:set:=${M_0}$\
textbf{while} Work $neq emptyset$\
textbf{do} select $M$ from Work;\
Work:=Work$setminus{M};$\
textbf{for} $tin$enabled(M)\
textbf{do} $M':=$fire($M,t);$\
$M':=$AddOmegas($M,t,M',V,E$);
textbf{if} $M'not in V$\
textbf{then} $V:=Vcup {M'}$\
Work:=Work$cup{M'};$\
$E:=Ecup{(M,t,M')}$\
textbf{return}$(V,E,v_0)$
and also
$ADDOMEGAS(M,t,M',V,E)$\
textbf{for}$M''in V$\
textbf{do if} $M''<M'$ and $M''xrightarrow{*}_{E} M$\
textbf{then} $M':=M'+((M'-M'').omega);$\
textbf{return} $M';$
formatting
add a comment |
I have the text for the algorithm, I am unable to format it, with the numbers and spacing as in the image:
$COVERABILITY-GRAPH((S,T,F,M_0))$\
$(V,E,v_0):=({M_0},emptyset,M_0);$\
Work:set:=${M_0}$\
textbf{while} Work $neq emptyset$\
textbf{do} select $M$ from Work;\
Work:=Work$setminus{M};$\
textbf{for} $tin$enabled(M)\
textbf{do} $M':=$fire($M,t);$\
$M':=$AddOmegas($M,t,M',V,E$);
textbf{if} $M'not in V$\
textbf{then} $V:=Vcup {M'}$\
Work:=Work$cup{M'};$\
$E:=Ecup{(M,t,M')}$\
textbf{return}$(V,E,v_0)$
and also
$ADDOMEGAS(M,t,M',V,E)$\
textbf{for}$M''in V$\
textbf{do if} $M''<M'$ and $M''xrightarrow{*}_{E} M$\
textbf{then} $M':=M'+((M'-M'').omega);$\
textbf{return} $M';$
formatting
1
You have several algorithm packages to do it. No need for e.g.textbf{for}
.
– JouleV
14 mins ago
Thanks. I dont see how algorithmic supports numbering
– GermanShepherd
9 mins ago
I am not experienced with any of the packages at all, so I can't be sure of anything. However, I think at least one of them must support numbering.
– JouleV
7 mins ago
add a comment |
I have the text for the algorithm, I am unable to format it, with the numbers and spacing as in the image:
$COVERABILITY-GRAPH((S,T,F,M_0))$\
$(V,E,v_0):=({M_0},emptyset,M_0);$\
Work:set:=${M_0}$\
textbf{while} Work $neq emptyset$\
textbf{do} select $M$ from Work;\
Work:=Work$setminus{M};$\
textbf{for} $tin$enabled(M)\
textbf{do} $M':=$fire($M,t);$\
$M':=$AddOmegas($M,t,M',V,E$);
textbf{if} $M'not in V$\
textbf{then} $V:=Vcup {M'}$\
Work:=Work$cup{M'};$\
$E:=Ecup{(M,t,M')}$\
textbf{return}$(V,E,v_0)$
and also
$ADDOMEGAS(M,t,M',V,E)$\
textbf{for}$M''in V$\
textbf{do if} $M''<M'$ and $M''xrightarrow{*}_{E} M$\
textbf{then} $M':=M'+((M'-M'').omega);$\
textbf{return} $M';$
formatting
I have the text for the algorithm, I am unable to format it, with the numbers and spacing as in the image:
$COVERABILITY-GRAPH((S,T,F,M_0))$\
$(V,E,v_0):=({M_0},emptyset,M_0);$\
Work:set:=${M_0}$\
textbf{while} Work $neq emptyset$\
textbf{do} select $M$ from Work;\
Work:=Work$setminus{M};$\
textbf{for} $tin$enabled(M)\
textbf{do} $M':=$fire($M,t);$\
$M':=$AddOmegas($M,t,M',V,E$);
textbf{if} $M'not in V$\
textbf{then} $V:=Vcup {M'}$\
Work:=Work$cup{M'};$\
$E:=Ecup{(M,t,M')}$\
textbf{return}$(V,E,v_0)$
and also
$ADDOMEGAS(M,t,M',V,E)$\
textbf{for}$M''in V$\
textbf{do if} $M''<M'$ and $M''xrightarrow{*}_{E} M$\
textbf{then} $M':=M'+((M'-M'').omega);$\
textbf{return} $M';$
formatting
formatting
asked 15 mins ago


GermanShepherdGermanShepherd
611320
611320
1
You have several algorithm packages to do it. No need for e.g.textbf{for}
.
– JouleV
14 mins ago
Thanks. I dont see how algorithmic supports numbering
– GermanShepherd
9 mins ago
I am not experienced with any of the packages at all, so I can't be sure of anything. However, I think at least one of them must support numbering.
– JouleV
7 mins ago
add a comment |
1
You have several algorithm packages to do it. No need for e.g.textbf{for}
.
– JouleV
14 mins ago
Thanks. I dont see how algorithmic supports numbering
– GermanShepherd
9 mins ago
I am not experienced with any of the packages at all, so I can't be sure of anything. However, I think at least one of them must support numbering.
– JouleV
7 mins ago
1
1
You have several algorithm packages to do it. No need for e.g.
textbf{for}
.– JouleV
14 mins ago
You have several algorithm packages to do it. No need for e.g.
textbf{for}
.– JouleV
14 mins ago
Thanks. I dont see how algorithmic supports numbering
– GermanShepherd
9 mins ago
Thanks. I dont see how algorithmic supports numbering
– GermanShepherd
9 mins ago
I am not experienced with any of the packages at all, so I can't be sure of anything. However, I think at least one of them must support numbering.
– JouleV
7 mins ago
I am not experienced with any of the packages at all, so I can't be sure of anything. However, I think at least one of them must support numbering.
– JouleV
7 mins ago
add a comment |
0
active
oldest
votes
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%2f485783%2fhow-to-format-the-algorithm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f485783%2fhow-to-format-the-algorithm%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
1
You have several algorithm packages to do it. No need for e.g.
textbf{for}
.– JouleV
14 mins ago
Thanks. I dont see how algorithmic supports numbering
– GermanShepherd
9 mins ago
I am not experienced with any of the packages at all, so I can't be sure of anything. However, I think at least one of them must support numbering.
– JouleV
7 mins ago