@@ -128,8 +128,7 @@ support the command ``latex``.
128
128
illustrates LaTeX generation for your object.
129
129
130
130
#. You can use any macros included in ``amsmath ``, ``amssymb ``, or
131
- ``amsfonts ``, or the ones defined in
132
- :sage_root: `doc/commontex/macros.tex `.
131
+ ``amsfonts ``, or the ones defined in :mod: `sage.misc.latex_macros `.
133
132
134
133
An example template for a ``_latex_ `` method follows. Note that the
135
134
``.. skip `` line should not be included in your code; it is here to
@@ -162,7 +161,7 @@ Print representation
162
161
====================
163
162
164
163
The standard Python printing method is ``__repr__(self) ``. In Sage,
165
- that is for objects that derive from `` SageObject ` ` (which is
164
+ that is for objects that derive from :class: ` SageObject ` (which is
166
165
everything in Sage), instead define ``_repr_(self) ``. This is
167
166
preferable because if you only define ``_repr_(self) `` and not
168
167
``__repr__(self) ``, then users can rename your object to print however
@@ -647,17 +646,17 @@ When importing from other Python libraries that do not provide sufficient typing
647
646
information, it is possible to augment the library's typing information for
648
647
the purposes of typechecking the Sage library:
649
648
650
- - Create typestub files and place them in the directory :sage_root: ` src/typings `.
649
+ - Create typestub files and place them in the directory :file: ` SAGE_ROOT/ src/typings `.
651
650
For example, the distribution **pplpy ** provides the top-level package :mod: `ppl `,
652
651
which publishes no typing information. We can create a typestub file
653
- :sage_root: ` src/typings/ppl.pyi ` or :sage_root: ` src/typings/ppl/__init__.pyi `.
652
+ :file: ` SAGE_ROOT/ src/typings/ppl.pyi ` or :file: ` SAGE_ROOT/ src/typings/ppl/__init__.pyi `.
654
653
655
654
- When these typestub files are working well, it is preferable from the viewpoint
656
655
of the Sage project that they are "upstreamed", i.e., contributed to the
657
656
project that maintains the library. If a new version of the upstream library
658
657
becomes available that provides the necessary typing information, we can
659
658
update the package in the Sage distribution and remove the typestub files again
660
- from :sage_root: ` src/typings `.
659
+ from :file: ` SAGE_ROOT/ src/typings `.
661
660
662
661
- As a fallback, when neither adding typing annotations to source files
663
662
nor adding typestub files is welcomed by the upstream project, it is possible
0 commit comments