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