|
13 | 13 | double_space = re.compile(" +")
|
14 | 14 |
|
15 | 15 | end_space = re.compile(r"(@\[end[a-z]*\])([A-Za-z])")
|
| 16 | +end_paren = re.compile(r"(@\[end[a-z]*\])([(])") |
16 | 17 |
|
17 | 18 | begin_verb = re.compile(r"@1")
|
18 | 19 | end_verb = re.compile(r"@[23] *@\[endcode\]")
|
19 | 20 | verb_loop = re.compile("^( .*)@\[[a-z]*\]", re.MULTILINE)
|
20 | 21 |
|
21 | 22 | dollars = re.compile(r"@\[dollar\]\s*(.*?)\s*@\[dollar\]", re.DOTALL)
|
22 |
| -doubledollars = re.compile(r"@\[doubledollar\]\s*(.*?)\s*@\[doubledollar\]", re.DOTALL) |
| 23 | +doubledollars = re.compile(r"@\[doubledollar\]\s*(.*?)\s*@\[doubledollar\] *", re.DOTALL) |
23 | 24 |
|
24 | 25 | math_loop = re.compile(r"(@\[start[A-Z]*MATH\][^@]*)@\[[a-z]*\]")
|
25 | 26 | math_backslash = re.compile(r"(@\[start[A-Z]*MATH\][^@]*)=BACKSLASH=")
|
@@ -130,6 +131,10 @@ def raw_to_rest(doc):
|
130 | 131 | # insert a non-breaking space
|
131 | 132 | doc = end_space.sub("\\1\xa0\\2", doc)
|
132 | 133 |
|
| 134 | + # Similarly, for inline markup immediately followed by an open |
| 135 | + # parenthesis, insert a space |
| 136 | + doc = end_paren.sub("\\1 \\2", doc) |
| 137 | + |
133 | 138 | # Fix labels and references
|
134 | 139 | doc = label_define.sub("", doc)
|
135 | 140 | doc = label_ref.sub("``\\3`` (in the PARI manual)", doc)
|
@@ -299,22 +304,22 @@ def get_rest_doc(function):
|
299 | 304 | <BLANKLINE>
|
300 | 305 | .. MATH::
|
301 | 306 | <BLANKLINE>
|
302 |
| - f(x) = \exp(-i\pi/24).\eta((x+1)/2)/\eta(x) {such that} |
| 307 | + f(x) = \exp (-i\pi/24).\eta ((x+1)/2)/\eta (x) {such that} |
303 | 308 | j = (f^{24}-16)^3/f^{24},
|
304 | 309 | <BLANKLINE>
|
305 | 310 | where :math:`j` is the elliptic :math:`j`-invariant (see the function :literal:`ellj`).
|
306 | 311 | If :math:`flag = 1`, returns
|
307 | 312 | <BLANKLINE>
|
308 | 313 | .. MATH::
|
309 | 314 | <BLANKLINE>
|
310 |
| - f_1(x) = \eta(x/2)/\eta(x) {such that} |
| 315 | + f_1(x) = \eta (x/2)/\eta (x) {such that} |
311 | 316 | j = (f_1^{24}+16)^3/f_1^{24}.
|
312 | 317 | <BLANKLINE>
|
313 | 318 | Finally, if :math:`flag = 2`, returns
|
314 | 319 | <BLANKLINE>
|
315 | 320 | .. MATH::
|
316 | 321 | <BLANKLINE>
|
317 |
| - f_2(x) = \sqrt{2}\eta(2x)/\eta(x) {such that} |
| 322 | + f_2(x) = \sqrt{2}\eta (2x)/\eta (x) {such that} |
318 | 323 | j = (f_2^{24}+16)^3/f_2^{24}.
|
319 | 324 | <BLANKLINE>
|
320 | 325 | Note the identities :math:`f^8 = f_1^8+f_2^8` and :math:`ff_1f_2 = \sqrt2`.
|
|
0 commit comments