Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #2809
| From | Robert Kern <robert.kern@gmail.com> |
|---|---|
| Subject | Re: Literate Programming |
| Date | 2011-04-07 16:21 -0500 |
| Organization | The Church of Last Thursday |
| References | <r7b178-602.ln1@svn.schaathun.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.123.1302211326.9059.python-list@python.org> (permalink) |
On 4/7/11 1:09 PM, Hans Georg Schaathun wrote: > Has anyone found a good system for literate programming in python? > > I have been trying to use pylit/sphinx/pdflatex to generate > technical documentation. The application is scientific/numerical > programming, so discussing maths in maths syntax in between > python syntax is important. > > While I like the style, there are several things which do not > work as they should. > > One problem is that reST strips the indentation of code. When > documentation intersperses nested blocks, it would look better > if indentation was preserved so that the semantics of the code > is clear in the documentation. Are there any tricks to achieve > this in sphinx, or other systems which get it right? http://sphinx.pocoo.org/markup/code.html As far as I can tell, it just works. See here for an example: http://ipython.scipy.org/doc/nightly/html/interactive/reference.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Literate Programming Hans Georg Schaathun <hg@schaathun.net> - 2011-04-07 19:09 +0100
Re: Literate Programming jkn <jkn_gg@nicorp.f9.co.uk> - 2011-04-07 12:31 -0700
Re: Literate Programming Robert Kern <robert.kern@gmail.com> - 2011-04-07 16:21 -0500
Re: Literate Programming Hans Georg Schaathun <hg@schaathun.net> - 2011-04-08 10:01 +0100
Re: Literate Programming Jim <jim.hefferon@gmail.com> - 2011-04-08 05:22 -0700
Re: Literate Programming Hans Georg Schaathun <hg@schaathun.net> - 2011-04-08 20:21 +0100
Re: Literate Programming Jim <jim.hefferon@gmail.com> - 2011-04-09 03:45 -0700
Re: Literate Programming Hans Georg Schaathun <hg@schaathun.net> - 2011-04-09 16:20 +0100
Re: Literate Programming "Tim Arnold" <tim.arnold@sas.com> - 2011-04-08 12:58 -0400
Re: Literate Programming Hans Georg Schaathun <hg@schaathun.net> - 2011-04-09 16:25 +0100
Re: Literate Programming "Tim Arnold" <tim.arnold@sas.com> - 2011-04-11 12:39 -0400
csiph-web