Skip to content

Commit

Permalink
Merge pull request #889 from rocky/gallery-and-doc-fixes
Browse files Browse the repository at this point in the history
Go over gallery examples and documentation
  • Loading branch information
GarkGarcia authored Sep 15, 2020
2 parents 7cb4279 + b3f7a7a commit 4e0ad0d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 24 deletions.
11 changes: 7 additions & 4 deletions mathics/doc/documentation/1-Manual.mdoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<chapter title="Introduction">

\Mathics---to be pronounced like "Mathematics" without the "emat"---is a general-purpose computer algebra system (CAS). It is meant to be a free, light-weight alternative to \Mathematica. It is free both as in "free beer" and as in "freedom". There are various online mirrors running \Mathics but it is also possible to run \Mathics locally. A list of mirrors can be found at the \Mathics homepage, <url>http://mathics.github.io</url>.
\Mathics---to be pronounced like "Mathematics" without the "emat"---is a general-purpose computer algebra system (CAS). It is meant to be a free, open-source alternative to \Mathematica. It is free both as in "free beer" and as in "freedom". There are various online mirrors running \Mathics but it is also possible to run \Mathics locally. A list of mirrors can be found at the \Mathics homepage, <url>http://mathics.github.io</url>.

The programming language of \Mathics is meant to resemble \Wolfram\'s famous \Mathematica as much as possible. However, \Mathics is in no way affiliated or supported by \Wolfram. \Mathics will probably never have the power to compete with \Mathematica in industrial applications; yet, it might be an interesting alternative for educational purposes.

Expand Down Expand Up @@ -66,7 +66,10 @@ Furthermore, SQLite support is needed. Debian/Ubuntu provides the package <con>l
</console>
(as super-user, i.e. either after having issued <con>su</con> or by preceding the command with <con>sudo</con>).

