[Date Index] [Thread Index] [Author Index]
Re: Suggestions on how to use standard engineering symbols in Mathematica which conflict with Mathematica own symbols?
You could use Interpretation to create an object which looks like one thing but evaluates as another. You can also add formatting rules to change the default output to produce an InterpretationBox object...something like this: In:= MakeBoxes[Inertia, StandardForm]:=InterpretationBox[I, Inertia]; In:= Inertia Out= I This completely prevents a conflict with the built-in symbols, since you can still type in an I and have it mean what you want it to mean. If you wanted to use such an object for input, you can copy/paste it from output, or put it into a palette button. -John On Sun, 18 Oct 2009 05:26:29 -0400 (EDT), Nasser M. Abbasi wrote: > Hello > > This is a problem I am sure all of us had. > > It would be nice to use the same standard engineering/physics > symbols/letters found in textbook to write the equations in mathematica. > > But some/many of those symbols conflict with existing Mathemtica symbols. > For example, Young modulus is always written as E, but E in mathematica is > reserved to the exponential constant, and I would like to use I (upper > case > I) to mean the moment of inertia, and not have it conflict with complex > number I. And many other examples. > > I was wondering if there is a way to still use these letters in my > equations but not conflict with Mathematica's? > > I thought may be I could make a bold versions of these letters with a new > code, or find latine characters which "looks like" these from the palette, > but have different ASCII code. > > Or may be I could tell mathematica somehow to "undefine" these symbols > during some computation and restore them again, so it will not interpret > them as its own standard symbols only during this computation, but was > not sure if this is a good idea? (would this will cause a problem > internally to Mathematica as it could very well use these symbols in its > own package code. I could always use Exp instead of E and use Sqrt[-1] > instead of "I" when I really mean to use the Mathematica letters and > leave E and I etc... for my use. > > Any other ideas others have on this subject? I'd really like to write the > equations as they appear in the textbook if possible and not have to > rename standard engineering letters to something else. > > --Nasser