[Date Index] [Thread Index] [Author Index]
Re: Viewing packages in mathematica
On 8/21/09 at 4:42 AM, hell at exoneon.de (Benjamin Hell) wrote: >Hi, this is a real beginner question for packages in mathematica. >When I view a package (.m) file in mathematica, the mathematica >editor doesn't show any indentation nor does any automatic line >breaks when scaling the window. So whereas my code can be read quite >well in a standard mathematica notebook, it looks ugly in a package >file. Is there any way to setup some viewing options to change that >behaviour? How are you creating the .m file to begin with? If you are creating the .m file within Mathematica's notebook interface, i.e., marking cells with code to be included in the ..m file as initialization cells and using save as... to save this as a .m file, why open the resulting .m file into a notebook? Keep the notebook, make changes as needed and save. When set up correctly, the .m file is generated automatically as you save changes to the notebook that generates it. Another way to create .m files would be to use an independent text editor. If you are doing this, your best bet is to continue to use that text editor rather than trying to open the .m file in Mathematica. Also, there is Wolfram Workbench. Others have found this useful. As for myself, I've not found Wolfram Workbench to be that useful. I much prefer keeping a Mathematica notebook and generating the .m file from it.