Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28495 views
License: GPL3
ubuntu2004
1
% Copyright (c) 2015 Karim Belabas.
2
% Permission is granted to copy, distribute and/or modify this document
3
% under the terms of the GNU General Public License
4
5
% TeX macros for gp's reference card. Based on Stephen Gildea's multicolumn
6
% macro package, modified from his GNU emacs reference card. Based on an
7
% earlier version by Joseph H. Silverman who kindly let me use his original
8
% file.
9
10
\def\versionnumber{2.38}% Version of these reference cards
11
\def\PARIversion{2.14.0}% Version of PARI described on these reference cards
12
\def\year{2021}
13
\def\month{April}
14
15
\special{papersize=29.7cm,21cm}
16
17
% ignore parimacro.tex's \magnification setting
18
\let\oldmagnification\magnification
19
\catcode`@=11
20
\def\magnification{\count@}%
21
\catcode`@=12
22
\input parimacro.tex
23
\let\magnification\oldmagnification
24
\ifPDF
25
\pdfpagewidth=11.69in
26
\pdfpageheight=8.26in
27
\fi
28
29
\newcount\columnsperpage
30
% The final reference card has six columns, three on each side.
31
% This file can be used to produce it in any of three ways:
32
% 1 column per page
33
% produces six separate pages, each of which needs to be reduced to 80%.
34
% This gives the best resolution.
35
% 2 columns per page
36
% produces three already-reduced pages.
37
% You will still need to cut and paste.
38
% 3 columns per page
39
% produces two pages which must be printed sideways to make a
40
% ready-to-use 8.5 x 11 inch reference card.
41
% For this you need a dvi device driver that can print sideways.
42
% [For 2 or 3 columns, you'll need 6 and 8 point fonts.]
43
% Which mode to use is controlled by setting \columnsperpage below:
44
\columnsperpage=3
45
46
% You shouldn't need to modify anything below this line.
47
48
\def\version{\month\ \year\ v\versionnumber}
49
50
\def\shortcopyrightnotice{\vskip .5ex plus 2 fill
51
\centerline{\small \copyright\ \year\ Karim Belabas.
52
Permissions on back. v\versionnumber}}
53
54
\def\<#1>{$\langle${#1}$\rangle$}
55
\def\copyrightnotice{\vskip 1ex plus 2 fill
56
\begingroup\small
57
\centerline{Based on an earlier version by Joseph H. Silverman}
58
\centerline{\version. Copyright \copyright\ \year\ K. Belabas}
59
60
Permission is granted to make and distribute copies of this card provided the
61
copyright and this permission notice are preserved on all copies.
62
63
Send comments and corrections to \<Karim.Belabas@math.u-bordeaux.fr>
64
\endgroup}
65
66
% make \bye not \outer so that the \def\bye in the \else clause below
67
% can be scanned without complaint.
68
\def\bye{\par\vfill\supereject\end}
69
70
\newdimen\intercolumnskip
71
\newbox\columna
72
\newbox\columnb
73
74
\def\ncolumns{\the\columnsperpage}
75
76
\message{[\ncolumns\space
77
column\if 1\ncolumns\else s\fi\space per page]}
78
79
\def\scaledmag#1{ scaled \magstep #1}
80
81
% This multi-way format was designed by Stephen Gildea
82
% October 1986.
83
\if 1\ncolumns
84
\hsize 4in
85
\vsize 10in
86
\voffset -.7in
87
\font\titlefont=\fontname\tenbf \scaledmag3
88
\font\headingfont=\fontname\tenbf \scaledmag2
89
\font\smallfont=\fontname\sevenrm
90
\font\smallsy=\fontname\sevensy
91
92
\footline{\hss\folio}
93
\def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
94
\else
95
\hsize 3.4in
96
\vsize 7.90in
97
\hoffset -.75in
98
\voffset -.815in
99
\font\titlefont=cmbx10 \scaledmag2
100
\font\headingfont=cmbx10 %\scaledmag1
101
\font\smallfont=cmr6
102
\font\smallsy=cmsy6
103
\font\eightrm=cmr8
104
\font\eightbf=cmbx8
105
\font\eightit=cmti8
106
\font\eighttt=cmtt8
107
\font\eightsy=cmsy8
108
\font\eightsl=cmsl8
109
\font\eighti=cmmi8
110
\font\eightex=cmex10 at 8pt
111
\textfont0=\eightrm
112
\textfont1=\eighti
113
\textfont2=\eightsy
114
\textfont3=\eightex
115
\def\rm{\fam0 \eightrm}
116
\def\bf{\eightbf}
117
\def\it{\eightit}
118
\def\tt{\eighttt}
119
\normalbaselineskip=.8\normalbaselineskip
120
\normallineskip=.8\normallineskip
121
\normallineskiplimit=.8\normallineskiplimit
122
\normalbaselines\rm %make definitions take effect
123
124
\if 2\ncolumns
125
\let\maxcolumn=b
126
\footline{\hss\rm\folio\hss}
127
\def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
128
\else \if 3\ncolumns
129
\let\maxcolumn=c
130
\nopagenumbers
131
\else
132
\errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
133
\errmessage{Illegal number of columns per page}
134
\fi\fi
135
136
\intercolumnskip=.45in
137
\def\abc{a}
138
\output={%
139
% This next line is useful when designing the layout.
140
%\immediate\write16{Column \folio\abc\space starts with \firstmark}
141
\if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
142
\else\if a\abc
143
\global\setbox\columna\columnbox \global\def\abc{b}
144
%% in case we never use \columnb (two-column mode)
145
\global\setbox\columnb\hbox to -\intercolumnskip{}
146
\else
147
\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
148
\def\multicolumnformat{\shipout\vbox{\makeheadline
149
\hbox{\box\columna\hskip\intercolumnskip
150
\box\columnb\hskip\intercolumnskip\columnbox}
151
\makefootline}\advancepageno}
152
\def\columnbox{\leftline{\pagebody}}
153
154
\def\bye{\par\vfill\supereject
155
\if a\abc \else\null\vfill\eject\fi
156
\if a\abc \else\null\vfill\eject\fi
157
\end}
158
\fi
159
160
% we won't be using math mode much, so redefine some of the characters
161
% we might want to talk about
162
%\catcode`\^=12
163
%\catcode`\_=12
164
%\catcode`\~=12
165
166
\chardef\\=`\\
167
\chardef\{=`\{
168
\chardef\}=`\}
169
170
\hyphenation{}
171
172
\parindent 0pt
173
\parskip 0pt
174
175
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
176
177
\outer\def\newcolumn{\vfill\eject}
178
179
\outer\def\title#1{{\titlefont\centerline{#1}}}
180
181
\outer\def\section#1{\par\filbreak
182
\vskip 1ex plus .4ex minus .5ex
183
{\headingfont #1}\mark{#1}%
184
\vskip .5ex plus .3ex minus .5ex
185
}
186
187
\outer\def\subsec#1{\filbreak
188
\vskip 0.07ex plus 0.05ex
189
{\bf #1}
190
\vskip 0.03ex plus 0.05ex
191
}
192
193
\newdimen\keyindent
194
\def\beginindentedkeys{\keyindent=1em}
195
\def\endindentedkeys{\keyindent=0em}
196
\endindentedkeys
197
198
\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
199
200
\newbox\libox
201
\setbox\libox\hbox{\kbd{M-x }}
202
\newdimen\liwidth
203
\liwidth=\wd\libox
204
205
\def\li#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
206
{\hskip\keyindent\relax#1\hfil}%
207
\hskip -\liwidth minus 1fil
208
\kbd{#2}\hfil}}
209
210
\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
211
&\kbd{#3}\quad\cr}
212
213
\def\mod{\;\hbox{\rm mod}\;}
214
\def\expr{\hbox{\it expr}}
215
\def\seq{\hbox{\it seq}}
216
\def\args{\hbox{\it args}}
217
\def\file{\hbox{\it file}}
218
\def\QQ{\hbox{\bf Q}}
219
\def\MM{\hbox{\bf M}}
220
\def\ZZ{\hbox{\bf Z}}
221
\def\PP{\hbox{\bf P}}
222
\def\RR{\hbox{\bf R}}
223
\def\FF{\hbox{\bf F}}
224
\def\CC{\hbox{\bf C}}
225
\def\deg{\mathop{\rm deg}}
226
\def\bs{\char'134}
227
\def\pow{\^{}\hskip0pt}
228
\def\til{\raise-0.3em\hbox{\~{}}}
229
\def\typ#1{\kbd{t\_#1}}
230
231
%%%%%%%%%%%%%%%%%%%%%%%
232
233
\title{\TITLE}
234
\centerline{(PARI-GP version \PARIversion)}
235
236