1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
TeX/Mathematica is a set of tools that provide facilities of
Mathematica Notebooks in a UNIX environment, under GNU Emacs. They
permit interaction between a text and a Mathematica buffer and, if
desired, the use of TeX/LaTeX to annotate Mathematica-based
explorations and programs. Inclusion of Mathematica-generated
graphics in TeX/LaTeX documents printed using PostScript is
supported. The tools also support the automatic generation of
Mathematica packages from Mathematica documents.
With these tools one can interactively develop and refine teaching and
research documents. The interactive nature of the tools encourages
Mathematica-based exploration as a natural part of the writing
process.
Getting TeX/Mathematica
***********************
The TeX/Mathematica tools are available from Internet host
`chem.bu.edu' [128.197.30.18] by anonymous `ftp' in directory
`/pub/tex-mathematica'. The author can be reached at Internet address
`dan@chem.bu.edu'.
The `ftp' directory contains four files
* `README', which duplicates the information
in this node.
* `CHANGES', which describes changes that have been made.
* `tex-mma-j.ps.Z', the compressed PostScript documentation/example.
* `tex-mma.tar.Z', the TeX/Mathematica distribution kit (includes the
first three files).
LaTeX description of TeX/Mathematica
====================================
The PostScript document `tex-mma-j.ps.Z' is derived from the LaTeX
description of TeX/Mathematica. Transfer the document from the
`ftp' directory in binary (image) mode and then print it with
zcat tex-mma-j.ps.Z | lpr
The source for this document is the LaTeX file `tex-mma-j.tex' and
the BibTeX file `tex-mma-j.bib'. You can use `tex-mma-j.tex'
as a LaTeX example of a TeX/Mathematica document.
Files in the distribution kit
=============================
The file `tex-mma.tar.Z' contains the TeX/Mathematica
tools. These consist of the following:
Documentation things:
* `tex-mma.texinfo', Texinfo documentation of TeX/Mathematica
* `tex-mma.ps.Z', compressed Texinfo document
formatted with TeX into PostScript
* `tex-mma.info', Info file
(this file)
for on-line Emacs documentation
* `tex-mma-j.tex', LaTeX description/example of TeX/Mathematica
* `tex-mma-j.bib', BibTeX file for `tex-mma-j.tex'
* `tex-mma-j.ps.Z', compressed LaTeX documentation formatted in
PostScript
* `sin3x.ps', Mathematica-generated figure included in
`tex-mma-j.tex'
* `tex-mma-tex.tex', TeX example of TeX/Mathematica
* `texinfo.tex', TeX macros used to format `tex-mma.texinfo'
GNU Emacs things:
* `tex-mma.el', the `tex-mathematica' package
* `math.el', David Jacobson's Mathematica mode package (*Note math::)
* `unix-tex-mma.el', example implementation of cell-type `unix'
TeX/LaTeX things:
* `mathematica10pt.tex', TeX 10 point TeX/Mathematica interface
* `mathematica12pt.tex', TeX 12 point TeX/Mathematica interface
* `mathematica.sty', LaTeX generic TeX/Mathematica interface
* `mathematica.tex', macros for formatting TeX/Mathematica
documents, used by the preceding files
Shell scripts and Mathematica commands for processing graphics, and
shell script and template file for Mathematica package assembly:
* `PSTeX.m', generates `psfig'-adapted graphics to a file, without
PostScript prolog
* `addBBox', shell script called by `PSTeX'
* `PSTeXpro.m', generates `psfig'-adapted graphics to a file, with
PostScript prolog
* `addBBoxpro', shell script called by `PSTeXpro'
* `addBBoxpro.awk', `awk' script called by `addBBoxpro'
* `PSFile.m', generates full-page graphics to a file, with PostScript
prolog
* `tex-mma-assemble-package', shell script for Mathematica package
assembly
* `tex-mma-assemble-package.tmplt', Emacs Lisp template used by
`tex-mma-assemble-package'
This is from Cameron Smith (*Note addBBox::):
* `mma.pro.1.2', Mathematica Version 1.2 PostScript prolog. Note
that a different prolog will be needed for Mathematica Version 2.0.
This will be available from the author (*Note Getting tex-math::).
These are from Trevor Darrell's `psfig/tex' distribution (*Note psfig::):
* `psfig.pro', `psfig' PostScript prolog.
* `psfig.sty', `psfig' for LaTeX.
* `psfig.tex', `psfig' for TeX.
Installation procedure
======================
1. Transfer `tex-mma.tar.Z' in binary (image) mode into an empty
directory, and extract its contents, with (for example)
zcat tex-mma.tar.Z | tar xvf -
2. Install the Info on-line documentation file `tex-mma.info' where
your Emacs looks for Info file. If desired, add a pointer to it to your
Info directory file so that it will appear in the Info top-level menu.
The source for `tex-mma.info' is `tex-mma.texinfo'. The file
`tex-mma.ps.Z' is the compressed TeX formatted version, made
using the `texinfo.tex' included in the distribution (see the
beginning of `tex-mma.texinfo' for directions). The formatted
version can be printed with
zcat tex-mma.ps.Z | lpr
It contains complete details of the TeX/Mathematica tools.
3. Edit `tex-mma.el' to
* set `tex-mma-process-string' to the command
you use to start Mathematica (default is `math');
* set `tex-mma-info-file' to point to where you put the file
`tex-mma.info'
4. Run `M-x byte-compile' on `tex-mma.el' and store the resulting
`tex-mma.elc' wherever your GNU Emacs looks for files.
5. Add the following to the GNU Emacs initialization file
(autoload 'tex-mathematica "tex-mma"
"Major-mode for interaction with Mathematica from TeX." t)
(autoload 'plain-tex-mathematica "tex-mma"
"Major-mode for interaction with Mathematica from TeX." t)
(autoload 'latex-mathematica "tex-mma"
"Major-mode for interaction with Mathematica from TeX." t)
6. If you do not have David Jacobson's Mathematica mode package
`math.el', install it following the instructions in `math.el'.
If you do have `math.el', make sure your version is at least as
current as the one here, which contains changes necessary for use with
`tex-mma.el'. Make sure you place the file `math.el' (or,
better, the byte-compiled file `math.elc') where your Emacs looks
for libraries, so that `tex-mma.elc' will be able to load it if it
is not already loaded.
7. Edit `mathematica.tex' (at the end) to specify where the PostScript
prolog files `psfig.pro' and `mma.pro.1.2' will be, and put the
prolog files there.
8. If you are using a LaTeX *earlier* than 2 May 90, edit
`mathematica.sty' according to the comments there.
9. Put `mathematica.tex', `mathematica.sty', `mathematica12pt.tex',
`mathematica10pt.tex', `psfig.sty', and `psfig.tex' where your
TeX looks for macro files.
10. Put `PSTeX.m', `PSTeXpro.m' and `PSFile.m' where your
Mathematica looks for packages.
11. Edit `addBBoxpro' to specify which `awk' you use (default is GNU
awk, `gawk').
12. Edit `tex-mma-assemble-package' to set the variables `bindir', `tmpdir'
and `tmpdirsed' for your system, as described in the comments there
and then place `tex-mma-assemble-package.tmplt' in `bindir'.
13. Put `addBBox', `addBBoxpro', `addBBoxpro.awk' and
`tex-mma-assemble-package' on your system's binary search path, make sure
they have execute status, and then execute `rehash'.
You should be ready to go: Startup emacs, run `M-x tex-mathematica'
and have fun.
|