On Mac OS X, consider using Fink (<url>http://www.finkproject.org</url>) and install the <con>sqlite3-dev</con> package.
On Mac OS X
<console>
# brew install sqlite3
</console>

If you are on Windows, please figure out yourself how to install SQLite.

Expand All @@ -78,9 +81,9 @@ Simply run:
<console>
# python setup.py install
</console>
In addition to installing \Mathics, this will download the required Python packages <con>sympy</con>, <con>mpmath</con>, <con>django</con>, and <con>pysqlite</con> and install them in your Python <con>site-packages</con> directory (usually <con>/usr/lib/python2.x/site-packages</con> on Debian or <con>/Library/Frameworks/Python.framework/Versions/2.x/lib/python2.x/site-packages</con> on Mac OS X).
In addition to installing \Mathics, this will download the required Python packages <con>sympy</con>, <con>mpmath</con>, <con>django</con>, and <con>pysqlite</con> and install them in your Python <con>site-packages</con> directory (usually <con>/usr/lib/python3.x/site-packages</con> on Debian or <con>/Library/Frameworks/Python.framework/Versions/3.x/lib/python3.x/site-packages</con> on Mac OS X).

Two executable files will be created in a binary directory on your <con>PATH</con> (usually <con>/usr/bin</con> on Debian or <con>/Library/Frameworks/Python.framework/Versions/2.x/bin</con> on Mac OS X): <con>mathics</con> and <con>mathicsserver</con>.
Two executable files will be created in a binary directory on your <con>PATH</con> (usually <con>/usr/bin</con> on Debian or <con>/Library/Frameworks/Python.framework/Versions/3.x/bin</con> on Mac OS X): <con>mathics</con> and <con>mathicsserver</con>.
</section>

<section title="Running \Mathics">
Expand Down
4 changes: 2 additions & 2 deletions mathics/doc/documentation/A-License.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ limitations under the License.
</section>

<section title="Three.js">
Copyright © 2010-2012 Three.js authors.
Copyright © 2010-2020 Three.js authors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -398,7 +398,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright © 2001, 2002 Enthought, Inc.
All rights reserved.

Copyright © 2003-2013 SciPy Developers.
Copyright © 2003-2019 SciPy Developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion mathics/doc/tex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ logo-heptatom.pdf logo-text-nodrop.pdf:
documentation.tex:
(cd ../.. && $(PYTHON) test.py -o && $(PYTHON) test.py -t)

#: Same as
#: Same as mathics.pdf
latex: mathics.pdf

#: Remove all auto-generated files
Expand Down
43 changes: 26 additions & 17 deletions mathics/web/media/js/inout.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,31 @@ function loadLink() {

function showGallery() {
setQueries([
'1 + 2 - x * 3 x / y',
'Sin[Pi]',
'Graphics3D[Sphere[{0, 0, 0}, 1]]',
'Plot[{Sin[x], Cos[x], Tan[x]}, {x, -3Pi, 3Pi}]',
'BarChart[{{1, 2, 3}, {2, 3, 4}}]',
'Plot[{Abs[Sin[x]], Abs[Cos[x]]}, {x,0,4 Pi}, Mesh->Full]',
'Plot3D[Exp[x] Cos[y], {x, -2, 1}, {y, -Pi, 2 Pi}, PlotPoints->31]',
'Plot3D[Sin[x y], {x, -2, 2}, {y, -2, 2}, Mesh->Full, PlotPoints->21]',
'Graph[{1 <-> 2, 2 <-> 3, 5 <-> 2, 3 <-> 4, 5 <-> 3}]',
'N[E, 30]',
'D[Sin[2x] + Log[x] ^ 2, x]',
'Integrate[Tan[x] ^ 5, x]',
'A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; MatrixForm[A]',
'LinearSolve[A, {1, 1, 1}] // MatrixForm',
'Eigenvalues[A]',
'# ^ 2 & /@ Range[10]',
'Graphics[Table[{EdgeForm[{GrayLevel[0, 0.5]}], Hue[(-11+q+10r)/72, 1, 1, 0.6], Disk[(8-r){Cos[2Pi q/12], Sin [2Pi q/12]}, (8-r)/3]}, {r, 6}, {q, 12}]]'
'1 + 2 - x * 3 x / y',
'Apart[1 / (x^2 + 5x + 6)]',
'Cancel[x / x ^ 2]',
'Expand[(x + y)^ 3]',
'Factor[x ^ 2 + 2 x + 1]',
'Sin[Pi]',
'Simplify[5*Sin[x]^2 + 5*Cos[x]^2]',
'Graphics3D[Sphere[{0, 0, 0}, 1]]',
'Plot[{Sin[x], Cos[x], Tan[x]}, {x, -3Pi, 3Pi}]',
'BarChart[{{1, 2, 3}, {2, 3, 4}}]',
'Plot[{Abs[Sin[x]], Abs[Cos[x]]}, {x,0,4 Pi}, Mesh->Full]',
'Plot3D[Exp[x] Cos[y], {x, -2, 1}, {y, -Pi, 2 Pi}, PlotPoints->21]',
'Plot3D[Sin[x y], {x, -2, 2}, {y, -2, 2}, Mesh->Full, PlotPoints->21]',
'N[E, 30]',
'D[Sin[2x] + Log[x] ^ 2, x]',
'Integrate[Tan[x] ^ 5, x]',
'A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; MatrixForm[A]',
'LinearSolve[A, {1, 1, 1}] // MatrixForm',
'Eigenvalues[A]',
'# ^ 2 & /@ Range[10]',
'Graphics[Table[{EdgeForm[{GrayLevel[0, 0.5]}], Hue[(-11+q+10r)/72, 1, 1, 0.6], Disk[(8-r){Cos[2Pi q/12], Sin [2Pi q/12]}, (8-r)/3]}, {r, 6}, {q, 12}]]',
'ElementData[74]',
'ElementData["He", "AbsoluteBoilingPoint"]',
'ListLinePlot[Table[Sin[x], {x,-5, 5, 0.5}], Filling->Axis]',
'Graphics3D[Polygon[{{0,0,0}, {0,1,1}, {1,0,0}}]]',
'Graphics[Line[AnglePath[Table[1.7, {50}]]]]'
]);
}

0 comments on commit 4e0ad0d

Please sign in to comment.