Skip to content

Commit 663aad3

Browse files
committed
Fix some inline CSS/span syntax
1 parent 5324cc3 commit 663aad3

7 files changed

Lines changed: 62 additions & 62 deletions

03-building-a-block.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ all sprites, or only to the current sprite and its children.
4040

4141
In this dialog box, you can choose the block's palette, shape, and name.
4242
With one exception, there is one color per
43-
palette, e.g., all {span .mono}[Motion] blocks are blue. But the {span .mono}[Variables] palette
43+
palette, e.g., all {span .mono}`Motion` blocks are blue. But the {span .mono}`Variables` palette
4444
includes the orange variable-related blocks and the red list-related
4545
blocks. Both colors are available, along with an "`Other`" option that
46-
makes grey blocks in the {span .mono}[Variables] palette for blocks that don’t fit any
46+
makes grey blocks in the {span .mono}`Variables` palette for blocks that don’t fit any
4747
category.
4848

4949
There are three block shapes , following a
@@ -55,7 +55,7 @@ Predicates, which is the technical term for reporters that report
5555
Boolean (true or false) values.
5656

5757
Suppose you want to make a block named “square” that draws a square. You
58-
would choose {span .mono}[Motion], Command, and type “square” into the name field.
58+
would choose {span .mono}`Motion`, Command, and type “square” into the name field.
5959
When you click "`OK`", you enter the {index}`Block Editor`.
6060
This works just like making a script in the sprite’s scripting area,
6161
except that the “hat” block at the top, instead of saying something like
@@ -68,7 +68,7 @@ custom block, then click OK:
6868

6969
{img alt="image503.png" width="4.62in"}`images/03-building-a-block/image503.png`
7070

71-
Your block appears at the bottom of the {span .mono}[Motion] palette. Here’s the block
71+
Your block appears at the bottom of the {span .mono}`Motion` palette. Here’s the block
7272
and the result of using it:
7373

7474
{img alt="image524.png" width="4.20in"}`images/03-building-a-block/image524.png`
@@ -109,7 +109,7 @@ You can now drag the orange variable down into the script, then click okay:
109109

110110
{img alt="image511.png" width="1.47in"}`images/03-building-a-block/image511.png`
111111

112-
Your block now appears in the {span .mono}[Motion] palette with an input box: ![image512.png](images/03-building-a-block/image512.png) <!-- style="width:0.69792in;height:0.25in" / --> You can draw
112+
Your block now appears in the {span .mono}`Motion` palette with an input box: ![image512.png](images/03-building-a-block/image512.png) <!-- style="width:0.69792in;height:0.25in" / --> You can draw
113113
any size square by entering the length of its side in the box and
114114
running the block as usual, by clicking it or by putting it in a script.
115115

@@ -236,11 +236,11 @@ The window shows all of your
236236
global custom blocks. You can uncheck some of the checkboxes to select
237237
exactly which blocks you want to include in your library. (You can
238238
"`right-click`" or "`control-click`" on the export window for a menu that lets
239-
you check or uncheck all the boxes at once.) Then press "`OK`" An {span .mono}[XML] file
239+
you check or uncheck all the boxes at once.) Then press "`OK`" An {span .mono}`XML` file
240240
containing the blocks will appear in your Downloads location.
241241

242242
To import a block library, use the "`Import…`" command in the "`File`" menu,
243-
or just drag the {span .mono}[XML] file into the Snap<em>!</em> window.
243+
or just drag the {span .mono}`XML` file into the Snap<em>!</em> window.
244244

245245
Several block libraries are included with Snap<em>!</em>; for details about
246246
them, see @sec-libraries.

05-typed-inputs.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ data type
1010

1111
## Scratch’s Type Notation
1212

