function multiple lines into box Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)aligning a multiline formula with the bullet of itemizeSplitting Frames into Multiple ColumnsHow can I box multiple aligned equations?Box or [ around multiple lines inside alignBox for multiple lines and automatic widthAdjusting the width of a displaymath environmentSplit equation into multiple linesSplitting an equation into multiple linesbreak LHS into multiple lines for conditional functionmapsto and function definition / definition environment
How do you write "wild blueberries flavored"?
Did any compiler fully use 80-bit floating point?
Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?
Problem with display of presentation
Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?
Why not use the yoke to control yaw, as well as pitch and roll?
Did pre-Columbian Americans know the spherical shape of the Earth?
Short story about astronauts fertilizing soil with their own bodies
malloc in main() or malloc in another function: allocating memory for a struct and its members
Does a random sequence of vectors span a Hilbert space?
As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?
French equivalents of おしゃれは足元から (Every good outfit starts with the shoes)
2018 MacBook Pro won't let me install macOS High Sierra 10.13 from USB installer
How do I say "this must not happen"?
What does 丫 mean? 丫是什么意思?
Why are current probes so expensive?
Does the universe have a fixed centre of mass?
The test team as an enemy of development? And how can this be avoided?
latest version of QGIS fails to edit attribute table of GeoJSON file
One-one communication
Sally's older brother
Besides transaction validation, are there any other uses of the Script language in Bitcoin
Understanding piped commands in GNU/Linux
.bashrc alias for a command with fixed second parameter
function multiple lines into box
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)aligning a multiline formula with the bullet of itemizeSplitting Frames into Multiple ColumnsHow can I box multiple aligned equations?Box or [ around multiple lines inside alignBox for multiple lines and automatic widthAdjusting the width of a displaymath environmentSplit equation into multiple linesSplitting an equation into multiple linesbreak LHS into multiple lines for conditional functionmapsto and function definition / definition environment
I'm trying to write the Leapfrog integrator for Monte Carlo Hamiltonian, but I can not properly align each of the rows, any suggestions please.
Expected Output:
My code:
documentclass[12pt,a4paper]article
usepackageamsmath
begindocument
[
boxed
!beginaligned
textbffunction & LEAPFROG ((boldsymbolq_0, boldsymbolp_0); h, L) \
& boldsymbolp_1/2 leftarrow boldsymbolp_0 - frac12 h nabla_q U(q_0) \
& textbffor i leftarrow 1,2,...,L \
& boldsymbolq_i leftarrow boldsymbolq_i-1 + h boldsymbolM^-1 boldsymbolp_i-1/2\
& textbfif i neq L textbfthen\
& boldsymbolp_i + 1/2 leftarrow boldsymbolp_i-1/2 - h nabla_boldsymbolq U (boldsymbolq_i)\
& boldsymbolp_L leftarrow boldsymbolp_L-1/2 - 1/2 h nabla_boldsymbolq U (boldsymbolq_L) \
& textbfreturn ((boldsymbolq_L, boldsymbolp_L) textas ((boldsymbolq^*, boldsymbolp^*)
endaligned
]
enddocument
equations boxes
add a comment |
I'm trying to write the Leapfrog integrator for Monte Carlo Hamiltonian, but I can not properly align each of the rows, any suggestions please.
Expected Output:
My code:
documentclass[12pt,a4paper]article
usepackageamsmath
begindocument
[
boxed
!beginaligned
textbffunction & LEAPFROG ((boldsymbolq_0, boldsymbolp_0); h, L) \
& boldsymbolp_1/2 leftarrow boldsymbolp_0 - frac12 h nabla_q U(q_0) \
& textbffor i leftarrow 1,2,...,L \
& boldsymbolq_i leftarrow boldsymbolq_i-1 + h boldsymbolM^-1 boldsymbolp_i-1/2\
& textbfif i neq L textbfthen\
& boldsymbolp_i + 1/2 leftarrow boldsymbolp_i-1/2 - h nabla_boldsymbolq U (boldsymbolq_i)\
& boldsymbolp_L leftarrow boldsymbolp_L-1/2 - 1/2 h nabla_boldsymbolq U (boldsymbolq_L) \
& textbfreturn ((boldsymbolq_L, boldsymbolp_L) textas ((boldsymbolq^*, boldsymbolp^*)
endaligned
]
enddocument
equations boxes
Try to do that with dedicated packages, e.g.algorithms
andalgpseudocode
packages.
– Bernard
4 mins ago
add a comment |
I'm trying to write the Leapfrog integrator for Monte Carlo Hamiltonian, but I can not properly align each of the rows, any suggestions please.
Expected Output:
My code:
documentclass[12pt,a4paper]article
usepackageamsmath
begindocument
[
boxed
!beginaligned
textbffunction & LEAPFROG ((boldsymbolq_0, boldsymbolp_0); h, L) \
& boldsymbolp_1/2 leftarrow boldsymbolp_0 - frac12 h nabla_q U(q_0) \
& textbffor i leftarrow 1,2,...,L \
& boldsymbolq_i leftarrow boldsymbolq_i-1 + h boldsymbolM^-1 boldsymbolp_i-1/2\
& textbfif i neq L textbfthen\
& boldsymbolp_i + 1/2 leftarrow boldsymbolp_i-1/2 - h nabla_boldsymbolq U (boldsymbolq_i)\
& boldsymbolp_L leftarrow boldsymbolp_L-1/2 - 1/2 h nabla_boldsymbolq U (boldsymbolq_L) \
& textbfreturn ((boldsymbolq_L, boldsymbolp_L) textas ((boldsymbolq^*, boldsymbolp^*)
endaligned
]
enddocument
equations boxes
I'm trying to write the Leapfrog integrator for Monte Carlo Hamiltonian, but I can not properly align each of the rows, any suggestions please.
Expected Output:
My code:
documentclass[12pt,a4paper]article
usepackageamsmath
begindocument
[
boxed
!beginaligned
textbffunction & LEAPFROG ((boldsymbolq_0, boldsymbolp_0); h, L) \
& boldsymbolp_1/2 leftarrow boldsymbolp_0 - frac12 h nabla_q U(q_0) \
& textbffor i leftarrow 1,2,...,L \
& boldsymbolq_i leftarrow boldsymbolq_i-1 + h boldsymbolM^-1 boldsymbolp_i-1/2\
& textbfif i neq L textbfthen\
& boldsymbolp_i + 1/2 leftarrow boldsymbolp_i-1/2 - h nabla_boldsymbolq U (boldsymbolq_i)\
& boldsymbolp_L leftarrow boldsymbolp_L-1/2 - 1/2 h nabla_boldsymbolq U (boldsymbolq_L) \
& textbfreturn ((boldsymbolq_L, boldsymbolp_L) textas ((boldsymbolq^*, boldsymbolp^*)
endaligned
]
enddocument
equations boxes
equations boxes
asked 11 mins ago
Rafael DíazRafael Díaz
1085
1085
Try to do that with dedicated packages, e.g.algorithms
andalgpseudocode
packages.
– Bernard
4 mins ago
add a comment |
Try to do that with dedicated packages, e.g.algorithms
andalgpseudocode
packages.
– Bernard
4 mins ago
Try to do that with dedicated packages, e.g.
algorithms
and algpseudocode
packages.– Bernard
4 mins ago
Try to do that with dedicated packages, e.g.
algorithms
and algpseudocode
packages.– Bernard
4 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%2f485968%2ffunction-multiple-lines-into-box%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%2f485968%2ffunction-multiple-lines-into-box%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
Try to do that with dedicated packages, e.g.
algorithms
andalgpseudocode
packages.– Bernard
4 mins ago