Math & ScienceAutomatic Multiline Math Expression Evaluation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
sonny
Posts: 13
Joined: Wed Mar 25, 2009 11:14 pm

Automatic Multiline Math Expression Evaluation

Post by sonny »

Hi,

Short version of the question:

Is it possible to instruct LaTeX to duplicate the relational or arithmetic operator where a line is split, so that the operator appears both at the end of the initial line, and at the beginning of the following line?

I mean something like this.

Code: Select all

a = b + c + d - e =
  = 5 + 3782 + 256 -
  - 7 = whatever
Longer version of the explanation:

I need to generate documents that don't contain equations as such, but math formulas that will be evaluated step by step, like the above example but more complicated (and usually their evaluation won't fit in a single line).

The math expression evaluation is performed (automatically) by a program, and the numerical values substituted in the expressions are arguments which can be modified by the user, so it's not possible to do manual line breaking in advance. Line breaking has to be done automatically.

I've heard of the breqn package, and I will try it, but if you believe there's a better choice, please tell.

In my environment, everybody duplicates the operator sign whenever a math line is split, so I wish to follow such style.

Thanks a lot in advance for any suggestions or advice!

sonny

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply