-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathg0
117 lines (117 loc) · 3.31 KB
/
g0
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
.\" Adapted for groff by G. Branden Robinson, 2022-06-30/07-02. Thanks
.\" to Deri James for PDF support.
.\" These values, used with URW Times fonts at 10 points, produce column
.\" and page breaks nearly identical to the C/A/T typeset original.
.nr LL 5.4i
.nr PO 1.55i
.\" Define a fake Bell System logo.
.char \[bs] \o'\[ci]|'
.EQ
delim $$
.EN
.
.af year 0000
.af mo 00
.af dy 00
.ND "August 15, 1978 \fI(retypeset with \fPgroff \n(.x.\n(.y.\n(.Y\fI\
\n[year]-\n(mo-\n(dy)"
.\" GBR: Suppress repetition of doc info and don't alter page numbering.
.ie \n(.y=23 .RP no-repeat-info no-renumber
.el .RP no
.\" Force page 1 to be numbered; it follows the cover page and the Unix
.\" Programmer's Manual page headings (which these sources don't produce
.\" anyway) are not appropriate for this document in isolation.
.\"nr pg*P1 1
.\"TM "76-1273-4 76-1271-4" 39199 39199-11
.ds CF \fIgroff\fP \n(.x.\n(.y.\n(.Y
.TL
Typesetting Mathematics _ User's Guide
\&\ \ \ \ \ (Second\ Edition)
.AU 2C-518 6021
Brian W. Kernighan and Lorinda L. Cherry
.AI
.MH
.AB
.\" This document uses the full page width for the abstract.
.\"in
.\"ll
.nr 0:li 0
.nr 0:ri 0
.pdfinfo /Title Typesetting Mathematics - User's Guide (Second Edition)
.pdfinfo /Author Brian W. Kernighan and Lorinda L. Cherry
.PP
This is the user's guide for a system for typesetting
mathematics,
using
the \%photo\%typesetters on the
.UX
and
.UC GCOS
operating systems.
.PP
Mathematical expressions are described in a language
designed to be easy to use
by people who know neither mathematics nor typesetting.
Enough of the language to set in-line expressions like
.\" Correct missing space before "->" for GNU eqn. GBR, 2022.
$lim from {x -> pi /2} ( tan~x) sup{sin~2x}~=~1$
or display equations like
.\"in .5i
.EQ I
G(z)~mark =~ e sup { ln ~ G(z) }
~=~ exp left (
sum from k>=1 {S sub k z sup k} over k right )
~=~ prod from k>=1 e sup {S sub k z sup k /k}
.EN
.\" Use "cdots" for ellipses on the math axis; "ldots" on the baseline.
.\" Redefine them to space them more widely. Use ~ more generously than
.\" K&C; groff eqn tends to horizontally pack more tightly. Keep the
.\" copy of this in file "g4" in sync.
.EQ I
define cdots "{ \[md]~\[md]~\[md] }"
define ldots "{ .~.~. }"
lineup = left ( 1 + S sub 1 z +
{ S sub 1 sup 2 z sup 2 } over 2! + ~ cdots right )
~ left ( 1+ { S sub 2 z sup 2 } over 2
+ { S sub 2 sup 2 z sup 4 } over { 2 sup 2 cdot 2! }
+ ~ cdots right ) ~ cdots
.EN
.EQ I
lineup = sum from m>=0 left (
sum from
pile { k sub 1 ,k sub 2 , ~ ldots ~ , k sub m >=0
above
k sub 1 +2k sub 2 + ~ cdots ~ +mk sub m =m}
{ S sub 1 sup {k sub 1} } over {1 sup k sub 1 k sub 1 ! } ~
{ S sub 2 sup {k sub 2} } over {2 sup k sub 2 k sub 2 ! } ~
cdots
{ S sub m sup {k sub m} } over {m sup k sub m k sub m ! }
right ) ~ z sup m
.EN
.\"in 0
can be learned in an hour or so.
.PP
The language interfaces directly with
the phototypesetting language
.UC TROFF ,
so mathematical expressions can be embedded in the running
text
of a manuscript,
and the entire document produced in one process.
This user's guide is an example of its output.
.PP
The same language
may be used with the
.UC UNIX
formatter
.UC NROFF
to set mathematical \%expressions on
.UC DASI
and
.UC GSI
terminals
and Model 37 teletypes.
.\" TODO: Force the first body page to be numbered "2" to align with PDF
.\" page numbers.
.AE
.\"CS 11 0 11 0 0 3