Re: Creating a Document Programmatically

2008-04-03 Thread Rich Shepard
On Tue, 25 Mar 2008, Rich Shepard wrote: Has anyone done this? Our model is written in Python, so we can use the open() and write() methods to squirt strings to a disk file. After learning PyX (Python wrapper for TeX/LaTeX primarily for graphics), and trying to use it to write the reports,

Re[2]: Creating a Document Programmatically

2008-04-03 Thread Alan G Isaac
1. You need to use raw strings or double your backslashes. 2. Probably you should use LaTeX tables. Cheers, Alan Isaac

Re[2]: Creating a Document Programmatically

2008-04-03 Thread Rich Shepard
On Thu, 3 Apr 2008, Alan G Isaac wrote: 1. You need to use raw strings or double your backslashes. Alan, Yes, doubling the backslashes worked. 2. Probably you should use LaTeX tables. I'll probably get to this for some of the reports. But, on this one the text strings need to be

[OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Dov Feldstern
Rich Shepard wrote: On Tue, 25 Mar 2008, Rich Shepard wrote: Has anyone done this? Our model is written in Python, so we can use the open() and write() methods to squirt strings to a disk file. After learning PyX (Python wrapper for TeX/LaTeX primarily for graphics), and trying to use it

Re: [OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Rich Shepard
On Fri, 4 Apr 2008, Dov Feldstern wrote: Based on your example, I would strongly recommend that you look into http://www.cheetahtemplate.org/ --- it's a wonderful tool, and it looks to me like it may be just what you're looking for. Dov, Thank you for the recommendation. But, I don't see

Re[2]: [OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Alan G Isaac
On Thu, 3 Apr 2008, Rich Shepard apparently wrote: The sample code I posted needs to be placed precisely on the page so the pairs are aligned with a row of bubbles on the OMR form. It seems to me that this calls for a page description language, like PostScript of PDF. However maybe you

Re: Creating a Document Programmatically

2008-04-03 Thread Rich Shepard
On Tue, 25 Mar 2008, Rich Shepard wrote: Has anyone done this? Our model is written in Python, so we can use the open() and write() methods to squirt strings to a disk file. After learning PyX (Python wrapper for TeX/LaTeX primarily for graphics), and trying to use it to write the reports,

Re[2]: Creating a Document Programmatically

2008-04-03 Thread Alan G Isaac
1. You need to use raw strings or double your backslashes. 2. Probably you should use LaTeX tables. Cheers, Alan Isaac

Re[2]: Creating a Document Programmatically

2008-04-03 Thread Rich Shepard
On Thu, 3 Apr 2008, Alan G Isaac wrote: 1. You need to use raw strings or double your backslashes. Alan, Yes, doubling the backslashes worked. 2. Probably you should use LaTeX tables. I'll probably get to this for some of the reports. But, on this one the text strings need to be

[OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Dov Feldstern
Rich Shepard wrote: On Tue, 25 Mar 2008, Rich Shepard wrote: Has anyone done this? Our model is written in Python, so we can use the open() and write() methods to squirt strings to a disk file. After learning PyX (Python wrapper for TeX/LaTeX primarily for graphics), and trying to use it

Re: [OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Rich Shepard
On Fri, 4 Apr 2008, Dov Feldstern wrote: Based on your example, I would strongly recommend that you look into http://www.cheetahtemplate.org/ --- it's a wonderful tool, and it looks to me like it may be just what you're looking for. Dov, Thank you for the recommendation. But, I don't see

Re[2]: [OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Alan G Isaac
On Thu, 3 Apr 2008, Rich Shepard apparently wrote: The sample code I posted needs to be placed precisely on the page so the pairs are aligned with a row of bubbles on the OMR form. It seems to me that this calls for a page description language, like PostScript of PDF. However maybe you

Re: Creating a Document Programmatically

2008-04-03 Thread Rich Shepard
On Tue, 25 Mar 2008, Rich Shepard wrote: Has anyone done this? Our model is written in Python, so we can use the open() and write() methods to squirt strings to a disk file. After learning PyX (Python wrapper for TeX/LaTeX primarily for graphics), and trying to use it to write the reports,

Re[2]: Creating a Document Programmatically

2008-04-03 Thread Alan G Isaac
1. You need to use raw strings or double your backslashes. 2. Probably you should use LaTeX tables. Cheers, Alan Isaac

Re[2]: Creating a Document Programmatically

2008-04-03 Thread Rich Shepard
On Thu, 3 Apr 2008, Alan G Isaac wrote: 1. You need to use raw strings or double your backslashes. Alan, Yes, doubling the backslashes worked. 2. Probably you should use LaTeX tables. I'll probably get to this for some of the reports. But, on this one the text strings need to be

[OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Dov Feldstern
Rich Shepard wrote: On Tue, 25 Mar 2008, Rich Shepard wrote: Has anyone done this? Our model is written in Python, so we can use the open() and write() methods to squirt strings to a disk file. After learning PyX (Python wrapper for TeX/LaTeX primarily for graphics), and trying to use it

Re: [OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Rich Shepard
On Fri, 4 Apr 2008, Dov Feldstern wrote: Based on your example, I would strongly recommend that you look into http://www.cheetahtemplate.org/ --- it's a wonderful tool, and it looks to me like it may be just what you're looking for. Dov, Thank you for the recommendation. But, I don't see

Re[2]: [OT] templating latex (was: Re: Creating a Document Programmatically)

2008-04-03 Thread Alan G Isaac
On Thu, 3 Apr 2008, Rich Shepard apparently wrote: > The sample code I posted needs to be placed precisely on > the page so the pairs are aligned with a row of bubbles on > the OMR form. It seems to me that this calls for a page description language, like PostScript of PDF. However maybe you

Re: Creating a Document Programmatically

2008-03-31 Thread G. Milde
On 25.03.08, Rich Shepard wrote: Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise) ... Has anyone done this? You might have a look, if pyreport is what you want:

Re: Creating a Document Programmatically

2008-03-31 Thread G. Milde
On 25.03.08, Rich Shepard wrote: Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise) ... Has anyone done this? You might have a look, if pyreport is what you want:

Re: Creating a Document Programmatically

2008-03-31 Thread G. Milde
On 25.03.08, Rich Shepard wrote: > Many moons ago I asked for opinions on using LaTeX as a report tool for a > python application (a mathematical model, to be more precise) ... > Has anyone done this? You might have a look, if pyreport is what you want:

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
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

Re: Creating a Document Programmatically

2008-03-26 Thread Steve Litt
On Wednesday 26 March 2008 09:50, Rich Shepard wrote: 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

Re: Creating a Document Programmatically

2008-03-26 Thread Alan Isaac
Sounds like you should consider docutils with reStructuredText. This produces PDF via LaTeX. (If you need math in your text, say so, and I'll explain how it's done.) Cheers, Alan Isaac

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
On Wed, 26 Mar 2008, Steve Litt wrote: Why not put the preamble and other multiline code in one or more separate text files. Those things are data, not code. That way you or your assistant can change the preamble without changing the Python program and its indentation. Steve, Nothing to

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
On Wed, 26 Mar 2008, Alan Isaac wrote: Sounds like you should consider docutils with reStructuredText. This produces PDF via LaTeX. (If you need math in your text, say so, and I'll explain how it's done.) Alan, Fancy meeting you here! :-) LyX mail list, PyX mail list, ... wonder to how

Re: Creating a Document Programmatically

2008-03-26 Thread Alan Isaac
On Wed, 26 Mar 2008, Rich Shepard wrote: After looking at the docutils page on sourceforge.net, I don't think that's what I want. I'm not trying to produce program documentation, but the inputs and outputs of a mathematical model whose UI and some code are written in Python Take a look

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
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

Re: Creating a Document Programmatically

2008-03-26 Thread Steve Litt
On Wednesday 26 March 2008 09:50, Rich Shepard wrote: 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

Re: Creating a Document Programmatically

2008-03-26 Thread Alan Isaac
Sounds like you should consider docutils with reStructuredText. This produces PDF via LaTeX. (If you need math in your text, say so, and I'll explain how it's done.) Cheers, Alan Isaac

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
On Wed, 26 Mar 2008, Steve Litt wrote: Why not put the preamble and other multiline code in one or more separate text files. Those things are data, not code. That way you or your assistant can change the preamble without changing the Python program and its indentation. Steve, Nothing to

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
On Wed, 26 Mar 2008, Alan Isaac wrote: Sounds like you should consider docutils with reStructuredText. This produces PDF via LaTeX. (If you need math in your text, say so, and I'll explain how it's done.) Alan, Fancy meeting you here! :-) LyX mail list, PyX mail list, ... wonder to how

Re: Creating a Document Programmatically

2008-03-26 Thread Alan Isaac
On Wed, 26 Mar 2008, Rich Shepard wrote: After looking at the docutils page on sourceforge.net, I don't think that's what I want. I'm not trying to produce program documentation, but the inputs and outputs of a mathematical model whose UI and some code are written in Python Take a look

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
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

Re: Creating a Document Programmatically

2008-03-26 Thread Steve Litt
On Wednesday 26 March 2008 09:50, Rich Shepard wrote: >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

Re: Creating a Document Programmatically

2008-03-26 Thread Alan Isaac
Sounds like you should consider docutils with reStructuredText. This produces PDF via LaTeX. (If you need math in your text, say so, and I'll explain how it's done.) Cheers, Alan Isaac

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
On Wed, 26 Mar 2008, Steve Litt wrote: Why not put the preamble and other multiline code in one or more separate text files. Those things are data, not code. That way you or your assistant can change the preamble without changing the Python program and its indentation. Steve, Nothing to

Re: Creating a Document Programmatically

2008-03-26 Thread Rich Shepard
On Wed, 26 Mar 2008, Alan Isaac wrote: Sounds like you should consider docutils with reStructuredText. This produces PDF via LaTeX. (If you need math in your text, say so, and I'll explain how it's done.) Alan, Fancy meeting you here! :-) LyX mail list, PyX mail list, ... wonder to how

Re: Creating a Document Programmatically

2008-03-26 Thread Alan Isaac
On Wed, 26 Mar 2008, Rich Shepard wrote: > After looking at the docutils page on sourceforge.net, > I don't think that's what I want. I'm not trying to > produce program documentation, but the inputs and outputs > of a mathematical model whose UI and some code are written > in Python Take a

Creating a Document Programmatically

2008-03-25 Thread Rich Shepard
This is not specifically LyX, but LaTeX. I ask for your indulgence. :-) Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise), and finally decided that ReportLab would be the better solution. However, having

Re: Creating a Document Programmatically

2008-03-25 Thread John
On Wednesday 26 March 2008 03:58:47 pm Rich Shepard wrote: This is not specifically LyX, but LaTeX. I ask for your indulgence. :-) Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise), and finally decided

Creating a Document Programmatically

2008-03-25 Thread Rich Shepard
This is not specifically LyX, but LaTeX. I ask for your indulgence. :-) Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise), and finally decided that ReportLab would be the better solution. However, having

Re: Creating a Document Programmatically

2008-03-25 Thread John
On Wednesday 26 March 2008 03:58:47 pm Rich Shepard wrote: This is not specifically LyX, but LaTeX. I ask for your indulgence. :-) Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise), and finally decided

Creating a Document Programmatically

2008-03-25 Thread Rich Shepard
This is not specifically LyX, but LaTeX. I ask for your indulgence. :-) Many moons ago I asked for opinions on using LaTeX as a report tool for a python application (a mathematical model, to be more precise), and finally decided that ReportLab would be the better solution. However, having

Re: Creating a Document Programmatically

2008-03-25 Thread John
On Wednesday 26 March 2008 03:58:47 pm Rich Shepard wrote: >This is not specifically LyX, but LaTeX. I ask for your indulgence. :-) > >Many moons ago I asked for opinions on using LaTeX as a report tool for > a python application (a mathematical model, to be more precise), and > finally