Re: Distinguishing Strings from Symbols
- To: mathgroup at smc.vnet.net
- Subject: [mg81154] Re: [mg81114] Distinguishing Strings from Symbols
- From: "Yuri Kandrashkin" <spinalgebra at gmail.com>
- Date: Fri, 14 Sep 2007 03:34:56 -0400 (EDT)
- References: <200709131021.GAA15611@smc.vnet.net>
Hi, You can apply the function InputForm for your result like in the example below {x,"x"} //InputForm You also can change the value of option ShowStringCharacters for Output cells in style definitions. To change the style of strings you can use the following command although I am not sure that this is a best solution : $PrePrint = (# /. str_String :> Style[str, Red]) & 2007/9/13, dr DanW <dmaxwarren at gmail.com>: > I have several notebooks where I am using short strings that might be > the same as the name of a symbol; for example, "x". When these > strings show up as output, I cannot tell if I am looking at a string > "x" or a symbol x. Is there a way I can define a Format or alter > OutputForm so strings in output always have a different look than > symbols, such as appearing in red or in italics? > > > -- Sincerely, Yuri Kandrashkin, PhD http://spinalgebra.com - Mathematica based applications: - Magnetic Resonance with SpinAlgebra - Work with systems of Units - Interactive tools: ViewPoint selector, Options explorer, etc
- References:
- Distinguishing Strings from Symbols
- From: dr DanW <dmaxwarren@gmail.com>
- Distinguishing Strings from Symbols