avi9526
unread,Apr 16, 2012, 1:33:43 PM4/16/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-s...@googlegroups.com
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.