Re: MultiLine Formula (formatting w/brace)
- To: mathgroup at smc.vnet.net
- Subject: [mg45541] Re: MultiLine Formula (formatting w/brace)
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 13 Jan 2004 04:03:55 -0500 (EST)
- Organization: The University of Western Australia
- References: <btthni$sno$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <btthni$sno$1 at smc.vnet.net>, "Bruce W. Colletti" <bcolletti at compuserve.com> wrote: > Re Mathematica 5.0. > > In a text cell, I want to write a piecewise function... > > f(x) = 5x, x < -2 > 7x, x in [-2,3] > 6x, x > 3 > > ...displayed with a lefthand side big curly brace that covers all lines > top-to-bottom, together with centering the "f(x) = " on brace-center. > > How would I do this? I've put the righthand side into a 3x2 table and > using the BasicTypesetting palette, choose the curly brace button. This > nearly works except that righthand side "blank lines" destroy the > otherwise perfect look. The problem persists when I change brace size > (using Format/Size). This was covered by Neil Soiffer in the Tricks of the Trade column of The Mathematica Journal 8(1): Very large brackets and braces for their common uses in Mathematica (function call, lists) can look silly. Hence, as defined in UnicodeFontMapping.tr, they are set to grow to at most "2.01" (factor of two, with a fudge factor) times their normal size when SpanMaxSize is set to Automatic. Spanning can be controlled by selecting Expression Input | Spanning Characters | Expand Indefinitely from the Edit menu. Alternatively, if you use the Option Inspector and type in Span you will see the Spanning Character Options. You can set SpanMaxSize around the character, at the cell level, notebook level, or globally. You may not be happy with what the brackets and braces look like for function calls and lists, though. Here is the result of setting SpanMaxSize -> Infinity at the character level. There is another problem: in each case the opening bracket is displayed in color, indicating that it is unmatched. In TraditionalForm, a better alternative is to close off the unmatched left bracket with \[AutoRightMatch] (or \[EscapeKey]\right.\[EscapeKey]) which keeps things properly bracketed. This will not work for StandardForm unless you set DelimiterMatching->None for the cell (or any larger scope). Here is the result of closing off the unmatched left bracket. Cheers, Paul -- Paul Abbott Phone: +61 8 9380 2734 School of Physics, M013 Fax: +61 8 9380 1014 The University of Western Australia (CRICOS Provider No 00126G) 35 Stirling Highway Crawley WA 6009 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul