views:

166

answers:

2
+1  A: 

It was my impression that rst supported Unicode; can you just type in the raw character and let docutils handle encoding for HTML?

Hank Gay
hmm... I guess I could, but I'd rather stick to ASCII.
Jason S
+1  A: 

You have a large number of defined symbols via the "substitution" operator.

You have to include the definitions via .. include:: <isonum.txt> or something similar.

Most of them have the form |larr| or |rarr|.

They are defined in the docutils.parsers.rst.include installation directory. There are dozens of files which define numerous Unicode characters.

S.Lott
Hmmm. These look really lousy compared to the Markdown symbols that result.
Jason S
"lousy"? What does that mean in this context? Are you saying that `←` is worse than `|larr|` or are you saying that your browser font looks lousy?
S.Lott
I'm looking at this `→` on this site, and comparing it against Sphinx (using RST) HTML output of |rarr|. Both are HTML and are using the same default font. I'm not sure if they are the same unicode character, I don't have a character-codepoint-decoder on hand.
Jason S
You don't need much of a code-point decoder. The standard HTML entities give you the Unicode character number. The `<isonum.txt>` file gives you the character defined by RST. You can create your own definition if the HTML entity is different than the RST entity.
S.Lott
Hmm. Both sources claim codepoint 0x2192 for rarr, and the surrounding text is in the same font, yet the symbols look different. Something is fishy, and like I said, I don't have a character codepoint decoder.
Jason S
Argh -- a red herring, it has something to do with the CSS or font displays, nothing to do with UTF-8 encoding vs. HTML entity encoding. Thanks!
Jason S