Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3023

Re: Literate Programming

From "Tim Arnold" <tim.arnold@sas.com>
Newsgroups comp.lang.python
Subject Re: Literate Programming
Date 2011-04-11 12:39 -0400
Organization SAS Inc.
Message-ID <invasu$3uq$1@foggy.unx.sas.com> (permalink)
References <r7b178-602.ln1@svn.schaathun.net> <innerq$bj1$1@foggy.unx.sas.com> <aca678-b87.ln1@svn.schaathun.net>

Show all headers | View raw


"Hans Georg Schaathun" <hg@schaathun.net> wrote in message 
news:aca678-b87.ln1@svn.schaathun.net...
> On Fri, 8 Apr 2011 12:58:34 -0400, Tim Arnold
>  <tim.arnold@sas.com> wrote:
> :  If you already know LaTeX, you might experiment with the *.dtx docstrip
> :  capability.
>
> Hi.  Hmmm.  That's a new thought.  I never thought of using docstrip
> with anything but LaTeX.  It sounds like a rather primitive tool for
> handling python code, and I would expect some serious trouble getting
> sensible highlighting in vim/eclim (or most other editors for that
> matter).  But I'll give it a thought.  Thanks.
>
> :  It has some pain points if you're developing from scratch, but I use it 
> once
> :  I've got a system in reasonable shape.
>
> Hmmm.  I wonder if I am every going to reach that stage :-)
>
> :             You have full control over the
> :  display and you can make the code files go anywhere you like when you 
> run
> :  pdflatex on your file.
>
> If you use docstrip with python, what packages do you use to highlight
> code and markup programming concepts (methods/classes/variables)?
> If I may ask ...
>
> -- 
> :-- Hans Georg

I don't use anything special, just the verbatim environment is fine for my 
purposes.  But you might like the listings package which iirc has syntax 
highlighting built-in for python. ah, yes:
http://en.wikibooks.org/wiki/LaTeX/Packages/Listings

There's also the 'fancyvrb' package:
http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb

good luck,
--Tim

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar


Thread

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