Skip to content

Commit 1aef687

Browse files
authored
Merge pull request #2 from Mathics3/workflows
Workflows
2 parents 659e92b + cc94733 commit 1aef687

File tree

231 files changed

+708
-642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+708
-642
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Mathics3-user-guide
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.12']
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
sudo apt update -qq && sudo apt install asymptote texlive-xetex texlive-latex-extra
24+
python -m pip install --upgrade pip
25+
- name: Install the documentation and dependencies
26+
run: |
27+
make setup
28+
- name: Generate documentation
29+
run: |
30+
mkdir /home/runner/.local
31+
mkdir /home/runner/.local/var
32+
mkdir /home/runner/.local/var/Mathics3
33+
make doctest-data
34+
make rst-documentation
35+
cd docs
36+
make html
37+
make latex

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ build rebuild:
3434
#: Wipe derivable files
3535
clean:
3636
$(MAKE) -C docs $<
37+
rm -f -R docs/manual
38+
rm -f -R docs/reference-of-builtin-symbols
3739

docs/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ["sphinx.ext.autosectionlabel"]
33+
extensions = ["sphinx.ext.autosectionlabel", "sphinx.ext.mathjax"]
3434

3535
# Add any paths that contain templates here, relative to this directory.
3636
templates_path = ["_templates"]
@@ -57,3 +57,7 @@
5757

5858
latex_engine = 'xelatex'
5959

60+
61+
mathjax2_config={
62+
"preamble":r"\usepackage{multirow}",
63+
}

docs/manual/further-tutorial-examples/curve-sketching.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Finally, let's plot :code:`f` :
8484
>>> Plot[f[x], {x, -8, 6}]
8585

8686
=
87-
.. image:: tmp1h__d952.png
87+
.. image:: asy_Manual_Further_Tutorial_Examples_Curve_Sketching_3clg1xkv.png
8888
:align: center
8989

9090

docs/manual/further-tutorial-examples/dice.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A dice object shall be displayed as a rectangle with the given number of points
3030
>>> Dice[1]
3131

3232
=
33-
.. image:: tmpp81ukcll.png
33+
.. image:: asy_Manual_Further_Tutorial_Examples_Dice_falirv9n.png
3434
:align: center
3535

3636

@@ -57,7 +57,7 @@ The empty series of dice shall be displayed as an empty dice:
5757
>>> Dice[]
5858

5959
=
60-
.. image:: tmpabn7beds.png
60+
.. image:: asy_Manual_Further_Tutorial_Examples_Dice_aeohbq0n.png
6161
:align: center
6262

6363

@@ -71,7 +71,7 @@ Any non-empty series of dice shall be displayed as a row of individual dice:
7171
>>> Dice[1, 6, 4, 4]
7272

7373
=
74-
.. image:: tmp32or4y29.png
74+
.. image:: eq_Manual_Further_Tutorial_Examples_Dice_g2c_gxxt.png
7575
:align: center
7676

7777

@@ -111,7 +111,7 @@ We can now combine dice:
111111
>>> Dice[1, 5] + Dice[3, 2] + Dice[4]
112112

113113
=
114-
.. image:: tmp0nqno03o.png
114+
.. image:: eq_Manual_Further_Tutorial_Examples_Dice_xbql_vb5.png
115115
:align: center
116116

117117

@@ -137,7 +137,7 @@ And now let's put some dice into a table:
137137
>>> Table[{Dice[Sequence @@ d], DiceSum @ Dice[Sequence @@ d]}, {d, {{1, 2}, {2, 2}, {2, 6}}}] // TableForm
138138

139139
=
140-
.. image:: tmpyxbsv76w.png
140+
.. image:: eq_Manual_Further_Tutorial_Examples_Dice_f0ph1t0b.png
141141
:align: center
142142

143143

docs/manual/language-tutorial/3d-graphics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Three-dimensional graphics are created using the function :code:`Graphics3D` an
1919
>>> Graphics3D[Polygon[{{0,0,0}, {0,1,1}, {1,0,0}}]]
2020

2121
=
22-
.. image:: tmpouet69sx.png
22+
.. image:: asy_Manual_Language_Tutorial_3D_Graphics_3gk0_tfk.png
2323
:align: center
2424

2525

@@ -30,7 +30,7 @@ Colors can also be added to three-dimensional primitives.
3030
>>> Graphics3D[{Orange, Polygon[{{0,0,0}, {1,1,1}, {1,0,0}}]}, Axes->True]
3131

3232
=
33-
.. image:: tmppebt78xy.png
33+
.. image:: asy_Manual_Language_Tutorial_3D_Graphics_n28iucq9.png
3434
:align: center
3535

3636

docs/manual/language-tutorial/graphics-introduction-examples.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ Two-dimensional graphics can be created using the function :code:`Graphics` and
2828
>>> Graphics[{Circle[{0, 0}, 1]}]
2929

3030
=
31-
.. image:: tmpax7zqh1e.png
31+
.. image:: asy_Manual_Language_Tutorial_Graphics_Introduction_Examples_c4njl6yo.png
3232
:align: center
3333

3434

3535

3636
>>> Graphics[{Line[{{0, 0}, {0, 1}, {1, 1}, {1, -1}}], Rectangle[{0, 0}, {-1, -1}]}]
3737

3838
=
39-
.. image:: tmpqhakjtgl.png
39+
.. image:: asy_Manual_Language_Tutorial_Graphics_Introduction_Examples_473uoeas.png
4040
:align: center
4141

4242

@@ -65,7 +65,7 @@ All components range from 0 to 1. Each color function can be supplied with an ad
6565
>>> Graphics[{Red, Disk[]}]
6666

6767
=
68-
.. image:: tmpe8e4aqhv.png
68+
.. image:: asy_Manual_Language_Tutorial_Graphics_Introduction_Examples_gdx6tf5c.png
6969
:align: center
7070

7171

@@ -76,7 +76,7 @@ Table of hues:
7676
>>> Graphics[Table[{Hue[h, s], Disk[{12h, 8s}]}, {h, 0, 1, 1/6}, {s, 0, 1, 1/4}]]
7777

7878
=
79-
.. image:: tmpb5aws5pr.png
79+
.. image:: asy_Manual_Language_Tutorial_Graphics_Introduction_Examples_rut4ke_s.png
8080
:align: center
8181

8282

@@ -100,7 +100,7 @@ Colors can be mixed and altered using the following functions:
100100
>>> Graphics[{Lighter[Red], Disk[]}]
101101

102102
=
103-
.. image:: tmph8geaq1t.png
103+
.. image:: asy_Manual_Language_Tutorial_Graphics_Introduction_Examples_ieet9zfc.png
104104
:align: center
105105

106106

docs/manual/language-tutorial/plotting-introduction-examples.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Plotting Introduction Examples
66
>>> Plot[Sin[x], {x, 0, 2 Pi}]
77

88
=
9-
.. image:: tmp2kcscn62.png
9+
.. image:: asy_Manual_Language_Tutorial_Plotting_Introduction_Examples_a3b7of6v.png
1010
:align: center
1111

1212

@@ -17,7 +17,7 @@ You can also plot multiple functions at once:
1717
>>> Plot[{Sin[x], Cos[x], x ^ 2}, {x, -1, 1}]
1818

1919
=
20-
.. image:: tmp058vzyuu.png
20+
.. image:: asy_Manual_Language_Tutorial_Plotting_Introduction_Examples_hh0ab9z2.png
2121
:align: center
2222

2323

@@ -28,7 +28,7 @@ Two-dimensional functions can be plotted using :code:`DensityPlot` :
2828
>>> DensityPlot[x ^ 2 + 1 / y, {x, -1, 1}, {y, 1, 4}]
2929

3030
=
31-
.. image:: tmpvsl1hxll.png
31+
.. image:: asy_Manual_Language_Tutorial_Plotting_Introduction_Examples_wk7lhasu.png
3232
:align: center
3333

3434

