Skip to content

Commit d525e45

Browse files
committed
More summary info, Start to doc doc pipeline
1 parent 16bc004 commit d525e45

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

mathics/builtin/list/constructing.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ class Array(Builtin):
6969
"plen": "`1` and `2` should have the same length.",
7070
}
7171

72+
summary_text = (
73+
"form an array of any dimension by applying a function to successive indices"
74+
)
75+
7276
def apply(self, f, dimsexpr, origins, head, evaluation):
7377
"Array[f_, dimsexpr_, origins_:1, head_:List]"
7478

@@ -131,6 +135,7 @@ class ConstantArray(Builtin):
131135
}
132136

133137

138+
134139
class Normal(Builtin):
135140
"""
136141
<dl>
@@ -412,6 +417,10 @@ class Table(_IterationFunction):
412417
"Table[expr_, n_Integer]": "Table[expr, {n}]",
413418
}
414419

420+
summary_text = (
421+
"form a Mathematical Table of any dimension from expressions or lists"
422+
)
423+
415424
def get_result(self, items):
416425
return Expression(SymbolList, *items)
417426

@@ -444,6 +453,8 @@ class Tuples(Builtin):
444453
= {{a, c}, {a, d}, {b, c}, {b, d}}
445454
"""
446455

456+
summary_text = "form n-tuples from a list"
457+
447458
def apply_n(self, expr, n, evaluation):
448459
"Tuples[expr_, n_Integer]"
449460

mathics/doc/tex/README.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Overview
2+
--------
3+
4+
Here we have document data and scripts for generating the Mathics Reference manual in PDF form.
5+
6+
The document is a LaTeX file run through XeTeX with Asymptote graphics.
7+
8+
You'll need Asymptote 2.71-37 or greater and 9.54.0 or greater to
9+
process the graphics. Ealier version may have bugs in them which
10+
prevent some images from getting processed. Notable here are the
11+
"Filling" ande "Bottom" examples which need opacity to work on various kinds of plots.
12+
13+
inkscape is needed for the Mathics logos if you need to generate these from source.
14+
15+
Workflow
16+
--------
17+
18+
The overall top-level LaTeX document is ``mathic.tex``. The pulls in
19+
``documentation.tex`` which is automatically generated from the Python
20+
program ``doc2latex.py`` and that in turn gets its data from
21+
``doc_tex_data.pcl`` which in turn gets its data from ``../documentation/*.mdoc``.
22+
23+
Here is a flow of the data:
24+
25+
```
26+
doc/documentation/*.mdoc --+
27+
|
28+
bultins/*.py -------------+--> doc/tex/doc_tex_data.pcl ---> documentation.tex -+
29+
docpipeline.py doc2latex.py |
30+
|
31+
doc/images/*.svg -------------> doc/tex/log*.pdf --------------------------------+---------------------> mathics.pdf
32+
images.sh | xetex,asyptote,gv
33+
|
34+
doc/tex/mathics.tex -------------------------------------------------------------+
35+
36+
```
37+
38+
A GNU Makefile in this directory has been created to manage the complicated workflow above.
39+
40+
Troubleshooting
41+
---------------
42+
43+
GNU makefile targets can be used to make pieces of the document pipeline. Run ``remake --tasks`` to see
44+
a list of Makefile targets.
45+
46+
If the problem is with graphics, if you don't have the figure name but
47+
just its number, you may be able to figure out its number by going
48+
into ``documetation.tex`` and finding the appropriate section in the
49+
LaTeX document and then getting the number that is listed there.
50+
51+
To view one of the asymptote figures, e.g. ``mathics-83.asy``:
52+
53+
$ asy
54+
asy
55+
Welcome to Asymptote version 2.71-37 (to view the manual, type help)
56+
> include "mathics-83.asy"
57+
include "mathics-83.asy"

0 commit comments

Comments
 (0)