MathGroup Archive 2004

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

Search the Archive

Re: TraditionalForm of expressions WITHOUT evaluating.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52181] Re: TraditionalForm of expressions WITHOUT evaluating.
  • From: Peter Pein <petsie at arcor.de>
  • Date: Sun, 14 Nov 2004 04:30:19 -0500 (EST)
  • References: <cn4l9o$13p$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Nacho wrote:
> Hello.
> 
> I would like to ask you how to do the following.
> 
> I want to input some expressions (in InputForm or StandardForm) and
> display them in TraditionalForm but without evaluating them.
> 
> For example, if I do:
> 
> 2+2 == 4 // TraditionalForm
> 
> I obtain "True" in a nice font ;) but not the "2+2 = 4".
> 
> The expression I want to do is more complicated, with integrals, but
> basicly it is the same, for example:
> 
> Integrate[x,{x,2,3}] //TraditionalForm
> 
> Returns 5/2, but I want the Integral symbol with the limits and the
> dx.
> 
> 
> 
> Also, related to this, anybody knowns how to export a graphic, cell,
> or Traditionalform expression to a bitmap with the resulution I want
> and smoothed? For example, a 1024x768 graph with the lines smoothed,
> or an integral with smoothed font in a resolution to be included in a
> image.
> 
> Thanks a lot for your answers.
> 
> Best regards.
> 
The first part is easily done with

In[1]:=
THForm[expr_] = TraditionalForm@HoldForm@expr;
SetAttributes[THForm, HoldFirst];

In[3]:=
2 + 2 == 4 // THForm
Out[3]//TraditionalForm=
\!\(\*FormBox[
   TagBox[\(2 + 2 == 4\),
     HoldForm], TraditionalForm]\)
In[4]:=
Integrate[x, {x, 2, 3}] // THForm

Out[4]//TraditionalForm=
\!\(\*FormBox[
   TagBox[\(\[Integral]\_2\%3 x \[DifferentialD]x\),
     HoldForm], TraditionalForm]\)

-- 
Peter Pein
Berlin


  • Prev by Date: Re: TraditionalForm of expressions WITHOUT evaluating.
  • Next by Date: Re: next Prime method from sci.math post
  • Previous by thread: Re: TraditionalForm of expressions WITHOUT evaluating.
  • Next by thread: Re: TraditionalForm of expressions WITHOUT evaluating.