diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2427101f..648473fbb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: check-merge-conflict - id: debug-statements stages: [pre-commit] - exclude: ChangeLog-spell-corrected.diff + exclude: ChangeLog-spell-corrected.diff|mathics/builtin/system.py - id: end-of-file-fixer stages: [pre-commit] exclude: ChangeLog-spell-corrected.diff diff --git a/mathics/builtin/atomic/strings.py b/mathics/builtin/atomic/strings.py index a8016b14a..21f164b5b 100644 --- a/mathics/builtin/atomic/strings.py +++ b/mathics/builtin/atomic/strings.py @@ -269,10 +269,10 @@ class CharacterEncoding(Predefined): https://reference.wolfram.com/language/ref/$CharacterEncoding.html
-
'$CharacterEncoding' +
'\\$CharacterEncoding'
specifies the default raw character encoding to use for input and \ output when no encoding is explicitly specified. \ - Initially this is set to '$SystemCharacterEncoding'. + Initially this is set to '\\$SystemCharacterEncoding'.
See the character encoding current is in effect and used in input and \ @@ -281,7 +281,7 @@ class CharacterEncoding(Predefined): >> $CharacterEncoding = ... - By setting its value to one of the values in '$CharacterEncodings', \ + By setting its value to one of the values in '\\$CharacterEncodings', \ operators are formatted differently. For example, >> $CharacterEncoding = "ASCII"; a -> b @@ -290,13 +290,13 @@ class CharacterEncoding(Predefined): = ... Setting its value to 'None' restore the value to \ - '$SystemCharacterEncoding': + '\\$SystemCharacterEncoding': >> $CharacterEncoding = None; >> $SystemCharacterEncoding == $CharacterEncoding = True See also - :$SystemCharacterEncoding: + :\\$SystemCharacterEncoding: /doc/reference-of-built-in-symbols/atomic-elements-of-expressions/string-manipulation/$systemcharacterencoding/. """ @@ -329,7 +329,7 @@ class CharacterEncodings(Predefined): https://reference.wolfram.com/language/ref/$CharacterEncodings.html
-
'$CharacterEncodings' +
'\\$CharacterEncodings'
stores the list of available character encodings.
@@ -430,6 +430,7 @@ class LetterNumber(Builtin): = 2 """ + # FIXME: put the right unicode characters in a way that the # following test works... r""" @@ -706,9 +707,9 @@ class SystemCharacterEncoding(Predefined): """ :WMA link: - https://reference.wolfram.com/language/ref/$SystemCharacterEncoding.html + https://reference.wolfram.com/language/ref/\\$SystemCharacterEncoding.html
-
$SystemCharacterEncoding +
\\$SystemCharacterEncoding
gives the default character encoding of the system. On startup, the value of environment variable 'MATHICS_CHARACTER_ENCODING' \ @@ -899,7 +900,7 @@ def eval_form(self, expr, form, evaluation: Evaluation, options: dict): class Transliterate(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/Transliterate.html @@ -955,4 +956,5 @@ class Whitespace(Builtin): >> StringReplace[" this has leading and trailing whitespace \n ", (StartOfString ~~ Whitespace) | (Whitespace ~~ EndOfString) -> ""] <> " removed" // FullForm = "this has leading and trailing whitespace removed" """ + summary_text = "sequence of whitespace characters" diff --git a/mathics/builtin/drawing/drawing_options.py b/mathics/builtin/drawing/drawing_options.py index 4c7cb7a40..5d7406821 100644 --- a/mathics/builtin/drawing/drawing_options.py +++ b/mathics/builtin/drawing/drawing_options.py @@ -318,7 +318,7 @@ class PlotRange(Builtin):
  • $max$ - explicit limit for each function.
  • {$min$, $max$} - explicit limits for $y$ (2D), $z$ (3D), \ or array values. -
  • {{$x$_$min$, $x$_$max$}, {{$y_min}, {$y_max}} - explicit limits for \ +
  • {{$x_{min}$, $x_{max}$}, {{$y_{min}$}, {$y_{max}$}} - explicit limits for \ $x$ and $y$. diff --git a/mathics/builtin/drawing/graphics3d.py b/mathics/builtin/drawing/graphics3d.py index 230b72535..3f2c13a57 100644 --- a/mathics/builtin/drawing/graphics3d.py +++ b/mathics/builtin/drawing/graphics3d.py @@ -66,7 +66,7 @@ class Graphics3D(Graphics): :WMA link:https://reference.wolfram.com/language/ref/Graphics3D.html
    -
    'Graphics3D[$primitives$, $options$]' +
    'Graphics3D'[$primitives$, $options$]
    represents a three-dimensional graphic. See :Drawing Option and Option Values: @@ -170,11 +170,11 @@ class Sphere(Builtin): :WMA link:https://reference.wolfram.com/language/ref/Sphere.html
    -
    'Sphere[{$x$, $y$, $z$}]' +
    'Sphere'[{$x$, $y$, $z$}]
    is a sphere of radius 1 centered at the point {$x$, $y$, $z$}. -
    'Sphere[{$x$, $y$, $z$}, $r$]' +
    'Sphere'[{$x$, $y$, $z$}, $r$]
    is a sphere of radius $r$ centered at the point {$x$, $y$, $z$}. -
    'Sphere[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}, ... }, $r$]' +
    'Sphere'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}, ... }, $r$]
    is a collection spheres of radius $r$ centered at the points \ {$x1$, $y2$, $z2$}, {$x2$, $y2$, $z2$}, ...
    @@ -198,14 +198,14 @@ class Cone(Builtin): :WMA link:https://reference.wolfram.com/language/ref/Cone.html
    -
    'Cone[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}]' +
    'Cone'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}]
    represents a cone of radius 1. -
    'Cone[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}, $r$]' +
    'Cone'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}, $r$]
    is a cone of radius $r$ starting at ($x1$, $y1$, $z1$) and ending at \ ($x2$, $y2$, $z2$). -
    'Cone[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}, ... }, $r$]' +
    'Cone'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}, ... }, $r$]
    is a collection cones of radius $r$.
    @@ -247,16 +247,16 @@ class Cuboid(Builtin): Cuboid also known as interval, rectangle, square, cube, rectangular parallelepiped, tesseract, orthotope, and box.
    -
    'Cuboid[$p_min$]' +
    'Cuboid'[$p_{min}$]
    is a unit cube/square with its lower corner at point $p_min$. -
    'Cuboid[$p_min$, $p_max$] -
    is a 2d square with with lower corner $p_min$ and upper corner $p_max$. +
    'Cuboid'[$p_{min}$, $p_{max}$] +
    is a 2d square with with lower corner $p_{min}$ and upper corner $p_{max}$. -
    'Cuboid[{$p_min$, $p_max$}]' +
    'Cuboid'[{$p_{min}$, $p_{max}$}]
    is a cuboid with lower corner $p_min$ and upper corner $p_max$. -
    'Cuboid[{$p1_min$, $p1_max$, ...}]' +
    'Cuboid'[{$p1_{min}$, $p1_{max}$, ...}]
    is a collection of cuboids.
    'Cuboid[]' is equivalent to 'Cuboid[{0,0,0}]'. @@ -300,14 +300,14 @@ class Cylinder(Builtin): :WMA link:https://reference.wolfram.com/language/ref/Cylinder.html
    -
    'Cylinder[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}]' +
    'Cylinder'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}]
    represents a cylinder of radius 1. -
    'Cylinder[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}, $r$]' +
    'Cylinder'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}}, $r$]
    is a cylinder of radius $r$ starting at ($x1$, $y1$, $z1$) and ending at \ ($x2$, $y2$, $z2$). -
    'Cylinder[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}, ... }, $r$]' +
    'Cylinder'[{{$x1$, $y1$, $z1$}, {$x2$, $y2$, $z2$}, ... }, $r$]
    is a collection cylinders of radius $r$.
    @@ -348,10 +348,10 @@ class Tube(Builtin): :WMA link:https://reference.wolfram.com/language/ref/Tube.html
    -
    'Tube[{$p1$, $p2$, ...}]' +
    'Tube'[{$p1$, $p2$, ...}]
    represents a tube passing through $p1$, $p2$, ... with radius 1. -
    'Tube[{$p1$, $p2$, ...}, $r$]' +
    'Tube'[{$p1$, $p2$, ...}, $r$]
    represents a tube with radius $r$.
    diff --git a/mathics/builtin/evaluation.py b/mathics/builtin/evaluation.py index 80d96bd60..71402e368 100644 --- a/mathics/builtin/evaluation.py +++ b/mathics/builtin/evaluation.py @@ -14,18 +14,18 @@ class RecursionLimit(Predefined): - """ + r""" :WMA link: - https://reference.wolfram.com/language/ref/$RecursionLimit.html + https://reference.wolfram.com/language/ref/\$RecursionLimit.html
    -
    '$RecursionLimit' +
    '\$RecursionLimit'
    specifies the maximum allowable recursion depth after which a \ calculation is terminated.
    - Calculations terminated by '$RecursionLimit' return '$Aborted': + Calculations terminated by '\$RecursionLimit' return '\$Aborted': >> a = a + a : Recursion depth of 200 exceeded. = $Aborted @@ -71,17 +71,17 @@ def evaluate(self, evaluation) -> Integer: class IterationLimit(Predefined): - """ - :WMA link:https://reference.wolfram.com/language/ref/$IterationLimit.html + r""" + :WMA link:https://reference.wolfram.com/language/ref/\$IterationLimit.html
    -
    '$IterationLimit' +
    '\$IterationLimit'
    specifies the maximum number of times a reevaluation of an expression may happen.
    - Calculations terminated by '$IterationLimit' return '$Aborted': + Calculations terminated by '\$IterationLimit' return '\$Aborted': >> $IterationLimit = 1000 diff --git a/mathics/builtin/exp_structure/general.py b/mathics/builtin/exp_structure/general.py index b1462f492..f229b7de5 100644 --- a/mathics/builtin/exp_structure/general.py +++ b/mathics/builtin/exp_structure/general.py @@ -235,11 +235,11 @@ class SortBy(Builtin):
    'SortBy[$list$, $f$]'
    sorts $list$ (or the elements of any other expression) according to \ canonical ordering of the keys that are extracted from the $list$'s \ - elements using $f. Chunks of elements that appear the same under $f \ - are sorted according to their natural order (without applying $f). + elements using $f$. Chunks of elements that appear the same under $f$ \ + are sorted according to their natural order (without applying $f$).
    'SortBy[$f$]' -
    creates an operator function that, when applied, sorts by $f. +
    creates an operator function that, when applied, sorts by $f$.
    >> SortBy[{{5, 1}, {10, -1}}, Last] diff --git a/mathics/builtin/files_io/files.py b/mathics/builtin/files_io/files.py index c45f6c49d..fe32ff609 100644 --- a/mathics/builtin/files_io/files.py +++ b/mathics/builtin/files_io/files.py @@ -52,11 +52,11 @@ class Input_(Predefined): - """ - :WMA link:https://reference.wolfram.com/language/ref/$Input.html + r""" + :WMA link:https://reference.wolfram.com/language/ref/\$Input.html
    -
    '$Input' +
    '\$Input'
    is the name of the stream from which input is currently being read.
    @@ -364,7 +364,7 @@ class Get(PrefixOperator):
    'Get[$name$, Trace->True]'
    Runs Get tracing each line before it is evaluated. - 'Settings`$TraceGet' can be also used to trace lines on all 'Get[]' calls. + 'Settings`\$TraceGet' can be also used to trace lines on all 'Get[]' calls.
    @@ -409,17 +409,17 @@ def eval(self, path: String, evaluation: Evaluation, options: dict): class InputFileName_(Predefined): - """ + r""" :WMA link: - https://reference.wolfram.com/language/ref/$InputFileName.html + https://reference.wolfram.com/language/ref/\$InputFileName.html
    -
    '$InputFileName' +
    '\$InputFileName'
    is the name of the file from which input is currently being read.
    - While in interactive mode, '$InputFileName' is "". + While in interactive mode, '\$InputFileName' is "". X> $InputFileName """ @@ -1126,7 +1126,7 @@ def eval_n(self, file, types, n: Integer, evaluation: Evaluation, options: dict) py_n = n.get_int_value() if py_n < 0: evaluation.message( - "ReadList", "intnm", to_expression("ReadList", file, types, m) + "ReadList", "intnm", to_expression("ReadList", file, types, n) ) return diff --git a/mathics/builtin/forms/__init__.py b/mathics/builtin/forms/__init__.py index 08079cc3c..4e034b9d1 100644 --- a/mathics/builtin/forms/__init__.py +++ b/mathics/builtin/forms/__init__.py @@ -1,11 +1,11 @@ -""" +r""" Forms of Input and Output A Form format specifies the way Mathics Expression input is read or output \ written. -The variable :$OutputForms': -/doc/reference-of-built-in-symbols/forms-of-input-and-output/form-variables/$outputforms/ \ +The variable :\$OutputForms': +/doc/reference-of-built-in-symbols/forms-of-input-and-output/form-variables/\$outputforms/ \ has a list of Forms defined. See also :WMA link: diff --git a/mathics/builtin/forms/other.py b/mathics/builtin/forms/other.py index a89bc08ac..b8af827fe 100644 --- a/mathics/builtin/forms/other.py +++ b/mathics/builtin/forms/other.py @@ -1,5 +1,5 @@ -""" -Forms which are not in '$OutputForms' +r""" +Forms which are not in '\$OutputForms' """ import re @@ -13,7 +13,7 @@ class SequenceForm(FormBaseClass): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/SequenceForm.html @@ -56,7 +56,7 @@ def eval_makeboxes(self, args, form, evaluation, options: dict): class StringForm(FormBaseClass): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/StringForm.html diff --git a/mathics/builtin/forms/variables.py b/mathics/builtin/forms/variables.py index b02500f0d..853f904d0 100644 --- a/mathics/builtin/forms/variables.py +++ b/mathics/builtin/forms/variables.py @@ -11,21 +11,21 @@ class PrintForms_(Predefined): r"""
    -
    '$PrintForms' +
    '\$PrintForms'
    contains the list of basic print forms. It is updated automatically when new 'PrintForms' are defined by setting format values.
    >> $PrintForms = ... - Suppose now that we want to add a new format 'MyForm'. Initially, it does not belong to '$PrintForms': + Suppose now that we want to add a new format 'MyForm'. Initially, it does not belong to '\$PrintForms': >> MemberQ[$PrintForms, MyForm] = False Now, let's define a format rule: >> Format[F[x_], MyForm] := "F<<" <> ToString[x] <> ">>" - Now, the new format belongs to the '$PrintForms' list + Now, the new format belongs to the '\$PrintForms' list >> MemberQ[$PrintForms, MyForm] = True @@ -42,7 +42,7 @@ def evaluate(self, evaluation): class OutputForms_(Predefined): r"""
    -
    '$OutputForms' +
    '\$OutputForms'
    contains the list of all output forms. It is updated automatically when new 'OutputForms' are defined by setting format values.
    diff --git a/mathics/builtin/graphics.py b/mathics/builtin/graphics.py index 313c6fec9..dbe5bdaaa 100644 --- a/mathics/builtin/graphics.py +++ b/mathics/builtin/graphics.py @@ -1393,7 +1393,7 @@ class Inset(Builtin):
    'Text[$obj$, $pos$]'
    represents an object $obj$ inset in a graphic at position $pos$. -
    'Text[$obj$, $pos$, $$]' +
    'Text[$obj$, $pos$, $opos$]'
    represents an object $obj$ inset in a graphic at position $pos$, \ in away that the position $opos$ of $obj$ coincides with $pos$ \ in the enclosing graphic. diff --git a/mathics/builtin/kernel_sessions.py b/mathics/builtin/kernel_sessions.py index 215f76514..67ab4342e 100644 --- a/mathics/builtin/kernel_sessions.py +++ b/mathics/builtin/kernel_sessions.py @@ -8,8 +8,8 @@ class Out(Builtin): - """ - :WMA: https://reference.wolfram.com/language/ref/$Out + r""" + :WMA: https://reference.wolfram.com/language/ref/\$Out
    '%$k$' or 'Out[$k$]'
    gives the result of the $k$th input line. diff --git a/mathics/builtin/list/eol.py b/mathics/builtin/list/eol.py index c9b778f29..38cd26fe1 100644 --- a/mathics/builtin/list/eol.py +++ b/mathics/builtin/list/eol.py @@ -424,7 +424,7 @@ class DeleteCases(Builtin):
    returns the elements of $list$ that do not match $pattern$.
    'DeleteCases[$list$, $pattern$, $levelspec$]' -
    removes all parts of $list on levels specified by $levelspec$ that match pattern (not fully implemented). +
    removes all parts of $list$ on levels specified by $levelspec$ that match pattern (not fully implemented).
    'DeleteCases[$list$, $pattern$, $levelspec$, $n$]'
    removes the first $n$ parts of $list$ that match $pattern$. diff --git a/mathics/builtin/list/rearrange.py b/mathics/builtin/list/rearrange.py index 683ec4cf6..8bf1761a1 100644 --- a/mathics/builtin/list/rearrange.py +++ b/mathics/builtin/list/rearrange.py @@ -792,7 +792,7 @@ class GatherBy(_GatherOperation):
    'GatherBy[$list$, {$f$, $g$, ...}]'
    gathers elements of $list$ into sub lists of items whose image \ under $f$ identical. Then, gathers these sub lists again into sub \ - sub lists, that are identical under $g. + sub lists, that are identical under $g$.
    >> GatherBy[{{1, 3}, {2, 2}, {1, 1}}, Total] @@ -891,7 +891,7 @@ class PadLeft(_Pad):
    pads $list$ to length $n$ by adding 0 on the left.
    'PadLeft[$list$, $n$, $x$]'
    pads $list$ to length $n$ by adding $x$ on the left. -
    'PadLeft[$list$, {$n1$, $n2, ...}, $x$]' +
    'PadLeft[$list$, {$n1$, $n2$, ...}, $x$]'
    pads $list$ to lengths $n1$, $n2$ at levels 1, 2, ... respectively by adding $x$ on the left.
    'PadLeft[$list$, $n$, $x$, $m$]'
    pads $list$ to length $n$ by adding $x$ on the left and adding a margin of $m$ on the right. @@ -929,7 +929,7 @@ class PadRight(_Pad):
    pads $list$ to length $n$ by adding 0 on the right.
    'PadRight[$list$, $n$, $x$]'
    pads $list$ to length $n$ by adding $x$ on the right. -
    'PadRight[$list$, {$n1$, $n2, ...}, $x$]' +
    'PadRight[$list$, {$n1$, $n2$, ...}, $x$]'
    pads $list$ to lengths $n1$, $n2$ at levels 1, 2, ... respectively by adding $x$ on the right.
    'PadRight[$list$, $n$, $x$, $m$]'
    pads $list$ to length $n$ by adding $x$ on the left and adding a margin of $m$ on the left. @@ -1360,7 +1360,7 @@ class Tally(_GatherOperation): the result as a list of pairs {object, count}.
    'Tally[$list$, $test$]' -
    counts the number of occurrences of objects and uses $test to \ +
    counts the number of occurrences of objects and uses $test$ to \ determine if two objects should be counted in the same bin.
  • diff --git a/mathics/builtin/mainloop.py b/mathics/builtin/mainloop.py index 49548b498..29cd442f4 100644 --- a/mathics/builtin/mainloop.py +++ b/mathics/builtin/mainloop.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -""" +r""" The Main Loop An interactive session operates a loop, called the "main loop" in this way: @@ -16,10 +16,10 @@ There are a variety of "hooks" that allow you to insert functions to be applied to the expressions at various stages \ in the main loop. -If you assign a function to the global variable '$PreRead' it will be applied with the input that is read in the first \ +If you assign a function to the global variable '\$PreRead' it will be applied with the input that is read in the first \ step listed above. -Similarly, if you assign a function to global variable '$Pre', it will be applied with the input before processing the \ +Similarly, if you assign a function to global variable '\$Pre', it will be applied with the input before processing the \ input, the second step listed above. """ @@ -31,10 +31,10 @@ class HistoryLength(Builtin): - """ + r""" :WMA: https://reference.wolfram.com/language/ref/$HistoryLength
    -
    '$HistoryLength' +
    '\$HistoryLength'
    specifies the maximum number of 'In' and 'Out' entries.
    @@ -104,10 +104,10 @@ class In(Builtin): class IOHookPreRead(Builtin): - """ - :WMA: https://reference.wolfram.com/language/ref/$PreRead + r""" + :WMA: https://reference.wolfram.com/language/ref/\$PreRead
    -
    $PreRead +
    \$PreRead
    is a global variable whose value, if set, is applied to the \ text or box form of every input expression before it is fed to the parser. @@ -123,15 +123,15 @@ class IOHookPreRead(Builtin): class IOHookPre(Builtin): - """ - :WMA: https://reference.wolfram.com/language/ref/$Pre + r""" + :WMA: https://reference.wolfram.com/language/ref/\$Pre
    -
    $Pre +
    '\$Pre'
    is a global variable whose value, if set, is applied to every input expression.
    - Set $Timing$ as the $Pre function, stores the elapsed time in a variable, - stores just the result in Out[$Line] and print a formatted version showing the elapsed time + Set 'Timing' as the '\$Pre' function, stores the elapsed time in a variable, + stores just the result in 'Out[\$Line]' and print a formatted version showing the elapsed time >> $Pre := (Print["[Processing input...]"];#1)& >> $Post := (Print["[Storing result...]"]; #1)& | [Processing input...] @@ -156,10 +156,10 @@ class IOHookPre(Builtin): class IOHookPost(Builtin): - """ - :WMA: https://reference.wolfram.com/language/ref/$Post + r""" + :WMA: https://reference.wolfram.com/language/ref/\$Post
    -
    $Post +
    '\$Post'
    is a global variable whose value, if set, is applied to every output expression.
    """ @@ -170,10 +170,10 @@ class IOHookPost(Builtin): class IOHookPrePrint(Builtin): - """ - :WMA: https://reference.wolfram.com/language/ref/$PrePrint + r""" + :WMA: https://reference.wolfram.com/language/ref/\$PrePrint
    -
    $PrePrint +
    '\$PrePrint'
    is a global variable whose value, if set, is applied to every output expression before it is printed.
    """ @@ -186,10 +186,10 @@ class IOHookPrePrint(Builtin): class IOHookSyntaxHandler(Builtin): - """ - :WMA: https://reference.wolfram.com/language/ref/$SyntaxHandler + r""" + :WMA: https://reference.wolfram.com/language/ref/\$SyntaxHandler
    -
    $SyntaxHandler +
    '\$SyntaxHandler'
    is a global variable whose value, if set, is applied to any input string that is found to contain a syntax \ error. @@ -203,10 +203,10 @@ class IOHookSyntaxHandler(Builtin): class Line(Builtin): - """ + r""" :WMA: https://reference.wolfram.com/language/ref/$Line
    -
    '$Line' +
    '\$Line'
    holds the current input line number.
    diff --git a/mathics/builtin/makeboxes.py b/mathics/builtin/makeboxes.py index 38495f711..f4bc3ba30 100644 --- a/mathics/builtin/makeboxes.py +++ b/mathics/builtin/makeboxes.py @@ -22,12 +22,12 @@ class BoxForms_(Predefined): - """ - :WMA link:https://reference.wolfram.com/language/ref/$BoxForms.html + r""" + :WMA link:https://reference.wolfram.com/language/ref/\$BoxForms.html
    -
    -
    $BoxForms is the list of box formats. +
    '\$BoxForms' +
    contains the list of box formats.
    >> $BoxForms diff --git a/mathics/builtin/matrices/constrmatrix.py b/mathics/builtin/matrices/constrmatrix.py index 1bd4600a3..6a6c5a775 100644 --- a/mathics/builtin/matrices/constrmatrix.py +++ b/mathics/builtin/matrices/constrmatrix.py @@ -24,7 +24,7 @@ class BoxMatrix(Builtin): https://reference.wolfram.com/language/ref/BoxMatrix.html
    -
    'BoxMatrix[$s]' +
    'BoxMatrix[$s$]'
    Gives a box shaped kernel of size 2 $s$ + 1.
    @@ -90,7 +90,7 @@ class DiamondMatrix(Builtin): :WMA link:https://reference.wolfram.com/language/ref/DiamondMatrix.html
    -
    'DiamondMatrix[$s]' +
    'DiamondMatrix[$s$]'
    Gives a diamond shaped kernel of size 2 $s$ + 1.
    @@ -127,7 +127,7 @@ class DiskMatrix(Builtin): :WMA link:https://reference.wolfram.com/language/ref/DiskMatrix.html
    -
    'DiskMatrix[$s]' +
    'DiskMatrix[$s$]'
    Gives a disk shaped kernel of size 2 $s$ + 1.
    diff --git a/mathics/builtin/messages.py b/mathics/builtin/messages.py index d6ae30645..3c4d44a14 100644 --- a/mathics/builtin/messages.py +++ b/mathics/builtin/messages.py @@ -2,7 +2,6 @@ Message-related functions. """ - import typing from typing import Any @@ -17,11 +16,11 @@ class Aborted(Predefined): - """ + r""" :WMA link:https://reference.wolfram.com/language/ref/Aborted.html
    -
    '$Aborted' +
    '\$Aborted'
    is returned by a calculation that has been aborted.
    """ @@ -125,10 +124,10 @@ def get_msg_list(exprs): class Failed(Predefined): - """ - :WMA link:https://reference.wolfram.com/language/ref/$Failed.html + r""" + :WMA link:https://reference.wolfram.com/language/ref/\$Failed.html
    -
    '$Failed' +
    '\$Failed'
    is returned by some functions in the event of an error.
    """ diff --git a/mathics/builtin/numbers/algebra.py b/mathics/builtin/numbers/algebra.py index 3380a4ce2..d3f186db3 100644 --- a/mathics/builtin/numbers/algebra.py +++ b/mathics/builtin/numbers/algebra.py @@ -1525,7 +1525,7 @@ class Simplify(Builtin):
    simplifies $expr$.
    'Simplify[$expr$, $assump$]' -
    simplifies $expr$ assuming $assump$ instead of $Assumptions$. +
    simplifies $expr$ assuming $assump$ instead of '\$Assumptions'.
    >> Simplify[2*Sin[x]^2 + 2*Cos[x]^2] @@ -1535,23 +1535,23 @@ class Simplify(Builtin): >> Simplify[f[x]] = f[x] - Simplify over conditional expressions uses $\$Assumptions$, or $assump$ + Simplify over conditional expressions uses '\$Assumptions', or $assump$ to evaluate the condition: >> $Assumptions={a <= 0}; >> Simplify[ConditionalExpression[1, a > 0]] = Undefined - The $assump$ option override $\$Assumption$: + The $assump$ option override '\$Assumption': >> Simplify[ConditionalExpression[1, a > 0] ConditionalExpression[1, b > 0], { b > 0 }] = ConditionalExpression[1, a > 0] - On the other hand, $Assumptions$ option does not override $\$Assumption$, but add to them: + On the other hand, 'Assumptions' option does not override '\$Assumptions', but add to them: >> Simplify[ConditionalExpression[1, a > 0] ConditionalExpression[1, b > 0], Assumptions -> { b > 0 }] = ConditionalExpression[1, a > 0] - Passing both options overwrites $Assumptions with the union of $assump$ the option + Passing both options overwrites '\$Assumptions' with the union of $assump$ the option >> Simplify[ConditionalExpression[1, a > 0] ConditionalExpression[1, b > 0], {a>0},Assumptions -> { b > 0 }] = 1 >> $Assumptions={}; - The option $ComplexityFunction$ allows to control the way in which the \ + The option 'ComplexityFunction' allows to control the way in which the \ evaluator decides if one expression is simpler than another. For example, \ by default, 'Simplify' tries to avoid expressions involving numbers with many digits: >> Simplify[20 Log[2]] diff --git a/mathics/builtin/numbers/constants.py b/mathics/builtin/numbers/constants.py index b2caf6162..b0c54dad3 100644 --- a/mathics/builtin/numbers/constants.py +++ b/mathics/builtin/numbers/constants.py @@ -595,19 +595,19 @@ class Overflow(Builtin): class MaxMachineNumber(Predefined): - """ + r""" Largest normalizable machine number ( :WMA: - https://reference.wolfram.com/language/ref/$MaxMachineNumber.html + https://reference.wolfram.com/language/ref/\$MaxMachineNumber.html )
    -
    '$MaxMachineNumber' +
    '\$MaxMachineNumber'
    Represents the largest positive number that can be represented \ as a normalized machine number in the system.
    - The product of '$MaxMachineNumber' and '$MinMachineNumber' is a constant: + The product of '\$MaxMachineNumber' and '\$MinMachineNumber' is a constant: >> $MaxMachineNumber * $MinMachineNumber = 4. @@ -621,14 +621,14 @@ def evaluate(self, evaluation: Evaluation) -> MachineReal: class MinMachineNumber(Predefined): - """ + r""" Smallest normalizable machine number ( :WMA: - https://reference.wolfram.com/language/ref/$MinMachineNumber.html + https://reference.wolfram.com/language/ref/\$MinMachineNumber.html )
    -
    '$MinMachineNumber' +
    '\$MinMachineNumber'
    Represents the smallest positive number that can be represented \ as a normalized machine number in the system.
    diff --git a/mathics/builtin/numbers/numbertheory.py b/mathics/builtin/numbers/numbertheory.py index 7259e9925..491862602 100644 --- a/mathics/builtin/numbers/numbertheory.py +++ b/mathics/builtin/numbers/numbertheory.py @@ -88,7 +88,7 @@ class DivisorSigma(SympyFunction):
    'DivisorSigma[$k$, $n$]' -
    returns $\sigma_k$($n$) +
    returns $\sigma_k(n)$
    For reference, let us first get the integer divisors of 20: @@ -1001,7 +1001,7 @@ class RandomPrime(Builtin): :Prime numbers:https://reference.wolfram.com/language/ref/RandomPrime.html
    -
    'RandomPrime[{$imin$, $imax}]' +
    'RandomPrime[{$imin$, $imax$}]'
    gives a random prime between $imin$ and $imax$.
    'RandomPrime[$imax$]' diff --git a/mathics/builtin/procedural.py b/mathics/builtin/procedural.py index 6544cf401..ee312eef3 100644 --- a/mathics/builtin/procedural.py +++ b/mathics/builtin/procedural.py @@ -41,13 +41,13 @@ class Abort(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/Abort.html
    'Abort[]' -
    aborts an evaluation completely and returns '$Aborted'. +
    aborts an evaluation completely and returns '\$Aborted'.
    >> Print["a"]; Abort[]; Print["b"] @@ -416,12 +416,12 @@ def eval_with_false_and_other(self, condition, t, f, u, evaluation): class Interrupt(Builtin): - """ + r""" :WMA link:https://reference.wolfram.com/language/ref/Interrupt.html
    'Interrupt[]' -
    Interrupt an evaluation and returns '$Aborted'. +
    Interrupt an evaluation and returns '\$Aborted'.
    >> Print["a"]; Interrupt[]; Print["b"] diff --git a/mathics/builtin/quantum_mechanics/angular.py b/mathics/builtin/quantum_mechanics/angular.py index cad013268..9a92c2b37 100644 --- a/mathics/builtin/quantum_mechanics/angular.py +++ b/mathics/builtin/quantum_mechanics/angular.py @@ -40,8 +40,8 @@ class ClebschGordan(SympyFunction):
    'ClebschGordan[{$j1$, $m1$}, {$j2$, $m2$}, {$j$ $m$}]' -
    returns the Clebsch-Gordan coefficient for the decomposition of |$j$,$m$> \ - in terms of |$j1$, $m$>, |$j2$, $m2$>. +
    returns the Clebsch-Gordan coefficient for the decomposition of $|j, m\rangle$ \ + in terms of $|j1, m\rangle$, $|j2, m2\rangle$.
    >> ClebschGordan[{3 / 2, 3 / 2}, {1 / 2, -1 / 2}, {1, 1}] @@ -143,7 +143,7 @@ class SixJSymbol(SympyFunction): https://reference.wolfram.com/language/ref/SixJSymbol.html)
    -
    'SixJSymbol[{$j1, $j2$, $j3$}, {$j4$, $j5$, $j6$}]' +
    'SixJSymbol[{$j1$, $j2$, $j3$}, {$j4$, $j5$, $j6$}]'
    returns the values of the Wigner 6-$j$ symbol.
    diff --git a/mathics/builtin/scoping.py b/mathics/builtin/scoping.py index 56bf89039..8243a9af5 100644 --- a/mathics/builtin/scoping.py +++ b/mathics/builtin/scoping.py @@ -112,7 +112,7 @@ class Begin(Builtin): class BeginPackage(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/BeginPackage.html @@ -123,7 +123,7 @@ class BeginPackage(Builtin):
    The $context$ argument must be a valid context name. 'BeginPackage' changes \ - the values of '$Context' and '$ContextPath', setting the current context to $context$. + the values of '\$Context' and '\$ContextPath', setting the current context to $context$. ## >> BeginPackage["test`"] ## = test` @@ -269,12 +269,12 @@ def eval_with_string(self, string, evaluation: Evaluation) -> ListExpression: class ContextPath_(Predefined): - """ + r""" :WMA link - :https://reference.wolfram.com/language/ref/$ContextPath.html + :https://reference.wolfram.com/language/ref/\$ContextPath.html
    -
    '$ContextPath' +
    '\$ContextPath'
    is the search path for contexts.
    @@ -299,14 +299,14 @@ class ContextPath_(Predefined): class ContextPathStack(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/ContextPathStack.html
    -
    'System`Private`$ContextPathStack' -
    is an internal variable tracking the values of '$ContextPath' \ +
    'System`Private`\$ContextPathStack' +
    is an internal variable tracking the values of '\$ContextPath' \ saved by 'Begin' and 'BeginPackage'.
    """ @@ -321,13 +321,13 @@ class ContextPathStack(Builtin): class ContextStack(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/ContextStack.html
    -
    'System`Private`$ContextStack' -
    is an internal variable tracking the values of '$Context' +
    'System`Private`\$ContextStack' +
    is an internal variable tracking the values of '\$Context' saved by 'Begin' and 'BeginPackage'.
    """ @@ -372,7 +372,7 @@ class End(Builtin): class EndPackage(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/EndPackage.html @@ -382,8 +382,8 @@ class EndPackage(Builtin):
    marks the end of a package, undoing a previous 'BeginPackage'.
    - After 'EndPackage', the values of '$Context' and '$ContextPath' at the \ - time of the 'BeginPackage' call are restored, with the new package\'s context prepended to $ContextPath. + After 'EndPackage', the values of '\$Context' and '\$ContextPath' at the \ + time of the 'BeginPackage' call are restored, with the new package\'s context prepended to '\$ContextPath'. """ messages = { @@ -408,7 +408,7 @@ class EndPackage(Builtin): class Module(Builtin): - """ + r""" :WMA link: https://reference.wolfram.com/language/ref/Module.html @@ -416,8 +416,8 @@ class Module(Builtin):
    'Module[{$vars$}, $expr$]'
    localizes variables by giving them a temporary name of the form \ - 'name$number', where number is the current value of '$ModuleNumber'. \ - Each time a module is evaluated, '$ModuleNumber' is incremented. + 'name\$number', where number is the current value of '\$ModuleNumber'. \ + Each time a module is evaluated, '\$ModuleNumber' is incremented.
    ## FIXME: fix and go over @@ -483,30 +483,30 @@ def eval(self, vars, expr, evaluation: Evaluation): class ModuleNumber_(Predefined): - """ + r""" :WMA link: - https://reference.wolfram.com/language/ref/$ModuleNumber.html + https://reference.wolfram.com/language/ref/\$ModuleNumber.html
    -
    '$ModuleNumber' +
    '\$ModuleNumber'
    is the current "serial number" to be used for local module variables.