Thanks for your quick answer, André. Unfortunately, I'm afraid that
may not be the
culprit, because I have several lines of the type

  pyx.text.preamble("\usepackage{package_1}")

and these lines don't give me trouble...

Best,
dani

On Thu, Jun 11, 2015 at 2:52 PM, André Wobst
<[email protected]> wrote:
> Hi Mico,
>
> Just a quick, wild guess:
>
> It might be related to "\u" being interpreted as unicode identifier.
>
> IIRC in Python 2
>
>   "\usomething"
>
> (none-unicode string) is equal to "\\usomething", as \u is not replaced by 
> something, whereas for
>
>   u"\usomething"
>
> returns something else then "\\useomething", as \u is considered to start a 
> unicode codepoint identifier.
>
> Now, in Python3 \u always works like for the unicode strings in Python3.
>
> Again, this is just a wild guess, but I might be right. Somehow I remember to 
> have stumbled on that myself quite some time ago.
>
> Best,
>
>
> André
>
>
> Am 11.06.2015 um 14:37 schrieb Mico Filós <[email protected]>:
>
>> Dear all,
>>
>> I am getting an error in pyx 0.14 whenever I load the package
>> "lmodern". The relevant error lines seem to be
>>
>> File "/usr/lib/python3/dist-packages/pyx/text.py", line 1114, in _execute
>>    raise TexResultError("unhandled TeX response (might be an error)")
>> The expression passed to TeX was:
>>  \ProcessPyXBox{\tiny{}\setbox0\hbox{$\vcenter{\vrule
>> width0pt}$}\PyXDimenVShift=\ht0\setbox0\hbox{{\gdef\PyXBoxHAlign{0.50000}\gdef\PyXFlushHAlign{0.50000}\PyXragged{}$\displaystyle{0}$}}\lower\PyXDimenVShift\box0%
>>  }{2}%
>>  \PyXInput{12}%
>> After parsing the return message from TeX, the following was left:
>>  *
>>  (/usr/share/texmf/tex/latex/lm/omslmsy.fd)
>>  (/usr/share/texmf/tex/latex/lm/omxlmex.fd)
>>  (cut after 5 lines; use errordetail.full for all output)
>> Error in atexit._run_exitfuncs:
>> Traceback (most recent call last):
>>  File "/usr/lib/python3/dist-packages/pyx/text.py", line 1022, in _cleanup
>>    self.do_finish()
>>  File "/usr/lib/python3/dist-packages/pyx/text.py", line 1225, in do_finish
>>    raise ValueError("end of dvifile expected but further pages follow")
>>
>>
>> Removing the line
>>
>>    pyx.text.preamble("\usepackage{lmodern}")
>>
>> solves the problem, but unfortunately I need this package. For the
>> record, there was no error at all in the former version of PyX. Do you
>> know what may be going on?
>>
>> Thanks a lot!
>> Dani
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> PyX-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pyx-user
>
> --
> by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
>    / \ \    / )   [email protected], http://www.wobsta.de/
>   / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
>  (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/
>

------------------------------------------------------------------------------
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to