On Wed, 26 Mar 2008, John wrote:

Not directly related to your task but ... Some years ago I used perl to
satisfy the need for an Insurance Co to write standard letters to a client
in processing claims, renewals, etc of policies. This was a challenge
because the amount of interpolated comment was derived from a database and
was unpredictable in size.

John,

  I've been working with ReportLab, a python library for database reporting.
Like LaTeX, it allows very fine control of placement of text on the page.
But, it is highly limited in the graphics it can handle ... only raster
images directly.

  After spending a long time -- too much time, IMO -- with ReportLab and
Matplotlib (plotting library based on MatLab) and not getting the results we
need, it became time to look for alternatives.

  There are two main reports from the approximate reasoning model: the input
variables and a detailed, step-by-step log of each model run. Neither is in
the realm of a database report writing tool (such as ReportLab), and the
data plots we need turn out to be much easier -- and better results -- using
PyX rather than mpl (nice .eps or .pdf with LaTeX handling of all text and
math). The data come from lists of tuples, not directly from the database
tables.

One of the difficulties with Python I foresee are that its reliance on
indentation might be broken by LyX collapsing consecutive spaces.

  After years of C I'm still bothered by Python's use of indentation to
delimit code blocks. Particularly when it's anally obsessive where comments
start.

So my advice. Do it with LyX rather than LaTeX. It makes it easier to play
with your output file using LyX rather than attacking .tex file with vi.

  What I intend to do is use the Python free-form comment delimiter (""" ...
""") to write the preamble and other multiline code, and the rest as
embedded strings. Using open(), write(), and close() I'll get a .tex file on
disk, then spawn a shell to execute a script to run latex->dvips->ps2pdf.

  Oh, I don't use vi and its children; strictly an emacs user. There's a
reason I don't like vi, but that's a long story for another forum.

Many thanks,

Rich

--
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Reply via email to