13-
Prior to version 3, Scratch block inputs came in two types: {span .mono}[Text-or-number] type and {span .mono}[Number] type. The former is
13+
Prior to version 3, Scratch block inputs came in two types: {span .mono}`Text-or-number` type and {span .mono}`Number` type. The former is
1414
indicated by a rectangular box, the latter by a rounded box: {inline alt="image654.png" class="image-inline"}`images/05-typed-inputs/image654.png`. A third
15-
Scratch type, {span .mono}[Boolean] (true/false), can be used in certain {span .mono}[Control]
15+
Scratch type, {span .mono}`Boolean` (true/false), can be used in certain {span .mono}`Control`
1616
blocks with hexagonal slots.
1717

18-
The Snap<em>!</em> types are an expanded collection including {span .mono}[Procedure], {span .mono}[List],
19-
and {span .mono}[Object] types. Note that, with the exception of {span .mono}[Procedure] types, all
18+
The Snap<em>!</em> types are an expanded collection including {span .mono}`Procedure`, {span .mono}`List`,
19+
and {span .mono}`Object` types. Note that, with the exception of {span .mono}`Procedure` types, all
2020
of the input type shapes are just reminders to the user of what the
2121
block expects; they are not enforced by the language.
2222

@@ -56,31 +56,31 @@ find the type you want.
5656
{img alt="image659.png" width="6.82in"}`images/05-typed-inputs/image659.png`
5757

