forked from neldredge/mathgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscibook.in
452 lines (308 loc) · 10.9 KB
/
scibook.in
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# scibook.in: Grammar rules for the `book' product
#
# Copyright (C) 2012 Nathaniel Eldredge
# This file is part of Mathgen.
#
# Adapted from scirules.in from SCIgen
# (http://pdos.csail.mit.edu/scigen/). Portions may be copyright
# (C) the authors of SCIgen.
#
# Mathgen is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Mathgen is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mathgen; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
START SCIBOOK_LATEX
.include scirules.in
WORK text
WORK section
WORK book
SDISCUSS in CITATION, it is shown that ASSERTION.
SDISCUSS recently, there has been much interest in the METANOUN of OBJECTS.
DISCUSS a {}useful survey of the subject can be found in CITATION.
DISCUSS it is essential to consider that $VAR$ may be PROPERTY.
SDISCUSS it was FAMOUS who first asked whether OBJECTS can be METAVERBED.
DISCUSS this could shed important light on a conjecture of FAMOUS.
#SDISCUSS we wish to extend the results of CITATION to OBJECTS.
DISCUSS unfortunately, we cannot assume that ASSERTION.
SDISCUSS every student is aware that ASSERTION.
SDISCUSS recent developments in AREA have raised the question of whether ASSERTION.
DISCUSS in this context, the results of CITATION are highly relevant.
DISCUSS this reduces the results of CITATION to BIGTHEOREM.
SDISCUSS it has long been known that ASSERTION CITATION.
SDISCUSS AUTHOR's METANOUN of OBJECTS was a milestone in AREA.
DISCUSS this leaves open the question of PROPNOUN.
SDISCUSS it is well known that ASSERTION.
DISCUSS it would be interesting to apply the techniques of CITATION to OBJECTS.
#DISCUSS in future work, we plan to address questions of PROPNOUN as well as PROPNOUN.
DISCUSS the groundbreaking work of AUTHOR on OBJECTS was a major advance.
SDISCUSS in CITATION, the authors address the PROPNOUN of OBJECTS under the additional assumption that ASSERTION.
SDISCUSS the goal of the present WORK is to METAVERB OBJECTS.
DISCUSS it is not yet known whether ASSERTION, although CITATION does address the issue of PROPNOUN.
SDISCUSS in CITATION, the main result was the METANOUN of OBJECTS.
DISCUSS in this setting, the ability to METAVERB OBJECTS is essential.
SDISCUSS recent interest in OBJECTS has centered on METAVERBING OBJECTS.
SDISCUSS a central problem in AREA is the METANOUN of OBJECTS.
SDISCUSS in CITATION, the authors METAVERBED OBJECTS.
SDISCUSS is it possible to METAVERB OBJECTS?
DISCUSS AUTHOR improved upon the results of AUTHOR by METAVERBING OBJECTS.
DISCUSS here, PROPNOUN is CLEARLY a concern.
DISCUSS the work in CITATION did not consider the PROPLIST case.
# Cut down the size of the bibliography
CITATION_SINGLE+3 CITATION_OLD
SCIBOOK_LATEX {
LATEX_HEADER
\frontmatter
NOCITATION
NOCITATION
NOCITATION
NOCITATION
NOCITATION
PREFACE
%ACKNOW%LEDGEMENTS
\mainmatter
CHAPTERS
LATEX_FOOTER
}
TESTPARA
#############################################################################
####### Titles #######
#############################################################################
# ! = do not choose the same expansion twice for this rule
AUTHOR_NAME!
############################################################################
###### Chapters, sections, etc
############################################################################
PREFACE {
\chapter{Preface}
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
}
CHAPTERS CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER
CHAPTERS CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER
CHAPTERS CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER
CHAPTERS CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER
#CHAPTERS CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER
#CHAPTERS CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER
# Short generic titles are better for textbooks
SECTION_TITLE+4 CONCEPT
CHAPTER {
\chapter{SECTION_TITLE}
SECTIONS
EXERCISES
NOTES
}
SECTIONS+1 SECTION SECTION SECTION SECTION
SECTIONS+1 SECTION SECTION SECTION SECTION SECTION
SECTIONS+1 SECTION SECTION SECTION SECTION SECTION SECTION
SECTIONS SECTION SECTION SECTION SECTION SECTION SECTION SECTION
SECTION {
\section{SECTION_TITLE}
SECTION_INTRO
SECTION_BODY
}
SECTION_INTRO {
DISCUSSIONPARAI
}
SECTION_INTRO {
DISCUSSIONPARAI
DISCUSSIONPARAI
}
# SUBSECTIONS SUBSECTION SUBSECTION
# SUBSECTIONS SUBSECTION SUBSECTION SUBSECTION
# SUBSECTIONS SUBSECTION SUBSECTION SUBSECTION SUBSECTION
# SUBSECTIONS SUBSECTION SUBSECTION SUBSECTION SUBSECTION SUBSECTION
SECTION_BODY RES RES RES RES RES RES RES RES RES RES RES RES RES RES
SECTION_BODY RES RES RES RES RES RES RES RES RES RES RES RES RES
SECTION_BODY RES RES RES RES RES RES RES RES RES RES RES RES
SECTION_BODY+1 RES RES RES RES RES RES RES RES RES RES RES
SECTION_BODY+1 RES RES RES RES RES RES RES RES RES RES
SECTION_BODY+1 RES RES RES RES RES RES RES RES RES
SECTION_BODY+1 RES RES RES RES RES RES RES RES
SECTION_BODY+1 RES RES RES RES RES RES RES
SECTION_BODY RES RES RES RES RES RES
SECTION_BODY RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES RES
# SUBSECTION RES RES RES RES RES
# SUBSECTION RES RES RES RES
# SUBSECTION RES RES RES
DEFS+4
DEFS+2 DEFINITION
DEFS DEFINITION DEFINITION
RES {
DEFS
DISCUSSIONPARAI
DEFS
RESULT
INDEX
PROOF
INDEX
}
RES+3 {
DEFS
RESULT
INDEX
PROOF
INDEX
}
EXERCISES {
\section{Exercises}
\begin{enumerate}
TEN_EXERCISES
SOME_EXERCISES
\end{enumerate}
}
TEN_EXERCISES EXERCISE EXERCISE EXERCISE EXERCISE EXERCISE EXERCISE EXERCISE EXERCISE EXERCISE EXERCISE
SOME_EXERCISES EXERCISE
SOME_EXERCISES+16 SOME_EXERCISES EXERCISE
PROVE prove that
PROVE show that
PROVE find an example to show that
PROVE determine whether
HINT ASSERTION
HINT use the fact that ASSERTION
HINT first show that ASSERTION
HINT construct an appropriate OBJECT
HINT reduce to the PROPLIST case
MAYBEHINT+4
MAYBEHINT (Hint: HINT.)
EXERCISE+5 {
\item MAYBEASSUMPTION PROVE ASSERTION. MAYBEHINT
}
EXERCISE+2 {
\item MAYBEASSUMPTION use PROPNOUN to PROVE ASSERTION. MAYBEHINT
}
EXERCISE {
\item True or false? ASSERTION. MAYBEHINT
}
NOTES {
\section{Notes}
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
DISCUSSIONPARAI
}
#################################################################
####### Index entries
#################################################################
# We make no attempt to have the index entries bear any resemblance
# to the text. This is probably more realistic anyway.
# Indexes should occur on their own line to survive the prettyprinter
DISCUSSIONPARAI {
DISCUSSIONPARA
INDEX
}
INDEX \index{INDEXWORD}
INDEX+4
INDEXWORD+2 NOUNS
INDEXWORD+2 NOUNS!PROPERTY
INDEXWORD METANOUN
INDEXWORD+2 PROPNOUN
INDEXWORD+2 FAMOUS
#############################################################################
######## LaTeX stuff ########
#############################################################################
LATEX_HEADER {
\documentclass[10pt]{book}
% keep on one line with no spaces to avoid prettyprinter
\usepackage[paperheight=9in,paperwidth=6in,includehead,includefoot,top=0.5in,bottom=0.5in,outer=0.5in,inner=0.75in]{geometry}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage[numbers]{natbib}
\numberwithin{equation}{section}
\usepackage{txfonts}
\usepackage{hyphenat}
\usepackage[overload]{textcase} % Otherwise $p_t$ gets capitalized
% into $P_T$ in chapter headings,
% which is not desirable
\usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=black,citecolor=black,urlcolor=black,plainpages=false,pdfpagelabels]{hyperref}
\usepackage[fit]{truncate}
\usepackage[toctitles]{titlesec}
\usepackage{makeidx}
\makeindex
\usepackage{url}
\usepackage{tocbibind}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{question}{Question}
\newtheorem{conjecture}[theorem]{Conjecture}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{exercise}[theorem]{Exercise}
\setlength{\emergencystretch}{2em}
\theoremstyle{remark}
\newtheorem*{remark*}{Remark}
\begin{document}
\frontmatter
\title{BTITLE}
\author{SCIAUTHORS}
\date{}
\maketitle
\null\vfill
\noindent
COPYRIGHT
\newpage
\tableofcontents
}
LATEX_CITEPACK % \usepackage{cite}
LATEX_FONTCLASS
LATEX_DOCCLASS \documentclass[LATEX_FONTSIZE]{article}
LATEX_DOCCLASS \documentclass[LATEX_FONTSIZE]{amsart}
LATEX_BIBSTYLE \bibliographystyle{plainnat}
LATEX_FONTSIZE 11pt
LATEX_FONTSIZE 10pt
LATEX_MAYBE_FULLPAGE
LATEX_MAYBE_FULLPAGE \usepackage{fullpage}
LATEX_FOOTER {
\backmatter
\bibliographystyle{plain}
\bibliography{scigenbibfile}
\nohyphens{\printindex}
\end{document}
}
LATEX_TITLE \title{SCI_TITLE}
LATEX_AUTHORS \author{SCIAUTHORS}
COPYRIGHT {
{ \scriptsize
\noindent This work is in the public domain.
\vspace{1ex}
\noindent The contents of this book were randomly generated by \texttt{mathgen}, a context-free grammar to produce random mathematical writing. The program is freely available online at \url{http://www.thatsmathematics.com/mathgen/}. Any similarity to real mathematics, mathematicians, persons, companies, entities, et cetera, is either coincidental or intended as parody. The name of the author was also randomly chosen and does not refer to a real person.
\vspace{1ex}
\noindent The \texttt{mathgen} program was written by Nathaniel Eldredge, based heavily on SCIgen by Jeremy Stribling, Max Krohn, and Dan Aguayo, which is a program to produce random computer science articles. SCIgen is also freely available online at \url{http://pdos.csail.mit.edu/scigen/}.
\vspace{1ex}
\noindent This book was generated on \today{} using the seed value SEED.}
}