Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

For show(<string>) the code executed is basically show(latex(<string>)).

If you want to work with non-ascii characters, you should go for unicode. In Python3 that's going to be the default. At the moment we're still on Python2, so you should do something like

S= u'á'

If you do that, then you'll see that show(S) gives you an error. If you define

T='á'

then show(T) basically "silently" fails: the non-ascii character gets inserted into a TeX typesetting routine that is currently not capable of handling non-ascii characters. There are variants of TeX (specifically XeTeX) that are unicode-capable, but that's not what is currently used in sage.

The normal LaTeX way of typesetting a word like "rápido" would be as "r\'apido", but that doesn't seem to be supported in the notebook either.

I think it would be entirely reasonable to open a feature-request to let "show" support non-ascii (and particularly accented) characters.