@@ -39,7 +39,7 @@ You can use a custom coloring function:
3939
>>> DensityPlot[x ^ 2 + 1 / y, {x, -1, 1}, {y, 1, 4}, ColorFunction -> (Blend[{Red, Green, Blue}, #]&)]
4040

4141
=
42-
.. image:: tmpc8e2fuq6.png
42+
.. image:: asy_Manual_Language_Tutorial_Plotting_Introduction_Examples_wb_49pu0.png
4343
:align: center
4444

4545

@@ -52,7 +52,7 @@ Three-dimensional plots are supported as well:
5252
>>> Plot3D[Exp[x] Cos[y], {x, -2, 1}, {y, -Pi, 2 Pi}]
5353

5454
=
55-
.. image:: tmpxz6cv45t.png
55+
.. image:: asy_Manual_Language_Tutorial_Plotting_Introduction_Examples_ywn64sh3.png
5656
:align: center
5757

5858

docs/mathics3-modules.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
Mathics3 Modules
22
================
33

4+
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
9+
mathics3-modules/graphs-vertices-and-edges.rst
10+
mathics3-modules/natural-language-processing.rst
11+

docs/reference-of-built-in-symbols/arithmetic-functions/basic-arithmetic/plus.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The sum of 2 red circles and 3 red circles is...
8080
>>> 2 Graphics[{Red,Disk[]}] + 3 Graphics[{Red,Disk[]}]
8181

8282
=
83-
.. image:: tmp_d48_ncg.png
83+
.. image:: eq_Reference_of_Built-in_Symbols_Arithmetic_Functions_Plus_z5tg1zs8.png
8484
:align: center
8585

8686

docs/reference-of-built-in-symbols/arithmetic-functions/basic-arithmetic/power.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Power
4747
>>> Plot[Evaluate[Table[x^y, {y, 1, 5}]], {x, -1.5, 1.5}, AspectRatio -> 1]
4848

4949
=
50-
.. image:: tmp38z1kx_8.png
50+
.. image:: asy_Reference_of_Built-in_Symbols_Arithmetic_Functions_Power_nihx1s1c.png
5151
:align: center
5252

5353

docs/reference-of-built-in-symbols/arithmetic-functions/basic-arithmetic/sqrt.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Complex numbers:
5353
>>> Plot[Sqrt[a^2], {a, -2, 2}]
5454

5555
=
56-
.. image:: tmpclcln5e9.png
56+
.. image:: asy_Reference_of_Built-in_Symbols_Arithmetic_Functions_Sqrt__1ntrv9g.png
5757
:align: center
5858

5959

docs/reference-of-built-in-symbols/atomic-elements-of-expressions/symbol-handling/names.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ The number of built-in symbols:
4949
>>> Length[Names["System`*"]]
5050

5151
=
52-
:math:`1507`
52+
:math:`1497`
5353

5454

docs/reference-of-built-in-symbols/binary-data/binary-reading-and-writing/binaryread.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ BinaryRead
2020
>>> strm = OpenWrite[BinaryFormat -> True]
2121

2222
=
23-
:math:`\text{OutputStream}\left[\text{/tmp/tmpr\_gu7\_2h},3\right]`
23+
:math:`\text{OutputStream}\left[\text{/tmp/tmpc82totep},3\right]`
2424

2525

2626
>>> BinaryWrite[strm, {97, 98, 99}]
2727

2828
=
29-
:math:`\text{OutputStream}\left[\text{/tmp/tmpr\_gu7\_2h},3\right]`
29+
:math:`\text{OutputStream}\left[\text{/tmp/tmpc82totep},3\right]`
3030

3131

3232
>>> Close[strm];
@@ -35,7 +35,7 @@ BinaryRead
3535
>>> strm = OpenRead[%, BinaryFormat -> True]
3636

3737
=
38-
:math:`\text{InputStream}\left[\text{/tmp/tmpr\_gu7\_2h},3\right]`
38+
:math:`\text{InputStream}\left[\text{/tmp/tmpc82totep},3\right]`
3939

4040

4141
>>> BinaryRead[strm, {"Character8", "Character8", "Character8"}]

docs/reference-of-built-in-symbols/binary-data/binary-reading-and-writing/binarywrite.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ BinaryWrite
2929
>>> strm = OpenWrite[BinaryFormat -> True]
3030

3131
=
32-
:math:`\text{OutputStream}\left[\text{/tmp/tmpjt6628bg},3\right]`
32+
:math:`\text{OutputStream}\left[\text{/tmp/tmpn52ow6sk},3\right]`
3333

3434

3535
>>> BinaryWrite[strm, {39, 4, 122}]
3636

3737
=
38-
:math:`\text{OutputStream}\left[\text{/tmp/tmpjt6628bg},3\right]`
38+
:math:`\text{OutputStream}\left[\text{/tmp/tmpn52ow6sk},3\right]`
3939

4040

4141
>>> Close[strm];
@@ -44,7 +44,7 @@ BinaryWrite
4444
>>> strm = OpenRead[%, BinaryFormat -> True]
4545

4646
=
47-
:math:`\text{InputStream}\left[\text{/tmp/tmpjt6628bg},3\right]`
47+
:math:`\text{InputStream}\left[\text{/tmp/tmpn52ow6sk},3\right]`
4848

4949

5050
>>> BinaryRead[strm]
@@ -74,19 +74,19 @@ Write a String
7474
>>> strm = OpenWrite[BinaryFormat -> True]
7575

7676
=
77-
:math:`\text{OutputStream}\left[\text{/tmp/tmpssqmr49c},3\right]`
77+
:math:`\text{OutputStream}\left[\text{/tmp/tmp943kudqi},3\right]`
7878

7979

8080
>>> BinaryWrite[strm, "abc123"]
8181

8282
=
83-
:math:`\text{OutputStream}\left[\text{/tmp/tmpssqmr49c},3\right]`
83+
:math:`\text{OutputStream}\left[\text{/tmp/tmp943kudqi},3\right]`
8484

8585

8686
>>> pathname = Close[%]
8787

8888
=
89-
:math:`\text{/tmp/tmpssqmr49c}`
89+
:math:`\text{/tmp/tmp943kudqi}`
9090

9191

9292

@@ -95,7 +95,7 @@ Read as Bytes
9595
>>> strm = OpenRead[%, BinaryFormat -> True]
9696

9797
=
98-
:math:`\text{InputStream}\left[\text{/tmp/tmpssqmr49c},3\right]`
98+
:math:`\text{InputStream}\left[\text{/tmp/tmp943kudqi},3\right]`
9999

100100

101101
>>> BinaryRead[strm, {"Character8", "Character8", "Character8", "Character8", "Character8", "Character8", "Character8"}]
@@ -107,7 +107,7 @@ Read as Bytes
107107
>>> pathname = Close[strm]
108108

109109
=
110-
:math:`\text{/tmp/tmpssqmr49c}`
110+
:math:`\text{/tmp/tmp943kudqi}`
111111

112112

113113

@@ -116,7 +116,7 @@ Read as Characters
116116
>>> strm = OpenRead[%, BinaryFormat -> True]
117117

118118
=
119-
:math:`\text{InputStream}\left[\text{/tmp/tmpssqmr49c},3\right]`
119+
:math:`\text{InputStream}\left[\text{/tmp/tmp943kudqi},3\right]`
120120

121121

122122
>>> BinaryRead[strm, {"Byte", "Byte", "Byte", "Byte", "Byte", "Byte", "Byte"}]
@@ -134,19 +134,19 @@ Write Type
134134
>>> strm = OpenWrite[BinaryFormat -> True]
135135

136136
=
137-
:math:`\text{OutputStream}\left[\text{/tmp/tmpxiuzr0jm},3\right]`
137+
:math:`\text{OutputStream}\left[\text{/tmp/tmp29bgwyg3},3\right]`
138138

139139

140140
>>> BinaryWrite[strm, 97, "Byte"]
141141

142142
=
143-
:math:`\text{OutputStream}\left[\text{/tmp/tmpxiuzr0jm},3\right]`
143+
:math:`\text{OutputStream}\left[\text{/tmp/tmp29bgwyg3},3\right]`
144144

145145

146146
>>> BinaryWrite[strm, {97, 98, 99}, {"Byte", "Byte", "Byte"}]
147147

148148
=
149-
:math:`\text{OutputStream}\left[\text{/tmp/tmpxiuzr0jm},3\right]`
149+
:math:`\text{OutputStream}\left[\text{/tmp/tmp29bgwyg3},3\right]`
150150

151151

152152
>>> DeleteFile[Close[%]];

0 commit comments

Comments
 (0)