MathGroup Archive 2002

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

Search the Archive

Re: Problems with creating packages (formatting)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33835] Re: [mg33748] Problems with creating packages (formatting)
  • From: Omega Consulting <omega_consulting at yahoo.com>
  • Date: Fri, 19 Apr 2002 02:28:23 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Packages are in InputForm, but Input cells are typically in StandardForm. 
What you are seeing in your package is the InputForm of a StandardForm cell 
(called ShortBoxForm). There are some things you can do to avoid these 
creatures in your packages generated from nbs.

1) Avoid StandardForm notations, such as superscripts, subscripts, 2D 
fractions, radicals, etc.

2) Switch your cells to InputForm. You can switch an existing cell with 
menu item Cell>Convert To>InputForm or Cell>Display As>InputForm. You can 
switch the default with the menu item Cell>Default Input FormatType>InputForm.

----------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"

Spend less time searching and more time finding.
http://www.wz.com/internet/Mathematica.html

At 01:14 AM 4/11/2002, Mike Varney wrote:
>Hello all.
>
>I am attempting to create a package under version 4.1.
>After entering in my functions, etc etc and setting the cell as the
>initiation cell, I am able to save the package as package.m.
>
>I can now call and load the package fine and the functions work fine as
>well.
>
>The problem is that when I open package.m in mathmatica to edit the package
>the text is in the "plain text" format, i.e..
>
>F[x_] := Cos[x]^3 + 3Exp[x]+1
>
>Becomes:
>
>\!\(F[x_] := Cos[x]\^3 + 3  Exp[x] + 1\)
>
>The installation is the default one with an extra directory under
>standardpackages for my packages.  I have changed none of the default
>settings.
>
>My saving procedure is the following:
>
>1.  I click on a cell and type in my functions, etc to create the package.
>This includes comments, etc., etc.
>
>2.  I click on the cell bracket and choose Cell -> Cell Properties ->
>Initialization Cell
>
>3.  I save as special -> Package Format
>
>I close the notebook without saving, restart mathematica and open the
>package.m and see the formatting errors.
>
>If any of you have ideas on how to solve this I would appreciate the
>feedback.
>
>Thanks.
>
>Mike



  • Prev by Date: Re: Passing arguments and pattern matching
  • Next by Date: BesselZeros and Working Precision?
  • Previous by thread: RE: Problems with creating packages (formatting)
  • Next by thread: ascending/decending polynomial order