Skip to content

Commit 65f48dc

Browse files
committed
Rename another asciidoc variable
1 parent f370975 commit 65f48dc

11 files changed

Lines changed: 65 additions & 65 deletions

00_intro.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,15 @@ example programs by clicking on them.
368368

369369
endif::html_target[]
370370

371-
ifdef::tex_target[]
371+
ifdef::book_target[]
372372

373373
(((download)))(((sandbox)))(((running code)))Most of the example code
374374
in this book can be found on the book's ((website)), at
375375
http://eloquentjavascript.net/code[_eloquentjavascript.net/code_],
376376
which also provides an easy way to run the programs and experiment
377377
with writing your own code.
378378

379-
endif::tex_target[]
379+
endif::book_target[]
380380

381381
(((developer tools)))(((JavaScript console)))Running JavaScript
382382
programs outside of this book's sandbox is also possible. You can opt

04_data.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ example, introducing concepts as they apply to the problem at hand.
3131
The example code will often build on functions and variables that were
3232
introduced earlier in the text.
3333

34-
ifdef::tex_target[]
34+
ifdef::book_target[]
3535

3636
(((sandbox)))The online coding sandbox for the book
3737
(http://eloquentjavascript.net/code[_eloquentjavascript.net/code_])
@@ -40,7 +40,7 @@ you decide to work through the examples in another environment, be
4040
sure to first download the full code from this chapter from the
4141
sandbox page.
4242

43-
endif::tex_target[]
43+
endif::book_target[]
4444

4545
== The weresquirrel ==
4646

@@ -494,11 +494,11 @@ ifdef::html_target[]
494494

495495
endif::html_target[]
496496

497-
ifdef::tex_target[]
497+
ifdef::book_target[]
498498

499499
pass:[\begin{equation}\phi = \frac{n_{11}n_{00}-n_{10}n_{01}}{\sqrt{n_{1\bullet}n_{0\bullet}n_{\bullet1}n_{\bullet0}}}\end{equation}]
500500

501-
endif::tex_target[]
501+
endif::book_target[]
502502

503503
The notation (!html _n_~01~!)(!book pass:[$n_{01}$]!) indicates the
504504
number of measurements where the first measurement (pizza) is false

07_elife.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ for (var i = 0; i < 5; i++) {
619619
// → … five turns of moving critters
620620
----
621621

622-
ifdef::tex_target[]
622+
ifdef::book_target[]
623623

624624
The first two maps that are displayed will look something like this
625625
(depending on the random direction the critters picked):
@@ -644,7 +644,7 @@ critters crawling around and bouncing off the walls, open this chapter
644644
in the online version of the book at
645645
http://eloquentjavascript.net[_eloquentjavascript.net_].
646646

647-
endif::tex_target[]
647+
endif::book_target[]
648648

649649
ifdef::html_target[]
650650

@@ -1029,7 +1029,7 @@ animateWorld(valley);
10291029

10301030
endif::html_target[]
10311031

1032-
ifdef::tex_target[]
1032+
ifdef::book_target[]
10331033

10341034
----
10351035
############################ ############################
@@ -1072,7 +1072,7 @@ ifdef::tex_target[]
10721072
############################ ############################
10731073
----
10741074

1075-
endif::tex_target[]
1075+
endif::book_target[]
10761076

10771077
(((stability)))(((reproduction)))(((extinction)))(((starvation)))Most
10781078
of the time, the plants multiply and expand quite quickly, but then

12_browser.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@ A simple HTML document looks like this:
175175
</html>
176176
----
177177

178-
ifdef::tex_target[]
178+
ifdef::book_target[]
179179

180180
This is what such a document would look like in the browser:
181181

182182
image::img/home-page.png[alt="My home page",width="6.3cm"]
183183

184-
endif::tex_target[]
184+
endif::book_target[]
185185

186186
(((angular brackets)))The tags, wrapped in angular brackets (“++<++”
187187
and “++>++”), provide information about the ((structure)) of the

13_dom.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ This function is then used to add a simple attribution to a quote.
394394
</script>
395395
----
396396

397-
ifdef::tex_target[]
397+
ifdef::book_target[]
398398

399399
image::img/blockquote.png[alt="A blockquote with attribution",width="8cm"]
400400

401-
endif::tex_target[]
401+
endif::book_target[]
402402

403403
== Attributes ==
404404

@@ -514,11 +514,11 @@ function id(x) { return x; }
514514
<script>highlightAllCode();</script>
515515
----
516516

517-
ifdef::tex_target[]
517+
ifdef::book_target[]
518518

519519
image::img/highlighted.png[alt="A highlighted piece of code",width="4.8cm"]
520520

521-
endif::tex_target[]
521+
endif::book_target[]
522522

523523
(((getAttribute method)))(((setAttribute method)))(((className
524524
property)))(((class attribute)))There is one commonly used attribute,
@@ -569,11 +569,11 @@ space _inside_ the element, ignoring border width.
569569
</script>
570570
----
571571

572-
ifdef::tex_target[]
572+
ifdef::book_target[]
573573

574574
image::img/boxed-in.png[alt="A paragraph with a border",width="8cm"]
575575

576-
endif::tex_target[]
576+
endif::book_target[]
577577

578578

579579
[[boundingRect]]
@@ -659,11 +659,11 @@ property.
659659
<p><a href="." style="color: green">Green link</a></p>
660660
----
661661

662-
ifdef::tex_target[]
662+
ifdef::book_target[]
663663

664664
image::img/colored-links.png[alt="A normal and a green link",width="2.2cm"]
665665

666-
endif::tex_target[]
666+
endif::book_target[]
667667

668668
(((border (CSS))))(((color (CSS))))(((CSS)))(((colon character)))A
669669
style attribute may contain one or more _((declaration))s_, which are
@@ -683,11 +683,11 @@ This text is displayed <strong>inline</strong>,
683683
<strong style="display: none">not at all</strong>.
684684
----
685685

686-
ifdef::tex_target[]
686+
ifdef::book_target[]
687687

688688
image::img/display.png[alt="Different display styles",width="4cm"]
689689

690-
endif::tex_target[]
690+
endif::book_target[]
691691

692692
(((hidden element)))The `block` tag will end up on its own line, since
693693
((block element))s are not displayed inline with the text around them.
@@ -885,11 +885,11 @@ displays a picture of a cat that floats around in an ((ellipse)).
885885
</script>
886886
----
887887

888-
ifdef::tex_target[]
888+
ifdef::book_target[]
889889

890890
image::img/cat-animation.png[alt="A moving cat head",width="8cm"]
891891

892-
endif::tex_target[]
892+
endif::book_target[]
893893

894894
(((top (CSS))))(((left (CSS))))(((centering)))(((relative
895895
positioning)))First, the picture is centered on the page, and given a

14_event.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,11 @@ on this bar makes it narrower or wider.
469469
</script>
470470
----
471471

472-
ifdef::tex_target[]
472+
ifdef::book_target[]
473473

474474
image::img/drag-bar.png[alt="A draggable bar",width="5.3cm"]
475475

476-
endif::tex_target[]
476+
endif::book_target[]
477477

478478
(((mouseup event)))(((mousemove event)))Note that the `"mousemove"`
479479
handler is registered on the whole ((window)). Even if the mouse goes
@@ -642,11 +642,11 @@ focus.
642642
</script>
643643
----
644644

645-
ifdef::tex_target[]
645+
ifdef::book_target[]
646646

647647
image::img/help-field.png[alt="Providing help when a field is focused",width="4.4cm"]
648648

649-
endif::tex_target[]
649+
endif::book_target[]
650650

651651
(((focus event)))(((blur event)))The ((window)) object will receive
652652
`"focus"` and `"blur"` events when the user moves from or to the

15_game.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,11 @@ DOMDisplay.prototype.clear = function() {
687687
</script>
688688
----
689689

690-
ifdef::tex_target[]
690+
ifdef::book_target[]
691691

692692
image::img/game_simpleLevel.png[alt="Our level rendered",width="7cm"]
693693

694-
endif::tex_target[]
694+
endif::book_target[]
695695

696696
(((link (HTML tag))))(((style sheet)))(((CSS)))The `<link>` tag, when used
697697
with `rel="stylesheet"`, is a way to load a CSS file into a page. The

16_canvas.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ through the `getContext` method on the `<canvas>` element.
124124
</script>
125125
----
126126

127-
ifdef::tex_target[]
127+
ifdef::book_target[]
128128

129129
image::img/canvas_fill.png[alt="A canvas with a rectangle",width="3cm"]
130130

131-
endif::tex_target[]
131+
endif::book_target[]
132132

133133
After creating the context object, the example draws a red
134134
((rectangle)) 100 ((pixel))s wide and 50 pixels high, with its top
@@ -181,11 +181,11 @@ positive number.
181181
</script>
182182
----
183183

184-
ifdef::tex_target[]
184+
ifdef::book_target[]
185185

186186
image::img/canvas_stroke.png[alt="Two stroked squares",width="5cm"]
187187

188-
endif::tex_target[]
188+
endif::book_target[]
189189

190190
(((default value)))(((canvas,size)))When no `width` or `height`
191191
attributes are specified, as in the previous example, a canvas element
@@ -212,11 +212,11 @@ describing such a path is rather peculiar. It is done entirely through
212212
</script>
213213
----
214214

215-
ifdef::tex_target[]
215+
ifdef::book_target[]
216216

217217
image::img/canvas_path.png[alt="Stroking a number of lines",width="2.1cm"]
218218

219-
endif::tex_target[]
219+
endif::book_target[]
220220

221221
(((canvas)))(((stroke method)))(((lineTo method)))(((moveTo
222222
method)))(((shape)))The example creates a path with a number of
@@ -245,11 +245,11 @@ start, and the shape enclosed by the resulting line is filled.
245245
</script>
246246
----
247247

248-
ifdef::tex_target[]
248+
ifdef::book_target[]
249249

250250
image::img/canvas_triangle.png[alt="Filling a path",width="2.2cm"]
251251

252-
endif::tex_target[]
252+
endif::book_target[]
253253

254254
This draws a filled triangle. Note that only two of the triangle's
255255
sides are explicitly drawn. The third, from the bottom right corner
@@ -291,11 +291,11 @@ picture illustrates this:
291291
</script>
292292
----
293293

294-
ifdef::tex_target[]
294+
ifdef::book_target[]
295295

296296
image::img/canvas_quadraticcurve.png[alt="A quadratic curve",width="2.3cm"]
297297

298-
endif::tex_target[]
298+
endif::book_target[]
299299

300300
(((stroke method)))We draw a ((quadratic curve)) from the left to the
301301
right, with (60,10) as control point, and then draw two ((line))
@@ -326,11 +326,11 @@ illustrates the behavior of such a curve:
326326
</script>
327327
----
328328

329-
ifdef::tex_target[]
329+
ifdef::book_target[]
330330

331331
image::img/canvas_beziercurve.png[alt="A bezier curve",width="2.2cm"]
332332

333-
endif::tex_target[]
333+
endif::book_target[]
334334

335335
The two control points specify the direction at both ends of the
336336
curve. The further they are away from their corresponding point, the
@@ -370,11 +370,11 @@ start of the rounded part.
370370
</script>
371371
----
372372

373-
ifdef::tex_target[]
373+
ifdef::book_target[]
374374

375375
image::img/canvas_arc.png[alt="Two arcs with different radii",width="2.3cm"]
376376

377-
endif::tex_target[]
377+
endif::book_target[]
378378

379379
(((canvas)))(((arcTo method)))(((lineTo method)))The `arcTo` method
380380
will not draw the line from the end of the rounded part to the goal
@@ -409,11 +409,11 @@ to draw a full circle.
409409
</script>
410410
----
411411

412-
ifdef::tex_target[]
412+
ifdef::book_target[]
413413

414414
image::img/canvas_circle.png[alt="Drawing a circle",width="4.9cm"]
415415

416-
endif::tex_target[]
416+
endif::book_target[]
417417

418418
(((moveTo method)))(((arc method)))(((path, canvas)))The resulting picture
419419
contains a ((line)) from the left of the full circle (first call to
@@ -478,11 +478,11 @@ people that picked a given choice.
478478
</script>
479479
----
480480

481-
ifdef::tex_target[]
481+
ifdef::book_target[]
482482

483483
image::img/canvas_pie_chart.png[alt="A pie chart",width="5cm"]
484484

485-
endif::tex_target[]
485+
endif::book_target[]
486486

487487
But a chart that doesn't tell us what it means is not very helpful. We
488488
would like to have a way to draw text to the ((canvas)).
@@ -644,11 +644,11 @@ set a horizontal scale and one to set a vertical scale.
644644
</script>
645645
----
646646

647-
ifdef::tex_target[]
647+
ifdef::book_target[]
648648

649649
image::img/canvas_scale.png[alt="A scaled circle",width="6.6cm"]
650650

651-
endif::tex_target[]
651+
endif::book_target[]
652652

653653
(((mirroring)))Scaling will cause everything about the drawn image, including the
654654
((line width)), to be stretched out or squeezed together as specified.
@@ -793,11 +793,11 @@ recursion stops when the length drops below 8.
793793
</script>
794794
----
795795

796-
ifdef::tex_target[]
796+
ifdef::book_target[]
797797

798798
image::img/canvas_tree.png[alt="A recursive picture",width="5cm"]
799799

800-
endif::tex_target[]
800+
endif::book_target[]
801801

802802
(((save method)))(((restore method)))(((canvas)))(((rotate method)))If
803803
the calls to `save` and `restore` were not there, the second recursive
@@ -1109,14 +1109,14 @@ below plugs the new display into `runGame`:
11091109

11101110
endif::html_target[]
11111111

1112-
ifdef::tex_target[]
1112+
ifdef::book_target[]
11131113

11141114
(((game,screenshot)))That concludes the new ((display)) system. The
11151115
resulting game looks something like this:
11161116

11171117
image::img/canvas_game.png[alt="The game as shown on canvas",width="8cm"]
11181118

1119-
endif::tex_target[]
1119+
endif::book_target[]
11201120

11211121
[[graphics_tradeoffs]]
11221122
== Choosing a graphics interface ==

0 commit comments

Comments
 (0)