How to break apart a huge fraction resulting from a symbolic calculation?
Clash Royale CLAN TAG#URR8PPP
I'm trying to use a Computer Algebra System to learn something about an algebraic expression, and this is what it gives me as a result in LaTex:
documentclassarticle
usepackagebreqn
begindocument
begindmath
frace_0 n_0 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) + e_1 n_1 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_10 left(left(- p_1 + r_1right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_1 - q_1right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) - e_11 left(left(- p_2 + r_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_2 - q_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + e_2 n_2 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_9 left(left(- p_0 + r_0right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_0 - q_0right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + left(e_3 n_0 + e_4 n_1 + e_5 n_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right) - left(e_6 n_0 + e_7 n_1 + e_8 n_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)^2
enddmath
enddocument
It is a huge fraction, that gets cut when I try to compile this to PDF:
Is there an automagic way to cut this fraction in multiple lines in LaTex? If you look at the LaTex source code, searching for sensible break points to be manually inserted in such expressions will not be fun.
Edit: The fraction looks like this:
You can barely see it, but there is a single denominator, and the numerator is huge. Is there a way to write the numerator automatically across multiple lines?
amsmath fractions breqn
add a comment |
I'm trying to use a Computer Algebra System to learn something about an algebraic expression, and this is what it gives me as a result in LaTex:
documentclassarticle
usepackagebreqn
begindocument
begindmath
frace_0 n_0 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) + e_1 n_1 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_10 left(left(- p_1 + r_1right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_1 - q_1right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) - e_11 left(left(- p_2 + r_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_2 - q_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + e_2 n_2 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_9 left(left(- p_0 + r_0right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_0 - q_0right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + left(e_3 n_0 + e_4 n_1 + e_5 n_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right) - left(e_6 n_0 + e_7 n_1 + e_8 n_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)^2
enddmath
enddocument
It is a huge fraction, that gets cut when I try to compile this to PDF:
Is there an automagic way to cut this fraction in multiple lines in LaTex? If you look at the LaTex source code, searching for sensible break points to be manually inserted in such expressions will not be fun.
Edit: The fraction looks like this:
You can barely see it, but there is a single denominator, and the numerator is huge. Is there a way to write the numerator automatically across multiple lines?
amsmath fractions breqn
3
Well, this is not a TeX's problem. Tell us how the result should look like and there should be a way how to accomplish this. However, with my typography hat on, there is no good solution that keeps the fraction as a fraction.
– yo'
Jan 22 at 13:59
add a comment |
I'm trying to use a Computer Algebra System to learn something about an algebraic expression, and this is what it gives me as a result in LaTex:
documentclassarticle
usepackagebreqn
begindocument
begindmath
frace_0 n_0 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) + e_1 n_1 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_10 left(left(- p_1 + r_1right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_1 - q_1right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) - e_11 left(left(- p_2 + r_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_2 - q_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + e_2 n_2 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_9 left(left(- p_0 + r_0right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_0 - q_0right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + left(e_3 n_0 + e_4 n_1 + e_5 n_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right) - left(e_6 n_0 + e_7 n_1 + e_8 n_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)^2
enddmath
enddocument
It is a huge fraction, that gets cut when I try to compile this to PDF:
Is there an automagic way to cut this fraction in multiple lines in LaTex? If you look at the LaTex source code, searching for sensible break points to be manually inserted in such expressions will not be fun.
Edit: The fraction looks like this:
You can barely see it, but there is a single denominator, and the numerator is huge. Is there a way to write the numerator automatically across multiple lines?
amsmath fractions breqn
I'm trying to use a Computer Algebra System to learn something about an algebraic expression, and this is what it gives me as a result in LaTex:
documentclassarticle
usepackagebreqn
begindocument
begindmath
frace_0 n_0 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) + e_1 n_1 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_10 left(left(- p_1 + r_1right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_1 - q_1right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) - e_11 left(left(- p_2 + r_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_2 - q_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + e_2 n_2 left(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right)right) - e_9 left(left(- p_0 + r_0right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right) + left(p_0 - q_0right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right)right) + left(e_3 n_0 + e_4 n_1 + e_5 n_2right) left(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2right) - left(e_6 n_0 + e_7 n_1 + e_8 n_2right) left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)left(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right) + n_2 left(p_2 - q_2right)right)^2
enddmath
enddocument
It is a huge fraction, that gets cut when I try to compile this to PDF:
Is there an automagic way to cut this fraction in multiple lines in LaTex? If you look at the LaTex source code, searching for sensible break points to be manually inserted in such expressions will not be fun.
Edit: The fraction looks like this:
You can barely see it, but there is a single denominator, and the numerator is huge. Is there a way to write the numerator automatically across multiple lines?
amsmath fractions breqn
amsmath fractions breqn
edited Jan 22 at 18:28
Cœur
1054
1054
asked Jan 22 at 13:55
tmarictmaric
4411416
4411416
3
Well, this is not a TeX's problem. Tell us how the result should look like and there should be a way how to accomplish this. However, with my typography hat on, there is no good solution that keeps the fraction as a fraction.
– yo'
Jan 22 at 13:59
add a comment |
3
Well, this is not a TeX's problem. Tell us how the result should look like and there should be a way how to accomplish this. However, with my typography hat on, there is no good solution that keeps the fraction as a fraction.
– yo'
Jan 22 at 13:59
3
3
Well, this is not a TeX's problem. Tell us how the result should look like and there should be a way how to accomplish this. However, with my typography hat on, there is no good solution that keeps the fraction as a fraction.
– yo'
Jan 22 at 13:59
Well, this is not a TeX's problem. Tell us how the result should look like and there should be a way how to accomplish this. However, with my typography hat on, there is no good solution that keeps the fraction as a fraction.
– yo'
Jan 22 at 13:59
add a comment |
2 Answers
2
active
oldest
votes
Not automagically, I'm afraid. First and foremost, don't use left
and right
sizing directives: Not only do they not succeed in enlarging any of the parentheses, they also prevent TeX from inserting line breaks within the scope of left-right pairs. Second, use a parbox
directive, and typeset the equation in inline-math mode (no frac
terms) inside the parbox
. Why inline-math mode? Because TeX allows line-breaking for inline-math material (as long as there are no left
-right
disturbances).
To set off the start and end of the numerator and denominator term, use curly braces .
Optionally, use square brackets -- [
and and ]
-- instead of the "outer" round parentheses.
That said, I'm not sure what your readers are supposed to take away -- let alone remember for more than three seconds -- from looking at the following expression...
documentclassarticle
begindocument
[
parbox0.8textwidth$bigl
e_0 n_0 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
+ e_1 n_1 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_10 [(- p_1 + r_1) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_1 - q_1) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
- e_11 [(- p_2 + r_2) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_2 - q_2) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ e_2 n_2 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_9 [(- p_0 + r_0) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_0 - q_0) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ [e_3 n_0 + e_4 n_1 + e_5 n_2] [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]
- [e_6 n_0 + e_7 n_1 + e_8 n_2] [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
bigrbig/bigl
n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)
bigr^2 $
]
enddocument
add a comment |
Not automagically. I removed the left
and right
around long expressions, keeping them only for the differences pi – qi and similar.
documentclassarticle
usepackageamsmath
begindocument
beginequation
begingathered
frac
;
parbox0.8displaywidthraggedrightleftskip=1emhspace-1em$
e_0 n_0 (- n_0 p_0 + n_0 r_0 + n_0
left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1
left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2
left(p_2 - q_2right)) + e_1 n_1
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) -
n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_10 (left(- p_1 + r_1right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_1 - q_1right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2))
- e_11 (left(- p_2 + r_2right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_2 - q_2right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2)) + e_2 n_2
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right)
- n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_9 (left(- p_0 + r_0right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right))
+ left(p_0 - q_0right) (n_0 p_0
- n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2
- n_2 r_2)) + (e_3 n_0 + e_4 n_1
+ e_5 n_2) (n_0 p_0 - n_0 r_0
+ n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2)
- (e_6 n_0 + e_7 n_1 + e_8 n_2)
(n_0 left(p_0 - q_0right) + n_1
left(p_1 - q_1right) + n_2 left(p_2 - q_2right))
$;
(n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2))^2
endgathered
endequation
enddocument
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%2f471280%2fhow-to-break-apart-a-huge-fraction-resulting-from-a-symbolic-calculation%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
Not automagically, I'm afraid. First and foremost, don't use left
and right
sizing directives: Not only do they not succeed in enlarging any of the parentheses, they also prevent TeX from inserting line breaks within the scope of left-right pairs. Second, use a parbox
directive, and typeset the equation in inline-math mode (no frac
terms) inside the parbox
. Why inline-math mode? Because TeX allows line-breaking for inline-math material (as long as there are no left
-right
disturbances).
To set off the start and end of the numerator and denominator term, use curly braces .
Optionally, use square brackets -- [
and and ]
-- instead of the "outer" round parentheses.
That said, I'm not sure what your readers are supposed to take away -- let alone remember for more than three seconds -- from looking at the following expression...
documentclassarticle
begindocument
[
parbox0.8textwidth$bigl
e_0 n_0 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
+ e_1 n_1 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_10 [(- p_1 + r_1) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_1 - q_1) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
- e_11 [(- p_2 + r_2) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_2 - q_2) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ e_2 n_2 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_9 [(- p_0 + r_0) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_0 - q_0) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ [e_3 n_0 + e_4 n_1 + e_5 n_2] [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]
- [e_6 n_0 + e_7 n_1 + e_8 n_2] [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
bigrbig/bigl
n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)
bigr^2 $
]
enddocument
add a comment |
Not automagically, I'm afraid. First and foremost, don't use left
and right
sizing directives: Not only do they not succeed in enlarging any of the parentheses, they also prevent TeX from inserting line breaks within the scope of left-right pairs. Second, use a parbox
directive, and typeset the equation in inline-math mode (no frac
terms) inside the parbox
. Why inline-math mode? Because TeX allows line-breaking for inline-math material (as long as there are no left
-right
disturbances).
To set off the start and end of the numerator and denominator term, use curly braces .
Optionally, use square brackets -- [
and and ]
-- instead of the "outer" round parentheses.
That said, I'm not sure what your readers are supposed to take away -- let alone remember for more than three seconds -- from looking at the following expression...
documentclassarticle
begindocument
[
parbox0.8textwidth$bigl
e_0 n_0 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
+ e_1 n_1 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_10 [(- p_1 + r_1) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_1 - q_1) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
- e_11 [(- p_2 + r_2) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_2 - q_2) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ e_2 n_2 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_9 [(- p_0 + r_0) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_0 - q_0) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ [e_3 n_0 + e_4 n_1 + e_5 n_2] [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]
- [e_6 n_0 + e_7 n_1 + e_8 n_2] [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
bigrbig/bigl
n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)
bigr^2 $
]
enddocument
add a comment |
Not automagically, I'm afraid. First and foremost, don't use left
and right
sizing directives: Not only do they not succeed in enlarging any of the parentheses, they also prevent TeX from inserting line breaks within the scope of left-right pairs. Second, use a parbox
directive, and typeset the equation in inline-math mode (no frac
terms) inside the parbox
. Why inline-math mode? Because TeX allows line-breaking for inline-math material (as long as there are no left
-right
disturbances).
To set off the start and end of the numerator and denominator term, use curly braces .
Optionally, use square brackets -- [
and and ]
-- instead of the "outer" round parentheses.
That said, I'm not sure what your readers are supposed to take away -- let alone remember for more than three seconds -- from looking at the following expression...
documentclassarticle
begindocument
[
parbox0.8textwidth$bigl
e_0 n_0 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
+ e_1 n_1 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_10 [(- p_1 + r_1) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_1 - q_1) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
- e_11 [(- p_2 + r_2) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_2 - q_2) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ e_2 n_2 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_9 [(- p_0 + r_0) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_0 - q_0) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ [e_3 n_0 + e_4 n_1 + e_5 n_2] [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]
- [e_6 n_0 + e_7 n_1 + e_8 n_2] [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
bigrbig/bigl
n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)
bigr^2 $
]
enddocument
Not automagically, I'm afraid. First and foremost, don't use left
and right
sizing directives: Not only do they not succeed in enlarging any of the parentheses, they also prevent TeX from inserting line breaks within the scope of left-right pairs. Second, use a parbox
directive, and typeset the equation in inline-math mode (no frac
terms) inside the parbox
. Why inline-math mode? Because TeX allows line-breaking for inline-math material (as long as there are no left
-right
disturbances).
To set off the start and end of the numerator and denominator term, use curly braces .
Optionally, use square brackets -- [
and and ]
-- instead of the "outer" round parentheses.
That said, I'm not sure what your readers are supposed to take away -- let alone remember for more than three seconds -- from looking at the following expression...
documentclassarticle
begindocument
[
parbox0.8textwidth$bigl
e_0 n_0 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
+ e_1 n_1 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_10 [(- p_1 + r_1) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_1 - q_1) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
- e_11 [(- p_2 + r_2) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_2 - q_2) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ e_2 n_2 [- n_0 (p_0 - r_0) + n_0 (p_0 - q_0)
- n_1 (p_1 - r_1) + n_1 (p_1 - q_1)
- n_2 (p_2 - r_2) + n_2 (p_2 - q_2)]
- e_9 [(- p_0 + r_0) [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
+ (p_0 - q_0) [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]]
+ [e_3 n_0 + e_4 n_1 + e_5 n_2] [n_0 (p_0 - r_0) + n_1 (p_1 - r_1) + n_2 (p_2 - r_2)]
- [e_6 n_0 + e_7 n_1 + e_8 n_2] [n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)]
bigrbig/bigl
n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2)
bigr^2 $
]
enddocument
edited Jan 22 at 15:12
answered Jan 22 at 14:23
MicoMico
278k30380768
278k30380768
add a comment |
add a comment |
Not automagically. I removed the left
and right
around long expressions, keeping them only for the differences pi – qi and similar.
documentclassarticle
usepackageamsmath
begindocument
beginequation
begingathered
frac
;
parbox0.8displaywidthraggedrightleftskip=1emhspace-1em$
e_0 n_0 (- n_0 p_0 + n_0 r_0 + n_0
left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1
left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2
left(p_2 - q_2right)) + e_1 n_1
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) -
n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_10 (left(- p_1 + r_1right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_1 - q_1right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2))
- e_11 (left(- p_2 + r_2right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_2 - q_2right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2)) + e_2 n_2
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right)
- n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_9 (left(- p_0 + r_0right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right))
+ left(p_0 - q_0right) (n_0 p_0
- n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2
- n_2 r_2)) + (e_3 n_0 + e_4 n_1
+ e_5 n_2) (n_0 p_0 - n_0 r_0
+ n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2)
- (e_6 n_0 + e_7 n_1 + e_8 n_2)
(n_0 left(p_0 - q_0right) + n_1
left(p_1 - q_1right) + n_2 left(p_2 - q_2right))
$;
(n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2))^2
endgathered
endequation
enddocument
add a comment |
Not automagically. I removed the left
and right
around long expressions, keeping them only for the differences pi – qi and similar.
documentclassarticle
usepackageamsmath
begindocument
beginequation
begingathered
frac
;
parbox0.8displaywidthraggedrightleftskip=1emhspace-1em$
e_0 n_0 (- n_0 p_0 + n_0 r_0 + n_0
left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1
left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2
left(p_2 - q_2right)) + e_1 n_1
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) -
n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_10 (left(- p_1 + r_1right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_1 - q_1right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2))
- e_11 (left(- p_2 + r_2right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_2 - q_2right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2)) + e_2 n_2
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right)
- n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_9 (left(- p_0 + r_0right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right))
+ left(p_0 - q_0right) (n_0 p_0
- n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2
- n_2 r_2)) + (e_3 n_0 + e_4 n_1
+ e_5 n_2) (n_0 p_0 - n_0 r_0
+ n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2)
- (e_6 n_0 + e_7 n_1 + e_8 n_2)
(n_0 left(p_0 - q_0right) + n_1
left(p_1 - q_1right) + n_2 left(p_2 - q_2right))
$;
(n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2))^2
endgathered
endequation
enddocument
add a comment |
Not automagically. I removed the left
and right
around long expressions, keeping them only for the differences pi – qi and similar.
documentclassarticle
usepackageamsmath
begindocument
beginequation
begingathered
frac
;
parbox0.8displaywidthraggedrightleftskip=1emhspace-1em$
e_0 n_0 (- n_0 p_0 + n_0 r_0 + n_0
left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1
left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2
left(p_2 - q_2right)) + e_1 n_1
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) -
n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_10 (left(- p_1 + r_1right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_1 - q_1right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2))
- e_11 (left(- p_2 + r_2right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_2 - q_2right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2)) + e_2 n_2
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right)
- n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_9 (left(- p_0 + r_0right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right))
+ left(p_0 - q_0right) (n_0 p_0
- n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2
- n_2 r_2)) + (e_3 n_0 + e_4 n_1
+ e_5 n_2) (n_0 p_0 - n_0 r_0
+ n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2)
- (e_6 n_0 + e_7 n_1 + e_8 n_2)
(n_0 left(p_0 - q_0right) + n_1
left(p_1 - q_1right) + n_2 left(p_2 - q_2right))
$;
(n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2))^2
endgathered
endequation
enddocument
Not automagically. I removed the left
and right
around long expressions, keeping them only for the differences pi – qi and similar.
documentclassarticle
usepackageamsmath
begindocument
beginequation
begingathered
frac
;
parbox0.8displaywidthraggedrightleftskip=1emhspace-1em$
e_0 n_0 (- n_0 p_0 + n_0 r_0 + n_0
left(p_0 - q_0right) - n_1 p_1 + n_1 r_1 + n_1
left(p_1 - q_1right) - n_2 p_2 + n_2 r_2 + n_2
left(p_2 - q_2right)) + e_1 n_1
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right) -
n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_10 (left(- p_1 + r_1right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_1 - q_1right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2))
- e_11 (left(- p_2 + r_2right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right)) + left(p_2 - q_2right)
(n_0 p_0 - n_0 r_0 + n_1 p_1 - n_1 r_1 +
n_2 p_2 - n_2 r_2)) + e_2 n_2
(- n_0 p_0 + n_0 r_0 + n_0 left(p_0 - q_0right)
- n_1 p_1 + n_1 r_1 + n_1 left(p_1 - q_1right)
- n_2 p_2 + n_2 r_2 + n_2 left(p_2 - q_2right))
- e_9 (left(- p_0 + r_0right)
(n_0 left(p_0 - q_0right) + n_1 left(p_1 - q_1right)
+ n_2 left(p_2 - q_2right))
+ left(p_0 - q_0right) (n_0 p_0
- n_0 r_0 + n_1 p_1 - n_1 r_1 + n_2 p_2
- n_2 r_2)) + (e_3 n_0 + e_4 n_1
+ e_5 n_2) (n_0 p_0 - n_0 r_0
+ n_1 p_1 - n_1 r_1 + n_2 p_2 - n_2 r_2)
- (e_6 n_0 + e_7 n_1 + e_8 n_2)
(n_0 left(p_0 - q_0right) + n_1
left(p_1 - q_1right) + n_2 left(p_2 - q_2right))
$;
(n_0 (p_0 - q_0) + n_1 (p_1 - q_1) + n_2 (p_2 - q_2))^2
endgathered
endequation
enddocument
answered Jan 22 at 14:26
egregegreg
718k8719053202
718k8719053202
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%2f471280%2fhow-to-break-apart-a-huge-fraction-resulting-from-a-symbolic-calculation%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
3
Well, this is not a TeX's problem. Tell us how the result should look like and there should be a way how to accomplish this. However, with my typography hat on, there is no good solution that keeps the fraction as a fraction.
– yo'
Jan 22 at 13:59