MathGroup Archive 2007

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

Search the Archive

TraditionalForm[HoldForm[...]] query

Dear Group,

I've just joined this newsgroup although I've used Mathematica on a
nearly daily basis for nearly 3 years now.  I use it for teaching,
assessment and exploring geometry and programming language features such
as monads and monad comprehensions.

I'm attempting to use Mathematica as part of a document production
system and so I'm interested in displaying mathematical text with its
structure intact (although taking advantage of the conversions from
input forms to output forms that functions such as TraditionalForm
provide).  I thought I had found a solution using HoldForm, and it
worked on many examples, but now I've found very simple cases where
expressions are rearranged, and not to my liking, within HoldForm.  More
troubling is that the rearrangement depends on whether TraditionalForm
or some other form is used such as StandardForm, and also on the
different input forms that are used, even if they "should" produce the
same output forms in some cases. My example of Exp vs \[ExponentialE]\^
below is a case in point.  When TraditionalForm[HoldForm[expression
involving \[ExponentialE]]] is used then the expression is rearranged,
while the same expression using Exp is not; no rearrangement is done in
either case if I use StandardForm instead of TraditionalForm.

Can anyone suggest a way forward and/or give a relatively simple
explanation (or even justification?) of this behaviour?  I'm finding it
frustrating that I haven't been able to find a good way of combining
Mathematica's symbolic and computational tools to produce documents I
can publish to my students, none of whom use Mathematica (more's the

Do I need to create my own version of HoldAll (perhaps with attribute
HoldAllComplete) and ensure that it does not normally appear in the
output in the same way that HoldAll does not?  Can I rely on that
attribute to ensure nothing wrapped in MyHoldAll is evaluated or
rearranged in any way?

I have looked through the newsgroup and seen some related articles but
found nothing that exactly matches my interest and needs.

[I have pasted the cells below; is there a better way of displaying
Mathematica examples apart from attaching a notebook?]

in hope,
Matthew Fairtlough.


5.0 for Microsoft Windows (November 18, 2003)

\!\(TraditionalForm[HoldForm[y\_h \[Equal] A\ \[ExponentialE]\^\(=CE=B1\
         x\) + B\ \[ExponentialE]\^\(=CE=B2\ x\)]]\)

   TagBox[\(y\_h \[Equal] \[ExponentialE]\^\(=CE=B1\ x\)\ A + B\ \
\[ExponentialE]\^\(=CE=B2\ x\)\),
     HoldForm], TraditionalForm]\)

\!\(StandardForm[HoldForm[y\_h \[Equal] A\ \[ExponentialE]\^\(=CE=B1\ x\)=
 + B\ \
\[ExponentialE]\^\(=CE=B2\ x\)]]\)

   TagBox[\(y\_h \[Equal]
     A\ \[ExponentialE]\^\(=CE=B1\ x\) + B\ \[ExponentialE]\^\(=CE=B2\ x\=

\!\(TraditionalForm[HoldForm[y\_h \[Equal] A\ Exp[=CE=B1\ x] + B\ Exp[=CE=
=B2\ x]]]\)

   TagBox[\(y\_h \[Equal]
      A\ \[ExponentialE]\^\(=CE=B1\ x\) + B\ \[ExponentialE]\^\(=CE=B2\ x=
     HoldForm], TraditionalForm]\)

  • Prev by Date: Definite Integration vs Newton-Leibniz formula
  • Next by Date: Re: Re: fastest way to add up a billion numbers
  • Previous by thread: Re: Definite Integration vs Newton-Leibniz formula
  • Next by thread: TraditionalForm[HoldForm[...]] query