|
[Date Index]
[Thread Index]
[Author Index]
Re: holding boxes verbatim
- To: mathgroup at smc.vnet.net
- Subject: [mg56245] Re: holding boxes verbatim
- From: "Carl K. Woll" <carlw at u.washington.edu>
- Date: Wed, 20 Apr 2005 05:30:35 -0400 (EDT)
- Organization: University of Washington
- References: <d42l18$3gf$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Chris Chiasson" <chris.chiasson at gmail.com> wrote in message
news:d42l18$3gf$1 at smc.vnet.net...
> Dear Math Group gurus,
>
> Mathematica is annoying me. I would like some way to type in a two
> dimensional box form (representing an arbitrary expression) and assign
> it to a symbol. I would then like to be able to operate on the
> expression by, for instance:
> 1 printing it
> 2 printing it with some variables' values substitued into it
> 3 and finally evaluating it
>
> Hold and its variants do not do the job because they prevent
> expression evaluation, but I need something that will keep its box
> form exactly as I have typed it.
>
> Please, how does one do this?
>
> A method for doing this is very useful to me because my professors
> like to see the variables substitued into the original (not
> Mathematica reparsed original, but verbatim original) equations.
>
> Thank you for your very valuable time,
An example of the desired behavior would be helpful. At any rate, have you
tried using HoldForm? For example:
expr = HoldForm[2^(x+1)];
expr
expr /. x->2
ReleaseHold[ expr /. x->2 ]
x + 1
2
2 + 1
2
8
I used InputForm instead of a 2D box form for expr for legibility, but using
a 2D box form for expr won't cause any problems.
If the above is not helpful, please give an example of the behavior you
desire.
Carl Woll
Prev by Date:
Re: holding boxes verbatim
Next by Date:
webMathematica 2.2 Released
Previous by thread:
Re: holding boxes verbatim
Next by thread:
Re: holding boxes verbatim
|