Skip to content

Commit 46dea59

Browse files
authored
Merge after 8/12: Comparison front (#712)
* running heads in frontmatters corrected * julie 29/11
1 parent 26c14d5 commit 46dea59

File tree

6 files changed

+23
-92
lines changed

6 files changed

+23
-92
lines changed

javascript/parseXmlHtml.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,11 @@ const processTextFunctionsDefaultHtml = {
345345
<div class='permalink'>
346346
<a name='top' class='permalink'>
347347
`);
348-
writeTo.push(displayTitle);
348+
if (ancestorHasTag(node, "MATTER")) {
349+
recursiveProcessTextHtml(getChildrenByTagName(node, "NAME")[0].firstChild, writeTo);
350+
} else {
351+
writeTo.push(displayTitle);
352+
}
349353
writeTo.push(`
350354
</a>
351355
</div>

javascript/parseXmlHtml_split.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getChildrenByTagName } from "./utilityFunctions";
1+
import { getChildrenByTagName, ancestorHasTag } from "./utilityFunctions";
22
import { allFilepath, tableOfContent } from "./index.js";
33
import {
44
html_links_part1,
@@ -282,7 +282,11 @@ export const processTextFunctionsHtml = {
282282
<div class='permalink'>
283283
<a name='top' class='permalink'>
284284
`);
285-
writeTo.push(displayTitle);
285+
if (ancestorHasTag(node, "MATTER") {
286+
recursiveProcessTextHtml(node.getChildrenByTagName(node, "NAME")[0].firstChild, writeTo);
287+
} else {
288+
writeTo.push(displayTitle);
289+
}
286290
writeTo.push(`
287291
</a>
288292
</div>

xml/others/02foreword02.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<MATTER>
22
<NAME>
3-
Foreword
3+
<SPLITINLINE><JAVASCRIPT>Foreword</JAVASCRIPT></SPLITINLINE>
44
</NAME>
5-
5+
<SPLITINLINE>
6+
<JAVASCRIPT>
67
<TEXT>
78
I had the pleasure of meeting the amazing Alan Perlis and
89
talking with him a few times, when I was still a student. He and
@@ -204,5 +205,6 @@
204205
<TITLE>Lexington, Massachusetts, 2021</TITLE>
205206
</ATTRIBUTION>
206207
</SIGNATURE>
207-
208+
</JAVASCRIPT>
209+
</SPLITINLINE>
208210
</MATTER>

xml/others/02foreword84.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<MATTER>
2-
<NAME>Foreword to Structure and Interpretation of Computer Programs, 1984</NAME>
2+
<NAME>Foreword <SPLITINLINE><JAVASCRIPT>to Structure and Interpretation of Computer Programs, 1984</JAVASCRIPT></SPLITINLINE></NAME>
33
<LABEL NAME="sec:foreword84"/>
44
<TEXT>
55
Educators, generals, dieticians, psychologists, and parents program.

xml/others/03prefaces03.xml

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<MATTER>
22
<NAME>
33
<SPLITINLINE>
4-
<SCHEME>Preface to the Second Edition</SCHEME>
54
<JAVASCRIPT>Preface</JAVASCRIPT>
65
</SPLITINLINE>
76
</NAME>
@@ -128,80 +127,6 @@
128127
</ATTRIBUTION>
129128
</SIGNATURE>
130129
</JAVASCRIPT>
131-
<SCHEME>
132-
<EPIGRAPH>
133-
Is it possible that software is not like anything else, that it
134-
is meant to be discarded: that the whole point is to
135-
always see it as a soap bubble?
136-
<ATTRIBUTION>
137-
<INDEX>Perlis, Alan J.</INDEX>
138-
<AUTHOR>Alan J. Perlis</AUTHOR>
139-
</ATTRIBUTION>
140-
</EPIGRAPH>
141-
<TEXT><PDF_ONLY>\noindent</PDF_ONLY>
142-
The material in this book has been the basis of MIT's entry-level
143-
computer science subject since 1980. We had been teaching this
144-
material for four years when the first edition was published, and
145-
twelve more years have elapsed until the appearance of this second
146-
edition. We are pleased that our work has been widely adopted and
147-
incorporated into other texts. We have seen our students take the
148-
ideas and programs in this book and build them in as the core of new
149-
computer systems and languages. In literal realization of an ancient
150-
Talmudic pun, our students have become our builders. We are lucky to
151-
have such capable students and such accomplished builders.
152-
</TEXT>
153-
<TEXT>
154-
In preparing this edition, we have incorporated hundreds of
155-
clarifications suggested by our own teaching experience and the
156-
comments of colleagues at MIT and elsewhere. We have redesigned
157-
most of the major programming systems in the book, including
158-
the generic-arithmetic system, the interpreters, the register-machine
159-
simulator, and the compiler; and we have rewritten all the program
160-
examples to ensure that any Scheme implementation conforming to
161-
the IEEE Scheme standard (IEEE 1990) will be able to run the code.
162-
</TEXT>
163-
<TEXT>
164-
This edition emphasizes several new themes. The most important
165-
of these is the central role played by different approaches to
166-
dealing with time in computational models: objects with state,
167-
concurrent programming, functional programming, lazy evaluation,
168-
and nondeterministic programming. We have included new sections on
169-
concurrency and nondeterminism, and we have tried to integrate this
170-
theme throughout the book.
171-
</TEXT>
172-
<TEXT>
173-
The first edition of the book closely followed the syllabus of our MIT
174-
one-semester subject. With all the new material in the second
175-
edition, it will not be possible to cover everything in a single
176-
semester, so the instructor will have to pick and choose. In our own
177-
teaching, we sometimes skip the section on logic programming
178-
(section<SPACE/><REF NAME="sec:logic-programming"/>),
179-
we have students use the
180-
register-machine simulator but we do not cover its implementation
181-
(section<SPACE/><REF NAME="sec:simulator"/>),
182-
and we give only a cursory overview of
183-
the compiler
184-
(section<SPACE/><REF NAME="sec:compilation"/>).
185-
Even so, this is still
186-
an intense course. Some instructors may wish to cover only the first
187-
three or four chapters, leaving the other material for subsequent
188-
courses.
189-
</TEXT>
190-
<TEXT>
191-
The World Wide Web site <LINK address="https://mitpress.mit.edu/sites/default/files/sicp/index.html">of MIT Press</LINK>
192-
provides support for users of this book.
193-
This includes programs from the book,
194-
sample programming assignments, supplementary materials,
195-
and downloadable implementations of the Scheme dialect of Lisp.
196-
</TEXT>
197-
198-
<SIGNATURE>
199-
<ATTRIBUTION>
200-
<AUTHOR>Harold Abelson and Gerald Jay Sussman</AUTHOR>
201-
</ATTRIBUTION>
202-
</SIGNATURE>
203-
204-
</SCHEME>
205130
</SPLITINLINE>
206131

207132
</MATTER>

xml/others/03prefaces96.xml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
<MATTER>
22
<NAME>
3+
Prefaces
34
<SPLITINLINE>
4-
<SCHEME>
5-
Preface to the First Edition of SICP, 1984
6-
</SCHEME>
75
<JAVASCRIPT>
8-
Prefaces to Structure and Interpretation of Computer Programs, 1996<PDF_ONLY>\,\&amp;\,</PDF_ONLY><WEB_ONLY> &amp; </WEB_ONLY>1984
6+
to Structure and Interpretation of Computer Programs, 1996<PDF_ONLY>\,\&amp;\,</PDF_ONLY><WEB_ONLY> &amp; </WEB_ONLY>1984
97
</JAVASCRIPT>
108
</SPLITINLINE>
119
</NAME>
12-
<SPLITINLINE>
13-
<JAVASCRIPT>
10+
1411
<SECTION>
1512
<NAME>
16-
Preface to the Second Edition of SICP, 1996
13+
Preface <SPLITINLINE><JAVASCRIPT> to the Second Edition of SICP, 1996</JAVASCRIPT></SPLITINLINE>
1714
</NAME>
1815
<EPIGRAPH>
1916
Is it possible that software is not like anything else, that it
@@ -90,10 +87,9 @@ and downloadable implementations of the Scheme dialect of Lisp.
9087
</SECTION>
9188

9289
<SECTION>
93-
<NAME>Preface to the First Edition of SICP, 1984</NAME>
90+
<NAME>Preface to the First Edition <SPLITINLINE><JAVASCRIPT>of SICP, 1984</JAVASCRIPT></SPLITINLINE></NAME>
9491
</SECTION>
95-
</JAVASCRIPT>
96-
</SPLITINLINE>
92+
9793
<EPIGRAPH>
9894
A computer is like a violin. You can imagine a novice trying first a
9995
phonograph and then a violin. The latter, he says, sounds terrible.

0 commit comments

Comments
 (0)