MathGroup Archive 2001

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

Search the Archive

Re: [Novice] Automatic bracketing and Defaults Setup

  • To: mathgroup at
  • Subject: [mg31569] Re: [Novice] Automatic bracketing and Defaults Setup
  • From: "P.J. Hinton" <paulh at>
  • Date: Wed, 14 Nov 2001 03:41:44 -0500 (EST)
  • Organization: "Wolfram Research, Inc."
  • Sender: owner-wri-mathgroup at

On Sun, 11 Nov 2001 Nospam_homh at wrote:

> Could any kind soul out there show me if there is a way to have Mathematica
> (v4) set up such that everytime one enters brackets, their corresponding
> (closing) ones automatically appear?
> For example,
> Enter:  f = [
> Appears: f = [_]
>               ^
>           cursor is here
>  ... Steps later ...
> Enter:  f = [[{(Sin[
> Appears: f = [[{(Sin[_])}]]
>                      ^
>                cursor is here
> Also, I have searched the Math book, google, and wolfram and couldn't find
> any hints on how to have the magnification, the font family and font size set
> up as defaults ( I assumed that it is in the init.m file). It would be great
> if people can post their own favourite setups and beginners can use them as
> a start.
> Any help would be appreciated.

There is no feature as you describe.  However, it is possible to script
such an action and put the functionality under a button in a palette.  To
see how this is done, paste the following expression in a notebook.

    ButtonFunction :>
        RowBox[{"[", "\[Placeholder]", "]"}],
    ButtonEvaluator -> None,
    Active -> True
    ] // DisplayForm

Evaluate the expression, which will generate a button.  Select the button
and then click on the front end menu command:

	File -> Generate Palette from Selection

This will create the palette.  This palette may be saved as a notebook

To use the palette, simply click on the button whenever you would enter a
left square bracket.  This will paste a matched set of brackets and set
the edit caret in between the brackets.

P.J. Hinton
User Interface Programmer                         paulh at
Wolfram Research, Inc.

  • Prev by Date: Re: Built-in functions to C code
  • Next by Date: Zero does not equal zero et al.
  • Previous by thread: Re: [Novice] Automatic bracketing and Defaults Setup
  • Next by thread: Rendering Error in Raster and RasterArray