MathGroup Archive 2006

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

Search the Archive

Notebooks, packages, cells, and literate programming

  • To: mathgroup at
  • Subject: [mg64195] Notebooks, packages, cells, and literate programming
  • From: "Mark Adler" <madler at>
  • Date: Sat, 4 Feb 2006 04:13:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at

So I have a notebook that documents a package, the latter being
automatically saved from the initialization cells.  (When that works
anyway.)  All well and good, especially since it permits a literate
programming style, by which I mean detailed comments, example,
illustrations, etc. as desired between and among the actual package
cells.  The comments (cmd-7 text) are visually distinctive and compact.
 The examples can be run by the user to see what the code fragment
does, but is not part of the package.

That all works unless I have a definition of, say, a block with many
lines, then I cannot split those cells and have them work in the
notebook.  I'd like to intersperse comment and other sorts of
illustrative cells in and among the lines of the block.  I'd like to
never use the horrible (* *) comments in the block.

So is there a way to break up an expression among multiple cells in a
notebook and have the cells still work (if executed in the proper


p.s.  The answer is not "use smaller blocks".  I want comments between
individual lines of already small blocks.

  • Prev by Date: Re: how to visualize 3+D normal density contour?
  • Next by Date: Re: Trigonometric form of complex numbers
  • Previous by thread: Re: Compile arguments
  • Next by thread: Re: Notebooks, packages, cells, and literate programming