MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: output forms

  • To: mathgroup at
  • Subject: [mg121502] Re: output forms
  • From: "David Park" <djmpark at>
  • Date: Sun, 18 Sep 2011 04:08:45 -0400 (EDT)
  • Delivered-to:
  • References: <2973956.142355.1316252805735.JavaMail.root@m06>

Your ultimate objective is not clear here. In any case, Mathematica always
evaluates everything, applying all definitions until there are no more that
can be applied.

I probably wouldn't define values for a, b and c but use Rules instead to
substitute their values (or a With statement). This preserves their use as

To prevent automatic evaluation you have to use HoldForm. Then you can get
evaluation by using ReleaseHold. But suppose you want to do selective
evaluation of a held expression? The Presentations package has an
EvaluateAtPattern command that allows you to do selective evaluations.

If you are new to Mathematica % refers to the previous output.

<< Presentations` 

HoldForm[a + b c]
% /. {a -> 1, b -> 2, c -> 3}
% // EvaluateAtPattern[_Times]
% // EvaluateAtPattern[_Plus] 

This gives the successive outputs:

a + b c
1 + 2 x 3
1 + 6

Mathematica is not, out of the box, very good at teaching or illustrating
elementary or basic math, but with a little effort, using HoldForm, or
bypassing the more powerful automatic routines such as Integrate and Solve,
it is certainly possible to do a very good job at this.

David Park
djmpark at  

From: klkj fukyfl [mailto:kitas11 at] 

Hello, I need Matheamtica to do the following:




and so on...

previously I was using another system, but I found that this kind of stuff
is impossible

Can this be performed on Mathematica?

  • Prev by Date: Re: String Deletion
  • Next by Date: Re: Aligning Typeset Math on Equal Signs
  • Previous by thread: Re: output forms
  • Next by thread: Re: output forms