From: Wojciech J. <woj...@gm...> - 2009-12-14 21:34:37
|
Hi, Thanks. I may move MiKTeX to another dir and I'll do that, but the sad thing is "Program Files (x86)\MiKTeX 2.8" is the default installing dir of MiKTeX for any Windows x64. On Mon, Dec 14, 2009 at 9:52 AM, André Wobst <wo...@us...> wrote: > Hi, > > the reason are the brackets in your directory name: > > C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\size10.clo > > PyX tries to understand the output of TeX, which has a certain bracket structure for including files. The first string after an opening bracket should be a filename. We already auto-guess spaces and line breaks in the TeX output, but I don't see a good solution to generically handling something like you have here. > > Is it an option to alter the installation path of your MiKTeX? Otherwise you need to disable the detailed parsing by passing a texmessage.ignore to the text processing, but this is bad, as it will hide true LaTeX errors as well ... > > Best, > > > André > > > Am 12.12.2009 um 13:06 schrieb Wojciech Jaskowski: > >> Hi, >> >> when I try to "text.set(mode="latex")", PyX crashes. A simple example: >> >> from pyx import * >> text.set(mode="latex") >> text.set(errordebug=3) >> mygraph = graph.graphxy( >> width=10 * unit.v_cm, >> y=graph.axis.lin(min=0,max=25), >> x=graph.axis.lin(min=0,max=200)) >> mygraph.plot(graph.data.function("y(x) = x")) >> mygraph.writetofile("plot.pdf"); >> >> The above crashes; when I comment out the line >> >> text.set(mode="latex") >> >> everything is fine. >> >> I use Windows 7 x64 with Miktex 2.8. I tried PyX 0.9, 1.0 and #3010, >> but without any luck. Below is the error I get. I will appreciate any >> help. >> >> Traceback (most recent call last): >> File "graph.py", line 13, in <module> >> mygraph.writetofile("plot.pdf"); >> File "C:\Python26\lib\site-packages\pyx\canvas.py", line 289, in wrappedindocu >> ment >> return method(d, file) >> File "C:\Python26\lib\site-packages\pyx\document.py", line 179, in writetofile >> >> self.writePDFfile(open(filename, "wb"), **kwargs) >> File "C:\Python26\lib\site-packages\pyx\document.py", line 171, in writePDFfil >> e >> pdfwriter.PDFwriter(self, _outputstream(file, "pdf"), **kwargs) >> File "C:\Python26\lib\site-packages\pyx\pdfwriter.py", line 316, in __init__ >> catalog = PDFcatalog(document, self, registry) >> File "C:\Python26\lib\site-packages\pyx\pdfwriter.py", line 142, in __init__ >> self.PDFpages = PDFpages(document, writer, registry) >> File "C:\Python26\lib\site-packages\pyx\pdfwriter.py", line 201, in __init__ >> page = PDFpage(page, pageno, self, writer, registry) >> File "C:\Python26\lib\site-packages\pyx\pdfwriter.py", line 235, in __init__ >> self.PDFcontent = PDFcontent(page, writer, self.pageregistry) >> File "C:\Python26\lib\site-packages\pyx\pdfwriter.py", line 267, in __init__ >> page.processPDF(contentfile, writer, acontext, registry, self.bbox) >> File "C:\Python26\lib\site-packages\pyx\document.py", line 134, in processPDF >> self._process("processPDF", *args) >> File "C:\Python26\lib\site-packages\pyx\document.py", line 84, in _process >> bbox.set(self.canvas.bbox()) >> File "C:\Python26\lib\site-packages\pyx\graph\graph.py", line 151, in bbox >> self.finish() >> File "C:\Python26\lib\site-packages\pyx\graph\graph.py", line 280, in finish >> self.doaxes() >> File "C:\Python26\lib\site-packages\pyx\graph\graph.py", line 503, in doaxes >> self.dolayout() >> File "C:\Python26\lib\site-packages\pyx\graph\graph.py", line 487, in dolayout >> >> self.doaxiscreate(axisname) >> File "C:\Python26\lib\site-packages\pyx\graph\graph.py", line 217, in doaxiscr >> eate >> self.axes[axisname].create() >> File "C:\Python26\lib\site-packages\pyx\graph\axis\axis.py", line 571, in crea >> te >> self.canvas = self.axis.create(self.data, self.positioner, self.graphtexrunn >> er, self.errorname) >> File "C:\Python26\lib\site-packages\pyx\graph\axis\axis.py", line 234, in crea >> te >> return _regularaxis._create(self, data, positioner, graphtexrunner, self.par >> ter, self.rater, errorname) >> File "C:\Python26\lib\site-packages\pyx\graph\axis\axis.py", line 204, in _cre >> ate >> variants[0].storedcanvas = layout(variants[0]) >> File "C:\Python26\lib\site-packages\pyx\graph\axis\axis.py", line 139, in layo >> ut >> self.painter.paint(canvas, data, self, positioner) >> File "C:\Python26\lib\site-packages\pyx\graph\axis\painter.py", line 192, in p >> aint >> t.temp_labelbox = canvas.texrunner.text_pt(t.temp_x_pt, t.temp_y_pt, t.label >> , labelattrs) >> File "C:\Python26\lib\site-packages\pyx\text.py", line 1229, in text_pt >> return self.text(x * unit.t_pt, y * unit.t_pt, expr, *args, **kwargs) >> File "C:\Python26\lib\site-packages\pyx\text.py", line 1192, in text >> self.execute("\\begin{document}", self.defaulttexmessagesbegindoc + self.tex >> messagesbegindoc) >> File "C:\Python26\lib\site-packages\pyx\text.py", line 996, in execute >> self.defaulttexmessagesdocclass + self.texmessagesdocclass) >> File "C:\Python26\lib\site-packages\pyx\text.py", line 1045, in execute >> raise TexResultError("unhandled TeX response (might be an error)", self) >> pyx.text.TexResultError: unhandled TeX response (might be an error) >> The expression passed to TeX was: >> \documentclass{article}% >> \PyXInput{3}% >> The return message from TeX was: >> * >> *("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\article.cls" >> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class >> ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\size10.clo")) >> PyXInputMarker:executeid=3: >> After parsing this message, the following was left: >> * >> *("C:\Program Files \MiKTeX 2.8\tex\latex\base\article.cls" >> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class >> ) >> >> >> Here is the error message: >> >> >> >> >> -- >> Wojciech Jaskowski >> Laboratory of Intelligent Decision Support Systems >> Institute of Computing Science >> Poznan University of Technology >> Piotrowo 2, 60-965 Poznan, Poland >> E-mail: wja...@cs... >> www.cs.put.poznan.pl/wjaskowski >> >> ------------------------------------------------------------------------------ >> Return on Information: >> Google Enterprise Search pays you back >> Get the facts. >> http://p.sf.net/sfu/google-dev2dev >> _______________________________________________ >> PyX-user mailing list >> PyX...@li... >> https://lists.sourceforge.net/lists/listinfo/pyx-user > > -- > by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim > / \ \ / ) wo...@us..., http://www.wobsta.de/ > / _ \ \/\/ / PyX - High quality PostScript and PDF figures > (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ > > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user > > -- Wojciech Jaskowski Laboratory of Intelligent Decision Support Systems Institute of Computing Science Poznan University of Technology Piotrowo 2, 60-965 Poznan, Poland E-mail: wja...@cs... www.cs.put.poznan.pl/wjaskowski |