Section 7: Format Commands

In Section 5, Part 1 of the Learner Level, we introduced the formatter, which BEX uses to format the text you send to a printer, brailler, or voice device. In Learner Level Section 6, we explained how you enter format indicators to instruct the formatter to break text into lines and paragraphs, as well as introduced ten fundamental format commands to instruct BEX to center, underline, and create margins and tabs. With this basic information under your belt, you're almost ready to learn about BEX's many format commands. First, you need to know some more detail about how the formatter works.

Part 1: The Formatter

The formatter determines output for three options: on the Main Menu, options P - Print chapters and M - Multi-function print; and on the Second Menu, option W - Write chapters to textfile. Option W is like printing to a file on disk--more details appear in Section 10. The formatter uses the carriage width to assemble one line of text at a time. When you print to SW, for example, the formatter uses a carriage width of 80 to build each line. When you print to SH, the formatter uses a carriage width of 40. At the Learner Level, you only used the carriage width and form length that you defined in your configuration. In Section 6, we mentioned that you can define carriage width and form length for generic inkprint printing without reconfiguration by answering N at the Which printer: prompt. In Parts 4 and 6 of this Section, we describe how you can change carriage width and form length within a document using format commands.

All format indicators and format commands are instructions to the formatter. The formatter is quite literal minded, and only recognizes the commands when you enter them correctly. To give you more flexibility, the formatter lets you instruct it to do some quite strange things. It's even possible to tell the formatter to do truly stupid things--but we try to warn you about these. Part of becoming skilled at formatting text with BEX is recognizing which format command to use in a particular situation. Because BEX has many format commands, you frequently have more than one choice in a given situation.

The formatter's memory is persistent, which makes printing large amounts of text easy. You can create set-up chapters that contain most of the formatting instructions, and use the set-up chapters again and again. An example of this was the LETTERHEAD chapter M. J. Prude used to start off all his letters.

In this Section, we review a number of concepts and commands we talked about in the Learner Level, as well as introduce new format commands.

Syntax for Format Indicators and Commands

Format indicators are all four keystrokes long: space, dollar sign, lowercase letter, space.

Format commands vary in length. They start with two dollar signs, followed by a lowercase letter or letters, sometimes followed by a number--represented here with . When entering format commands with a braille keyboard, you must use the ed sign, dots 1-2-4-6, for the dollar sign, and Nemeth or "dropped" numbers for the value shown by # (the number sign).

The $$ command must be immediately preceded by one of five choices:

The Importance of Spaces

We recommend that you precede and follow all format commands with a single space or hard <CR>. The single space following a format command is "thrown away" as BEX prints. When you enter format commands this way, each format command is a single BEX word, facilitating cursor movement in the Editor. More importantly, the Grade 2 and Back from Grade 2 translators must be able to distinguish between format commands, which are never translated, and words, which are translated. Compare what happens to this text:
$$ccomputer literacy#[_$]#$$c<space>computer literacy
when it's sent through the Grade 2 translator. (Do it and see!). When you don't type a space between the $$c centering command and the word computer, the translator does not place the com sign, shown in screen braille by the hyphen.

When Format Commands Take Effect

All format commands must precede the text you wish them to influence. Some commands control format for one paragraph, while others influence the placement of all subsequent lines. Some commands affect placement of text on one line, while others control when the formatter moves to a new output page. Some commands create repeating elements that appear on every output page, and some commands' function is so bizarre that we've put them in the "miscellaneous" category.

The current line concept

The better you understand how BEX's formatter operates, the better your results. We mentioned earlier that the formatter assembles one entire line at a time. It uses the $$ commands you place in your text to format this current line, then hands the line to BEX to print. The line the formatter works with is defined in either of two ways: by new line commands you enter in your text, or by the soft <CR>s BEX places at the end of each line as it formats.

Because the formatter prepares each line before printing the line, commands such as $$p-# work. When the formatter encounters the command $$p-2, it places the next character two positions back on the line; whatever character was there before is gone. The formatter could not do this if the line were being printed and formatted at the same time. (See Part 5 for further discussion of $$p#).

However, it is precisely for this reason that you must be vigilant about putting new-line ( $l ) or paragraph ( $p ) indicators before commands that take affect on a new line; commands such $$r, $$h, and $$c. You also must be vigilant about creating new lines after commands that need them, such as $$ml# and $$mr#. When the formatter encounters these commands, it makes note to execute them on the next line it formats. It does not reformat the current line it is working on, but waits for the next line.

You must also remember to place a new-line ( $l ) or paragraph ( $p ) indicator before a line which is centered. Otherwise, when the formatter encounters the $$c, it will go to the beginning of the entire line it is preparing, and center that text, instead of taking just the text that appears after the command.

Position zero

When we talk about the placement of the characters on a printed line, we will be referring to the character's position. A position is equivalent to the width of one printed character. Position zero is the leftmost point that the printhead on your printer can go to. Therefore, if your carriage width is 72, your printer will print characters on positions zero through 71. Position zero can move around on your paper; its exact placement depends on how you set your printer's internal margins. Perhaps you set them through the use of automatic set-up procedures (discussed in User Level Section 3, Part 3). However, in terms of how BEX's formatter view your text, position zero is always the leftmost position on the printed page.

You're about to learn about relative commands that use a numerical value that can alter the horizontal position of text on the current line. For example, suppose BEX's formatter prints a character on position 8. Next, the formatter encounters the command $$p15; it then prints the next character at position 15. Part 10 gives further examples of positioning characters at a specific point on a line.

Part 2: Carriage Width and Form Length

BEX allows you to define your carriage width and form length in three ways: in your configuration; when you answer N at the Which printer: for a new printer when printing; and within your document with format commands. Whatever way you choose to specify these values, they provide the fundamental image of the page that the formatter uses. Many other format commands position text relative to the carriage width and form length. We draw your attention to this relationship in the detailed descriptions that follow.

Establish Carriage Width and Form Length When You Configure

We recommend that, where possible, you establish your carriage width and form length when you configure your printer. While you are answering the questions in the printer section, you can get suggested values for carriage width and form length by entering <CR> alone at these prompts. Since BEX has room to store four printer specifications, you can establish four printers that are all the same physical printer, but use four different sets of values for carriage width and form length. You can also establish carriage width and form length for an inkprint printer by entering N at the Which printer: prompt.

The advantage of these two approaches is that the carriage width and form length remain constant throughout your document. It makes your documents more "portable" between print and braille and between different printers.

Because many other format commands use your carriage width and form length as reference points, changing your carriage width or form length within a document can interfere with the execution of other format commands. When you do use format commands to establish carriage width and form length, always place them at the very beginning of your list of chapters to print. For predictable results, never change carriage width or form length in the middle of a document!

The formatter and carriage width

The formatter places soft <CR>s in your text automatically, when it recognizes that a word won't fit in the number of characters allowed on the line. The maximum number of characters on any line is determined by the interaction of the carriage width with the format commands that control paragraph indent, and left and right margins. We recommend that you set your carriage width for the maximum number of characters you want to appear on any line, and then use margins to temporarily narrow the carriage width.

The formatter and form length

BEX's formatter uses the form length value to automatically break text into output pages. At the start of each page, the formatter starts counting every <CR> it sends out. When the number of <CR>s reaches the form length, the formatter sends out a form feed command, or control-L, to the printer. A form length of 55 establishes 55 possible <CR>s for the page. Since the formatter counts every <CR>, lines that do not contain text are still counted as part of your form length. With double spacing set by $$l2, (lowercase l digit two) text may appear on lines 1, 3, 5, ... 51, 53, 55. Exactly where line 1 appears on the output page depends where you set top-of-form on your printer. Remember that if you use the $$mt# top margin command, the formatter moves line 1 down # lines.

The formatter knows that a heading (begun with either $$c or $$h) all alone on the bottom of a page looks stupid, so it "looks ahead" to make sure that there's room for at least the first line of the next paragraph before executing the $$c or $$h command. When there isn't enough room, then the formatter sends the form feed message early. The amount BEX "looks ahead" depends how you set paragraph line spacing with $$s#.

A form length of zero tells the formatter to not bother counting <CR>s. If your printer is smart enough, it may be able to break pages itself, and you would want to enter $$f0 into your text. Some voice devices prefer a form length of zero. However, giving BEX's formatter a form length of zero disables some of BEX's features. For example, you cannot use BEX's page numbering or running headers or footers with a form length of zero. BEX will not prevent centered headings at the bottom of a page. Even when your printer has automatic page breaking, think twice before using a form length of zero.

When you do not use a form length of zero and your printer automatically breaks pages, you must prevent conflicts between BEX's page breaks and your printer's page breaks. To let BEX break your pages, make sure your printer is not set for a page length which is less than BEX's form length.

Part 7 discusses how to create running headers and footers in great detail. BEX can only execute these types of commands only when your form length is four or more lines.

Carriage Width and Form Length in Printing to the Screen

All screen modes have their own built-in defaults for carriage width and form length (listed in Section 6, Part 1). You enter $$w# and $$f# commands to establish carriage width and form length different than what you configured. It's quite possible that these values exceed the built-in defaults for a particular screen mode.

