Skip to content

Commit 41606f9

Browse files
authored
Merge pull request #675 from Mathics3/complete_doc_url_bunch_g
And finally, the lastone round, and the test.
2 parents d949182 + e96a0d6 commit 41606f9

File tree

16 files changed

+544
-387
lines changed

16 files changed

+544
-387
lines changed

mathics/builtin/box/layout.py

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def to_boxes(x, evaluation: Evaluation, options={}) -> BoxElementMixin:
5757

5858
class BoxData(Builtin):
5959
"""
60+
<url>:WMA link:https://reference.wolfram.com/language/ref/BoxData.html</url>
61+
6062
<dl>
6163
<dt>'BoxData[...]'
6264
<dd>is a low-level representation of the contents of a typesetting
@@ -88,6 +90,10 @@ def is_constant_list(list):
8890

8991
class FractionBox(BoxExpression):
9092
"""
93+
<url>
94+
:WMA link:
95+
https://reference.wolfram.com/language/ref/FractionBox.html</url>
96+
9197
<dl>
9298
<dt>'FractionBox[$x$, $y$]'
9399
<dd> FractionBox[x, y] is a low-level formatting construct that represents $\frac{x}{y}$.
@@ -159,9 +165,14 @@ def get_array(self, elements, evaluation):
159165

160166
class InterpretationBox(BoxExpression):
161167
"""
168+
<url>
169+
:WMA link:
170+
https://reference.wolfram.com/language/ref/InterpretationBox.html</url>
171+
162172
<dl>
163173
<dt>'InterpretationBox[{...}, expr]'
164-
<dd> is a low-level box construct that displays as boxes, but is interpreted on input as expr.
174+
<dd> is a low-level box construct that displays as boxes, but is \
175+
interpreted on input as expr.
165176
</dl>
166177
167178
>> A = InterpretationBox["Pepe", 4]
@@ -186,9 +197,13 @@ def apply_display(boxexpr, evaluation):
186197

187198
class RowBox(BoxExpression):
188199
"""
200+
<url>
201+
:WMA link:
202+
https://reference.wolfram.com/language/ref/RowBox.html</url>
189203
<dl>
190204
<dt>'RowBox[{...}]'
191-
<dd>is a box construct that represents a sequence of boxes arranged in a horizontal row.
205+
<dd>is a box construct that represents a sequence of boxes arranged in \
206+
a horizontal row.
192207
</dl>
193208
"""
194209

@@ -257,7 +272,9 @@ def to_expression(self) -> Expression:
257272

258273
class ShowStringCharacters(Builtin):
259274
"""
260-
<url>:WMA link: https://reference.wolfram.com/language/ref/ShowStringCharacters.html</url>
275+
<url>
276+
:WMA link:
277+
https://reference.wolfram.com/language/ref/ShowStringCharacters.html</url>
261278
<dl>
262279
<dt>'ShowStringCharacters'
263280
<dd>is an option for Cell that directs whether to display '"' in strings.
@@ -276,6 +293,9 @@ class ShowStringCharacters(Builtin):
276293

277294
class SqrtBox(BoxExpression):
278295
"""
296+
<url>
297+
:WMA link:
298+
https://reference.wolfram.com/language/ref/SqrtData.html</url>
279299
<dl>
280300
<dt>'SqrtBox[$x$]'
281301
<dd> is a low-level formatting construct that represents $\\sqrt{x}$.
@@ -315,6 +335,7 @@ def to_expression(self):
315335

316336
class StyleBox(BoxExpression):
317337
"""
338+
318339
<url>:WMA link: https://reference.wolfram.com/language/ref/StyleBox.html</url>
319340
<dl>
320341
<dt>'StyleBox[boxes, options]'
@@ -408,6 +429,10 @@ def to_expression(self):
408429

409430
class SubsuperscriptBox(BoxExpression):
410431
"""
432+
<url>
433+
:WMA link:
434+
https://reference.wolfram.com/language/ref/SubsuperscriptBox.html</url>
435+
411436
<dl>
412437
<dt>'SubsuperscriptBox[$a$, $b$, $c$]'
413438
<dd>is a box construct that represents $a_b^c$.
@@ -446,6 +471,9 @@ def to_expression(self):
446471

447472
class SuperscriptBox(BoxExpression):
448473
"""
474+
<url>
475+
:WMA link:
476+
https://reference.wolfram.com/language/ref/SuperscriptBox.html</url>
449477
<dl>
450478
<dt>'SuperscriptBox[$a$, $b$]'
451479
<dd>is a box construct that represents $a^b$.
@@ -481,6 +509,8 @@ def to_expression(self):
481509

482510
class TagBox(BoxExpression):
483511
"""
512+
<url>:WMA link:https://reference.wolfram.com/language/ref/TagBox.html</url>
513+
484514
<dl>
485515
<dt>'TagBox[boxes, tag]'
486516
<dd> is a low-level box construct that displays as
@@ -494,6 +524,9 @@ class TagBox(BoxExpression):
494524

495525
class TemplateBox(BoxExpression):
496526
"""
527+
<url>
528+
:WMA link:
529+
https://reference.wolfram.com/language/ref/TemplateBox.html</url>
497530
<dl>
498531
<dt>'TemplateBox[{$box_1$, $box_2$,...}, tag]'
499532
<dd>is a low-level box structure that parameterizes the display and evaluation of the boxes $box_i$ .
@@ -506,6 +539,10 @@ class TemplateBox(BoxExpression):
506539

507540
class TextData(Builtin):
508541
"""
542+
<url>
543+
:WMA link:
544+
https://reference.wolfram.com/language/ref/TextData.html</url>
545+
509546
<dl>
510547
<dt>'TextData[...]'
511548
<dd>is a low-level representation of the contents of a textual
@@ -518,6 +555,10 @@ class TextData(Builtin):
518555

519556
class TooltipBox(BoxExpression):
520557
"""
558+
## <url>
559+
## :WMA link:
560+
## https://reference.wolfram.com/language/ref/TooltipBox.html</url>
561+
521562
<dl>
522563
<dt>'TooltipBox[{...}]'
523564
<dd>undocumented...

mathics/builtin/colors/color_directives.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ def to_color_space(self, color_space):
209209

210210
class CMYKColor(_ColorObject):
211211
"""
212+
<url>:WMA link:https://reference.wolfram.com/language/ref/CMYKColor.html</url>
213+
212214
<dl>
213215
<dt>'CMYKColor[$c$, $m$, $y$, $k$]'
214216
<dd>represents a color with the specified cyan, magenta,
@@ -226,6 +228,8 @@ class CMYKColor(_ColorObject):
226228

227229
class ColorDistance(Builtin):
228230
"""
231+
<url>:WMA link:https://reference.wolfram.com/language/ref/ColorDistance.html</url>
232+
229233
<dl>
230234
<dt>'ColorDistance[$c1$, $c2$]'
231235
<dd>returns a measure of color distance between the colors $c1$ and $c2$.
@@ -433,6 +437,8 @@ class ColorError(BoxExpressionError):
433437

434438
class GrayLevel(_ColorObject):
435439
"""
440+
<url>:WMA link:https://reference.wolfram.com/language/ref/GrayLevel.html</url>
441+
436442
<dl>
437443
<dt>'GrayLevel[$g$]'
438444
<dd>represents a shade of gray specified by $g$, ranging from
@@ -449,6 +455,8 @@ class GrayLevel(_ColorObject):
449455

450456
class Hue(_ColorObject):
451457
"""
458+
<url>:WMA link:https://reference.wolfram.com/language/ref/Hue.html</url>
459+
452460
<dl>
453461
<dt>'Hue[$h$, $s$, $l$, $a$]'
454462
<dd>represents the color with hue $h$, saturation $s$, lightness $l$ and opacity $a$.
@@ -507,6 +515,8 @@ def trans(t):
507515

508516
class LABColor(_ColorObject):
509517
"""
518+
<url>:WMA link:https://reference.wolfram.com/language/ref/LABColor.html</url>
519+
510520
<dl>
511521
<dt>'LABColor[$l$, $a$, $b$]'
512522
<dd>represents a color with the specified lightness, red/green and yellow/blue
@@ -521,6 +531,8 @@ class LABColor(_ColorObject):
521531

522532
class LCHColor(_ColorObject):
523533
"""
534+
<url>:WMA link:https://reference.wolfram.com/language/ref/LCHColor.html</url>
535+
524536
<dl>
525537
<dt>'LCHColor[$l$, $c$, $h$]'
526538
<dd>represents a color with the specified lightness, chroma and hue
@@ -535,6 +547,8 @@ class LCHColor(_ColorObject):
535547

536548
class LUVColor(_ColorObject):
537549
"""
550+
<url>:WMA link:https://reference.wolfram.com/language/ref/LUVColor.html</url>
551+
538552
<dl>
539553
<dt>'LCHColor[$l$, $u$, $v$]'
540554
<dd>represents a color with the specified components in the CIE 1976 L*u*v* (CIELUV) color space.
@@ -548,6 +562,8 @@ class LUVColor(_ColorObject):
548562

549563
class Opacity(_GraphicsDirective):
550564
"""
565+
<url>:WMA link:https://reference.wolfram.com/language/ref/Opacity.html</url>
566+
551567
<dl>
552568
<dt>'Opacity[$level$]'
553569
<dd> is a graphics directive that sets the opacity to $level$.
@@ -582,6 +598,8 @@ def create_as_style(klass, graphics, item):
582598

583599
class RGBColor(_ColorObject):
584600
"""
601+
<url>:WMA link:https://reference.wolfram.com/language/ref/RGBColor.html</url>
602+
585603
<dl>
586604
<dt>'RGBColor[$r$, $g$, $b$]'
587605
<dd>represents a color with the specified red, green and blue
@@ -608,6 +626,8 @@ def to_rgba(self):
608626

609627
class XYZColor(_ColorObject):
610628
"""
629+
<url>:WMA link:https://reference.wolfram.com/language/ref/XYZColor.html</url>
630+
611631
<dl>
612632
<dt>'XYZColor[$x$, $y$, $z$]'
613633
<dd>represents a color with the specified components in the CIE 1931 XYZ color space.

mathics/builtin/colors/named_colors.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def __init__(self, *args, **kwargs):
1919
else:
2020
text_name = self.text_name
2121
doc = """
22+
<url>:WMA link:https://reference.wolfram.com/language/ref/%(text_name)s.html</url>
2223
<dl>
2324
<dt>'%(name)s'
2425
<dd>represents the color %(text_name)s in graphics.
@@ -42,6 +43,8 @@ def __init__(self, *args, **kwargs):
4243

4344
class Black(_ColorObject):
4445
"""
46+
<url>:WMA link:https://reference.wolfram.com/language/ref/Black.html</url>
47+
4548
>> Black
4649
= RGBColor[0, 0, 0]
4750
"""
@@ -51,6 +54,8 @@ class Black(_ColorObject):
5154

5255
class Blue(_ColorObject):
5356
"""
57+
<url>:WMA link:https://reference.wolfram.com/language/ref/Blue.html</url>
58+
5459
>> Blue
5560
= RGBColor[0, 0, 1]
5661
"""
@@ -60,6 +65,8 @@ class Blue(_ColorObject):
6065

6166
class Brown(_ColorObject):
6267
"""
68+
<url>:WMA link:https://reference.wolfram.com/language/ref/Brown.html</url>
69+
6370
>> Brown
6471
= RGBColor[0.6, 0.4, 0.2]
6572
"""
@@ -69,6 +76,8 @@ class Brown(_ColorObject):
6976

7077
class Cyan(_ColorObject):
7178
"""
79+
<url>:WMA link:https://reference.wolfram.com/language/ref/Cyan.html</url>
80+
7281
>> Cyan
7382
= RGBColor[0, 1, 1]
7483
"""
@@ -78,6 +87,8 @@ class Cyan(_ColorObject):
7887

7988
class Gray(_ColorObject):
8089
"""
90+
<url>:WMA link:https://reference.wolfram.com/language/ref/Gray.html</url>
91+
8192
>> Gray
8293
= GrayLevel[0.5]
8394
"""
@@ -87,6 +98,8 @@ class Gray(_ColorObject):
8798

8899
class Green(_ColorObject):
89100
"""
101+
<url>:WMA link:https://reference.wolfram.com/language/ref/Green.html</url>
102+
90103
>> Green
91104
= RGBColor[0, 1, 0]
92105
"""
@@ -96,6 +109,8 @@ class Green(_ColorObject):
96109

97110
class Magenta(_ColorObject):
98111
"""
112+
<url>:WMA link:https://reference.wolfram.com/language/ref/Magenta.html</url>
113+
99114
>> Magenta
100115
= RGBColor[1, 0, 1]
101116
"""
@@ -105,6 +120,8 @@ class Magenta(_ColorObject):
105120

106121
class LightBlue(_ColorObject):
107122
"""
123+
<url>:WMA link:https://reference.wolfram.com/language/ref/LightBlue.html</url>
124+
108125
>> Graphics[{LightBlue, EdgeForm[Black], Disk[]}]
109126
= -Graphics-
110127
@@ -182,6 +199,8 @@ class Orange(_ColorObject):
182199

183200
class Red(_ColorObject):
184201
"""
202+
<url>:WMA link:https://reference.wolfram.com/language/ref/Red.html</url>
203+
185204
>> Red
186205
= RGBColor[1, 0, 0]
187206
"""
@@ -191,6 +210,8 @@ class Red(_ColorObject):
191210

192211
class Yellow(_ColorObject):
193212
"""
213+
<url>:WMA link:https://reference.wolfram.com/language/ref/Yellow.html</url>
214+
194215
>> Yellow
195216
= RGBColor[1, 1, 0]
196217
"""
@@ -200,6 +221,8 @@ class Yellow(_ColorObject):
200221

201222
class White(_ColorObject):
202223
"""
224+
<url>:WMA link:https://reference.wolfram.com/language/ref/White.html</url>
225+
203226
>> White
204227
= GrayLevel[1]
205228
"""

mathics/builtin/comparison.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
55
There are a number of functions for testing Expressions.
66
7-
Functions that "ask a question" have names that end in "Q". They return 'True' for an explicit answer, and 'False' otherwise.
7+
Functions that "ask a question" have names that end in "Q". \
8+
They return 'True' for an explicit answer, and 'False' otherwise.
89
"""
910

1011
# This tells documentation how to sort this module

0 commit comments

Comments
 (0)