Dear all,
I've been using Sphinx for creating online handouts for university
programming courses. I like to type unicode characters directly in the
source code; for example:

    The suit is ♠. The floor of `x` is `⌊x⌋`.

(I set :math: as the default role in conf.py). In the HTML output, this
works beautifully for both regular text and jsmath equations.

Today I tried to generate a LaTeX version of the handout, and some symbols
(like card suits) weren't properly converted to their LaTeX counterparts. I
wrote this little extension that does the mapping:
http://gist.github.com/652626

Unfortunately, this does not work for symbols within math roles. In the
example above, the suit is converted, but the floor delimiters aren't. The
workaround would be to start using `\lfloor x\rfloor` in my .rst source
file, but I really want to keep the cleaner version above. Typing `Δω` by
using vim digraphs is much more convenient than `\Delta\omega`.

Is there a simple way to map unicode symbols within math roles to their
LaTeX versions?

Best regards.
-- 
Roberto Bonvallet

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to