How BEX handles this situation depends on which screen mode you print to. (It doesn't matter whether you add voice output with plus sign, letter V.) When you print to the 80-column W screen or the 40-column N screen, BEX's formatter executes any $$w# and $$f# commands you have placed in your text. When lines of text are longer than the screen's width, one line of output is shown as two lines on the screen. For all other screen modes, BEX always uses the default carriage width and form length for that screen, and ignores any $$w# or $$f# commands in your chapter.

The screen modes behave as described whether you print to S+V (screen with voice) or to screen alone.

Part 3: Formatting Paragraphs

By this point, the paragraph ( $p ) indicator is quite familiar. We've stressed how useful it is, especially since the formatter formats paragraphs differently for print and braille.

Paragraph Indent: $$i#

As we documented in Learner Level Section 6, paragraph indent is controlled by $$i#. The value # always moves relative to the existing left margin. Default value for print is $$i5; for braille it is $$i2.

When you have the default left margin of zero: $$i5 means the first character of every paragraph appears at position 5; $$i-5 means the first five characters of every paragraph don't print; and $$i0 means every paragraph starts at position zero (block style paragraphs).

Two reasons you may want to use $$i# are to create outdenting or to create block-style paragraphs. A negative indent combined with a positive margin makes "outdenting" (detailed in Learner Level, Section 9, Part 4). A zero indent makes "block style" paragraphs; usually you increase the paragraph line spacing to at least triple-spacing to make your paragraphs stand out.

When you establish a left margin at position 10: $$i5 means every paragraph starts at position 15; $$i-5 means every paragraph outdents, starting at position 5; and $$i0 creates block-style paragraphs, with the first line of each paragraph even with the left margin.

Paragraph Spacing: $$s#

As we said in the Learner Level, paragraph line spacing is controlled with $$s#. The default for print is double spacing, $$s2; for braille it's single spacing, $$s1. Place $$s# before the ( $p ) indicator you wish to affect. Line spacing at paragraphs is independent of the line spacing set with $$l#. The three commands $$l, (lowercase l digit one) $$s2 $$i0 make block style paragraphs for business letters.

Centering: $$c

As we said in the Learner Level, center text by placing a $$c before the first word you want centered. We advise you to make your centered text into paragraphs. Place ( $p ) before and after centered text to make one blank line before and after the heading. Turn off centering with ( $p ), ( $l ), or <CR>. When you want to center more than one line, and you want to control where these lines break, you must format each line separately. To do this, you must separate the lines with a new-line ( $l ) or paragraph ( $p ) indicator, or a hard <CR>, and type $$c at the start of each line:
$l#[_$]#$$c The Story of Helen Keller#[_$]#$l#[_$]#$$c and Anne Sullivan Macy#[_$]#$l

When you have a heading longer than about 20 characters less than your carriage width, the formatter divides the heading between two or more lines. However, it tries to fit as many words as possible on the first centered line, and then centers the remaining words on the next line. The result may be heading with uneven line lengths. If this is unacceptable to you, divide the lines manually, as above.

Headings: $$h

As we documented in the Learner Level, use $$h to center and underline a heading. Always precede and finish a heading with ( $p ). When printed to a brailler, $$h and $$c are executed exactly the same. When you do not want a paragraph ( $p ) indicator after your heading, will turn off the underlining, and ( $l ) will stop the centering. When you want to center and underline more than one line, and you want to control where these lines break, you must enter $$h at the start of each line.

Flush Right: $$r

$$r places all the text on the current line against the right margin. Turn off flush right with a ( $p ), ( $l ), or <CR>. When you want to place more than one line against the right margin, and you want to control where these lines break, you must enter $$r at the start of each line.

Why BEX doesn't justify left and right

Fully justified paragraphs are standard in typeset text. Typesetting software contains many routines that make fully justified text readable. Most microcomputer programs that perform left-and-right justification achieve this task by forcibly distributing the extra white space between words and letters. This type of justification coupled with a fixed-space printer is difficult to read and frequently looks quite ugly. To make justification look good, you need three things: a printer that supports both proportional spacing and the ability to squeeze letters closer together in small increments, and excellent automatic hyphenation software. BEX does not do these things; we've chosen to make BEX powerful in other areas.

Part 4: Controlling Horizontal Format for Many Lines

For a discussion of tabs, see Part 5, Controlling Horizontal Format for One Line.

Carriage Width: $$w#

$$w# allows you to specify carriage width with a document. The value # is measured in characters; its range is 2 to 240. Entering a $$w# command clears any left or right margins you've previously established with any $$ml# or $$mr# commands. The $$w# command is suppressed when printing to any screen except SN and SW.

Left Margin: $$ml#

As we said in the Learner Level, $$ml# (lowercase m lowercase like) changes the left margin. The left margin establishes where every line starts, except for the first line of a paragraph. The first line of each paragraph is controlled by the interaction bet $$i# and $$ml#. The value # can be a number (with or without a plus or minus sign) or the asterisk character. The default value for left margin is $$ml0 for all printers.

When the number has a plus or minus sign, the value # is the relative position measured from the existing left margin. When the left margin is zero, $$ml+10 moves the left margin 10 to the right, to position 10. Enter $$ml+10 again, and the left margin is at position 20. Enter $$ml-8 now, and the left margin moves eight characters to the left to position 12.

When the number has no plus or minus sign, the value # sets the left margin at position . For example, when you enter $$ml20 into your text, the left margin is set at position 20. You can establish a "standard" left margin with a plain number, for example, $$ml10, and then later make temporary changes with relative margins.

Use the asterisk character to establish a left margin at the current position. $$ml* can be a timesaver. Suppose you want to outdent a word from its definition. On a typewriter, you would establish a tab stop after you typed the word, then tab over to that tab stop for every line in the definition. With $$ml*, you can avoid that hassle:
Keyword#[_$]#-#[_$]#$$ml* Explanatory text that runs on without having to use tabs.
produces:
Keyword - Explanatory text that runs on without having to
use tabs.

Every time you use a $$ml# command, you clear the previous left margin. The new left margin established by $$ml# takes effect at the beginning of the next new line after the command. This new line could be created by a soft <CR> from BEX's formatter, or an explicit new line triggered by ( $p ), ( $l ) or a hard <CR>. Place $$ml# commands immediately before ( $p ) or ( $l ) indicators, so you can control exactly where the new left margin begins. See more examples of left margin commands in Part 10.

Right Margin: $$mr#

The right margin command is the mirror image of the left margin command. The value # can be a number with or without a plus or minus sign. Every time you use a $$mr# command, you clear the previous right margin. The default value for right margin is $$m0" for all printers. Place $$mr# commands after ( $p ) or ( $l ) indicators. The right margin command affects the formatter's behavior at the end of the line, so it takes effect immediately.

Measure the value # in positions from the right margin. When $$mr# has a plus sign, the right margin increases in positions to the left, and you have greater "white" or empty space along the right edge of the paper. When $$mr# has a minus sign, the right margin decreases to the right, and you have less empty space on the right edge of the paper.

For example, with a carriage width of 72 and a right margin of $$mr10, no characters appear between positions 62 and 72: so you have ten more positions of empty space along the right edge of the paper. Enter $$mr+5, and the right margin increases five positions to the left, so that no characters print between positions 57 and 72; you have an additional five positions of empty space along the right margin. Enter $$mr-9 now, and the right margin decreases nine positions to the right, so no characters print between 66 and 72; the right margin has narrowed. Enter $$mr0, and the full carriage width is available for printing.

Using left and right margins together

Here's a quick example of using left and right margins. You are writing a term paper which is double spaced, with no margins. Any long quotation should be single spaced with left and right margins increased by 5. Immediately before the ( $p ) at the start of the quotation, enter: $$l1 (lowercase l digit one) $$ml+5 $$mr+5. Immediately before the ( $p ) at the end of the quotation, enter: $$l2 (lowercase l digit two) $$ml-5 $$mr-5 to change the margins and line spacing back to their previous value.

Top Margin: $$mt#

$$mt# creates a top margin in your printout. The value # is equal to the number of soft <CR>s added after a form feed. The default value is zero. The $$mt# command is different from all other format commands: it does not change the number of lines of text printed per page. What changes is where the text starts on the page. You can't use a negative number with this command.

Line Spacing: $$l#

$$l# changes how far apart lines are on the page; it defines how many <CR>s BEX sends to the printer when moving to a new line. That new line could be one you explicitly requested one by typing ( $l ) or a hard <CR> in your chapter. The new line could also be a soft <CR> BEX creates as it fills up the carriage width. The default value is $$l1 (lowercase l digit one) for both print and braille. Line spacing $$l# and paragraph spacing $$s# act independently. It's perfectly possible to instruct the printer to triple space all lines, but only single-space at paragraphs, by entering $$l1 $$s3. The result would be quite hard to read, however.

$$l0 (lowercase l digit zero) sets no soft <CR> at the end of a line, and turns a hard <CR> into a space. BEX still sends <CR>s for each paragraph ( $p ) indicator, unless you also set $$s0. Most other word processors use hard <CR> to mark the end of a paragraph. When you type $$l0 $$s1 $$i0 in your document before printing to another computer, you create text that's easy for another word processor to use. $$l0 is the default for option W - Write chapters into a textfile on the Second Menu--more details are in Section 10.

() Caution! Do not use $$l0 when printing to the screen or to a Review class printer. $$l0 interrupts the default margins and causes BEX to crash. You may have to reboot.

Part 5: Controlling Horizontal Format for One Line

New Line

There are three ways new lines are created in your output. The formatter places soft <CR>s in your text automatically, when it recognizes that a word won't fit in the number of characters left in your carriage width on a given line. The maximum number of characters on any line is determined by the interaction of the carriage width, margins, and paragraph indent commands.

You can force a new line two ways: the new-line indicator ( $l ) or the hard <CR>. While longer, the ( $l ) indicator is less ambiguous than a hard <CR> when encountered in paperless braille.

Tabs

Set tab stops with $$t#. The value # can be a number (with or without a plus or minus sign) or the asterisk character. Examples of simple tabs appear in the Learner Level, Section 6, Part 3. Examples of using $$t# when the value # is positive or negative appear in this Section, Part 10.

You can set tab stops at the beginning of a chapter, or directly before where you need them in the chapter. Clear all tab stops at once with $$tc. It's a good idea to enter $$tc immediately before you establish new tabs; it ensures that only the latest tab values are in use.

Move to the next tab stop with ($$) which is always four keystrokes. The leading and following spaces are integral to the command. Part 10 discusses using tabs.

Immediate Horizontal Positioning: $$p#

Use $$p# to place text at a specific position on the line. The $$p# commands are a much faster alternative to tabs or margins, and are handy for filling out forms. You can use $$p# to place text to the left outside of your current left margin; you can also create precise charts and diagrams. The use of $$p# and $$t# is extensively demonstrated in Part 10.

The value # can take two forms: it can be a number preceded by a plus or minus sign, or it can be a number from your carriage width, that is, from zero to one less than your carriage width. When the value # has a plus or minus sign, the formatter moves the text right or left # number of positions over from its current position on the line.

Determining exactly how many positions the formatter moves over is a bit tricky to understand. Suppose you want to place five blank spaces between the words one and two. You might think that typing one $$p+5 two would do it, but try it and see: you get six spaces between! That's because when BEX's formatter encounters the $$p+5, it has already printed the e in one. It is not until after it has printed the space following the e that it encounters the $$p+5 command. Only then does it count the five positions over to place the t in two. The result is that you get six spaces between one and two instead of five:

Use $$p# to place text at a specific position on the line. The $$p# commands are a much faster alternative to tabs or margins, and are handy for filling out forms. You can use $$p# to place text to the left outside of your current left margin; you can also create precise charts and diagrams. The use of $$p# and $$t# is extensively demonstrated in Part 10.

The value # can take two forms: it can be a number preceded by a plus or minus sign, or it can be a number from your carriage width, that is, from zero to one less than your carriage width. When the value # has a plus or minus sign, the formatter moves the text right or left # number of positions over from its current position on the line.

Determining exactly how many positions the formatter moves over is a bit tricky to understand. Suppose you want to place five blank spaces between the words one and two. You might think that typing one $$p+5 two would do it, but try it and see: you get six spaces between! That's because when BEX's formatter encounters the $$p+5, it has already printed the e in one. It is not until after it has printed the space following the e that it encounters the $$p+5 command. Only then does it count the five positions over to place the t in two. The result is that you get six spaces between one and two instead of five:
one $$p+5 two
produces:
one<space><space><space><space><space><sp ace>two
The solution is to use $$p+4 instead:
one $$p+4 two
produces the five spaces you want:
one<space><space><space><space><space>two

You must be careful when using a minus sign with the value #. When your number moves left over previous text, that text is not printed--see below for an example. $$p-# or $$p+# can be quite helpful when you are creating columns, and is faster than tabs--we show a neat trick in Part 10.

$$p# is a faster and more certain alternative to typing spaces. For example, when you wish to set off text with a number or heading to the left, use $$p# to position the heading. Suppose you have a left margin of 10. To set off your paragraphs, you type:
$$p5 1. $$p10 A definition, perhaps. $l This text is at the left margin.
This produces:
1. A definition, perhaps.
This text is at the left margin.
Because you set $$p# at the left margin (10), the rest of the paragraph aligns underneath the A on the first line.

When you don't use a plus or minus sign before the value # in $$p#, the formatter places the next character on that position on the line. In this case, the value # can be any number from zero to one less than your carriage width. You can use $$p# to place text outside your margins. In the example above, we used $$pen to place the number one outside the left margin, but within the carriage width.

$$p# overwrites your text under two circumstances. When you have a $$p-# command which places the next character of your text to the left of your current position, you lose # number of characters. For example, if you type $$p-5, you lose the five characters of your text previous to the $$p-5 command.

As we mentioned in Part 1, BEX's formatter interprets the $$ commands to build up the current line, then sends that line to the printer. It's possible for the value # in $$p# to be less than the number of your current position on the current line. If this is so, then the text between the current position and position # is overwritten as BEX builds the current line. For example, you type:
$l Educational Goal $$p10 Bachelors Degree by 1993
you get:
EducationaBachelors Degree by 1993
When BEX encountered the $$p10 command, the current line contained the characters Educational Goal. The final l was at position 15. At this point, the value 10 in $$p10 is less than the current position on the line, so the characters between position 10 and position 15 are overwritten.

Here's an example which illustrates the difference between the three types of values for $$p#: Suppose you have a sentence you want on a specific place in your printout. When you want to be absolutely sure of where it will be in the final printout, you start a new line, and use the $$p# command without a plus or minus sign:
$l $$p10 New words positioned.
places the words starting with the N in New on position 10 on the new line. When you use a plus sign, the formatter moves the words 10 positions to the right of the previous word:
Last of your text. $$p+10 New words positioned.
produces:
Last of your text. New words positioned.
When you use a minus sign, the formatter moves the text to the left:
Last of your text. $$p-10 New words positioned.
produces:
Last of yNew words positioned.
As you can see, some of the previous text has been overwritten!

Part 6: Moving to a New Page and Controlling Page Break

Form Length: $$f#

There are three ways to define form length: in your configuration; with a New printer when printing; and with the $$f# command in your text. The value # is measured in lines, and may range from 0 to 126. A $$f# command in your text overrides the form length from your configuration or from a new printer; additionally, a $$f# command cancels any of the commands that establish page numbers, and running headers and footers on the page (described in Part 7). The $$f# command is ignored when printing to any screen modes except SW or SN. When the value # is four or less, then none of these commands can be executed. A form length of zero tells the formatter to not bother counting <CR>s. Use the $$f# command very carefully: it should always be one of the first elements in your chapter. See Part 10 for examples.

Advance to Specific Line: $$a#

Use the $$a# to advance immediately to the start of line # on the output page. The value # must be greater than your current line and less than your form length. The value # must be a plain number; it can't have a minus or plus sign. It's your responsibility to coordinate the value # with the lines where text normally appears, based on the interaction of your form length, line spacing, and line spacing at paragraphs.

Form Feed Indicator: ( $f )

The form feed indicator is four keystrokes: <space>, dollar sign, lowercase f <space>. Similar to the paragraph indicator, we show this as ( $f ). When the formatter executes ( $f ), the printer immediately advances to the top of the next page.

() Caution! The ( $f ) indicator can create blank pages! When (#[_$]#f#[_$]#) is the last command in your print-stream, and you have page numbering, running headers, or running footers, then the last page of your document is blank except for the page number, header, or footer. Only use ( $f ) when you want a form feed, no matter what.

Option M - Multi-function print automatically adds one form feed to the end of the list of chapters to print. If you prefer to have the printer itself advance the sheet for you to tear off, you can print one copy using Multi-function print instead of Print, and let BEX give the printer the form feed. This is just the same as when you press the form feed button on your printer after printing text. Or you can add the commands ( $f ) or $$vn (see below) at the end of your document. These steps, however, are not necessary when you have running footers or a bottom-line page number, since these always finish on the bottom line of the final page.

Discretionary Page Breaks

BEX's three page break commands give you three different levels of control over your page breaks.

Immediate: $$vn

When you wish text to start at the top of a new page, enter $$vn at the beginning of the text. When the formatter executes $$vn, it sends out a form feed unless a form feed would create a blank page.

Variable: $$vl#

$$vl# tells the formatter to execute a form feed only when there are less than # <CR>s remaining on the page. When there are at least # <CR>s left, then the formatter doesn't do anything with the $$vl# command. When there are fewer than # <CR>s left, then the formatter moves to a new output page.

The formatter takes into account every line in your form length, whether or not text is printed on that line. When your text is double-spaced, or when you have skipped lines with $$vs#, you need to count the blank spaces between the lines as well as the lines with text. When you have a running footer, you need to count the lines involved with that as well.

Use the $$vl# command to ensure that a segment of text appears entirely on the same printed page. $$vl# is useful for charts, tables, and multiple-line headings. For example, when you want to prevent a 15-line chart from being broken between two output pages, type $$vl15 (lowercase v lowercase l digits one five) before the first characters in the chart. When you print the same chart with lines double spaced, then you type $$vl30, since the value # is the number of <CR>s remaining in the output page.

We mentioned that the formatter automatically "looks ahead" when executing a $$c or $$h heading. However, the formatter is no genius, and it doesn't check to see if the next line also contains $$c or $$h. This means that multi-line headings that you format manually can sometimes appear alone at the bottom of the page. Use the $$vl# command to get around this problem--see Part 10 for a sample.

When BEX executes $$vn and $$vl#, the formatter creates the new output page no matter how many characters are in the current line. For example, when you have:
The bureau's $$vn ten criteria for grading papers ...
BEX prints the two words The bureau's followed by one <CR>, then moves to a new page to start printing ten criteria at the left margin of the new page's line one. This looks pretty stupid, so you don't want to enter $$vn or $$vl# in the middle of a line. Usually, you want to enter $$vn or $$vl# right before an explicit new-line or new paragraph.

Variable at end of line: $$vi#

The $$vi# command is not as immediate as $$vn or $$vl#. The $$vi# command first finishes the current output line, then moves to a new page when there are fewer than # <CR>s left on the current output page. Use $$vi# when you want to keep the end of one paragraph together with the start of the next paragraph. Similar to $$vl#, the value # in $$vi# must include every possible <CR> left on the page. When your text is double-spaced, you must include the number of blank lines as well as the number of printed lines in calculating $$vi#.

But unlike $$vl#, you don't have to put $$vi# exactly where you want the new page break. A good place to use $$vi# is at the end of a letter. You don't want the second page of a letter to contain just the Sincerely, Macalaster J. Prude complementary close. When the complementary close adds up to 5 <CR>s, then place $$vi? in the middle of the last paragraph. When your letter is short, then there are at least eight <CR>s left on the page, and the formatter doesn't execute $$vi0. When your letter is longer, the second page contains the last half of the paragraph plus the complementary close. You can use $$vi# whenever you want to keep text together, even when there are no explicit new lines or new paragraphs.

Part 7: Creating Headers and Footers

BEX allows you to specify particular treatment of individual lines on the page. To allow the same document to work with varying form lengths and carriage widths, BEX labels the lines on the output page with values that are relative to the top and bottom of the output page. The top lines are numbered 1, 2, 3, 4; the bottom lines are numbered -0, -1, -2, etc. You start with the bottom line as minus zero. With a form length of 58, the line called -1 could also be called line 57. All of the commands covered in this Part are canceled when you change the form length witha $$f# command. None of the commands can work when your form length is less than or equal to four.

Simple Page Numbering: $$np

As introduced at the Learner Level, the $$np command establishes print or braille format page numbering depending on whether you are printing to a printer or a brailler. For printers, the page number default is the word Page followed by the appropriate page number centered on the bottom line of each printed page. The line above the page number does not contain text. In addition to any device you configured as a printer, BEX uses the print format when printing to the screen. A printer defined with N defaults to print format when you use $$np, as does any device you configured as a printer.

When you print to a braille screen, as well as any printer configured as a brailler, the page number default is braille format: the page number appears on the right-hand margin of line one, with at least three preceding spaces. As always, you can type ? <CR> at the Which printer: prompt to get a list of configured printers.

Setting Page Number: $$n#

When you enter $$np in your text, BEX starts numbering with Page 1 or #a on the first output page. When you wish to start with a different page number, use $$n#, where the value of # is the page number you want to start with. The $$n# command must follow the $$np command. The formatter won't pay attention to $$n# unless it knows that it has the responsibility of page numbering. To start page numbering at page 25, enter $$np

Roman Numeral Page Numbering: $$vg

$$vg allows you to substitute lowercase Roman numerals for regular page numbering, up to xc (90). Enter $$vg immediately af $$np, or after a sophisticated page numbering command (explained below).

Skipping Lines: $$vs#

Prevent BEX from printing on line number # on each page with $$vs#. # varies from 1 to form length. The value # may be absolute or negative (with minus sign). If absolute, then # equals the line number, starting with the top line as 1. If # is negative, you count up from the bottom, starting with the bottom line as -0. With a form length of 58, $$vs-2 skips line 56. $$vs-0 skips the bottom line.

As you use $$vs#, keep in mind how the form length and line spacing interact. With a 55-line page, $$vs-1 stops text from appearing on line 54. If you establish double spacing with $$l2 (lowercase l digit two), text won't appear on line 54 anyway. If you wish to establish page numbering in the running footer, you may also wish to enter $$vs-1 and $$vs-2, so that there's a second blank line between the text and the running footer.

When you use $$mt# instead of $$vs# to create blank lines at the top of a page, keep in mind that $$mt# does not use up lines from your form length, while $$vs# does.

Running Headers: $$vh# [TEXT] <CR>

A running header is text that appears on the top of every output page. Use $$vh# to signal the start of text. The value of # defines which line on the output page contains the running header text. Running headers may appear on any line, but you are limited to a maximum of four running header lines: line 1 plus three other lines. For example, you can define $$vh1, $$vh2, $$vh15, and $$vh16. When you don't have a running header on line 1, then you are limited to three running header lines. You could h $$vh2, $$vh15, and $$vh16.

The text of the running header must be the only text in the formatter's current line. When the formatter encounters $$vh#, it actually says: "remember all the text in the current output line and print it again on line number # of every output page." While we show the header definition as ending with <CR>, you can also use ( $p ) or ( $l ). When the running header definition is not at the very beginning of the first chapter you print, then you must precede the definition with ( $p ), ( $l ), or <CR>. This ensures that text before the running header definition is not "captured" and printed along with your running header. The only time you don't have to explicitly move to a new line before the header definition is when your running header definition is the first information in a list of chapters to print.

You position the running header text horizontally by including other format commands such as $$c, $$h, $$r, or $$p# in the header definition:
$$vh1 $$c FINAL REPORT<CR>
centers the words FINAL REPORT on line 1 of each output page. You must check to be sure that there's enough room for your header. For example, when you're printing to an 18-point large print printer, this running header definition:
$$vh1 $$p0 MAY MINUTES $$p40 FINAL DRAFT $l
won't work. BEX recommends a carriage width of 40 for 18 point large print printers. If you printed a chapter with that running header definition, you would get the words MAY MINUTES on the line 1 of the first page, then FINAL DRAFT on line 2 of the first page. Subsequent pages would just contain the words MAY MINUTES on line 1.

Running headers are sometimes useful in braille as well as print. BEX allows a running header to coexist with braille page numbering. To center the words Spring Catalog at the top of every braille page, enter:
$$np $$vh1 $$c Spring Catalog<CR>
at the start of your text before you translate it. Make sure that the translated result is short enough to fit on a 41-cell line, and does not interfere with a long page number.

In just a few paragraphs, we explain how to use the <DEL> page number token to get page numbers in a running header or footer.

Running Footer: $$vf [TEXT)'<CR>

A running footer is text that appears on the bottom line of every output page. Use $$vf to signal the start of the footer text, which may be formatted with other format commands. The same rules apply to footers as headers: the running footer definition must be the only text in the formatter's current line. Precede $$vf with <CR>, ( $p ), ( $l ), or make sure it's the first text in the list of chapters you print. End the running footer definition with <CR>, ( $p ), or ( $l ).

Cancelling Numbered Line Commands: $$vo#

Clear all commands affecting line number # with $$vo# (lowercase very, lowercase letter o, digit.) The value # may be absolute or negative (with minus sign). If # is absolute, then # is the line number, counting from the top line as one. If # is negative, then you count up from the bottom, starting with the bottom line as minus zero. With form length of 25, $$vo-2 is line 23. The footer is $$vo-0.

Sophisticated Page Numbering: The Page Number Token

The following commands are designed for formatting print. RDC'S TranscriBEX software supports the complex running heads and page numbering required by the Code of Braille Textbook Format.

BEX uses the <DEL> character for several special applications, one of which is the page number token. Establish a repeating line on the page (running header or running footer) that contains the page number token, the <DEL> character. Use other format commands to place the token horizontally. When the formatter executes the repeating line containing the page number token, it substitutes the appropriate page number for the <DEL> character. You can still use $$n# to set the page number to any number , and $$vg to make lowercase Roman numerals.

Using BEX's own "simple print page numbering" as an example, this is how you'd define it with "sophisticated" commands:
$$vs-1 $$vf $$c Page <DEL><CR>

The $$vs-1 ensures that the line above the page number does not contain text. The $$vf defines a running footer, text appearing on the bottom line of every page. The $$c centers the text that follows: the word Page and then the page number itself, shown with the <DEL> page number token. The new line command (here, a hard <CR>) is crucial to indicate the end of the running footer text.

You can combine more text with the sophisticated page numbering scheme, as in the following example:
$$vs2 $$vs3 $$vh1 $$p0 7-<DEL> $$p54 History of Poland<CR>

The $$vs2 and $$vs3 ensure that lines 2 and 3 on every page do not contain text, making blank lines that visually separate the running header from the rest of the text. The $$vh, establishes the beginning of a running header on line one. The $$p0 and $$p5. position text horizontally on the carriage width of 72, defined in the configuration. For each page, line one contains 7-# jammed to the left margin, and History of Poland jammed to the right margin. Since you can integrate the page number token into your text, it's easy to make compound page numbers, like the ones in this manual. If you include the page number token in more than one running header or footer definition, you get more than one page number on each output page. If you typed:
$$vh1 $$p0 -<DEL>- $l $$vf $$c -<DEL>- $l
at the start of a chapter, then output page 1 would contain -1- starting at position 0 on line 1 plus -1- centered on the bottom line.

() Warning! BEX assumes a page number is two digits long. When your output page number will exceed 99, don't use $$r to format the running header or footer line containing the <DEL> page number token. If you did, BEX miscounts how many spaces to put in the line to make the header or footer flush right. The last character on the header or footer creeps over to the second output line. When the last character is the page number, then the last digit of the page number creeps over to the second output line. To avoid losing portions of your page number, use $$p# commands to position the page number token or other words in the header on the right. When your page number changes from two to three digits, decrease the # value in $$p# by one.

Changing Running Headers and Footers Mid-Document

You can redefine a header or footer in the middle of your document. The only limit is that you have no more than three headers total which are on line numbers greater than one. For example, if you have running headers on lines 1, 3, 25, and 27, you may not add an additional header, but you may redefine the text for these headers.

The tricky part is putting the new header or footer definition in the right spot. When you want the old header text on output page 7, and the new header text on output page 8, you must type the new header definition after the text that appears on output line 1, page 7 and before output line 1, page 8. You can redefine a header or footer that includes the <DEL> page number token. Changing the header definition does not interfere with sequential page numbering.

Example: Changing running headers

The following comments about running headers are equally true for running footers.

Suppose you're writing a report with two sections: Overview and Recommendations. You'd like a centered running header containing the section name and page number. You want the entire report numbered consecutively. Additionally, you want to omit the running header for the first page of each section.

You can define a new running head that includes the <DEL> page number token in the middle of your document, which changes the text without interrupting the page numbers. This is because the simple page numbering command, $$np, restarts page numbering at 1, but sophisticated page numbering with the <DEL> character does not. Here's what you enter:
$$vs1 $$vs2 $$vs3 $$h Section 1: Overview $l [First paragraph of Overview text] $l $$vh1 $$c Section 1: Overview - <DEL> $l [Remaining Overview paragraphs]

The first three commands make BEX skip lines 1, 2, and 3. Then comes the heading for the first section, centered and underlined by $$h. Lines 2 and 3 are skipped throughout the document. Line 1 is sometimes skipped, and sometimes contains a running header. This first running header is defined after the first paragraph of text, so that there will be no running header on the first output page. The ( $p ) at the end of the first paragraph is executed (which also ensures that the running head definition begins on a new line). The ( $p ) preceding the remaining Overview paragraphs only serves to delimit the header definition. The result is one paragraph in the output, plus one running head definition. The second and subsequent output pages contain the section title and page number on line 1. To change running header definitions mid-document, this is what you type:
[Final Overview paragraph] $$vs1 $$vn $$h Section 2: Recommendations $l [First paragraph of Recommendations text] $l $$vh1 $$c Section 2: Recommendations - <DEL> $l [Remainder of Recommendations text]

After all the Overview text, there are two commands: $$vs, $$vn. The command $$vs, suppresses the Overview running header for the next output page. The discretionary page break command $$vn creates that next output page, unless BEX was about to create a new page already. The order of these two commands is very important: entering $$vn $$vs1 would not work. That's because when BEX is placing a running header on line 1, it does it first thing after moving to a new page--before BEX even notices the $$vs1 command. When you tell BEX to skip line 1 before you move to a new page, then BEX knows what to do at the top of the new page, so the running head doesn't print.

After the first paragraph of Recommendations text, use the same trick to change the text of the running header as you did with the Overview section: the new running head definition is preceded and followed with ( $p ) paragraph indicators. The running header definition still contains the <DEL> page number token. The second output page of Recommendations contains the modified running head: the word Overview is replaced with Recommendations and the page number continues sequentially.

Part 8: Underlining

Basic Underlining: $$ub and $$uf

$$ub signals underline begin, and $$uf signals underline finish. You can also turn off underlining with a paragraph ( $p ) indicator. Always enter these commands as five keystrokes: <space> or hard <CR>, dollar sign, dollar sign, lowercase u lowercase f or b, <space>. That way, the Grade 2 translator recognizes the underlining and place the italics signs where appropriate. The space or <CR> before and after all format commands ensure that the translator knows when the commands end and your words begin.

Preventing Conflict Between Underlining and Punctuation: $$sp

The command $$sp tells the formatter: "Stop underlining at some punctuation." $$sp changes how is executed at the end of clauses and sentences. Once $$sp is in effect, the final punctuation is not underlined in the four cases: In the following four examples, the CBC emphasis indicator shows which letters are underlined

You turn off the effects of $$sp with the $$d command. At the Master Level, We introduce the touching token which lets you embed underlining and all other format commands within words.

Part 9: Miscellaneous Nifty Commands

Set Uppercase Lock: $$su

When you want all caps output of your text, enter $$su. The formatter changes all subsequent lowercase letters in your text to uppercase as the text is sent to the printer. $$su does not change the case of your text itself, so your format commands still work. Some braille devices and word processors prefer all uppercase text.

Stop and Beep: $$b

When the formatter encounters $$b1 it stops output and makes the Apple speaker beep once. The printing stops before printing the line where the $$b appears. To resume output, press <space>. This command comes in handy when you want to change typewheels, or when you want to be alerted to the end of a printout.

Option M - Multi-function print allows you to print a range of pages, but the range always involves printing to the final page of your output. Using $$b1 you can print from any page to a page before the final one. For example, your text is 12 pages long, and you only want reprints of pages 2 through 5. Use Multi-function print with a Review class printer to restart printing on output page 6. Note the first few words on line 1 of output page 6, then press <ESC> to cancel printing. Edit the chapter and type $$b at the beginning of that text. Print your text with Multi-function print to the actual printer, restarting printing on output page 3. The printout stops before output page 6, and the Apple beeps. Simply press <ESC> to stop the printout.

Zap Format Commands: $$z

You can turn off the formatter entirely by entering $$z in your text. BEX simply sends every character in the Editor to the printer number you specify. All format commands become lifeless dollar signs, characters and numbers, and are printed along with your text. No ( $p ), ( $l ), or ( $f ) indicators are executed. The formatter no longer breaks text between lines or pages. Hard <CR>s still reach the printer, as do any other control characters. Wake the formatter up again by entering $$d. Use $$z when you want an exact copy of your BEX pages on another device or in a textfile. You get slightly different results when you configure a device as a class P - Paperless brailler; the formatter filters out some control characters. See Section 5, Part 4 for details.

Reset to Default: $$d

Get in the habit of placing $$d at the start of each document you format. (Not at the start of every BEX chapt)'1 undds each document is contained in just one chapter.) $$d reestablishes the print or braille defaults: no margins; no tabs; ling spacing at single space; paragraph indent and line space as appropriate for print or braille; clear any repeating element from the page (page numbering, running heads, or footer); clear zap format; clear selective punctuation underlining mode; clear set uppercase all caps output mode. $$d does not change the carriage width or form length, however.

Every time you choose options P - Print, M - Multi-function print, or W - Write chapters to textfile, the formatter is also reset to the default values. When you want the format commands from one chapter to also control output for subsequent chapters, create a print-stream containing all those chapters. You can scan more than one disk drive by preceding the drive number with the plus sign--see Section 4 for a full explanation of chapter selection methods.

Repeat a Character: $$vrX

The format command $$vrX repeats the character X to the end of the current output line as defined by whatever margins are in effect. X may be an underline, dash, or even the space character. Only one $$vrX command works on any one line. Make sure you use ( $p ), (#[_$]#l#[_$]#), or <CR> to termiate the line properly. You may place other characters on the line using tab or positioning commands.

For example, you want to fold a braille letter in thirds to fit a standard business envelope. A line of dots 2-5, the digit 3 in screen braille, creates a good place to crease the letter. The following commands establish two running headers that divide the page vertically in thirds; the narrower carriage width fits 11 inch paper:
$$w32 $$vh8 $$vr3 $l $$vh18 $$vr3 $l#[_$]#

Or suppose Macalester J Prude wanted to create a decorative border on his letterhead. His inkprint printer's carriage width is 72 and his name is 18 characters long. Use half the difference between the carriage width and his name for the # in $$p# and place equals signs on the rest of the line like this:
$l#[_$]#$$vr=#[_$]#$$p27#[_$]#Macalester#[_$]#J#[_$]#Prude#[_$]#$l#[_$]#

Part 10: Putting Format Commands to Work

BEX's variety of format commands let you do many things. The three examples in this Part try to give you a flavor of what's possible. We've tried to give you an understanding of how the formatter executes these commands so that you can predict their influence on your text.

General Principles

Here are some general pointers for success. The paragraph ( $p ) indicator is your friend; use it often. You can easily manipulate blocks of text defined as "paragraphs" by the ( $p ) indicator. You can easily control how it's executed with $$s# and $$i#. Option R - Replace characters is also a powerful tool for formatting and re-formatting text. We don't want to get ahead of ourselves--Option R is explained in detail in Section 8--but Replace characters lets you define your own format commands, using the mnemonics that you're most comfortable with. The third tool that allows you to format with confidence is printing to the Review class printer. In this Part, we'll use this tool a lot.

Using Tabs

This example provides insight as to how the $$t# and $$p# commands work in BEX. It's a little tricky to understand at first, because it's not at all like you'd format text when typing or brailling: you can only do it with a computer.

Tabs in BEX can work for you in ways that are not possible on an ordinary typewriter. You can establish tabs relative to a word's position on the output line, both forward and backward from the word. This is particularly useful when you want to produce both print and braille versions of a document. Since you use relative $$t# and $$p# commands, BEX does some calculations for you, simplifying a tricky format situation for both print and braille.

Suppose you want to create a print version and a braille version of a class roster. This class roster contains two columns: the Student Name and the Seat Number.

You want to establish a tab to position the digits in the Seat Number column. You want to make sure this tab allows enough room for the longest student name, but the length of that name is different in print and braille. Here's how you proceed.

Type all the students' names, entering each on separate lines divided with either the new-line ( $l ) indicator, or a hard <CR>. Here's a list of names we cooked up:
Jane McCloskey
Andrea Higgins
Henry Mukwanago
Marvin Gardens
Victoria Bright Feather
Wanita Coombs
Daniel Rosenblatz
To see which name is longest, use control-V or print it to a Review class printer and examine it with line review.

Move to the top of your list, and press control-I to insert the format commands. Whenever you set up new tabs, you should begin with $$tc to clear all previous tabs. Type the command $$tc. Then begin a new line and type the student's name that is the longest. Here, our choice is Victoria Bright Feather:
$$tc $l Victoria Bright Feather
Do not delete this name from the list; this name is used as a reference for your column headings which will be on line one.

Establish a relative tab stop after this name for the second column heading. Make sure it is enough positions from the last letter in the name so that your second column will be set off. For print, we use eight positions:
$$tc $l Victoria Bright Feather $$t+8
Because there's a plus sign in the tab command, BEX sets a tab eight positions to the right of the last letter of Victoria's name. In print, this tab stop is at position 32.

But of course, the first line of the class roster doesn't contain a student's name, it begins with the column headings. You use $$p0 to position the column heading Student Name right on top of the Victoria Bright Feather. Like this:
$$tc $l Victoria Bright Feather $$t+8 $$p0 Student Name
Remember that any text positioned to the left on the line overwrites preceding text. BEX replaces the first 12 characters of Victoria Bright Feather with Student Name. When you have a margin set with $$ml#, use the number # to position your first column heading. For example, when your left margin is eight, type $$p8 instead of $$p0.

Since your column heading is shorter than the name it overwrites, use the repeat any character command $$vr to place spaces to fill up the rest of the line:
$$tc $l Victoria Bright Feather $$t+8 $$p0 Student Name $$vr<space>

Now you want to position the Seat Number column heading. Move to the tab stop, then type the second column heading:
$$tc $l Victoria Bright Feather $$t+8 $$p0 Student Name $$vr<space> $$ Seat No.<CR>

For your print copy, you want to use a larger number for $$t#. Here, we'll use +8 for print and +2 for braille. You probably want to center the second column heading over the data; use a $$p-# command to do it:
$$tc $l Victoria Bright Feather $$t+8 $$p0 Student Name $$vr<space> $$ $$p-3 Seat No.<CR>

This first line accomplishes two tasks: you define the tab stop for the second column and you format the column headings. This strategy is possible due to the way BEX prints. BEX creates each line of text by executing the format commands it encounters, in order. When BEX builds up the column heading line, it creates several versions. First, it puts all the letters in Victoria Bright Feather at the start of the line. Next it encounters the $$t+8 command. At this point, the formatter notes the current position on the line, adds 8, and stores this number in its list of valid tab stops.

Next, the formatter encounters $$p0, so it moves the current position back to the start of the line. The letters in Student Name are placed right on top of the letters of Victoria Bright Feather. The $$vr<space> command tells the formatter to put a space in any position that does not contain any other explicit character. When the formatter encounters the ($$) move-to-the-next-tab command, it checks its list of valid tab stops. Since the relative tab stop is already established, the formatter places the words Seat No. at the start of the second column.

All of your lines after the first line look like this:
$l Jane McCloskey $$ 1 $l Andrea Higgins $$ 2 $l Henry Mukwanago $$ 3 $l Marvin Gardens $$ 4

Use control-V or a Review class printer to see your handiwork.

The next step is to translate the chapter into braille with option G - Grade 2 translator. Be sure to use a different name for your target chapter, as you want both print and braille versions of this list. Use control-V or a Review class printer and line review to examine the translated chapter to see which name is longest in braille (it might be different). Here, the same name, Victoria Bright Feather, is still the longest:
,/ud5t ,"n s1t ,no4
,jane ,mc,closkey #a
,&rea ,hi79s #b
,h5ry ,mukwanago #c
,m>v9 ,g>d5s #d
,victoria ,b"r ,f1!r #e
,wanita ,coombs #f
,daniel ,ros5blatz #g
When the longest name is different, use the clipboard to move it to the first line, in place of the longest print name.

Here's what the final print copy of your list looks like in the Editor:
$l Victoria Bright Feather $$t+8 $$p0 Student Name $$vr<space> $$ $$p-3 Seat No.$l Jane McCloskey $$ 1 $l Andrea Higgins $$ 2 $l Henry Mukwanago $$ 3 $l Marvin Gardens $$ 4 $l Victoria Bright Feather $$ 5 $l Wanita Coombs $$ 6 $l Daniel Rosenblatz $$ 7

And your braille chapter:
$$tc ,victoria ,b"r ,f1!r $$t+2 $$p0 ,/ud5t ,"n $$vr<space> $$ ,s1t ,no4 $l ,jane ,mc,closkey $$ #a $l ,&rea ,hi79s $$ #b $l ,h5ry ,mukwanago $$ #c $l ,m>v9 ,g>d5s $$ #d $l ,victoria ,b"r ,f1!r $$ #e $l ,wanita ,coombs $$ #f $l ,daniel ,ros5blatz $$ #g

Here's what they look like when printed:
Student Name Seat No.
Jane McCloskey 1
Andrea Higgins 2
Henry Mukwanago 3
Marvin Gardens 4
Victoria Bright Feather 5
Wanita Coombs 6
Daniel Rosenblatz 7

And when embossed:
,/ud5t ,"n s1t ,no4
,jane ,mc,closkey #a
,&rea ,hi79s #b
,h5ry ,mukwanago #c
,m>v9 ,g>d5s #d
,victoria ,b"r ,f1!r #e
,wanita ,coombs #f
,daniel ,ros5blatz #g

Now you see how $$t# and $$p# can work together, to make the same text printable in both inkprint and braille. You only need to change two format commands to make nice print from braille (or vice versa).

Examining the Q FORM Chapter

There's a chapter called Q FORM on the BEXtras disk, which contains some format commands to add "sophisticated page numbering" to the by-now familiar QUANDARY article. Edit the Q FORM chapter to see these commands.

The first command is $$d, resetting the formatter to default. Next come three hard <CR>s. The formatt] sends out three <CR>s before any text is printed. A few blank lines at the start of an inkprint paper makes the first page more noticeable. Three new-line ( $l ) indicators would have the same effect, as would the command $$a3. The next command is $$sp, establishing selective punctuation for underlining.

Next comes $$vh1, signalling the start of the running head on line 1. The $$r immediately after places the header all the way to the right. The header contains the page number token, <DEL>. The ( $p ) after the <DEL> does not create an extra blank line, but does indent the next line for the beginning of a paragraph. The ( $p ) signals the end of the text for the running header.

() Caution! You can use $$r to position running header or footer text flush right, but only when your output page number is 99 or less. When you have three or more digits in your output page number, use $$p# commands instead

The page number for page 1 is commonly omitted in print documents, since the first page is readily identifiable by the extra room at the top of the page and the headings that usually appear there. This is also true for letters printed on letterhead: the first page doesn't have a page number, but subsequent pages contain "continuation lines" with the addressee and author's name and the page number.

The last two format commands in the Q FORM chapter instruct the formatter to skip lines 2 and 3 on all output pages, which separates the running head text from the bulk of the article.

Before you can print Q FORM and QUANDARY to see what the running head looks like, you have to edit QUANDARY to make sure there aren't any conflicting format commands. In fact, the first two commands do conflict: delete the $$D and $$np commands so that the commands in Q FORM can work. Also delete the hard <CR>, since Q FORM provides three blank lines at its start. Now, print chapters Q FORM and QUANDARY.

Use a Review class printer to examine the results

Tell BEX to print Q-FORM and then QUANDARY to a Review class printer. When the clicks stop, enter control-L to start line review. Press A,G and sit back and listen. Lines 1 through 3 are blank. Line 4 is in all uppercase, which is how a Review class printer shows underlined text. When you're done exploring the first 24 lines, press <ESC> to exit line review, then press the down arrow to get more text. How many screens comprise each output page depends on the form length you defined for this printer.

When you press <space> for the second output page, enter line review again. Press A to hear all of line 1--there's the running head, page number 2 and all. Use the right and left arrows to get to Lauer, the first word in the running head. You can press the spacebar now to hear the horizontal position of the audio cursor. The exact position of the cursor depends on the carriage width, the number of characters in the header, and the number of characters on the screen that show format for the Review class printer.

Print to the screen

You can print Q FORM and QUANDARY to the screen in any of the screen modes. The pages break differently depending on whether you print to SW, SH, or SL. If you put the format commands $$w# and $$f# into the chapter, they do not take effect when you print to any screen but SW and SN. These two commands are filtered out to avoid conflicts with the built-in screen carriage widths and form lengths.

With 20-column screen, the text of the running head can't fit on one line. The $$vh, command is quite strict: if the text is too long for one line, then it's cut short. Print these chapters to a screen mode or printer with a carriage width greater than 38 characters, and the running head fits perfectly.

Examining the RESUME Chapter

The one-page chapter named RESUME on the BEXtras disk contains fairly involved format commands. Print it to a Review class printer first, then edit it to see how it's done.

This chapter starts out with two format commands that set carriage width and form length: $$w72 and $$f50. The next three commands set "block style" paragraphs. Following $$s2 there's a hard <CR>. This suppresses the printing of the running head on line 1 on the first page of the resume. The text of the running head is next: it starts with $$p0 to place it at position zero. Next comes a running footer, to automatically place the continued overleaf message at the bottom of the first page. After the <CR> that delimits the footer, there are two "skip line" commands.

The resume has two columns. The left margin establishes the starting point of text in the second column. The major headings for the resume: Name, Employment history, Education, etc., appear in the first column.

The $$p0 precedes the actual beginning of text. So far, there has been only one hard <CR> that appears in the output, between $$s2 and $$vh1, and this means line 1 is blank. Lines 2 and 3 are also blank, because of the $$vs2 and $$vs3 commands. So Nevin's name starts at position zero on line 4. After Olson, there are three commands that accomplish a lot of work without a lot of calculation. The $$p+5 tells the formatter to place 5 spaces between the n at the end of Olson and the start of the street address. The $$t* sets a tab at this position, and the $$ml* sets the left margin at that same position. The street address ends with ( $p ). The next two lines start at the left margin, so they line up right under the street address.

A ( $p ) indicator follows the phone number. With the paragraph indent set to zero, the text would normally start at the left margin. The $$p0 command positions the word Employment in the first column, to the left of the current left margin. The ($$) moves the first employer name to the tab stop, which is set at the same position as the left margin. This line ends with ( $p ), so the job title is positioned at the left margin, lining up underneath the employer's name. After the date of employment, there are two margin commands, separated by a new-line indicator. Always change the left margin before a new line, and the right margin at the start of a new line. The margin commands affect behavior at the end of a line, whether the line is begun with a new-line ( $l ) indicator, a hard <CR>, or with a soft <CR> which BEX places while printing. If don't you enter a margin command before a command which begins a new line, you wouldn't know exactly on which line the new margin begins.

The six paragraphs in the Employment history section all use this same format: the narrower margins for the text underneath make the employer's name, job title, and dates distinctive on the page. At the start of the fifth paragraph, there's a $$vl10 command, to prevent any paragraph from being broken between the first and second output page. The value 10 is a guess. Another approach would be to print the text to a Review class printer, and see where it breaks without any $$vl# commands. Then place a $$vn command right before the paragraph where it breaks, so that the formatter advances to the next page before starting to print it. In either case, the next page starts with running head copy and is numbered.

The section that starts with Volunteer shows two approaches to creating tabs. The desired result is to indent the dates five spaces. The first paragraph uses the $$+5 command. In the second paragraph, $$t+5 sets a tab at the same position. Note that you need the ($$) immediately after to move to the tab just set. That's a lot of keystrokes, it's true, but for subsequent paragraphs, it's quite economical.

Right before the last paragraph, there's a $$vo-0 command--this clears the running footer, so that continued overleaf doesn't show up on the second page. While minus zero sounds loony, it is consistent with numbering from the bottom of the page. The line above the running footer is -1, so the footer itself is -0.

Section 8: Replace characters

Option R - Replace characters on the Main Menu makes BEX a powerful word processor. You can automatically reformat information from other word processing programs or computers. You can define your own keyboard shortcuts for frequently typed words, phrases, or format commands. Replace characters lets you find any series of characters and change it to a different series of characters. For example, you can find all occurrences of ::: (three colons) and change it to Department of Public Instruction. You can find every <CR> and change it to a space. You can find every appearance of ^* (caret, asterisk) and change it to $$ml+4#[_$]#$p#[_$]#$$mr+4

Part 1: The Tools of the Trade

Before we can explain the process of using Replace characters, there are five terms we must define. A transformation chapter is a BEX chapter containing the instructions Replace characters uses in making changes. It tells option R what to look for and what to replace it with. You already have direct experience with a transformation chapter. At the Learner Level, you used the transformation chapter called FIX TEXT to create BEX formatting commands from the <CR>s and spaces in a chapter read from a textfile. The BEXtras disk contains several transformation chapters to help you reformat text. We analyze how one works in Part 4.

You can create a transformation chapter two ways: by writing it from scratch in the Editor, or by typing in response to the prompts Replace characters supplies. We show you first how you can directly type in the changes you want Replace characters to make, which provides insight into the structure of transformation chapters.

No matter how it's created, the transformation chapter must have a particular structure. It must contain at least one transformation rule. A transformation rule consists of the find string and the change to string. The find string is what you instruct BEX to look for in your original chapter. It's the group of characters you wish to change. When BEX locates the find string, the characters in the find string are deleted, or depart. The departing characters are replaced by the characters in the change to string.

You can enter any character in your find or change to strings that you can type in the Editor--any of the 128 ASCII characters. However, for each transformation chapter, you must reserve one character as the terminator character. The terminator character marks the end of your find and change to strings. The terminator character can't be a part of your find or change to strings. You use the terminator character much as you use it when you type <CR> after a chapter name. The <CR>, and the terminator character tell BEX, "OK, pay attention to what I have typed." The terminator character can be <CR>. However, at times you want to include <CR> in your find or change to strings. In this situation, specify another character as the terminator. In the examples that follow, we use # (number sign) as the terminator.

Part 2: Typing Find and Change to Strings Directly

Replace characters is on the Main Menu. When you press R, BEX prompts for the chapters you want to work with. Once you enter chapter names, BEX prompts for target chapters. You can choose to use Replace characters in two ways: you can make modified copies of your original chapters, or you can overwrite your original chapters with the changed data. When you supply different names for the target chapters, you end up with transformed copies of your original chapters. When you use the S naming method, your improved target chapters overwrite your source chapters, saving you the effort of killing the source chapters later.

Once you finish telling BEX the source and target chapter names, BEX asks for the name of the transformation chapter. When you want to type in the changes directly, press <CR> at the Transformation chapter name: prompt. BEX then asks you to declare one character as your terminator. Now BEX starts asking for the first find string. Type in the string that contains the exact characters you want to find. Signal the end of the string by pressing your terminator character. BEX then prompts for the change to string. Here you enter the new characters you want in your target chapter. End the string with your terminator character. BEX then prompts again for a find string. Continue writing transformation rules by alternating between the Find: and Change to: prompts. When you are done with your list changes, enter your terminator alone at the Find: prompt. BEX then asks if you want to continue. When your disks are in the right places, press <CR> to accept the Y default and start replacing. When you don't want to go through the list of changes, enter N <CR> and you return to the Main Menu.

Here's what the dialogue looks like when you press R for Replace characters:
Main menu: R <CR>
Replace
Drive or Chapter: BLACK
Drive or Chapter: <CR>
Target chapter name: BLACK-R
Transformation chapter name: <CR>
Enter terminator: #
Find: <CR><space><space><space><space><space> ;#
Change to: <space>$p<space>#
Find: <CR><space>#
Change to: <space>$l<space>#
Find: #
Continue? Y <CR>

BEX loads the first page of the chapter into the page buffer, and executes the first transformation rule. BEX searches through the text character by character, until it finds an exact copy of the find string, then replaces it with an exact copy of the change to string.

For example, suppose you have a string of text ABCDEFGH in a chapter, and you want to change EFG to FEG. BEX's find string is EFG. It compares each group of three letters until it finds a match with the find string. It searches ABC, then BCD, then CDE, until it comes across the string EFG. Once it finds EFG, it replaces it with the change to string, FEG. The string of text now looks like ABCDFEGH. BEX then continues to search through the rest of the chapter for further occurrences of the find string.

BEX searches for each find string in the order they are entered into your transformation chapter. When BEX finds no more occurrences of the first rule's find string, BEX executes the second transformation rule, and so on through the list of rules.

The Apple speaker sounds for every change BEX makes. When there are a lot of changes, you hear interesting beeps, tones, and crackles. As you gain experience, the sounds tell you whether Replace characters is working correctly.

BEX goes through the entire list of transformation rules, then saves the first page of transformed text to the target chapter on disk, and moves on to the next page. BEX lists the name of each source chapter as it's completed, and then the total number of replacements that occurred.

When the changes are complete, BEX prompts: Save transformation chapter: providing you with an opportunity to save the list of rules on disk for later use. When you don't want to save the transformation chapter, just press <CR>. (Do not press the terminator you've used in your transformation chapter.) To save it as a BEX chapter, type a name followed by <CR>. Later you can use the same transformation chapter with other chapters. For example, you can create a transformation chapter that fixes your most common typing errors and save it on your program disk.

Sample: Typing Changes Directly

Suppose you have a chapter a friend typed into your computer for you. However, she didn't know much about BEX, and she entered a lot of <control-R> characters. She didn't use the paragraph ( $p ) indicator; for each paragraph she typed two <CR>s and five spaces. She always misspelled the word precede, and insult of insults, she spelled BEX wrong.

Here's what you type to correct the mistakes:
Main menu: R
Replace
Drive or chapter: GOOF <CR>
Drive or chapter: <CR>
Target chapter name: ALLFIX <CR>
Transformation chapter name: <CR>
Enter terminator: #
Find: <control-R>#
Change to: #
Find: <CR><CR><space><space><space><space>&l t;space>#
Change to: <space>$p<space>#
Find: preceed#
Change to: precede#
Find: Becks#
Change to: BEX#
Find: #
Continue? Y <CR>
Chapter GOOF done
Replaced 28 times
Save transformation chapter: 1SALLY <CR>
Main Menu:

After you press return at the Continue? Y prompt, you hear the Apple speaker click for each change. When you hear no more clicks, all the errors are fixed.

You type a control character in your find or change to string the same way you enter an Editor command: depress the control key, then press the appropriate letter. This is different than entering a control character in your text in the Editor. (You don't press control-C, then a plain letter.) To delete the entire find string, enter only your terminator at the Change to: prompt. To enter space characters into a string, press <space>. To signal BEX to start replacing, enter your terminator at the Find: prompt. The next time you want to transform a chapter that Sally typed, simply enter SALLY at the Transformation chapter name: prompt.

When you are directly typing in a transformation chapter, you can fix typing errors by using the left and right arrow keys. In some situations, you may want to include <control-U> (right arrow) and <control-H> (left arrow) as data in your find and change to strings. To do this, you give BEX a special signal: press the left arrow key at the Enter terminator: prompt. BEX responds with the message: Warning: left and right arrow keys used as data then prompts again for the actual terminator you want to use.

() Caution! When left and right arrow keys are entered into your find and change to strings, you can't use them to correct typing mistakes.

Let's examine the contents of the transformation chapter SALLY. It contains every keystroke entered between pressing <CR> at the Transformation chapter name: prompt and pressing <CR> at the Continue? Y prompt. Here's what the transformation chapter looks like:

#<control-R>##<CR><CR><SPACE><SPACE>&l t;SPACE><SPACE><SPACE># $p #Preceed#Precede#Becks#BEX##

The first character in a transformation chapter is always your terminator: here it is # (the number sign). Next comes the first rule: the find string is the one character, <control-R>, finished by the number sign terminator. The change to string consists of just the terminator, so <control-R> is deleted by this rule; we call this an empty change to string. The find string for the next rule is two returns and five spaces, finished by the number sign. The change to string is <space> dollar sign, lowercase p <space> number sign. There are two more rules: preceed changes to precede and Becks changes to BEX. The very last character is the terminator you supplied to the Find: prompt to start the replacement.

Part 3: Creating Transformation Chapters in the Editor

You have two choices for creating transformation chapters: type changes directly following the menu prompts, or write your chapter in the Editor. When you type changes directly, it's easy to keep track of where you are. BEX continually gives you the Find: and Change to: prompts. You can use line review to look back on previous find and change to strings.

Creating a transformation chapter from scratch in the Editor gives you much more control. You can get the Echo to voice everything simply by moving around with the left and right arrow keys. But you do have to keep track of where you are in the rule without prompting.

When your replacing task is short, then type your changes directly. When you are working with control characters, escape codes, or other complex strings, create your transformation chapter in the Editor.

() Caution! When you're first learning about Replace characters, there is some risk involved when using the same names for source and target chapters. If you don't structure your transformation rules correctly, it's possible to end up with a chapter with only some of the changes made. You can use <ESC> to cancel Replace characters in progress. When you cancel replacing, and you have entered the same name for the source and target chapters, some transformation rules are executed and some aren't--it depends when you pressed <ESC>. When you press it before BEX saves the first page, no changes are made. When you press <ESC> after BEX has saved the first page, then the first page has the changes. But your directory file for that chapter won't reflect the change in size. To recover fully, you have to use Fix chapters, and check your data to make sure all is well. Use different source and chapter names for the first few times you use Replace characters, and anytime you feel doubtful about the outcome after replacing.

Keeping Track in the Editor

Every transformation chapter must contain an even number of terminators: two for each rule, plus two more terminators. One of the "extra" terminators appears as the first character. When you tell BEX to use a chapter as a transformation chapter, BEX interprets the first character as your terminator. The characters between the first terminator and the next terminator are interpreted as the find string of the first rule. The characters between the second terminator and the third terminator are used as the change to string for the first rule. Every transformation rule contains two terminators; one defines the find string, the other defines the change to string.

The other "extra" terminator is the last character, which signals the end of the list of rules, as opposed to the end of the change to string. This means that the final two characters must both be terminators. (When your last rule deletes the find string (with an empty change to string), then three terminators appear at the end of the chapter. The transformation chapter SALLY we discussed in Part 2 contains ten terminators: two for each of the four rules, plus the beginning and ending terminators.

You have two terminators next to each other in only two situations. These two situations are quite different. First, you have two terminators in a row when your change to string is empty (when the find string is deleted). In this case, the pair of terminators appears between the find and change to strings. The first of the pair marks the end of the find string, and the second marks the end of the empty change to string. In this situation, all the find characters depart with no replacement. For example, the first rule in the transformation chapter SALLY deletes <control-R>s--so there are two terminator characters after the <control-R> character: one to mark the end of the find string, and one which is the entire change to string.

The second situation when you have two terminators in a row occurs at the end of your transformation chapter. The first of the pair signals the end of a change to string, and the second marks the end of the transformation rules.

Remember this when you use option M - Merge chapters on the Second Menu to combine two transformation chapters. At least three terminators appear together where your first source chapter and second source chapter meet. Delete the extra terminators from your new, larger transformation chapter before you use it. If you don't, then Replace characters would only execute the changes up to the "seam," since the two terminators stop the process.

Counting terminators in a transformation chapter

When you Merge chapters, or when you create a transformation chapter in the Editor, you may want to count the terminators in the chapter to make sure you have the right amount. However, counting with the right arrow key can be tedious. Use option R - Replace characters to count your terminators for you.

Here's how: Specify your transformation chapter as the source and target chapter in Replace characters. Key in changes directly, writing just one rule: replace your terminator character with itself. This does not change your transformation chapter. When Replace is finished, BEX announces Replaced # times: where # is the number of terminators in your chapter. This number must be even.

Remember that the number of terminators should be two more than twice the number of rules in your chapter.

Transformation Chapter Limits

A find or change to string cannot exceed 100 characters. A transformation chapter cannot exceed two BEX pages--a total of 8192 characters. During the Replace characters process, BEX refuses to execute a replacement that would make your target page contain more than 4096 characters. If you try to do this, you hear a grotesque noise, like sound effects for a flying saucer. Press <ESC> to stop the Replace characters process, and give your Apple a reassuring pat to calm it down.

Order of the Rules

The changes you specify, whether typed in directly or created in the Editor, are executed exactly in the order they appear in the transformation chapter. That means that you can have a rule which wipes out a new change, if you are not careful. Or you can create a two-step rule, where the first part changes one part, and the second another. For example, the transformation chapter KRM that is discussed in Part 4, has a two-step rule to insert paragraph ( $p ) indicators at the end of paragraphs. The first of the two rule deletes all spaces in front of <CR>s (the number sign here is the terminator):

#<space><CR>#<CR>#

The second rule replaces <CR>s with periods in front of them with ( $p ) indicators:

#.<CR>#.<space>$p<space>#

A two-step rule ensures that all the changes are made: if the KRM rule just replaced all <CR>s with spaces before them to paragraph ( $p ) indicators, any instance of <CR>s with periods before them would go unchanged.

Another way of ensuring that only the characters you want replaced are changed, is to use the intermediate rule method. For example, suppose you want to change two <CR>s to the paragraph ( $p ) indicator, but you want to leave three <CR>s alone. For your first rule, change the occurrences of three <CR>s to a distinctive set of characters like $$ (three percent signs). Next, find the two <CR>s and change them to ( $p ). Then, find the $$ strings and change them back to <CR><CR><CR>.

Uppercase and Lowercase

Replace characters is "case-sensitive". Replacing every A (uppercase A) with \ (backslash) does not affect any a (lowercase a). Sometimes the word you want to change appears at the start of a sentence, with an initial uppercase letter, and sometimes the same word appears all lowercase, in the middle of the sentence. In this situation, you must write two rules. (At the Master Level, you learn how to use contextual Replace to specify a letter regardless of case.) Another way around the problem of initial letter case variation is to ignore the first letter. For example, in the transformation chapter for our Newsletter, we tried to create consistency in naming contracted braille using a number instead of Roman numerals. To avoid uppercase vs. lowercase problems, we don't search for Grade II and grade II. We search for rade II and change it to rade 2. This sometimes has unintended results: an article that discussed Super Bowl Parade III got changed to Super Bowl Parade 2I.

Words vs. Parts of Words

In the sample shown in Part 2, Sally misspelled the word precede; she spelled it preceed. The third rule found preceed and changed it to precede. This works fine in a sentence like We preceed the action with deliberation. This rule won't fix the sentence He preceeded the action with deliberation, because the second word changes to precedeed. To find any occurrence of a misspelled word, you must ponder the possible variations in prefix and suffix, and create rules for each of them.

Another example relates to keyboard shortcuts. While writing this manual, we developed many abbreviations that were expanded after the text was complete. One writer always reverses the a and o in keyboard, so she developed a transformation chapter that expanded every appearance of k-b into keyboard. Imagine her surprise when she saw a sentence about the diskeyboardased VersaBraille. You can place spaces before and after the abbreviation: replace <space>k-b<space> with <space>keyboard<space> But, that doesn't work very well when you want to place punctuation next to the expanded word. To get around this problem, there are two complementary strategies. First, make your abbreviations so distinctive that they can't mistakenly appear embedded in words you don't want to change. For example, instead of using k-b use #kb The second approach requires you to write enough transformation rules to deal with all possible surrounding punctuation.

At the Master Level, you learn about contextual Replace, which allows you to write one transformation rule to handle many possible surrounding contexts.

Part 4: Supplied Transformation Chapters

The transformation chapters on the BEXtras disk can help you tidy up your data in many situations. When you want to use one of these transformation chapters, just insert your BEXtras disk in one of your drives. Specify the chapter by name, preceded with drive number if necessary. BEX reads the transformation rules into memory, then gives you the Continue? Y prompt. Remove the BEXtras disk and get your data disks in the correct drives, then press <CR> to start Replacing.

Most of the supplied transformation chapters are regular Replace chapters, so you can edit them to see how they work. You should copy them before you edit them, just in case you inadvertently change something.

KRM

This transformation chapter cleans up general text material imported from the Kurzweil Reading Machine (KRM). The Kurzweil doesn't provide any information about where paragraphs are divided in the print original. The KRM transformation chapter tries to guess at these divisions. This chapter contains five rules; its terminator is | (vertical bar). The first rule deletes any linefeeds, or <control-J>s. The second and third rules work together: the assumption is that the last line of a paragraph ends with a period, a space, and a <CR>. The second rule deletes the space, so that this end-of-paragraph situation is reduced to <period><CR> which is the find string of the third rule. This is then changed to the ( $p ) indicator. The only use for <CR>s is in their role as possible indicators of paragraph endings. Because BEX executes the rules in order, after the third rule is executed, you can get rid of the <CR>s. The fourth rule changes any remaining <CR>s to spaces, and the last rule deletes any extra spaces.

UCLC and LCUC

The "UpperCase to LowerCase" transformation chapter transforms entirely uppercase files to entirely lowercase files. Use this to work with files downloaded from all uppercase systems.

LCUC does just the reverse of UCLC, changing every lowercase letter to uppercase. Your format commands and format indicators are also changed--so they become powerless. When you want your format commands executed and all uppercase text, use the set uppercase format command $$su--see Section 7, Part 9.

SP2

This chapter is a contextual Replace chapter. In Master Level Section 6 we explain in gory detail how this contextual Replace chapter works. You can examine the chapter in the Editor if you want, but you will see many strange things!

This chapter places two spaces after the end of a sentence, and deletes two spaces anywhere else. (Since it's a Contextual Replace chapter, it's clever enough to not place two spaces after abbreviations.) Use SP2 whenever you want your print text to follow this common inkprint convention. (For both braille and typeset print, you never end sentences with two spaces.)

FIX TEXT

This chapter is also a contextual replace chapter. FIX TEXT is designed to reformat textfiles transferred with option R - Read textfiles to chapters (documented in Section 10, Part 5). It untangles the mess of control characters and text you may get as the result of underlining in some textfiles. It changes the many instances of <control-H> to BEX's ownand underlining commands, deletes any line feeds, and places $$c commands and paragraph ( $p ) indicators where needed.

Part 5: Troubleshooting Problems with Replace Characters

Here are some problems you may encounter when using Replace characters: