Floating lines in align environment












1















I'm using the align environment to align some equations, and I would like to insert some comments between them. The problem is that I'm using & to align the equals, and because my comments don't contain some, they make the equations shift to the right.



For example :



begin{align*}
1 &=& 3 - 2 \
text{And because 2 = 1 + 1} \
&=& 3 - 1 - 1
end{align*}


Okay, this is a stupid example but the problem is the equals will be aligned after the comment "and because...".
Do you have any idea of how I could tell LaTeX to "ignore" the comment and make it "float"?










share|improve this question

























  • this is very like the question how-can-i-break-an-align-environment-for-a-paragraph

    – barbara beeton
    Jun 25 '12 at 16:50











  • Welcome to TeX.SE. For future questions, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the documentclass and the appropriate packages.

    – Peter Grill
    Jun 25 '12 at 18:40
















1















I'm using the align environment to align some equations, and I would like to insert some comments between them. The problem is that I'm using & to align the equals, and because my comments don't contain some, they make the equations shift to the right.



For example :



begin{align*}
1 &=& 3 - 2 \
text{And because 2 = 1 + 1} \
&=& 3 - 1 - 1
end{align*}


Okay, this is a stupid example but the problem is the equals will be aligned after the comment "and because...".
Do you have any idea of how I could tell LaTeX to "ignore" the comment and make it "float"?










share|improve this question

























  • this is very like the question how-can-i-break-an-align-environment-for-a-paragraph

    – barbara beeton
    Jun 25 '12 at 16:50











  • Welcome to TeX.SE. For future questions, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the documentclass and the appropriate packages.

    – Peter Grill
    Jun 25 '12 at 18:40














1












1








1








I'm using the align environment to align some equations, and I would like to insert some comments between them. The problem is that I'm using & to align the equals, and because my comments don't contain some, they make the equations shift to the right.



For example :



begin{align*}
1 &=& 3 - 2 \
text{And because 2 = 1 + 1} \
&=& 3 - 1 - 1
end{align*}


Okay, this is a stupid example but the problem is the equals will be aligned after the comment "and because...".
Do you have any idea of how I could tell LaTeX to "ignore" the comment and make it "float"?










share|improve this question
















I'm using the align environment to align some equations, and I would like to insert some comments between them. The problem is that I'm using & to align the equals, and because my comments don't contain some, they make the equations shift to the right.



For example :



begin{align*}
1 &=& 3 - 2 \
text{And because 2 = 1 + 1} \
&=& 3 - 1 - 1
end{align*}


Okay, this is a stupid example but the problem is the equals will be aligned after the comment "and because...".
Do you have any idea of how I could tell LaTeX to "ignore" the comment and make it "float"?







math-mode spacing equations






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 15 '17 at 15:53









David Carlisle

488k4111271874




488k4111271874










asked Jun 25 '12 at 12:33









ArmaelArmael

61




61













  • this is very like the question how-can-i-break-an-align-environment-for-a-paragraph

    – barbara beeton
    Jun 25 '12 at 16:50











  • Welcome to TeX.SE. For future questions, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the documentclass and the appropriate packages.

    – Peter Grill
    Jun 25 '12 at 18:40



















  • this is very like the question how-can-i-break-an-align-environment-for-a-paragraph

    – barbara beeton
    Jun 25 '12 at 16:50











  • Welcome to TeX.SE. For future questions, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the documentclass and the appropriate packages.

    – Peter Grill
    Jun 25 '12 at 18:40

















this is very like the question how-can-i-break-an-align-environment-for-a-paragraph

– barbara beeton
Jun 25 '12 at 16:50





this is very like the question how-can-i-break-an-align-environment-for-a-paragraph

– barbara beeton
Jun 25 '12 at 16:50













Welcome to TeX.SE. For future questions, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the documentclass and the appropriate packages.

– Peter Grill
Jun 25 '12 at 18:40





Welcome to TeX.SE. For future questions, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the documentclass and the appropriate packages.

– Peter Grill
Jun 25 '12 at 18:40










1 Answer
1






active

oldest

votes


















3














Use intertext in place of text. See page 7 of the amsmath package documentation.






share|improve this answer





















  • 1





    and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

    – daleif
    Jun 25 '12 at 15:01











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f61117%2ffloating-lines-in-align-environment%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









3














Use intertext in place of text. See page 7 of the amsmath package documentation.






share|improve this answer





















  • 1





    and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

    – daleif
    Jun 25 '12 at 15:01
















3














Use intertext in place of text. See page 7 of the amsmath package documentation.






share|improve this answer





















  • 1





    and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

    – daleif
    Jun 25 '12 at 15:01














3












3








3







Use intertext in place of text. See page 7 of the amsmath package documentation.






share|improve this answer















Use intertext in place of text. See page 7 of the amsmath package documentation.







share|improve this answer














share|improve this answer



share|improve this answer








edited 6 mins ago









Martin Argerami

224211




224211










answered Jun 25 '12 at 12:36









Ian ThompsonIan Thompson

31.9k379154




31.9k379154








  • 1





    and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

    – daleif
    Jun 25 '12 at 15:01














  • 1





    and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

    – daleif
    Jun 25 '12 at 15:01








1




1





and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

– daleif
Jun 25 '12 at 15:01





and if intertext leave too much space above and below, mathtools have a shorter version: shortintertext. One useful biproduct of both, a page break is allowed at both inserted texts

– daleif
Jun 25 '12 at 15:01


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f61117%2ffloating-lines-in-align-environment%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

サソリ

広島県道265号伴広島線

Setup Asymptote in Texstudio