On Tue, Feb 23, 2010 at 12:52 AM, Drew <[email protected]> wrote: The problem is that \r is a carriage return in Python strings, even in > triple-quoted strings. Python interprets most backslashes as just > backslashes, but \r, \n, \a, \b, \t, \f, \', \" and a few others are > read as control characters. For instance, in Python "\w" is two > characters, but "\n" is just one. Using "\\w" also leads to two > characters, as does "\\n", so the safest bet is to add an extra > backslash when writing math in Python docstrings for autodoc. >
There is a much easier solution: just prefix all docstrings with r: r""" This :math:`\mu + \nu = \alpha` works nicely. """ Fredrik -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
