RE: line wrapping and good notebook style

*To*: mathgroup at smc.vnet.net*Subject*: [mg37427] RE: [mg37412] line wrapping and good notebook style*From*: "David Park" <djmp at earthlink.net>*Date*: Mon, 28 Oct 2002 03:40:50 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Shakti, Your method of doing multiple steps in a single cell is a good one. Especially, it is a way to group related steps and use % and %% without ambiguity as to what they stand for. I was trying to reproduce an example of what you are talking about and couldn't come up with a good one. But I know that in my work it often happens that after I use Return Mathematica indents when I don't want it to. This is because Mathematica does not yet know if the new line is a continuation of the previous statement. But when I begin typing the new line Mathematica snaps it back to the left margin. Have you tried that? (I also think there is some variation in Mathematica's behavior here in various versions.) You ask about good style for a notebook. This is, of course, a matter of taste but I see an many dreadful notebooks so this gives me an excuse to set forth some of my opinions. 1) The main purpose of a Mathematica notebook that you are sending to some other person is to communicate your ideas and knowledge in as clear a manner as possible. Anything that contributes to clarity is good, and anything that detracts from it is bad. Remember that the reader is seldom going to spend as much time reading the notebook as you spent making it. You have only a limited shot at another person's mind. 2) Good notebooks are usually a fine mixture of Text cells, Input/Output cells and graphics. The explanatory Text cells are equally as important as the calculations. And for explanatory text use Text cells, not group headings or Input cells. Text cells wrap, hyphenate and you can do spell checking on them, and you can also include mathematical expressions with Inline cells. 3) Make certain that the notebook has all necessary initializations and definitions in it. As a check, quit the kernel and evaluate the notebook in a fresh Mathematica session. A notebook that won't evaluate is certainly not going to convey your ideas. 4) If in any doubt about style, use the Default notebook style. Use cell grouping and group headings to organize your notebook. For example, you can put all your initialization statements in an Initialization Section. A long ungrouped, i.e., unorganized, notebook is difficult to navigate or follow. With headings and grouping, and with the groups closed, the notebook presents itself in outline form and already begins to convey your ideas. 5) STAY WITH THE DEFAULT AUTOMATIC GROUPING. I've seen many notebooks with manual grouping. Without any exception whatever they were all perfectly dreadful. They end up as one long totally unorganized mess. 6) Stay away from special formatting, colored cells and other special effects. They may mean something to you but are nothing but clutter to the reader. (It is too bad that WRI did not include some nice pastel Background colors for cells in the menu. The highly saturated colors are not suitable.) Grouping and Organization Completely Evaluable Text Cells - Input/Output Cells - Graphics Get rid of all special effect clutter. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Shakti Shrivastava [mailto:shaktis at student.umass.edu] To: mathgroup at smc.vnet.net I have been using mathematica for sometime now. However i have never managed to get around the problem of correctly formatting my documents. There is inevitable always a line formatting problem. Meaning if I type half way thru the line and without going all the way in the same line go on to use the next line, for eg. when i am writing out step-wise, the solution to a particular probelm, then the next line contents inevitably gets indented. Somehow I cant seem to get them left align correctly. For now I painstakingly do divide cell and merge them back to get the correct left alignment. however I am quite sure that there has to be a better solution. Can someone please advise. All my homeworks and papers are written in mathematica. also are there any good articles on good formatting with Mathematica. like adding footnotes on a page, etc. Thank you in advance for help! - Shakti Shrivastava.