Re: typing/formatting multi-part definition with alignment
- To: mathgroup at smc.vnet.net
- Subject: [mg41088] Re: [mg41067] typing/formatting multi-part definition with alignment
- From: Bobby Treat <drmajorbob+MathGroup3528 at mailblocks.com>
- Date: Thu, 1 May 2003 05:01:12 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Murray, It's possible to do better, but I'm not really an expert. Here's a start: display[f_, a_, b_] := DisplayForm@ RowBox[{f, "=", TagBox[ StyleBox[RowBox[{"{", StyleBox[GridBox[{{ a}, {b}}], ShowAutoStyles -> True]}], ShowAutoStyles -> False], (# &)]}] display[f, a, b] You can type display[f,a,b] in an input cell, select that expression, right-click, and select evaluate in place. You can highlight a (for instance) and type a new value, producing a new cell that you can edit as you please. Put the cursor on a or b, and you can push Ctrl-, or Ctrl-enter to get new columns and rows. Try doing the same after selecting f, too. You can also leave display[f, a, b] as is, evaluate it, and close the original cell (Cell>Cell Properties>Open). Dave Park likes to do all the work in closed cells like that -- printing all the comments and intermediate steps -- producing nice output cells that display the results. It can make writing the steps of a proof very nice. Bobby -----Original Message----- From: Murray Eisenberg <murraye at attbi.com> To: mathgroup at smc.vnet.net Subject: [mg41088] Re: [mg41067] typing/formatting multi-part definition with alignment Thanks for the help. Overall that seems to beat for speed the alternative offered by Garry Helzer, which required using the menu item Input > Create Table/Matrix/Palette. Of course what I'd _really_ like is a way to type the whole thing (as in LaTeX) without having to move my hands from the keyboard. But this may be the best that can be done for now. Bobby Treat wrote: > Pull up the BasicTypesetting palette and click on the pattern that looks > like a bracket followed by two vertically stacked boxes. Push Ctrl+, to > add a second column (for the conditions, perhaps) or Ctr/+enter to add a > row if needed. In these boxes you can put the right-hand side of the > display you want. > > If you replace the "{" with a parenthesis "(" it will automatically > increase in size to fit the rows. If you want to use "{", select the > cell and open the Options inspector with Ctrl-shift-O. Search for > SpanMaxSize and change the option value to Infinity. (Why we'd ever > want it to be anything else, I have no idea!) The resulting cell > shouldn't be evaluated, of course. -- Murray Eisenberg murray at 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