This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Front End / Menu Commands / Input Menu /

Make Template

FilledSmallSquare Make Template inserts a template based on the currently selected function name.

FilledSmallSquare This command reads your current selection (which should be a function name or insertion point after a function name) and adds a template for the arguments it can take. For example, if your selection is Plot you get Plot[f, {x, xmin, xmax}], which shows the simplest form of the Plot function.

FilledSmallSquare You can only get function templates when you are connected to a Mathematica kernel. To define a function template for a user-defined function, make the template the first statement in the "usage" message for the function. For example, to define the template f[a,b] for the function f, you could use the following command.

    f::usage = "f[a,b] is an example of a function"

FilledSmallSquare Note that the templates you get for built-in functions are usually only one of several possible argument forms. Use the kernel command ? to get more information, or see The Mathematica Book for a complete description of a given command.

FilledSmallSquare When you choose Make Template after typing a partial word, Mathematica looks to the left of the insertion point to find a suitable function or variable name. When this name is not a currently defined function, Make Template applies the Complete Selection command before attempting to make a template.

FilledSmallSquare Keyboard shortcuts: ShiftKeyKeyBarControlKeyLeftModifiedk RightModified(Windows); ShiftKeyKeyBarCommandKeyLeftModifiedk RightModified(Macintosh); ShiftKeyKeyBarControlKeyLeftModifiedk RightModified(X).