Rich Shepard wrote:
  This is not LyX specific, but I'm hoping that some of you can provide
direction to help me find the solution I need.

  In brief: we're developing an approximate reasoning model (a type of
expert system) in Python and C, with data maintained in an embedded SQLite
database. I'd like to produce reports via LaTeX and pdflatex. To do so, I
need to write report-specific LaTeX templates that have replaceable
variables where the content goes. Then, the applicaion would
programmatically extract the required information from a database table and
fill in the template for the report.

  I cannot find how to create such a LaTeX template in "Guide to LaTeX" or
TLC2. LaTeX document classes are templates themselves, but are used to
manually fill in the document content. Can this content be provided
programmatically?


I would write the template as an ordinary document (and of course would write it in LyX, then export to .tex), using some distinctive placeholders where the good stuff would be inserted (e.g., %%variable 1%% or some such). Then have a script create a copy of the .tex file (so as not to corrupt the master template) and use sed to substitute the good stuff for the placeholders. Depending on what the good stuff looks like, you might have to escape a character here or there.

Or am I missing something fundamental here?

/Paul

Reply via email to