I have Ubuntu 11.10 and SageMath 4.8 (build from source)
Next code works in Python 2.7 console and fail when using SageMath 4.8
#------------------------------------------
from matplotlib import rc
rc('font',**{'family':'serif'})
rc('text', usetex=True)
rc('text.latex',unicode=True)
rc('text.latex',preamble='\usepackage[utf8]{inputenc}')
rc('text.latex',preamble='\usepackage[russian]{babel}')
from pylab import *
x = linspace(0,2*pi,100)
y = sin(x)
plot(x,y,'-')
xlabel(u"ось абсцисс")
ylabel(u"ось ординат")
savefig('1.png')
#------------------------------------------
I get error "Package ucs Error: Unknown Unicode character 140 = U+008C". I open
temporary *.tex file that caused to error (in
"$HOME/.sage/matplotlib-1.0.1/tex.cache" directory) and find out that string
"ось абсцисс" have wrong encoding in *.tex file and looks like "Ð¾Ñ ÑŒ абÑ
Ñ†Ð¸Ñ Ñ ". Since that code works in Python console I think this problem is
fault of SageMath.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org