How to break apart a huge fraction resulting from a symbolic calculation?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















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:



enter image description here



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:



enter image description here



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?










share|improve this question



















  • 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















2















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:



enter image description here



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:



enter image description here



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?










share|improve this question



















  • 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













2












2








2








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:



enter image description here



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:



enter image description here



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?










share|improve this question
















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:



enter image description here



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:



enter image description here



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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










2 Answers
2






active

oldest

votes


















3














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...



enter image description here



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





share|improve this answer
































    3














    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


    enter image description here






    share|improve this answer






















      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%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









      3














      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...



      enter image description here



      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





      share|improve this answer





























        3














        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...



        enter image description here



        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





        share|improve this answer



























          3












          3








          3







          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...



          enter image description here



          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





          share|improve this answer















          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...



          enter image description here



          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






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 22 at 15:12

























          answered Jan 22 at 14:23









          MicoMico

          278k30380768




          278k30380768





















              3














              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


              enter image description here






              share|improve this answer



























                3














                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


                enter image description here






                share|improve this answer

























                  3












                  3








                  3







                  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


                  enter image description here






                  share|improve this answer













                  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


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 22 at 14:26









                  egregegreg

                  718k8719053202




                  718k8719053202



























                      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%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





















































                      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

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay