Skip to content

Commit 66b1a68

Browse files
authored
Merge pull request #674 from Mathics3/complete_doc_url_bunch_f
another bunch of docstring urls (almost done)
2 parents 1dd6fb9 + f1d2efd commit 66b1a68

File tree

15 files changed

+291
-7
lines changed

15 files changed

+291
-7
lines changed

mathics/builtin/compilation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636

3737
class Compile(Builtin):
3838
"""
39+
<url>:WMA link:https://reference.wolfram.com/language/ref/Compile.html</url>
40+
3941
<dl>
4042
<dt>'Compile[{$x1$, $x2$, ...}, $expr$]'
4143
<dd>Compiles $expr$ assuming each $xi$ is a $Real$ number.
@@ -182,7 +184,9 @@ def atom_to_boxes(self, f, evaluation):
182184

183185

184186
class CompiledFunction(Builtin):
185-
"""'
187+
"""
188+
<url>:WMA link:https://reference.wolfram.com/language/ref/CompiledFunction.html</url>
189+
186190
<dl>
187191
<dt>'CompiledFunction[$args$...]'
188192
<dd>represents compiled code for evaluating a compiled function.

mathics/builtin/compress.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010

1111
class Compress(Builtin):
1212
"""
13+
<url>
14+
:WMA link:
15+
https://reference.wolfram.com/language/ref/Compress.html</url>
16+
1317
<dl>
14-
<dt>'Compress[$expr$]'
18+
<dt>'Compress[$expr$]'
1519
<dd>gives a compressed string representation of $expr$.
1620
</dl>
1721
@@ -25,7 +29,7 @@ class Compress(Builtin):
2529
}
2630
summary_text = "compress an expression"
2731

28-
def apply(self, expr, evaluation, options):
32+
def eval(self, expr, evaluation, options):
2933
"Compress[expr_, OptionsPattern[Compress]]"
3034
if isinstance(expr, String):
3135
string = '"' + expr.value + '"'
@@ -45,6 +49,10 @@ def apply(self, expr, evaluation, options):
4549

4650
class Uncompress(Builtin):
4751
"""
52+
<url>
53+
:WMA link:
54+
https://reference.wolfram.com/language/ref/Uncompress.html</url>
55+
4856
<dl>
4957
<dt>'Uncompress["$string$"]'
5058
<dd>recovers an expression from a string generated by 'Compress'.
@@ -63,7 +71,7 @@ class Uncompress(Builtin):
6371

6472
summary_text = "recover a compressed expression"
6573

66-
def apply(self, string, evaluation):
74+
def eval(self, string, evaluation):
6775
"Uncompress[string_String]"
6876
string = string.get_string_value() # .encode("utf-8")
6977
string = base64.b64decode(string)

mathics/builtin/graphics.py

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ def _extract_graphics(graphics, format, evaluation):
185185

186186
class Show(Builtin):
187187
"""
188+
189+
<url>:WMA link:https://reference.wolfram.com/language/ref/Show.html</url>
190+
188191
<dl>
189192
<dt>'Show[$graphics$, $options$]'
190193
<dd>shows a list of graphics with the specified options added.
@@ -224,6 +227,8 @@ def eval(self, graphics, evaluation, options):
224227

225228
class Graphics(Builtin):
226229
r"""
230+
<url>:WMA link:https://reference.wolfram.com/language/ref/Graphics.html</url>
231+
227232
<dl>
228233
<dt>'Graphics[$primitives$, $options$]'
229234
<dd>represents a graphic.
@@ -395,9 +400,14 @@ class _Thickness(_Size):
395400

396401
class AbsoluteThickness(_Thickness):
397402
"""
403+
<url>
404+
:WMA link:
405+
https://reference.wolfram.com/language/ref/AbsoluteThickness.html</url>
406+
398407
<dl>
399408
<dt>'AbsoluteThickness[$p$]'
400-
<dd>sets the line thickness for subsequent graphics primitives to $p$ points.
409+
<dd>sets the line thickness for subsequent graphics primitives to $p$ \
410+
points.
401411
</dl>
402412
403413
>> Graphics[Table[{AbsoluteThickness[t], Line[{{20 t, 10}, {20 t, 80}}], Text[ToString[t]<>"pt", {20 t, 0}]}, {t, 0, 10}]]
@@ -412,6 +422,8 @@ def get_thickness(self):
412422

413423
class Point(Builtin):
414424
"""
425+
<url>:WMA link:https://reference.wolfram.com/language/ref/Point.html</url>
426+
415427
<dl>
416428
<dt>'Point[{$point_1$, $point_2$ ...}]'
417429
<dd>represents the point primitive.
@@ -441,6 +453,8 @@ class Point(Builtin):
441453

442454
class PointSize(_Size):
443455
"""
456+
<url>:WMA link:https://reference.wolfram.com/language/ref/PointSize.html</url>
457+
444458
<dl>
445459
<dt>'PointSize[$t$]'
446460
<dd>sets the diameter of points to $t$, which is relative to the overall width.
@@ -468,6 +482,9 @@ def get_absolute_size(self):
468482
# is kind of wrong.
469483
class Line(Builtin):
470484
"""
485+
486+
<url>:WMA link:https://reference.wolfram.com/language/ref/Line.html</url>
487+
471488
<dl>
472489
<dt>'Line[{$point_1$, $point_2$ ...}]'
473490
<dd>represents the line primitive.
@@ -520,6 +537,11 @@ def path(max_degree, p):
520537

521538
class FilledCurve(Builtin):
522539
"""
540+
541+
<url>
542+
:WMA link:
543+
https://reference.wolfram.com/language/ref/FilledCurve.html</url>
544+
523545
<dl>
524546
<dt>'FilledCurve[{$segment1$, $segment2$ ...}]'
525547
<dd>represents a filled curve.
@@ -537,6 +559,8 @@ class FilledCurve(Builtin):
537559

538560
class Polygon(Builtin):
539561
"""
562+
<url>:WMA link:https://reference.wolfram.com/language/ref/Polygon.html</url>
563+
540564
<dl>
541565
<dt>'Polygon[{$point_1$, $point_2$ ...}]'
542566
<dd>represents the filled polygon primitive.
@@ -564,6 +588,11 @@ class Polygon(Builtin):
564588

565589
class RegularPolygon(Builtin):
566590
"""
591+
592+
<url>
593+
:WMA link:
594+
https://reference.wolfram.com/language/ref/RegularPolygon.html</url>
595+
567596
<dl>
568597
<dt>'RegularPolygon[$n$]'
569598
<dd>gives the regular polygon with $n$ edges.
@@ -587,6 +616,10 @@ class RegularPolygon(Builtin):
587616

