Set width of algorithm environment (preferably document wide)Set horizontal width on custom listings environmentSet width of a custom environmentIndentation of `then` in algorithms?Set width of a custom environmentAlgorithm code width problemAlgorithm EnvironmentTabbing environment in tabular environment cancels set table widthHow can I make an algorithm environment wider than linewidth or textwidth?Set linespread in algorithm environementshow to set sidebar color widthHow to set algorithm width to avoid overfull hbox problemAdjust width of algorithm floatFormat an algorithm without using algorithm environment
How can a day be of 24 hours?
How exploitable/balanced is this homebrew spell: Spell Permanency?
Can someone clarify Hamming's notion of important problems in relation to modern academia?
What Exploit Are These User Agents Trying to Use?
Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?
Why is the sentence "Das ist eine Nase" correct?
how do we prove that a sum of two periods is still a period?
Is this draw by repetition?
Knowledge-based authentication using Domain-driven Design in C#
Different meanings of こわい
Rotate ASCII Art by 45 Degrees
Are British MPs missing the point, with these 'Indicative Votes'?
How to Prove P(a) → ∀x(P(x) ∨ ¬(x = a)) using Natural Deduction
Sums of two squares in arithmetic progressions
How could indestructible materials be used in power generation?
Machine learning testing data
Is "/bin/[.exe" a legitimate file? [Cygwin, Windows 10]
Why didn't Boeing produce its own regional jet?
How do I exit BASH while loop using modulus operator?
Finitely generated matrix groups whose eigenvalues are all algebraic
OP Amp not amplifying audio signal
What's the meaning of "Sollensaussagen"?
How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?
Am I breaking OOP practice with this architecture?
Set width of algorithm environment (preferably document wide)
Set horizontal width on custom listings environmentSet width of a custom environmentIndentation of `then` in algorithms?Set width of a custom environmentAlgorithm code width problemAlgorithm EnvironmentTabbing environment in tabular environment cancels set table widthHow can I make an algorithm environment wider than linewidth or textwidth?Set linespread in algorithm environementshow to set sidebar color widthHow to set algorithm width to avoid overfull hbox problemAdjust width of algorithm floatFormat an algorithm without using algorithm environment
Looking for a way to set the width of an algorithm
environment, preferably document wide (as opposed to per-algorithm). Thought it should be fairly easy, but couldn't find a particularly good solution.
Found this one here (wrap an algorithm in a minipage in a float, which is relatively okay, but surely there's a simpler way)?
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[2][tbh]%
beginmyalgo[#1]
centering
beginminipage#2
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]10cm
captionDoes work, though no nice solution.
endAlgorithm
enddocument
algorithms width
add a comment |
Looking for a way to set the width of an algorithm
environment, preferably document wide (as opposed to per-algorithm). Thought it should be fairly easy, but couldn't find a particularly good solution.
Found this one here (wrap an algorithm in a minipage in a float, which is relatively okay, but surely there's a simpler way)?
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[2][tbh]%
beginmyalgo[#1]
centering
beginminipage#2
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]10cm
captionDoes work, though no nice solution.
endAlgorithm
enddocument
algorithms width
add a comment |
Looking for a way to set the width of an algorithm
environment, preferably document wide (as opposed to per-algorithm). Thought it should be fairly easy, but couldn't find a particularly good solution.
Found this one here (wrap an algorithm in a minipage in a float, which is relatively okay, but surely there's a simpler way)?
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[2][tbh]%
beginmyalgo[#1]
centering
beginminipage#2
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]10cm
captionDoes work, though no nice solution.
endAlgorithm
enddocument
algorithms width
Looking for a way to set the width of an algorithm
environment, preferably document wide (as opposed to per-algorithm). Thought it should be fairly easy, but couldn't find a particularly good solution.
Found this one here (wrap an algorithm in a minipage in a float, which is relatively okay, but surely there's a simpler way)?
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[2][tbh]%
beginmyalgo[#1]
centering
beginminipage#2
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]10cm
captionDoes work, though no nice solution.
endAlgorithm
enddocument
algorithms width
algorithms width
edited Sep 22 '11 at 14:56
Joseph Wright♦
205k23563891
205k23563891
asked Dec 21 '10 at 4:00
badroitbadroit
3,45373352
3,45373352
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
floateveryalgorithmsetlengthhsize10cm
would limit the algorithm environment to a width of 10cm, but would not center it. (For additional centering one needs to re-define internal macros of the float package which does not sound like an elegant solution to me.)
So I'm afraid, the solution you have found seems to be quite good and if you would like to have the width setting global you could simply change the definition of Algorithm, e.g.:
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[1][tbh]%
beginmyalgo[#1]
centering
beginminipage10cm
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]
captionDoes work, though no nice solution.
endAlgorithm
enddocument
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
add a comment |
You can include the algorithm in a figure.
New contributor
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2f7484%2fset-width-of-algorithm-environment-preferably-document-wide%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
floateveryalgorithmsetlengthhsize10cm
would limit the algorithm environment to a width of 10cm, but would not center it. (For additional centering one needs to re-define internal macros of the float package which does not sound like an elegant solution to me.)
So I'm afraid, the solution you have found seems to be quite good and if you would like to have the width setting global you could simply change the definition of Algorithm, e.g.:
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[1][tbh]%
beginmyalgo[#1]
centering
beginminipage10cm
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]
captionDoes work, though no nice solution.
endAlgorithm
enddocument
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
add a comment |
floateveryalgorithmsetlengthhsize10cm
would limit the algorithm environment to a width of 10cm, but would not center it. (For additional centering one needs to re-define internal macros of the float package which does not sound like an elegant solution to me.)
So I'm afraid, the solution you have found seems to be quite good and if you would like to have the width setting global you could simply change the definition of Algorithm, e.g.:
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[1][tbh]%
beginmyalgo[#1]
centering
beginminipage10cm
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]
captionDoes work, though no nice solution.
endAlgorithm
enddocument
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
add a comment |
floateveryalgorithmsetlengthhsize10cm
would limit the algorithm environment to a width of 10cm, but would not center it. (For additional centering one needs to re-define internal macros of the float package which does not sound like an elegant solution to me.)
So I'm afraid, the solution you have found seems to be quite good and if you would like to have the width setting global you could simply change the definition of Algorithm, e.g.:
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[1][tbh]%
beginmyalgo[#1]
centering
beginminipage10cm
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]
captionDoes work, though no nice solution.
endAlgorithm
enddocument
floateveryalgorithmsetlengthhsize10cm
would limit the algorithm environment to a width of 10cm, but would not center it. (For additional centering one needs to re-define internal macros of the float package which does not sound like an elegant solution to me.)
So I'm afraid, the solution you have found seems to be quite good and if you would like to have the width setting global you could simply change the definition of Algorithm, e.g.:
documentclassarticle
usepackagealgorithm
floatstyleplain
newfloatmyalgotbhpmya
newenvironmentAlgorithm[1][tbh]%
beginmyalgo[#1]
centering
beginminipage10cm
beginalgorithm[H]%
endalgorithm
endminipage
endmyalgo
begindocument
beginAlgorithm[t]
captionDoes work, though no nice solution.
endAlgorithm
enddocument
answered Dec 21 '10 at 8:06
Axel SommerfeldtAxel Sommerfeldt
12.2k22855
12.2k22855
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
add a comment |
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
Thanks! (Just wanted to make sure I wasn't missing something.)
– badroit
Dec 21 '10 at 17:04
add a comment |
You can include the algorithm in a figure.
New contributor
add a comment |
You can include the algorithm in a figure.
New contributor
add a comment |
You can include the algorithm in a figure.
New contributor
You can include the algorithm in a figure.
New contributor
New contributor
answered 13 mins ago
fattah.safafattah.safa
1011
1011
New contributor
New contributor
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2f7484%2fset-width-of-algorithm-environment-preferably-document-wide%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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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