Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2072
| From | Peter Breitfeld <phbrf@t-online.de> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Remove MakeExpression settings |
| Date | 2011-05-03 12:23 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ipos3l$i41$1@smc.vnet.net> (permalink) |
| References | <ipm2f1$58n$1@smc.vnet.net> <ipoipp$g2j$1@smc.vnet.net> |
David Bailey wrote: > On 02/05/2011 11:53, Peter Breitfeld wrote: >> I made some settings using MakeExpression and MakeBoxes. Suppose I use >> >> beautyOut[a_]:=MakExpression[...] >> >> I can find these definitions in Definition[MakeBoxes] and >> Definitions[MakeBoxes]. >> >> Sometimes I want to switch off these definitions. The only way I found >> is to use Quit. >> >> My question: >> Is it possible, to remove the definitions made from the set of >> definitons of MakeExpression and Makeboxes? >> >> Thank you >> Peter > One possibility is not to remove them but activate/deactivate them based > on a global variable > > mySwitch=True; > > MakeExpression[...,StandardForm]:=Module[.............]/;mySwitch; > > Set up this way, they can be activated/deactivated at will. > > David Bailey > http://www.dbaileyconsultancy.co.uk > Thanks to David and John! I now use the following approach. The Definitions are strored in FormatValues[MakeBoxes] and FormatValues[MakeExpression]. I now maintain a list "beautyList" which contains all Symbols I want beauty. I have a Definition defBeauty[a_], which makes setting in MakeBoxes and MakeExpression. To find these definitions in the FormatValues list, I add a nonsense form to the form parameter of MakeBoxes/Expression. e.g. MakeBoxes[bla, form:StandardForm|TraditionalForm|WEIRD]... The function undefBeauty[a] now looks for the pattern WEIRD, deletes the entry in FormatValues[...], removes a from beautyList and calls defBeauty for all remaining entries in beautyList. This works quite good. -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Remove MakeExpression settings Peter Breitfeld <phbrf@t-online.de> - 2011-05-02 10:53 +0000
Re: Remove MakeExpression settings David Bailey <dave@removedbailey.co.uk> - 2011-05-03 09:44 +0000
Re: Remove MakeExpression settings Peter Breitfeld <phbrf@t-online.de> - 2011-05-03 12:23 +0000
csiph-web