Prev: Issuing Function Calls within a Plot command
Next: automatically include automatic numbering in a cell style
From: Murray Eisenberg on 3 Aug 2010 06:34 For creating labeled output, one might use either of the following sorts of expressions: StringForm["x = ``", x/.First(a)Solve[3x-4==0,x]] Row[{"x = ", x/.First(a)Solve[3x-4==0,x]}] The resulting Output cells look the same, although the underlying expressions in those Output cells are not. Is one form preferable to the other, from the viewpoint of the appearance of the output, etc.? [Yes, I realize that StringForm["controlstring", expr1,...] is doubtless what you'd want to use if: (1) the output were going to use the same value in more than one place in the control string or were going to permute the order of two or more expression values when they get inserted into the controlstring's "slots"; or (2) you wanted to include template text both before and after the value to be inserted and you wanted to isolate the text labeling from the expression whose value was to be inserted.] -- Murray Eisenberg murray(a)math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305 |