Re: (any documentation for) linear syntax?
- To: mathgroup at smc.vnet.net
- Subject: [mg107569] Re: [mg107534] (any documentation for) linear syntax?
- From: John Fultz <jfultz at wolfram.com>
- Date: Wed, 17 Feb 2010 07:03:48 -0500 (EST)
- Reply-to: jfultz at wolfram.com
If you want to search for a typeset form in the Find/Replace dialog, I strongly recommend not doing this by hand. Instead, use Edit->Enter Selection while you have an instance of the thing you're looking for selected. Mathematica will automatically convert it to the right form for you. That's really all you need to know. The rest of my response is for anyone who wants to understand a bit more about the details of the system, and cares to hear any ramblings and ruminations I might have to offer about it. The form you're talking about is not documented exhaustively, but it is documented. In the help viewer, enter the following to find it... tutorial/StringRepresentationOfBoxes This form is the only way in which boxes can be represented inside of strings. That is, by the way, where the term "linear syntax" comes from. In a string, you must have a linear representation (as opposed to an expression tree) because strings are a linear sequence of characters. This is all a bit unfortunate, because linear syntax can get extremely unwieldy, and it's particularly inside of strings where it becomes most unwieldy due to subtle issues with how the backslash escaping mechanism works within strings. While it's possible to create such forms by hand, we generally don't recommend it, and recommend instead using the various built-in ways of auto-converting when necessary (the documentation points to some of these). If it sounds like I'm not exactly thrilled about how we designed this aspect of the system, that's because I'm not. There are several gotchas I haven't fleshed out here, and with the hindsight that we now have, we could probably have done this better. Maybe we will someday. In the mean time, when you do have to interact with it, it's best to let the system work it out for you. In the case of Find/Replace, that tends to be pretty simple using the method I described in my first paragraph. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc. On Tue, 16 Feb 2010 03:52:49 -0500 (EST), divisor wrote: > Hello MathGroup: > > Solving a recent problem I had, Maxim mentioned that this string: > > Subscript[\[Alpha], 23]" > > can be used in the Find-Replace dialog by its evaluated equivalent > using this string: > > \!\(\[Alpha]\_23\) > > He called this "linear syntax". > > Since I will have other expressions that I need to convert into a form > like this, I tried to look this up in the help documentation. No luck > when trying these pages: > > guide/Syntax > tutorial/SpecialWaysToInputExpressions > > Can anyone tell me what this is called in the documentation or where I > can find documentation describing it? > > Thanks in advance. > > Roger Williams > Franklin Laboratory
- Follow-Ups:
- Re: Re: (any documentation for) linear syntax?
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: Re: (any documentation for) linear syntax?