Re: [OT] Programmatically Creating a LaTeX Document

2007-10-11 Thread Rich Shepard
On Wed, 10 Oct 2007, Steve Litt wrote: Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. Steve, Expediency won: I can do the reports using ReportLab's table layout. Fewer than two dozen lines of code, and I

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-11 Thread Rich Shepard
On Wed, 10 Oct 2007, Steve Litt wrote: Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. Steve, Expediency won: I can do the reports using ReportLab's table layout. Fewer than two dozen lines of code, and I

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-11 Thread Rich Shepard
On Wed, 10 Oct 2007, Steve Litt wrote: Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. Steve, Expediency won: I can do the reports using ReportLab's table layout. Fewer than two dozen lines of code, and I

[OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Todd Denniston
Rich Shepard wrote, On 10/10/2007 09:21 AM: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Todd Denniston wrote: I have done such a beast, therefore it can be done. :) Thank you, Todd! I had to be careful in my C program to properly escape LaTeX special chars before it wrote the data to MyVariableData.tex, i.e., at least _, * and \ become \_, {*} and

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Paul A. Rubin
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.

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Ernesto Posse
Since you are using Python, I suggest using the string.Template class for this purpose. I think the only thing that you would have to be careful about is with the $: You would have to replace the normal $'s of your LaTeX template by $$, since this class uses $ for marking placeholders. Here's the

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Paul A. Rubin wrote: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Ernesto Posse wrote: Since you are using Python, I suggest using the string.Template class for this purpose. I think the only thing that you would have to be careful about is with the $: You would have to replace the normal $'s of your LaTeX template by $$, since this class

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Ernesto Posse wrote: Since you are using Python, I suggest using the string.Template class for this purpose. The example on that 'man' page suggests the path to ultimate happiness, using the Python shell: from string import Template s = Template('$who likes $what')

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Todd Denniston
Rich Shepard wrote, On 10/10/2007 12:09 PM: On Wed, 10 Oct 2007, Paul A. Rubin wrote: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Steve Litt
On Wednesday 10 October 2007 13:16, Rich Shepard wrote: I'll play with this. It looks promising. Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. SteveT Steve Litt Books written in LyX:

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread William Adams
On Oct 10, 2007, at 12:15 PM, Todd Denniston wrote: I have done such a beast, therefore it can be done. :) Me too! My approach was a bit different though --- I templated a bunch of buttons using Runtime Revolution (a HyperCard clone) which were then output into a text file concatenated

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Steve Litt wrote: Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. Steve, I will. I'll try both LaTeX and ReportLab and see which seems to be easier to implement using one report as a

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Daniel Lohmann
Rich Shepard schrieb: There will be plots (created, no doubt, with PSTricks), to be included in the audit log report of each run. So I expect the templates to be as inclusive as your example. If you haven't worked with PSTricks so far (meaning that you have to learn something new

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Daniel Lohmann wrote: If you haven't worked with PSTricks so far (meaning that you have to learn something new anyway) you should also consider PGF/TikZ as a more modern alternative. Thanks, Daniel. I've used PSTricks some, but use Xfig most of the time. I started to

[OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Todd Denniston
Rich Shepard wrote, On 10/10/2007 09:21 AM: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Todd Denniston wrote: I have done such a beast, therefore it can be done. :) Thank you, Todd! I had to be careful in my C program to properly escape LaTeX special chars before it wrote the data to MyVariableData.tex, i.e., at least _, * and \ become \_, {*} and

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Paul A. Rubin
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.

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Ernesto Posse
Since you are using Python, I suggest using the string.Template class for this purpose. I think the only thing that you would have to be careful about is with the $: You would have to replace the normal $'s of your LaTeX template by $$, since this class uses $ for marking placeholders. Here's the

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Paul A. Rubin wrote: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Ernesto Posse wrote: Since you are using Python, I suggest using the string.Template class for this purpose. I think the only thing that you would have to be careful about is with the $: You would have to replace the normal $'s of your LaTeX template by $$, since this class

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Ernesto Posse wrote: Since you are using Python, I suggest using the string.Template class for this purpose. The example on that 'man' page suggests the path to ultimate happiness, using the Python shell: from string import Template s = Template('$who likes $what')

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Todd Denniston
Rich Shepard wrote, On 10/10/2007 12:09 PM: On Wed, 10 Oct 2007, Paul A. Rubin wrote: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Steve Litt
On Wednesday 10 October 2007 13:16, Rich Shepard wrote: I'll play with this. It looks promising. Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. SteveT Steve Litt Books written in LyX:

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread William Adams
On Oct 10, 2007, at 12:15 PM, Todd Denniston wrote: I have done such a beast, therefore it can be done. :) Me too! My approach was a bit different though --- I templated a bunch of buttons using Runtime Revolution (a HyperCard clone) which were then output into a text file concatenated

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Steve Litt wrote: Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. Steve, I will. I'll try both LaTeX and ReportLab and see which seems to be easier to implement using one report as a

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Daniel Lohmann
Rich Shepard schrieb: There will be plots (created, no doubt, with PSTricks), to be included in the audit log report of each run. So I expect the templates to be as inclusive as your example. If you haven't worked with PSTricks so far (meaning that you have to learn something new

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Daniel Lohmann wrote: If you haven't worked with PSTricks so far (meaning that you have to learn something new anyway) you should also consider PGF/TikZ as a more modern alternative. Thanks, Daniel. I've used PSTricks some, but use Xfig most of the time. I started to

[OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Todd Denniston
Rich Shepard wrote, On 10/10/2007 09:21 AM: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Todd Denniston wrote: I have done such a beast, therefore it can be done. :) Thank you, Todd! I had to be careful in my C program to properly escape LaTeX special chars before it wrote the data to MyVariableData.tex, i.e., at least "_", "*" and "\" become "\_", "{*}"

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Paul A. Rubin
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.

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Ernesto Posse
Since you are using Python, I suggest using the string.Template class for this purpose. I think the only thing that you would have to be careful about is with the $: You would have to replace the normal $'s of your LaTeX template by $$, since this class uses $ for marking placeholders. Here's the

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Paul A. Rubin wrote: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Ernesto Posse wrote: Since you are using Python, I suggest using the string.Template class for this purpose. I think the only thing that you would have to be careful about is with the $: You would have to replace the normal $'s of your LaTeX template by $$, since this class

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Ernesto Posse wrote: Since you are using Python, I suggest using the string.Template class for this purpose. The example on that 'man' page suggests the path to ultimate happiness, using the Python shell: from string import Template s = Template('$who likes $what')

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Todd Denniston
Rich Shepard wrote, On 10/10/2007 12:09 PM: On Wed, 10 Oct 2007, Paul A. Rubin wrote: 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

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Steve Litt
On Wednesday 10 October 2007 13:16, Rich Shepard wrote: > >I'll play with this. It looks promising. Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. SteveT Steve Litt Books written in LyX:

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread William Adams
On Oct 10, 2007, at 12:15 PM, Todd Denniston wrote: I have done such a beast, therefore it can be done. :) Me too! My approach was a bit different though --- I templated a bunch of buttons using Runtime Revolution (a HyperCard clone) which were then output into a text file concatenated

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Steve Litt wrote: Rich -- please share whatever your final solution with the list. I think most of us need to do this exact thing from time to time. Steve, I will. I'll try both LaTeX and ReportLab and see which seems to be easier to implement using one report as a

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Daniel Lohmann
Rich Shepard schrieb: There will be plots (created, no doubt, with PSTricks), to be included in the audit log report of each run. So I expect the templates to be as inclusive as your example. If you haven't worked with PSTricks so far (meaning that you have to learn something new

Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Rich Shepard
On Wed, 10 Oct 2007, Daniel Lohmann wrote: If you haven't worked with PSTricks so far (meaning that you have to learn something new anyway) you should also consider PGF/TikZ as a more modern alternative. Thanks, Daniel. I've used PSTricks some, but use Xfig most of the time. I started to