588617
class Arrow(Builtin):
589618
"""
619+
<url>
620+
:WMA link:
621+
https://reference.wolfram.com/language/ref/Arrow.html</url>
622+
590623
<dl>
591624
<dt>'Arrow[{$p1$, $p2$}]'
592625
<dd>represents a line from $p1$ to $p2$ that ends with an arrow at $p2$.
@@ -623,6 +656,11 @@ class Arrow(Builtin):
623656

624657
class Arrowheads(_GraphicsDirective):
625658
"""
659+
660+
<url>
661+
:WMA link:
662+
https://reference.wolfram.com/language/ref/Arrowheads.html</url>
663+
626664
<dl>
627665
<dt>'Arrowheads[$s$]'
628666
<dd>specifies that Arrow[] draws one arrow of size $s$ (relative to width of image, defaults to 0.04).
@@ -1150,6 +1188,8 @@ def set_size(
11501188

11511189
class Circle(Builtin):
11521190
"""
1191+
<url>:WMA link:https://reference.wolfram.com/language/ref/Circle.html</url>
1192+
11531193
<dl>
11541194
<dt>'Circle[{$cx$, $cy$}, $r$]'
11551195
<dd>draws a circle with center '($cx$, $cy$)' and radius $r$.
@@ -1180,6 +1220,8 @@ class Circle(Builtin):
11801220

11811221
class Disk(Builtin):
11821222
"""
1223+
<url>:WMA link:https://reference.wolfram.com/language/ref/Disk.html</url>
1224+
11831225
<dl>
11841226
<dt>'Disk[{$cx$, $cy$}, $r$]'
11851227
<dd>fills a circle with center '($cx$, $cy$)' and radius $r$.
@@ -1216,6 +1258,8 @@ class Disk(Builtin):
12161258

12171259
class Directive(Builtin):
12181260
"""
1261+
<url>:WMA link:https://reference.wolfram.com/language/ref/Directive.html</url>
1262+
12191263
<dl>
12201264
<dt> 'Directive'[$g_1$, $g_2$, ...]
12211265
<dd> represents a single graphics directive composed of the directives $g_1$, $g_2$, ...
@@ -1228,6 +1272,8 @@ class Directive(Builtin):
12281272

12291273
class EdgeForm(Builtin):
12301274
"""
1275+
<url>:WMA link:https://reference.wolfram.com/language/ref/EdgeForm.html</url>
1276+
12311277
<dl>
12321278
<dt> 'EdgeForm[$g$]'
12331279
<dd> is a graphics directive that specifies that edges of filled graphics objects are to be drawn using the graphics directive or list of directives $g$.
@@ -1244,6 +1290,8 @@ class EdgeForm(Builtin):
12441290

12451291
class FaceForm(Builtin):
12461292
"""
1293+
<url>:WMA link:https://reference.wolfram.com/language/ref/FaceForm.html</url>
1294+
12471295
<dl>
12481296
<dt> 'FaceForm[$g$]'
12491297
<dd> is a graphics directive that specifies that faces of filled graphics objects are to be drawn using the graphics directive or list of directives $ g$.
@@ -1255,6 +1303,8 @@ class FaceForm(Builtin):
12551303

12561304
class FontColor(Builtin):
12571305
"""
1306+
<url>:WMA link:https://reference.wolfram.com/language/ref/FontColor.html</url>
1307+
12581308
<dl>
12591309
<dt>'FontColor'
12601310
<dd>is an option for Style to set the font color.
@@ -1266,6 +1316,8 @@ class FontColor(Builtin):
12661316

12671317
class Inset(Builtin):
12681318
"""
1319+
<url>:WMA link:https://reference.wolfram.com/language/ref/Inset.html</url>
1320+
12691321
<dl>
12701322
<dt>'Text[$obj$]'
12711323
<dd>represents an object $obj$ inset in a graphic.
@@ -1284,6 +1336,8 @@ class Inset(Builtin):
12841336

12851337
class Large(Builtin):
12861338
"""
1339+
<url>:WMA link:https://reference.wolfram.com/language/ref/Large.html</url>
1340+
12871341
<dl>
12881342
<dt>'ImageSize' -> 'Large'
12891343
<dd>produces a large image.
@@ -1295,6 +1349,8 @@ class Large(Builtin):
12951349

12961350
class Medium(Builtin):
12971351
"""
1352+
<url>:WMA link:https://reference.wolfram.com/language/ref/Medium.html</url>
1353+
12981354
<dl>
12991355
<dt>'ImageSize' -> 'Medium'
13001356
<dd>produces a medium-sized image.
@@ -1306,6 +1362,8 @@ class Medium(Builtin):
13061362

13071363
class Offset(Builtin):
13081364
"""
1365+
<url>:WMA link:https://reference.wolfram.com/language/ref/Offset.html</url>
1366+
13091367
<dl>
13101368
<dt>'Offset[{$dx$, $dy$}, $position$]'
13111369
<dd>gives the position of a graphical object obtained by starting at the specified $position$ and then moving by absolute offset {$dx$,$dy$}.
@@ -1317,6 +1375,8 @@ class Offset(Builtin):
13171375

13181376
class Rectangle(Builtin):
13191377
"""
1378+
<url>:WMA link:https://reference.wolfram.com/language/ref/Rectangle.html</url>
1379+
13201380
<dl>
13211381
<dt>'Rectangle[{$xmin$, $ymin$}]'
13221382
<dd>represents a unit square with bottom-left corner at {$xmin$, $ymin$}.
@@ -1338,6 +1398,8 @@ class Rectangle(Builtin):
13381398

13391399
class Small(Builtin):
13401400
"""
1401+
<url>:WMA link:https://reference.wolfram.com/language/ref/Small.html</url>
1402+
13411403
<dl>
13421404
<dt>'ImageSize' -> 'Small'
13431405
<dd>produces a small image.
@@ -1349,6 +1411,8 @@ class Small(Builtin):
13491411

13501412
class Text(Inset):
13511413
"""
1414+
<url>:WMA link:https://reference.wolfram.com/language/ref/Text.html</url>
1415+
13521416
<dl>
13531417
<dt>'Text["$text$", {$x$, $y$}]'
13541418
<dd>draws $text$ centered on position '{$x$, $y$}'.
@@ -1366,6 +1430,8 @@ class Text(Inset):
13661430

13671431
class Thick(Builtin):
13681432
"""
1433+
<url>:WMA link:https://reference.wolfram.com/language/ref/Thick.html</url>
1434+
13691435
<dl>
13701436
<dt>'Thick'
13711437
<dd>sets the line width for subsequent graphics primitives to 2pt.
@@ -1378,6 +1444,8 @@ class Thick(Builtin):
13781444

13791445
class Thin(Builtin):
13801446
"""
1447+
<url>:WMA link:https://reference.wolfram.com/language/ref/Thin.html</url>
1448+
13811449
<dl>
13821450
<dt>'Thin'
13831451
<dd>sets the line width for subsequent graphics primitives to 0.5pt.
@@ -1390,6 +1458,8 @@ class Thin(Builtin):
13901458

13911459
class Thickness(_Thickness):
13921460
"""
1461+
<url>:WMA link:https://reference.wolfram.com/language/ref/Thickness.html</url>
1462+
13931463
<dl>
13941464
<dt>'Thickness[$t$]'
13951465
<dd>sets the line thickness for subsequent graphics primitives to $t$ times the size of the plot area.
@@ -1407,6 +1477,8 @@ def get_thickness(self):
14071477

14081478
class Tiny(Builtin):
14091479
"""
1480+
<url>:WMA link:https://reference.wolfram.com/language/ref/Tiny.html</url>
1481+
14101482
<dl>
14111483
<dt>'ImageSize' -> 'Tiny'
14121484
<dd>produces a tiny image.

mathics/builtin/inout.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
class Echo_(Predefined):
3232
"""
33+
<url>:WMA link:https://reference.wolfram.com/language/ref/Echo_.html</url>
34+
3335
<dl>
3436
<dt>'$Echo'
3537
<dd>gives a list of files and pipes to which all input is echoed.
@@ -45,6 +47,8 @@ class Echo_(Predefined):
4547

4648
class Print(Builtin):
4749
"""
50+
<url>:WMA link:https://reference.wolfram.com/language/ref/Print.html</url>
51+
4852
<dl>
4953
<dt>'Print[$expr$, ...]'
5054
<dd>prints each $expr$ in string form.

mathics/builtin/manipulate.py

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ def display_data(self, result):
241241

242242
class Manipulate(Builtin):
243243
"""
244+
<url>:WMA link:https://reference.wolfram.com/language/ref/Manipulate.html</url>
245+
244246
<dl>
245247
<dt>'Manipulate[$expr1$, {$u$, $u_min$, $u_max$}]'
246248
<dd>interactively compute and display an expression with different values of $u$.

0 commit comments

Comments
 (0)