Re: Creating my own cell
- To: mathgroup at smc.vnet.net
- Subject: [mg46760] Re: Creating my own cell
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sun, 7 Mar 2004 01:33:38 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <c298v2$572$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
Clear[makeIR]
SetAttributes[makeIR, HoldAll]
makeIR[gar_, numberOfRows_] := Module[{qar, lst},
lst =
Prepend[Table[{"\[Placeholder]",
"\[Placeholder]"}, {numberOfRows -
1}], {\[SelectionPlaceholder], \[Placeholder]}];
CellPrint[
Cell[BoxData[
RowBox[{ToString[Unevaluated[gar]], "=",
RowBox[{"(", GridBox[lst], ")"}]}]], "Input"]]
]
Regards
Jens
"Flurchick, Kenneth M" wrote:
>
> GentleBeings
> Trying to create a cell with a variable assigned to the matrix
> I have tried this but no assignemnt (Also lookscumbersome)
>
> makeIR[numberOfRows_] :=
> Module[{qar},
> StylePrint[Set[ qar,
> MatrixForm[
> Partition[
> Flatten[
> Insert[
> Table[{ \[Placeholder] , \[Placeholder] }, {
> numberOfRows - 1}],
> {\[SelectionPlaceholder], \[Placeholder]}, 1
> ]
> ], 2
> ]
> ]], "Input"
> ]
> ]
>
> I want to pass in the number of rows and make the 2D matrix for
> a user to fill in
> I want to position the current selection to the first placeholder.
> Any suggestions are desperately needed, this is just over my ability.
> kenf