MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: typesetting piecewise function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19791] Re: typesetting piecewise function
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 17 Sep 1999 01:36:45 -0400
  • References: <7rnkf4$elv@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

We need to deal with two problems: color and size of the brackets
. Color (indicating unmatched brackets)
- select the expression
- Format>Option
Inspector>EditingOptions>PrivateEditingOptions>AutoStyleEditingOptions>AutoS
tyleOptions  >"UnmatchedBracketStyle""UnmatchedBracket" > click box on right
and choose "None"
(this could have been done for individual brackets or for the whole cell)




Henrik Weimer <henrik at rice.edu> wrote in message
news:7rnkf4$elv at smc.vnet.net...
>
> Hello!
>
> I use Mathematica 4 for a lot of my technical writing. One common
> problem I have is defining a piecewise function. In mathematical
> notation one commonly uses a large opening curly brace with all the
> cases listed to the right. In Mathematica I can try to do this but the
> curly brace does not scale to the full hight of the matrix of cases on
> the right. Here is an example:
>
> \!\(\*
>   RowBox[{\(\[ScriptCapitalN][\[ScriptX]]\), "=",
>     RowBox[{"{", GridBox[{
>           {"1",
>             RowBox[{
>               RowBox[{
>                 RowBox[{
>                   StyleBox["if",
>                     "Text"], " ", "0"}], "<", "\[ScriptX]", "<=", "1"}],
>
>               ","}]},
>           {"0",
>             StyleBox["otherwise",
>               "Text"]}
>           }]}]}]\)
>
> If I use a regular opening paren instead of the curly brace it scales
> fine (I guess Mathematica thinks this is a matrix). Is there a way of
> getting this to look right with a large opening curly brace or something
> similar?
>
> Thanks,
>
>     Henrik Weimer
>     henrik at rice.edu
>

Henrik,

We need to deal with two problems: color and size of the brackets
. Color (indicating unmatched brackets)
- select the expression
- Format>Option
Inspector>EditingOptions>PrivateEditingOptions>AutoStyleEditingOptions>AutoS
tyleOptions  >"UnmatchedBracketStyle""UnmatchedBracket" > click box on right
and choose "None"
(this could have been done for individual brackets or for the whole cell)

. Size
Parentheses ( , )  automatically extend to span the related expression -
they are spanning or extensible characters.
Curly brackets {,} and square brackets [,] span by default only to a limited
size.
Spanning is controlled by Edit>Expression Input>SpanningCharacters,  and  in
more detail by Format>Option Inspector>FormattingOptions>Expression
Formatting>Spanning Character Options

- select the expression (including all brackets) or select the cell bracket.
- choose Edit > Expression Input >SpanningCharacters > Expand Indefinitely

(From next issue of Mathematica in Education and Research)


Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565




  • Prev by Date: Re: Mathematica always writes some functions with their names
  • Next by Date: Re: Re: Mathematica can't win against Tiger Woods
  • Previous by thread: typesetting piecewise function
  • Next by thread: Re: typesetting piecewise function