5858
The second row of input types
59-
contains the ones found in Scratch: {span .mono}[Number], {span .mono}[Any], and {span .mono}[Boolean]. (The
59+
contains the ones found in Scratch: {span .mono}`Number`, {span .mono}`Any`, and {span .mono}`Boolean`. (The
6060
reason these are in the second row rather than the first will become
6161
clear when we look at the column arrangement.) The first row contains the
62-
new Snap<em>!</em> types other than procedures: {span .mono}[Object], {span .mono}[Text], and {span .mono}[List]. The last two rows are the types related to procedures, discussed more fully below.
62+
new Snap<em>!</em> types other than procedures: {span .mono}`Object`, {span .mono}`Text`, and {span .mono}`List`. The last two rows are the types related to procedures, discussed more fully below.
6363

64-
The {span .mono}[List] type is used for first class lists, discussed
64+
The {span .mono}`List` type is used for first class lists, discussed
6565
in Chapter IV. The red rectangles inside the input slot are meant
6666
to resemble the appearance of lists as Snap<em>!</em> displays them on the
6767
stage: each element in a red rectangle.
6868

69-
The {span .mono}[Object] type is for sprites, costumes, sounds,
69+
The {span .mono}`Object` type is for sprites, costumes, sounds,
7070
and similar data types.
7171

72-
The {span .mono}[Text] type is really just a variant form of the Any
72+
The {span .mono}`Text` type is really just a variant form of the Any
7373
type, using a shape that suggests a text input.[^5]
7474

75-
[^5]: In Scratch, every block that takes a {span .mono}[Text-type] input has a default
75+
[^5]: In Scratch, every block that takes a {span .mono}`Text-type` input has a default
7676
value that makes the rectangles for text wider than tall. The blocks
77-
that aren’t specifically about text either are of {span .mono}[Number] type
77+
that aren’t specifically about text either are of {span .mono}`Number` type
7878
or have no default value, so those rectangles are
79-
taller than wide. At first some of us (bh) thought that {span .mono}[Text] was a
79+
taller than wide. At first some of us (bh) thought that {span .mono}`Text` was a
8080
separate type that always had a wide input slot; it turns out that this
8181
isn’t true in Scratch (delete the default text and the rectangle
8282
narrows), but we thought it a good idea anyway, so we allow Text-shaped
83-
boxes even for empty input slots. (This is why {span .mono}[Text] comes just above {span .mono}[Any]
83+
boxes even for empty input slots. (This is why {span .mono}`Text` comes just above {span .mono}`Any`
8484
in the input type selection box.)
8585

8686
:::{index} jigsaw-piece blocks
@@ -139,8 +139,8 @@ in an arbitrary input instead of using the pulldown menu.
139139

140140
Custom blocks can
141141
also have such inputs. To make a pulldown input, open the long form
142-
input dialog, choose a text type ({span .mono}[Any], {span .mono}[Text], or {span .mono}[Number]) and click the {inline alt="image658.png"}`images/05-typed-inputs/image658.png` <!-- style="width:0.13194in;height:0.13194in" -->
143-
icon in the bottom right corner, or {span .mono}[control/right-click] in the dialog.
142+
input dialog, choose a text type ({span .mono}`Any`, {span .mono}`Text`, or {span .mono}`Number`) and click the {inline alt="image658.png"}`images/05-typed-inputs/image658.png` <!-- style="width:0.13194in;height:0.13194in" -->
143+
icon in the bottom right corner, or {span .mono}`control/right-click` in the dialog.
144144
You will see this menu:
145145

146146
Click
@@ -211,7 +211,7 @@ type array.
211211

212212
The "`single input`" option: In Scratch, all inputs are in this category.
213213
There is one input slot in the block as it appears in its palette. If a
214-
single input is of type {span .mono}[Any], {span .mono}[Number], {span .mono}[Text], or {span .mono}[Boolean], then you can
214+
single input is of type {span .mono}`Any`, {span .mono}`Number`, {span .mono}`Text`, or {span .mono}`Boolean`, then you can
215215
specify a {index}`default value` that will be shown in that
216216
slot in the palette, like the “10” in the <code>move (10) steps block</code>. In the
217217
prototype block at the top of the script in the Block editor, an an input with
@@ -225,7 +225,7 @@ The "`Multiple inputs`" option:
225225
The <code>list</code> block introduced earlier accepts any number of inputs to
226226
specify the items of the new list. To allow this, Snap<em>!</em> introduces the
227227
arrowhead notation (⏴⏵) that expands and contracts the block, adding and
228-
removing input slots. ({span .mono}[Shift-clicking] on an arrowhead adds or removes
228+
removing input slots. ({span .mono}`Shift-clicking` on an arrowhead adds or removes
229229
three input slots at once.) Custom blocks made by the Snap<em>!</em> user have
230230
that capability, too. If you choose the "`Multiple inputs`" button, then
231231
arrowheads will appear after the input slot in the

06-procedures-as-data.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ and `map` above. This notation indicates that *the block itself,* not the
9191
number or other value that the block would report when called, is the
9292
input. If you want to use a block itself in a non-Reporter-type (e.g.,
9393
Any-type) input slot, you can enclose it explicitly in a ring, found at
94-
the top of the {span .mono}[Operators] palette.
94+
the top of the {span .mono}`Operators` palette.
9595

9696
{img alt="image744.png" width="1.08in"}`images/06-procedures-as-data/image744.png`
9797

@@ -152,10 +152,10 @@ otherwise, “reporter” includes predicates. When the word is capitalized
152152
inside a sentence, it means specifically oval-shaped blocks. So, “nested
153153
reporters” includes predicates, but “a Reporter-type input” doesn’t.)
154154

155-
Although an {span .mono}[Any-type] input slot (what you get if you use the small
155+
Although an {span .mono}`Any-type` input slot (what you get if you use the small
156156
input-name dialog box) will accept a procedure input, it doesn’t
157157
automatically ring the input as described above. So the declaration of
158-
{span .mono}[Procedure-type] inputs makes the use of your custom higher order block
158+
{span .mono}`Procedure-type` inputs makes the use of your custom higher order block
159159
much more convenient.
160160

161161
Why would you want a block to take a procedure as input? This is actually
@@ -173,7 +173,7 @@ the C when the block is used is the input named <var>action</var> in the body of
173173
the script. The only way to make sense of the variable <var>action</var> is to
174174
understand that its value is a script.
175175

176-
To declare an input to be {span .mono}[Procedure-type], open the input name dialog as usual, and click on the arrowhead:
176+
To declare an input to be {span .mono}`Procedure-type`, open the input name dialog as usual, and click on the arrowhead:
177177

178178
{img alt="image509.png" width="2.58in"}`images/06-procedures-as-data/image509.png`
179179

@@ -355,7 +355,7 @@ stop Snap<em>!</em> from filling a slot that should really remain empty.
355355

356356
Here’s
357357
an example of a situation in which a procedure must be explicitly marked
358-
as data by pulling a `ring` from the {span .mono}[Operators] palette and putting the
358+
as data by pulling a `ring` from the {span .mono}`Operators` palette and putting the
359359
procedure (block or script) inside it:
360360

361361
{img alt="image734.png" width="5.19in"}`images/06-procedures-as-data/image734.png`
@@ -420,7 +420,7 @@ an infinite loop. We need `my if then else` block to be able to select
420420
only one of the two alternatives to be evaluated.
421421

422422
We have a mechanism to allow that: declare the then variable <var>yes</var> and else variable <var>no</var> inputs to
423-
be of type {span .mono}[Reporter] rather than type {span .mono}[Any]. Then, when calling the block,
423+
be of type {span .mono}`Reporter` rather than type {span .mono}`Any`. Then, when calling the block,
424424
those inputs will be enclosed in a `ring` so that the expressions
425425
themselves, rather than their values, become the inputs:
426426

@@ -458,16 +458,16 @@ transformation of constant data into constant functions) is called a
458458
*special form*. To turn our `if` block into a
459459
special form, we edit the block’s prototype, declaring the inputs <var>yes</var>
460460
and <var>no</var> to be of type "`Any (unevaluated)`"
461-
instead of type {span .mono}[Reporter]. The script for the block is still that of the
461+
instead of type {span .mono}`Reporter`. The script for the block is still that of the
462462
second version, including the use of `call` to evaluate either <var>yes</var> or <var>no</var>
463-
but not both. But the slots appear as white {span .mono}[Any-type] rectangles, not
464-
{span .mono}[Reporter-type] rings, and the factorial block will look like our first
463+
but not both. But the slots appear as white {span .mono}`Any-type` rectangles, not
464+
{span .mono}`Reporter-type` rings, and the factorial block will look like our first
465465
attempt.
466466

467467
In a special form’s prototype, {index}`the unevaluated`
468468
input slot(s) are indicated by a lambda ("`λ`") next to the input name, just
469-
as if they were declared as {span .mono}[Procedure] type. They
470-
*are* {span .mono}[Procedure] type, really; they’re just disguised to the user of the
469+
as if they were declared as {span .mono}`Procedure` type. They
470+
*are* {span .mono}`Procedure` type, really; they’re just disguised to the user of the
471471
block.
472472

473473
Special forms trade off implementor sophistication
@@ -494,14 +494,14 @@ Scratch doesn’t have custom C‑shaped blocks, it can afford to handwave
494494
away the distinction between evaluated and unevaluated Booleans, but
495495
Snap<em>!</em> can’t. The pedagogic value of special forms is proven by the
496496
fact that no Scratcher ever notices that there’s anything strange about
497-
the way in which the hexagonal inputs in the {span .mono}[Control] blocks are
497+
the way in which the hexagonal inputs in the {span .mono}`Control` blocks are
498498
evaluated.
499499

500500
Also, the C-shaped slot familiar to Scratch users
501501
is an unevaluated procedure type; you don’t have to use a `ring` to keep
502502
the commands in the C-slot from being run before the C-shaped block is
503503
run. Those commands themselves, not the result of running them, are the
504-
input to the C-shaped {span .mono}[Control] block. (This is taken for granted by
504+
input to the C-shaped {span .mono}`Control` block. (This is taken for granted by
505505
Scratch users, especially because Scratchers don’t think of the contents
506506
of a C-slot as an input at all.) This is why it makes sense that
507507
“C‑shaped” is on the fourth row of types in the long form input dialog,

0 commit comments

Comments
 (0)