@@ -1090,7 +1090,7 @@ def get_underline_thickness(self, font, fontsize, dpi):
1090
1090
# Typesetting math formulas
1091
1091
#
1092
1092
# Many of the docstrings below refer to a numbered "node" in that
1093
- # book, e.g. @123
1093
+ # book, e.g. node123
1094
1094
#
1095
1095
# Note that (as TeX) y increases downward, unlike many other parts of
1096
1096
# matplotlib.
@@ -1118,7 +1118,7 @@ class MathTextWarning(Warning):
1118
1118
1119
1119
class Node (object ):
1120
1120
"""A node in the TeX box model
1121
- @133
1121
+ node133
1122
1122
"""
1123
1123
def __init__ (self ):
1124
1124
self .size = 0
@@ -1147,7 +1147,7 @@ def render(self, x, y):
1147
1147
1148
1148
class Box (Node ):
1149
1149
"""Represents any node with a physical location.
1150
- @135 """
1150
+ node135 """
1151
1151
def __init__ (self , width , height , depth ):
1152
1152
Node .__init__ (self )
1153
1153
self .width = width
@@ -1193,7 +1193,7 @@ class Char(Node):
1193
1193
The metrics must be converted to the TeX way, and the advance (if
1194
1194
different from width) must be converted into a Kern node when the
1195
1195
Char is added to its parent Hlist.
1196
- @134 """
1196
+ node134 """
1197
1197
def __init__ (self , c , state ):
1198
1198
Node .__init__ (self )
1199
1199
self .c = c
@@ -1284,7 +1284,7 @@ def render(self, x, y):
1284
1284
1285
1285
class List (Box ):
1286
1286
"""A list of nodes (either horizontal or vertical).
1287
- @135 """
1287
+ node135 """
1288
1288
def __init__ (self , elements ):
1289
1289
Box .__init__ (self , 0. , 0. , 0. )
1290
1290
self .shift_amount = 0. # An arbitrary offset
@@ -1342,7 +1342,7 @@ def grow(self):
1342
1342
1343
1343
class Hlist (List ):
1344
1344
"""A horizontal list of boxes.
1345
- @135 """
1345
+ node135 """
1346
1346
def __init__ (self , elements , w = 0. , m = 'additional' , do_kern = True ):
1347
1347
List .__init__ (self , elements )
1348
1348
if do_kern :
@@ -1385,7 +1385,7 @@ def hpack(self, w=0., m='additional'):
1385
1385
Thus, hpack(w, exactly) produces a box whose width is exactly w, while
1386
1386
hpack (w, additional ) yields a box whose width is the natural width
1387
1387
plus w. The default values produce a box with the natural width.
1388
- @644, @649 """
1388
+ node644, node649 """
1389
1389
# I don't know why these get reset in TeX. Shift_amount is pretty
1390
1390
# much useless if we do.
1391
1391
#self.shift_amount = 0.
@@ -1432,7 +1432,7 @@ def hpack(self, w=0., m='additional'):
1432
1432
1433
1433
class Vlist (List ):
1434
1434
"""A vertical list of boxes.
1435
- @137 """
1435
+ node137 """
1436
1436
def __init__ (self , elements , h = 0. , m = 'additional' ):
1437
1437
List .__init__ (self , elements )
1438
1438
self .vpack ()
@@ -1449,7 +1449,7 @@ def vpack(self, h=0., m='additional', l=float(inf)):
1449
1449
Thus, vpack(h, exactly) produces a box whose width is exactly w, while
1450
1450
vpack(w, additional) yields a box whose width is the natural width
1451
1451
plus w. The default values produce a box with the natural width.
1452
- @644, @668 """
1452
+ node644, node668 """
1453
1453
# I don't know why these get reset in TeX. Shift_amount is pretty
1454
1454
# much useless if we do.
1455
1455
# self.shift_amount = 0.
@@ -1508,7 +1508,7 @@ class Rule(Box):
1508
1508
rule up to the boundary of the innermost enclosing box. This is called
1509
1509
a "running dimension." The width is never running in an Hlist; the
1510
1510
height and depth are never running in a Vlist.
1511
- @138 """
1511
+ node138 """
1512
1512
def __init__ (self , width , height , depth , state ):
1513
1513
Box .__init__ (self , width , height , depth )
1514
1514
self .font_output = state .font_output
@@ -1536,7 +1536,7 @@ class Glue(Node):
1536
1536
GlueSpec class, which is shared between multiple glue objects. (This
1537
1537
is a memory optimization which probably doesn't matter anymore, but it's
1538
1538
easier to stick to what TeX does.)
1539
- @149, @152 """
1539
+ node149, node152 """
1540
1540
def __init__ (self , glue_type , copy = False ):
1541
1541
Node .__init__ (self )
1542
1542
self .glue_subtype = 'normal'
@@ -1564,7 +1564,7 @@ def grow(self):
1564
1564
self .glue_spec .width *= GROW_FACTOR
1565
1565
1566
1566
class GlueSpec (object ):
1567
- """@150, @151 """
1567
+ """node150, node151 """
1568
1568
def __init__ (self , width = 0. , stretch = 0. , stretch_order = 0 , shrink = 0. , shrink_order = 0 ):
1569
1569
self .width = width
1570
1570
self .stretch = stretch
@@ -1645,7 +1645,7 @@ class Kern(Node):
1645
1645
better to move them closer together or further apart. A kern node can
1646
1646
also appear in a vertical list, when its 'width' denotes additional
1647
1647
spacing in the vertical direction.
1648
- @155 """
1648
+ node155 """
1649
1649
def __init__ (self , width ):
1650
1650
Node .__init__ (self )
1651
1651
self .width = width
@@ -1731,7 +1731,7 @@ class Ship(object):
1731
1731
and vlist_out , which traverse the Hlists and Vlists inside of
1732
1732
horizontal and vertical boxes. The global variables used in TeX to
1733
1733
store state as it processes have become member variables here.
1734
- @592 ."""
1734
+ node592 ."""
1735
1735
def __call__ (self , ox , oy , box ):
1736
1736
self .max_push = 0 # Deepest nesting of push commands so far
1737
1737
self .cur_s = 0
@@ -1767,7 +1767,7 @@ def hlist_out(self, box):
1767
1767
elif isinstance (p , Kern ):
1768
1768
self .cur_h += p .width
1769
1769
elif isinstance (p , List ):
1770
- # @623
1770
+ # node623
1771
1771
if len (p .children ) == 0 :
1772
1772
self .cur_h += p .width
1773
1773
else :
@@ -1781,7 +1781,7 @@ def hlist_out(self, box):
1781
1781
self .cur_h = edge + p .width
1782
1782
self .cur_v = base_line
1783
1783
elif isinstance (p , Box ):
1784
- # @624
1784
+ # node624
1785
1785
rule_height = p .height
1786
1786
rule_depth = p .depth
1787
1787
rule_width = p .width
@@ -1797,7 +1797,7 @@ def hlist_out(self, box):
1797
1797
self .cur_v = baseline
1798
1798
self .cur_h += rule_width
1799
1799
elif isinstance (p , Glue ):
1800
- # @625
1800
+ # node625
1801
1801
glue_spec = p .glue_spec
1802
1802
rule_width = glue_spec .width - cur_g
1803
1803
if glue_sign != 0 : # normal
@@ -2468,7 +2468,7 @@ def subsuperscript(self, s, loc, toks):
2468
2468
else :
2469
2469
shift_down = SUBDROP * xHeight
2470
2470
if super is None :
2471
- # @757
2471
+ # node757
2472
2472
sub .shrink ()
2473
2473
x = Hlist ([sub ])
2474
2474
# x.width += SCRIPT_SPACE * xHeight
0 commit comments