MathGroup Archive 2003

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

Search the Archive

Re: Get theoretical answer on linear equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45170] Re: Get theoretical answer on linear equations
  • From: drbob at bigfoot.com (Bobby R. Treat)
  • Date: Fri, 19 Dec 2003 06:57:37 -0500 (EST)
  • References: <3B1F009121A0D411AD7B0010E37C5BEC05A8C777@of-mxs02.oppenheim.de> <brs5am$ikj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Before copying and pasting (to e-mail, for instance) change to
InputForm. That can be done in various ways. For instance,

(your input)//InputForm

The result can be copied and pasted without hassles.

The best solution is due to Omega Consulting--a palette that "copies
as InputForm", so that you don't have to actually change the contents
of your notebook to accomplish the task.

I put the palette in

C:\Documents and Settings\All Users\Application
Data\Mathematica\Applications\InputForm\FrontEnd\Palettes

Create that directory (you can use a different name for the InputForm
directory if you want) first, then select the following text, copy and
paste it into Mathematica (answer yes when it asks if you want to
convert the expression), and the result should be a new palette on
your screen.

Close Mathematica, and it should ask if you want to save the untitled
palette. Save it in the above directory, name it whatever you want (I
named it InputForm), and reopen Mathematica. File>Palettes should show
the new palette, and you're in bidness. Select anything you want to
copy into a text program, push the palette button, and paste where you
want it.

Bobby 
code follows...

Notebook[{
Cell[BoxData[
    ButtonBox[
      RowBox[{
        RowBox[{"Copy", " ", "As"}], "\n", " ", "InputForm"}],
      ButtonFunction:>Module[ {cpy, cpynb, evalnb}, 
          CompoundExpression[ 
            Set[ cpy, 
              NotebookRead[ 
                InputNotebook[ ]]], 
            If[ 
              SameQ[ cpy, {}], 
              Return[ ]], 
            Set[ cpynb, 
              NotebookCreate[ Visible -> False]], 
            NotebookWrite[ cpynb, cpy], 
            SelectionMove[ cpynb, All, Notebook], 
            FrontEndExecute[ {
              FrontEndToken[ cpynb, "SelectionConvert",
"InputForm"]}],
            Set[ evalnb, 
              NotebookPut[ 
                Notebook[ 
                  Map[ Cell[ #, "Input"]&, {
                    BoxData[ 
                      RowBox[ {"cpynb", "=", 
                        ToBoxes[ cpynb]}]], 
                    "FrontEndExecute[{FrontEndToken[cpynb,            
       \
        \"CopySpecial\",\"PlainText\"]}]", "NotebookClose[cpynb]", 
                    "NotebookClose[EvaluationNotebook[]]"}], Visible
->
                  False]]], 
            SelectionMove[ evalnb, All, Notebook], 
            SelectionEvaluate[ evalnb], Null]],
      ButtonEvaluator->Automatic,
      Active->True]], NotebookDefault,
  CellMargins->{{Inherited, Inherited}, {7, Inherited}},
  PageBreakAbove->True,
  CellLabelMargins->{{12, Inherited}, {Inherited, Inherited}},
  InputAutoReplacements->{
    "->"->"\[Rule]", ":>"->"\[RuleDelayed]", "<="->"\[LessEqual]", 
      ">="->"\[GreaterEqual]", "!="->"\[NotEqual]", "=="->"\[Equal]", 
      Inherited},
  "TwoByteSyntaxCharacterAutoReplacement"->True,
  Hyphenation->True,
  LineSpacing->{1.25, 0},
  ScriptMinSize->9,
  CounterIncrements->"Text",
  StyleMenuListing->None,
  FontFamily->"Courier"]
},
FrontEndVersion->"5.0 for Microsoft Windows",
ScreenRectangle->{{0, 1280}, {0, 967}},
ClosingAutoSave->True,
Editable->False,
WindowToolbars->{},
PageWidth->334,
WindowSize->{116, 56},
WindowMargins->{{Automatic, 5}, {72, Automatic}},
WindowFrame->"Palette",
WindowElements->{},
WindowFrameElements->"CloseBox",
WindowClickSelect->False,
ScrollingOptions->{"PagewiseScrolling"->True,
"VerticalScrollRange"->Fit},
ShowCellBracket->False,
CellMargins->{{0, 0}, {Inherited, 0}},
Active->True,
CellOpen->True,
ShowCellLabel->False,
ShowCellTags->False,
ImageMargins->{{0, Inherited}, {Inherited, 0}},
Magnification->1.5
]


  • Prev by Date: NDSolve: avoiding negative values?
  • Next by Date: Copy as InputForm
  • Previous by thread: Re: Get theoretical answer on linear equations
  • Next by thread: Re: Bernstein polynomails