Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symbols in restructuredText

Tags:

I want to use some symbols in restructuredText; how can I do this? (e.g. → in Markdown yields the "→" symbol as defined in the list of standard HTML character entities -- see also w3c reference)

Note: I don't want to require math formula support as a dependency.

like image 660
Jason S Avatar asked Dec 07 '09 19:12

Jason S


People also ask

How do I comment a line in an RST file?

For comments, add 2 periods .. followed by a newline and then your comment indented.

What is Sphinx RST?

RST is a powerful and straightforward markup language that, in combination with Sphinx, provides a wide range of facilities for intelligent and appealing documentation creation. It uses simple and implicit syntax to introduce a variety of content elements such as titles, code blocks, vertical lists, and many others.


2 Answers

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.

like image 72
S.Lott Avatar answered Jan 04 '23 18:01

S.Lott


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

like image 44
Hank Gay Avatar answered Jan 04 '23 19:01

Hank Gay