From: Michael H. <mh...@us...> - 2007-05-02 23:30:52
|
I offhandedly asked this earlier, but I really would like to know: Are there any examples out there of PyX being used to create tables in PostScript? An example of the kind of functionality I'm looking for is in groff/tbl. Thanks, Mike ---------------------------------------------------------------- Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ---------------------------------------------------------------- |
From: Michael H. <mh...@us...> - 2007-05-03 16:49:11
|
Since reading your comment, I investigated Latex (which I've never really used) a bit more and found that Latex should indeed do what I want. Since I'm building a system in Python, and PyX wraps Latex, I'm not sure that this is a misuse of PyX... Anyway, what I would like to do is create a class that allows me to create a table, and be able to set for each cell/column/row or entire table: background color horizontal alignment borders (on or off) to be more general you could add: text color and vertical alignment to the above list of attributes. I think I see the path ahead for doing this with the colortbl package in latex. If I'm feeling enterprising and community oriented, perhaps I'll offer it up to the world when I'm finished... Incidentally, is anyone else having trouble reading the mailing list archives? --Mike On May 2, 2007, at 7:11 PM, Alan G Isaac wrote: > On Wed, 2 May 2007, Michael Hearne apparently wrote: >> I offhandedly asked this earlier, but I really would like to know: >> Are there any examples out there of PyX being used to create tables >> in PostScript? >> An example of the kind of functionality I'm looking for is in >> groff/tbl. > > Frankly this sounds to me to be a misuse of PyX. > Can you motivate it a bit? > I assume you are aware of LaTeX + dvips? > > Cheers, > Alan Isaac > ---------------------------------------------------------------- Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ---------------------------------------------------------------- |
From: William H. <w.h...@as...> - 2007-05-03 17:17:08
|
Hi Michael On 5/3/07, Michael Hearne <mh...@us...> wrote: > Since reading your comment, I investigated Latex (which I've never really > used) a bit more and found that Latex should indeed do what I want. Sinc= e > I'm building a system in Python, and PyX wraps Latex, I'm not sure that t= his > is a misuse of PyX... > I wouldn't say that PyX "wraps" LaTeX, rather it uses LaTeX to typeset labels for use in graphs. If you want to use LaTeX in some other capacity (e.g., making a table), then PyX won't help that much. In that case, you might as well use LaTeX directly, by which I mean that your python script would write the .tex file and run pdflatex on it. The only advantage I see to using PyX in this context is that it frees you from having to worry about paper sizes and whether your table will fit. PyX will let you easily scale your table to fit on the page once you are done, although whether the result will be readable is another matter.... You could do the same in straight LaTeX too, but it is a bit trickier. Alternatively, you could take a look at ReportLab (www.reportlab.org), which would be a more pythonic solution, albeit without such good typography IMO. Cheers Will --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia |