Skip to content

Commit f799b9d

Browse files
committed
Various minor doc fixes
1 parent d57c646 commit f799b9d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

autogen/doc.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
double_space = re.compile(" +")
1414

1515
end_space = re.compile(r"(@\[end[a-z]*\])([A-Za-z])")
16+
end_paren = re.compile(r"(@\[end[a-z]*\])([(])")
1617

1718
begin_verb = re.compile(r"@1")
1819
end_verb = re.compile(r"@[23] *@\[endcode\]")
1920
verb_loop = re.compile("^( .*)@\[[a-z]*\]", re.MULTILINE)
2021

2122
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)
2324

2425
math_loop = re.compile(r"(@\[start[A-Z]*MATH\][^@]*)@\[[a-z]*\]")
2526
math_backslash = re.compile(r"(@\[start[A-Z]*MATH\][^@]*)=BACKSLASH=")
@@ -130,6 +131,10 @@ def raw_to_rest(doc):
130131
# insert a non-breaking space
131132
doc = end_space.sub("\\1\xa0\\2", doc)
132133

134+
# Similarly, for inline markup immediately followed by an open
135+
# parenthesis, insert a space
136+
doc = end_paren.sub("\\1 \\2", doc)
137+
133138
# Fix labels and references
134139
doc = label_define.sub("", doc)
135140
doc = label_ref.sub("``\\3`` (in the PARI manual)", doc)
@@ -299,22 +304,22 @@ def get_rest_doc(function):
299304
<BLANKLINE>
300305
.. MATH::
301306
<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}
303308
j = (f^{24}-16)^3/f^{24},
304309
<BLANKLINE>
305310
where :math:`j` is the elliptic :math:`j`-invariant (see the function :literal:`ellj`).
306311
If :math:`flag = 1`, returns
307312
<BLANKLINE>
308313
.. MATH::
309314
<BLANKLINE>
310-
f_1(x) = \eta(x/2)/\eta(x) {such that}
315+
f_1(x) = \eta (x/2)/\eta (x) {such that}
311316
j = (f_1^{24}+16)^3/f_1^{24}.
312317
<BLANKLINE>
313318
Finally, if :math:`flag = 2`, returns
314319
<BLANKLINE>
315320
.. MATH::
316321
<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}
318323
j = (f_2^{24}+16)^3/f_2^{24}.
319324
<BLANKLINE>
320325
Note the identities :math:`f^8 = f_1^8+f_2^8` and :math:`ff_1f_2 = \sqrt2`.

cypari2/gen.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,8 @@ cdef class Gen(Gen_base):
759759
# obsolete: https://trac.sagemath.org/ticket/22165
760760
def polred(self, *args, **kwds):
761761
r'''
762-
This function is :emphasis:`deprecated`, use :meth:`.polredbest` instead.
762+
This function is :emphasis:`deprecated`,
763+
use :meth:`~cypari2.gen.Gen_base.polredbest` instead.
763764
'''
764765
import warnings
765766
with warnings.catch_warnings():

0 commit comments

Comments
 (0)