Raised Dot Computing Newsletter:

Exploring Microcomputer Applications for the Visually Impaired -- ISSN 0890-0019

NOVEMBER 1987 -- Volume 5, Number 58

Published Monthly by Raised Dot Computing, Inc., 408 South Baldwin Street, Madison WI 53703. General phone: 608-257-9595. Technical Hotline: 608-257-8833.

Subscriptions: $18/year Print, $20/year Audio Tape, $30/year Disk. (Kindly add $20/year for postage outside N. America.)

Submissions are always welcome, especially on diskette. All are subject to editing for style and clarity. All opinions expressed are those of the author. Editor: Jesse Kaysen

Entire contents copyright 1987 by Raised Dot Computing, Inc., All Rights Reserved. Nothing may be reprinted in any medium--print, braille, audio, or electronic--without prior written permission from RDC Inc.

Table of Contents: the all-uppercase words name the disk chapters; the words after the equals sign are the actual article titles.

READ ME FIRST = How To Read the RDC Newsletter on Disk

CONTENTS = Table of Contents (print page 1)

LASER LINES = Laser Lines from the Editor -- Jesse Kaysen (print page 2)

CBC INTRO = An Introduction to the Code for Computer Braille Notation -- David Holladay & Jesse Kaysen (print pages 2 through 10)

BEX TRICK REF = BEX Trick Reference Card, includes Making Search and Replace Easier in the Editor -- Caryn Navy & Counting Words in BEX Chapters -- Jesse Kaysen (print pages 10 through 12)

HD DIPNER FIX = Why Dipner Dots Doesn't Work Right in Hot Dots and How to Fix It -- Caryn Navy & Nevin Olson (print pages 12 through 15)

FACTS ON FILE = Names and Addresses Mentioned in the Newsletter -- Trademarks & Copyrights

Laser Lines from the Editor -- Jesse Kaysen

The City of Madison Street Maintenance Crew beat me to the punch. Last month I promised this issue before the twinkling lights appeared on our telephone lines, but all the Christmas decorations are already in place. However, with this Newsletter I'm beginning to catch up. This month I will authoritatively promise that you will receive the December issue before March--that's a promise I know I can keep!

This issue is highly unusual in that all the articles are by RDC staff. I know the holiday season is a busy one, but please, stop this trend before it gets rolling. Write a Newsletter article today.

IMPORTANT NOTE TO DISK READERS! This article shows samples of Grade 2 braille and the Code for Computer Braille Notation. Translate this article at your own risk--some portions may appear incomprehensible! Since space, underbar, hyphen, space and space, underbar, lowercase l, space appear as samples of Code for Computer Braille Notation output, I've used a different marker in this article when showing an exact series of characters: The tilde (~) character. A single tilde precedes letter-for-letter material; two tildes signal the return to regular text.

An Introduction to the Code for Computer Braille Notation -- David Holladay & Jesse Kaysen

In last month's announcement of BEX 3.0, we mentioned in passing that the braille BEX 3.0 Manuals use the Code for Computer Braille Notation. This Code, which we'll abbreviate to "CBC," finally establishes a way to precisely represent computer-related material in braille. David wrote an article outlining the Code's features in the May 1986 RDC Newsletter, as CBC was being sent out for field trials. Much has happened since May 1986.

In May of 1987, the Braille Authority of North America formally adopted the Code for Computer Braille Notation. Raised Dot Computing has been busy studying CBC. Caryn and David are finetuning the procedures and tools for automating Computer Braille Code transcription. (And Jesse is just now starting to figure out how to write about it.) While we are not quite ready to announce the release of the product based on this work, we thought this would be a good time to provide braille readers and transcribers alike with a basic understanding of CBC.

Why CBC is Needed

When people first connected braille devices to computers, they needed to establish some correspondence between print characters and braille cells. The defacto standard in the U.S. became the "M.I.T. Terminal Code," often called "computer braille." When you send untranslated, inkprint material directly to a braille embosser or paperless brailler, the resulting braille is computer braille.

In this system, both the lowercase and uppercase versions of a letter are shown by the same braille cell. The computer braille standard provides no way for the braille reader to distingush between lowercase a and uppercase A; they are both embossed as dot 1. In addition to the problem of letters, the computer braille system breaks down when it comes to showing ten symbols. There's no way to tell the difference between a bracket and a brace, the backslash and the vertical bar, the tilde and the caret, or the accent and the at-sign.

Because the difference between a and A or { and [ can be crucially important, manufacturers of braille devices have developed a variety of ways to reduce the ambiguity inherent in the computer braille system. Some braille embossers, for example, allow you to choose 8-dot braille. One of the extra dots shows whether a cell is capitalized. Some paperless braille devices use pin vibration or audio tones to show capitalization. Whether it's eight dots or vibrating pins, a strategy like this allows the braille reader to know exactly what the inkprint looks like. But there's a significant drawback to these strategies: they depend on a particular arrangement of hardware, or as the computer scientists would say, they are "device-dependent."

The Code for Computer Braille Notation, on the other hand, is device-independent. Using combinations of the standard 64 braille cells, it provides a way to precisely and consistently distinguish between a and A, or { and [. CBC also establishes standard ways of representing inkprint horizontal spacing in a useful and clear fashion. Although it's conceivable that manufacturers of braille devices could incorporate CBC translators into embossers or paperless braillers, that's not the main purpose of the new Code for Computer Braille Notation. Rather, CBC is designed for reference materials about computers and using them.

Without CBC, someone transcribing the PostScript Language Reference Manual, for example, would be in a pickle. The PostScript programming language uses braces to enclose procedures, and brackets to enclose arrays: ~

/Helvetica [ 0 0 5 0 0 ] makefont

and ~

/Helvetica { 0 0 5 0 0 } makefont

mean totally different things. Case is also significant in PostScript: /ypos and /yPOS can refer to two different programs. Up until now, transcribers have done the best they can. In transcribing our own manuals here at RDC, we've used an eclectic combination of straight computer braille, grade 1, lengthy transcriber notes, and our own invented symbols to attempt to explain exactly what's on the printed page.

The adoption of CBC means an end to the confusion. Transcribers no longer need to reinvent the wheel for every computer book. Braille readers will have to learn a new code. But on the plus side, the code itself is fairly systematic. The rest of this article provides a basic understanding of how it works.

For those who want to know the full details, there are several resources available. The absolute reference, of course, is the CBC codebook: it's now available in both print and braille from the American Printing House for the Blind. In addition, the National Braille Association presented a workshop on preparing CBC transcriptions at their convention in May 1987. Their "Report of the CBC Workshop" provides a host of sample texts with detailed commentary on how to transcribe them. Finally, Sue Melrose is in the process of preparing a home-study course on CBC for the Hadley School for the Blind. She says the course will be ready in Spring of 1988--Contact Hadley directly for more details. Order numbers, addresses and phone numbers for all these materials appear in Facts on File.

When to Use CBC

The Code for Computer Braille Notation uses no contractions; similar to Grade 1 transcription, the CBC version of an inkprint passage always requires more cells than there are inkprint characters. Because of this, you would never transcribe an entire manual in CBC. Using a variety of contextual clues, the transcriber decides what portions of the inkprint need CBC, and what parts are comprehensible when transcribed in Grade 2. Generally, CBC is used for program listings, sample outputs, filenames, and any other situation where the braille reader must know the exact inkprint characters.

When a manual switches between two braille codes, it's important that the braille reader know which code they're seeing at any one point. One potentially tricky aspect of CBC is that there are a variety of ways to signal the braille reader "Hey, we're starting CBC now." We will point out the possibilities as we go along. But before we begin, we'd better explain how we're going to show samples of these different braille codes.

A Word about Notation

The concept of "computer braille" can be a little confusing at first. The M.I.T. Terminal Code actually serves two functions. As we've just explained, it's a standard for how every inkprint character is represented on a braille device. It's also the way that software manufacturers like RDC know which characters to use when translating inkprint to grade 2 braille, and which characters to send to a braille device to create comprehensible grade 2 output.

Here's a quick sample: the inkprint asterisk character is dots 1-6 in the M.I.T. Terminal Code. Dots 1-6 is the "ch" sign in grade 2 braille. When BEX translates the word chat it becomes the word *at in the grade 2 chapter. All U.S. braille devices display dots 1-6 when they receive the asterisk. When a braille device is displaying grade 2 material, then the braille reader knows that dots 1-6 stands for "ch." When a braille device is displaying inkprint material, then the braille reader interprets dots 1-6 as asterisk.

In an attempt to minimize confusion, we will show our CBC samples in two ways: both the inkprint characters that are sent to the braille device to emboss CBC material, and the names of the dot patterns that appear on the braille device. RDC uses the term "screen braille" to describe viewing translated braille text through an inkprint medium, such as a computer screen or voice output. (The distinction between screen braille and computer braille is a subtle one; it's explored in detail in the TranscriBEX Manual and Appendix 1 of the BEX 3.0 documentation. We will just use the term "computer braille" and "CBC" in this article.)

The ASCII Characters in CBC

The Code for Computer Braille Notation prescribes how to show each printable ASCII character. It uses the M.I.T. Terminal Code as its starting point. CBC reserves one of the 64 braille cells as a multipurpose symbol: dots 4-5-6, or underbar in computer braille. A single uppercase letter is preceded by dots 4-5-6. So _a means one uppercase A, while a represents one lowercase a.

That takes care of the 26 letters of the alphabet. For the digits 1 through 0, both computer braille and CBC use dropped a through dropped j, commonly called "Nemeth digits." For 20 other ASCII symbols, CBC and computer braille again use the same system, as follows:

ASCII & CBC Character -- Name and Braille Cell

! -- exclamation point, dots 2-3-4-6

" -- quote, dot 5

# -- number sign, dots 3-4-5-6

$ -- dollar sign, dots 1-2-4-6

% -- percent sign, dots 1-4-6

& -- ampersand, dots 1-2-3-4-6

' -- apostrophe, dot 3

( -- left parenthesis, dots 1-2-3-5-6

) -- right parenthesis, dots 2-3-4-5-6

* -- asterisk, dots 1-6

+ -- plus sign, dots 3-4-6

, -- comma, dot 6

- -- hyphen (minus sign), dots 3-6

. -- period (decimal point), dots 4-6

/ -- slash, dots 3-4

: -- colon, dots 1-5-6

; -- semicolon, dots 5-6

= -- equals sign, dots 1-2-3-4-5-6

> -- greater-than, dots 3-4-5

? -- question mark, dots 1-4-5-6

Dots 4-5-6 is how CBC distinguishes between the ten ambiguous symbols mentioned earlier. Here's the list:

CBC Representation -- ASCII Name and Braille Cell

[ -- left bracket, dots 2-4-6

_[ -- left brace, dots 4-5-6, 2-4-6

] -- right bracket, dots 1-2-4-5-6

_] -- right brace, dots 4-5-6, 1-2-4-5-6

\ -- backslash, dots 1-2-5-6

_\ -- vertical bar, dots 4-5-6, 1-2-5-6

^ -- caret, dots 4-5

_^ -- tilde, dots 4-5-6, 4-5

@ -- at-sign, dot 4

[email protected] -- accent, dots 4-5-6, dot 4

Because CBC uses dots 4-5-6 as its multipurpose symbol, it requires special effort to show an underbar as a character under discussion. A single underbar in inkprint is shown by two dots 4-5-6s in CBC. To show the expression ~


CBC uses 15 characters: ~


In dots, that's f, o, r, 4-5-6, 4-5-6, c, o, u, n, t, 4-5-6, 4-5-6, s, i, x.

Here's a hint to help you keep the underbars straight: dots 4-5-6 in CBC is always the first cell of a two-cell pair. A single dots 4-5-6 never appears alone. Here's a trickier example: to show the inkprint expression ~


CBC uses 13 characters: ~


The first 4-5-6 pairs with the letter m to mean one uppercase M. The next two dots 4-5-6 pair together to show the single underbar after the letter e. The fourth 4-5-6 paired with d shows the single uppercase D.

While the ASCII list of characters is sufficient for many purposes, some programming languages, notably APL, use additional characters. For this situation, CBC provides a method for transcribers to systematically create new representations. We won't go into the details of that here, since most personal computer-related material only uses the ASCII code.

Representing Capitalization

As we've shown, a single uppercase letter is preceded by one dots 4-5-6. When there's more than one uppercase letter, CBC uses the "caps lock" indicator: _> dots 4-5-6, 3-4-5. Caps lock can be cancelled by one of two things: a space, or the explicit "caps release" symbol _ Inkprint -- CBC -- Braille Cells

PageUp -- _page_up -- 4-5-6, p, a, g, e, 4-5-6, u, p

PRINT "No? " -- _>print "_no? " -- 4-5-6, 3-4-5, p, r, i, n, t, space, dot 5, 4-5-6, n, o, 1-4-5-6, space, dot 5

GetHDCall -- _get_>hdc_ Some computer languages are all lowercase, some all uppercase, and some are a mixture. If you were transcribing a book about Applesoft BASIC, almost all the CBC would be in "caps lock." CBC's "reverse capitalization" rule provides significant space-saving in this situation. The transcriber notes where reverse capitalization is in effect, and then the _ indicators reverse their meaning. A single underbar before a letter means a single lowercase letter; dots 4-5-6, 3-4-5 means "lowercase lock;" and space or dots 4-5-6, 1-2-6 means "lowercase release." When transcribed in "reverse capitalization" mode, the samples above would appear as:

Inkprint -- CBC -- Braille Cells

PageUp -- p_>age_ PRINT "No? " -- print "n_o? " -- p, r, i, n, t, space, dot 5, n, 4-5-6, o, 1-4-5-6, space, dot 5

GetHDCall -- g_>et_all -- g, 4-5-6, 3-4-5, e, t, 4-5-6, 1-2-6, h, d, c, 4-5-6, 3-4-5, a, l, l

Embedded and Set-Off Transcriptions

Material transcribed with CBC falls into two basic classes: "embedded" and "set off." These distinctions are similar to how you treat quotations in a term paper. A quotation of 25 words or less is generally enclosed within double quotes in the middle of a paragraph. When the quote is longer, you generally place it in its own paragraph, with wider left and right margins, and you don't enclose it within double quotes.

When CBC is embedded within a grade 2 paragraph, then it must begin with an explicit symbol. The generic "Begin CBC" indicator is _+ dots 4-5-6, 3-4-6. The CBC "termination indicator" is _: dots 4-5-6, 1-5-6. No spaces are placed between these indicators and the computer braille material. So when the inkprint shows: ~

Use the print statement

The Grade 2 plus CBC transcription is: ~

,use ! _+print_: /ate;t

or in braille cells: dot 6, u, s, e, space, "the" sign, space, 4-5-6, 3-4-6, p, r, i, n, t, 4-5-6, 1-5-6, space, "st" sign, a, t, e, dots 5-6, t.

When the CBC begins with a caps lock indicator, then you don't use both the generic CBC begin indicator and the caps lock indicator. The caps lock indicator is unique to CBC, so its presence is enough to signal the code switch. So when the inkprint shows: ~

Use the PRINT statement

the _+ is suppressed in favor of the _>

,use ! _>print_: /ate;t

And when the inkprint encloses a CBC word in quotes, like this: ~

Use the "PRINT" statement

then the CBC transcription is placed within grade 2 quotes: ~

,use ! 8_>print_:0 /ate;t

As braille cells, you have dot 6, u, s, e, space, "the" sign, dots 2-3-6, 4-5-6, 3-4-5, p, r, i, n, t, 4-5-6, 1-5-6, 3-5-6, space, "st" sign, a, t, e, dots 5-6, t.

When something that should be transcribed in CBC is shown on a new line in inkprint, then the transcription is "set off." In this case, a blank line begins and ends the CBC segment. No special signs (other than the blank line) are needed to show the beginning or ending of the CBC.

Two CBC Format Rules Add Characters

In addition to the rules for representing characters and capitalization, CBC also mandates where you put those characters on the braille page. When you're transcribing Grade 2, all the format information is presented with indent, runover, and blank lines. One unusual aspect of CBC is that, in addition to indent and runover variation, some formats require the placement of additional characters.

One of these situations involves the "continuation indicator." This combination of two cells shows when a single inkprint line of computer notation runs over to the next braille line. Dots 4-5-6, 1-2-3-4-6 _& at the end of a braille line means that the inkprint line continues on the next braille line. The subsequent material runs over to cell 2 on the next braille line for set off material, or cell 1 for embedded material. Lines should be divided at spaces; when you see a space immediately before the _& continuation indicator, you know it's a meaningful space. If you can't divide at a space, then CBC lets you divide the expression at an arbitrary point.

Suppose your inkprint shows the uppercase letters from A to Z on one line, with one space between each one. If this was transcribed in set-off CBC on a 40-cell line, it would look like: ~ _a _b _c _d _e _f _g _h _i _j _k _& _m _n _o _p _q _r _s _t _u _v _w _x _& _y _z

Another CBC format constraint is that lower-cell braille signs can never be isolated. For example, the digit 2 is represented by dots 2-3. If the digit 2 appears with spaces on both sides, or starts the braille line, the braille reader can't be sure what cell it is. CBC says that, if this format situation occurs, preceed the lower-cell sign with our friend dots 4-5-6. There are fifteen characters that are preceded with dots 4-5-6 if they appear isolated in a CBC transcription: the digits 1 through 0, quotation mark, apostrophe, comma, hyphen, or semicolon. So when the inkprint looks like: ~

1 - Copy Files

2 - Delete Files

3 - Rename Files

then the CBC transcription is: ~

_1 _copy _files

_2 _delete _files

_3 _rename _files

Or as braille cells: dots 4-5-6, Nemeth 1, space, 4-5-6, 3-6, space, 4-5-6, c, o, p, y, space, 4-5-6, f, i, l, e, s, and so forth.

Spaces and Indentation

On a typewriter, you use the spacebar to format your document. One of the first things you learn when using a word processor is that space is actually a character. When spaces appear inside a computer program, they are usually significant or "meaningful" spaces. However, computer manuals can also use spaces at the start of each inkprint line to illuminate a program's structure. Since spaces can play two roles, CBC provides two ways to transcribe them. The multiple spaces that are used to show indentation (at the beginning of a line) are handled differently from the meaningful spaces that may be found inside of a line.

When in doubt, spaces at the start of the line are considered as levels of indentation, not as "meaningful spaces." The braille lines follow the same pattern of indentation as the print, but do not necessarily use the same number of spaces. The first level starts in cell 1, the second level in cell 3, the third in cell 5, and so on--regardless of the number of spaces used for the inkprint indentation. Runovers always begin in cell 2, regardless of the indentation.

When there are fewer than five meaningful spaces in a row, you just use that number of blank cells in braille. For five or more meaningful spaces, CBC provides a "countable spaces indicator." The countable spaces indicator's total length is equal to the number of meaningful spaces. It starts with one space, then dots 4-5-6, followed by a variable number of full cells, finished by a single space. The number of full cells is three less than the number of meaningful inkprint spaces. For example, the inkprint looks like: ~



Program line 10 contains 13 meaningful spaces, while line 20 contains 15 meaningful spaces. The CBC transcription on a 40-cell line looks like: ~

10 _>print _" _========== _>pick _& _>one _>from" 20 _>print _" _============ _>this _& _>menu"

In braille cells, we have Nemeth 1, Nemeth zero, space, 4-5-6, 3-4-5, p, r, i, n, t, space, 4-5-6, dot 5, space, 4-5-6, ten full cells, space, 4-5-6, 3-4-5, p, i, c, k, space, 4-5-6, 1-2-3-4-6, (next line) space, 4-5-6, 3-4-5, o, n, e, space, 4-5-6, 3-4-5, f, r, o, m, dot 5. (new line) Nemeth 2, Nemeth zero, 4-5-6, 3-4-5, p, r, i, n, t, space, 4-5-6, dot 5, space, 4-5-6, twelve full cells, space, 4-5-6, 3-4-5, t, h, i, s, space, 4-5-6, 1-2-3-4-6, (next line) space, 4-5-6, 3-4-5, m, e, n, u, dot 5.


Emphasis is often used to differentiate between what a human types and how the computer responds. The inkprint shows this with underlining or two different typefonts. CBC's begin emphasis indicator is _* or dots 4-5-6, 1-6. The ending emphasis indicator _/ is dots 4-5-6, 3-4. The begin emphasis and ending emphasis indicators are adjacent to the word or symbol being emphasized. CBC emphasis is different from grade 2 italics. A single emphasis indicator appears at the start of the emphasized passage, which is terminated by a single end emphasis indicator.

When embedded computer braille starts out emphasized, then the generic "Begin CBC" indicator is suppressed. Since _* is only meaningful in CBC, its presence is sufficient to signal the start of embedded CBC notation. However, the end emphasis indicator is always required, so one embedded, emphasized CBC word ends with the end emphasis indicator followed by the generic end CBC indicator. When there are more than two typefonts in the inkprint, then CBC provides two "transcriber's option" symbols. The transcriber can use them for additional emphasis indicators, or to represent a non-ASCII character that occurs frequently in the text.

Shape Indicators

The CBC shape indicators allow the representation of non-ASCII characters, and also "keycaps" typefaces. The begin shape indicator is _$ or dots 4-5-6, 1-2-4-6. The end shape indicator is CBC's generic "termination" indicator _: or dots 4-5-6, 1-5-6. For example, when a programming language uses an open box character, the CBC transcription could be _$$4_: or dots 4-5-6, 1-2-4-6, 1-2-4-6, 2-5-6, 4-5-6, 1-5-6. The $4 construct is borrowed from Nemeth code.

Many inkprint computer manuals show pictures of individual keys with the character name inside a small box. For these "keycaps," CBC uses the letter k followed by the key name, enclosed in the shape indicators. So when the manual always shows a picture of the "Enter" key, then the CBC transcription would be _$kenter_: or dots 4-5-6, 1-2-4-6, e, n, t, e, r, 4-5-6, 1-5-6.

Shape indicators can appear in both set-off and embedded CBC transcriptions. Similar to the "Caps Lock" and "Begin Emphasis" indicators, the CBC "Begin Shape" indicator implies the beginning of embedded CBC. So when an embedded CBC shape indicator is the first CBC symbol, the explicit CBC indicator is suppressed in favor of the CBC shape indicator. However, the termination indicator that finishes up the shape indicator does not neccesarily mean the end of CBC, so you may have two termination indicators in a row. When the inkprint shows: ~

Press [picture of key with solid Apple] with [picture of key with left arrow] to move back one word

the CBC transcription would be ~

,press _$ksa_:_: ) _$k$[_:_: 6move back "o ^w

In dots, that's dot 6, p, r, e, s, s, space, 4-5-6, 1-2-3-5, k, s, a, 4-5-6, 1-5-6, 4-5-6, 1-5-6, space, "with" sign, space, 4-5-6, 1-2-3-5, k, 1-2-3-5, 2-4-6, 4-5-6, 1-5-6, 4-5-6, 1-5-6, space, 2-3-5, m, o, v, e, space, b, a, c, k, space, dot 5, o, space, dots 4-5, w.

For these keycaps, we used the letters "sa" to stand for the picture of the solid Apple, and the Nemeth code "left arrow" construct for the picture of the left arrow key.

Half Line Shifts and Nemeth Code

Half shifts down or up are really subscripts and superscripts. A half shift down is often used to show number bases; 14F with a subscript 16 would mean the hexadecimal number 14F. The half shift down indicator is dots 4-5-6, 1-4-5-6 or _? in computer braille. Return to the baseline is shown by either a space or the generic termination indicator, _: dots 4-5-6, 1-5-6. A half shift up (much rarer than shift down) is _# dots 4-5-6, 3-4-5-6. It is also terminated by dots 4-5-6, 1-5-6.

If some material is in mathematical notation instead of computer notation, it is necessary to use Nemeth code. Examples are formulas and equations. A horizontal fraction line or a dot used for multiplication are symptoms of mathematical notation.

In CBC, the start of Nemeth code is shown with _% dots 4-5-6, 1-4-6. To show the end of Nemeth code, use CBC's generic termination indicator _: dots 4-5-6, 1-5-6. CBC says that Nemeth code always occurs within Computer Braille Code. If the Nemeth code is set off then no beginning and ending CBC indicators are required; the blank line separating the literary text from the CBC/Nemeth is sufficient to show the switch in codes.

When the Nemeth Code is embedded within a literary paragraph, then the _+ begin CBC indicator is suppressed in favor of the _% start Nemeth indicator. But when you end both Nemeth and CBC, you must have two termination indicators: one to get out of Nemeth code (and into Computer Braille), and one to take you back to literary code.

Summing Up

This article has only been an overview. For the full details on CBC, please take advantage of the resources listed in Facts on File. We have not delved deeply into some of the stickier format issues, mainly because the software RDC is developing takes care of them without user intervention.

Designing an automatic way to handle the translation and format of Code for Computer Braille Notation has been a very exciting project. Many books about computers are already available in machine readable form. Adding CBC capabilities to TranscriBEX will result in a flexible tool for the job. Once the bulk of the text is captured, then the major work is in adding the appropriate formatting indicators, and BEX's contextual Replace has proved to be a great help. The transition between "normal text" and "computer output" is an important distinction for the inkprint. The machine readable file generally contains indicators which can be globally replaced to the indicators needed for our CBC software.

For example, RDC has transcribed some of the documentation for PC-Write using the CBC. These materials were printed from the IBM to the Apple using BEX 3.0. Once the files were happily in BEX chapters, we did all the necessary editing, transformation, and translation. The final files (in English Braille and CBC) were transferred back to the IBM. It took about three days to finish the project, which resulted in formatting over 150 pages of braille. More than half the formatting indicators were placed automatically using the tools of BEX. There is no doubt that these tools will greatly increase the amount of computer-related text available in braille.

BEX Trick Reference Card

This monthly column features nifty ways to put BEX to work. Contributions are always welcome!

Making Search and Replace Easier in the Editor -- Caryn Navy

When I'm in the final stages of editing a document, I find myself using the control-L locate command to review a variety of different things throughout the chapter. It's tedious to define seven new locate strings on each and every page! I've found out how to use Replace characters first to make the whole process easier and more efficient. Before I edit the chapter, I use Replace to add a distinctive marker, like the tilde character, before each one of the various items I want to check. Once the Replace is finished, I can Locate for the tilde to find a host of different things. Contextual Replace can enhance this process even more.

Suppose I want to check on the status of three things in my chapter: I want to confirm all the phone numbers; I want to see if I've overused the words "paired with" and "paired to"; and I want to change every occurrence of "type" to "press." I know from grim experience that the last transformation can create all sorts of havoc: "typewriter" becomes "presswriter" and other sillinesses. To find all these items and precede them with the tilde character, I'd write the following contextual transformation rules.

Enter terminator: |

Find: |

Contextual replace

On string: |

Off string: |

Find: 555-1212|

Pattern: ^NNNXNNNN|

Change to: ~|

Find: paired|

Pattern: ^IIIIII|

Change to: ~|

Find: type|

Pattern: |

Change to: ~press|

Find: Type|

Pattern: |

Change to: ~Press|

Find: |

Change to: |

Continue? Y <CR>

Starting to replace ...

Now I can edit this transformed chapter and locate for the tilde character, which will show up at all the text I'm interested in.

Counting Words in BEX Chapters -- Jesse Kaysen

When working with BEX chapters, it's easy enough to find out how many characters you have. In any one page, you merely press control-W C (or glance at the character count in the lower left hand corner). For a character count of all pages in a chapter, you can use option F - File List at the Page Menu. And for a character count of all chapters on a disk, option W - Whole disk catalog does the trick. But BEX lacks a built-in way to count words.

That's a drag, since many times we're faced with the task of writing a "100-word summary" or a "5000-word essay." Using contextual Replace, I've developed a way to quickly count words in a BEX chapter. My technique only works with one chapter at a time, and I can't guarantee that it's 100 percent accurate. However, it is very quick, and it comes close enough for most purposes.

Basically, what I do is count all the spaces or <CR>s in one chapter, except for the spaces or <CR>s before a BEX $$ command or the leading space of a paragraph ($p) or new-line ($l) indicator. Suppose the first sentence of a paragraph looks like this:

$pI whole-heartedly enjoyed reading $$ub The Cat in the Hat, $$uf and think you will enjoy it too.

When you're working in BEX's Editor, a "word" is any group of characters bounded on either side with a space or a <CR>. So this sentence has a total of 19 words: the text is 16 words, plus one word for the paragraph ($p) indicator at the start, plus two words for the underline begin and underline finish commands. The space that defines the end of the word "reading" also defines the beginning of the word ""; the space that defines the end of the "" also defines the beginning of the word "The". If I count all the spaces except a space that's immediately followed by one dollar sign, then I end up counting all the spaces that define real words (as opposed to BEX format commands).

Here's the contextual Replace dialog that accomplishes the task:

Enter terminator: |

Find: |

Contextual replace

On string: |

Off string: |

Find: <Space>$|

Pattern: D^O|

Change to: |

Find: |

Change to: |

Continue? Y <CR>

Starting to replace

Replaced # times ...

When BEX tells me "Replaced # times" the number is equal to the number of words in my chapter. Let's take a look at how this single transformation rule works. The Find string is one space followed by one dollar sign. This matches both the first two characters in a paragraph or new-line indicator and the first two characters in any double dollar sign command. The Pattern string is three characters: uppercase D, caret, uppercase O. The D pattern code stands for Delimiter: it matches either space or <CR>. The O pattern code stands for Other than; when paired with the dollar sign, it matches every character in a BEX chapter with the single exception of the dollar sign. Both the D and O pattern codes are uppercase, which means that the characters they're paired with remain in the transformed chapter.

But contextual Replace won't let you have a pattern string of only uppercase characters: BEX requires that some change occur in the replacement. So I slip the caret pattern code into the middle of the pattern string. The caret means "Insert the change to string at this point." BEX will permit a pattern string that contains all uppercase pattern codes as long as there is also one caret in the pattern string. I then pull a fast one and define an empty change to string, so no text is inserted after all. Running this transformation does not alter my chapter in any way, so I can confidently use the same name for source and target chapter.

With BEX 3.0, you can save this transformation chapter on your program disk. Whenever you want to count the words in a chapter, you simply specify this contextual transformation chapter from disk. BEX makes a large number of clicks, then announces "Replaced # times" and you have your word count.

With older versions of BEX, however, I encountered a bug that affects how BEX displays the "Replaced # times" message. With BEX 2.2 or earlier, once BEX is done replacing it announces "Replaced # times" and then immediately clears the screen. If you're willing to stay close to your computer to get that number as it flashes by, then there's no problem. But if you want to review the "Replaced # times" message at your leisure, I've developed a workaround to do just that.

When I first encountered the bug, I thought, "Well, I guess I'll just have to type my single transformation rule directly each time." Then I realized that an automatic procedure chapter could do that for me.

At the Main Menu, I pressed control-R so BEX would start remembering my keystrokes. I choose replace characters, and specified the Zippy chapter as both source and target. Then I typed the single contextual replace rule shown above, and BEX went through the process of finding and replacing, then announcing the number of replacements. When I was prompted for a transformation chapter name, I just pressed <CR>. When I was back at the Main Menu prompt, I pressed control-S to save my automatic procedure chapter to disk, under the name WC, then immediately edited it.

As always, the last character in an auto chapter is a high-bit-set character. The next-to-last character in the auto chapter was the <CR> I'd pressed at the "Save transformation chapter:" prompt. I deleted that <CR>. Now, when I press control-A at the Main Menu and specify WC, it counts the words in my Zippy chapter. When I come back to my computer, the number of replacements is waiting on the top line of the screen. I simply press <CR> to not save the transformation chapter, and I'm done.

Why Dipner Dots Doesn't Work Right in Hot Dots and How to Fix It -- Caryn Navy & Nevin Olson

One option in Hot Dots versions 1.0 and 1.5 is a type of brailling called "Dipner Dots." We named this technique in honor of Randy Dipner, who first had the idea of modifying a daisy-wheel printer to create braille. Dipner Dots is really two things: hardware modifications to your daisy-wheel printer, and special "driver" software. The Dipner driver breaks each line of braille into three lines in inkprint: one line contains periods where all the dots 1 and dots 4 are embossed; the next line contains periods for all the dots 2 and 5, while the third line has periods for the dots 3 and 6. When all works well, the Dipner driver, in combination with a lightly modified daisy-wheel printer, creates draft-quality braille very inexpensively.

Up until recently, we thought all was well with the Dipner program in Hot Dots. The Dipner Dots instructions in the Hot Dots manual explain in agonizing detail how the process works. However, we did not intend using Dipner to be as agonizing as several of you have found it. Some users have tried to do Dipner Dots and ended up with all your dots at the right hand edge of the page, piled on top of one another.

We've traced the problem to the bane of all software publishers and users: it's a bug! The Dipner driver in Hot Dots 1.0 and 1.5 does not end each line of output correctly. Each Dipner line should end with carriage return followed by three occurences of two characters: Escape then uppercase U. (We'll show this as <Esc>-U.) Each <Esc>-U tells the printer to do one half linefeed. At the end of every third Dipner line--dots 3 and 6 in every cell--there is one additional <Esc>-U to add space between the braille lines. The Hot Dots Dipner driver only puts in the <Esc>-U characters, assumming that the printer will generate its own carriage return.

That's the bad news. The good news is that we've come up with an automated workaround. It's a three-step process. First, you use Dipner from the command line to create a formatted textfile. (You can't use the Dipner choice from Hot Dots' menu, because the menu does not let you print to disk.) Next, you transform the data in the textfile with Global, inserting the at the end of each Dipner line. Finally, you output the modified file at the command line. (Again, you can't use Hot Dots' menu, because that would just recreate the problem you're working around.) First we'll provide the step by step procedure, then we'll give you a BATCH file that does all the work in one fell swoop.

Step-by-Step through the Dipner Fix

Let's suppose that the file you want to emboss with Dipner Dots is named DIPTXT.BFM. This file is already in grade 2 braille and formatted. The following samples are shown in lowercase, but of course DOS doesn't care about case so you could type caps just as well. We show one press of the Enter key with [Enter]. Following the conventions in the DOS manuals, we show file specifications beginning with "d:" to stand for any drive letter. If your files are on your b drive, then substitute "b:" for "d:" in our samples. The first step is running Dipner from the command line:

A> dipner d:diptxt.bfm d:diptxt.tmp [Enter]

The resulting DIPTXT.TMP file has only the <Esc>-U characters at the end of each Dipner line, instead of plus <Esc>-U. When the last dot on the Dipner line is not embossed, the end of the line looks like <Space><Esc>. When the last dot on the Dipner line is embossed, the data looks like <period><Esc>. So you need to run two rules in Global: locate every occurence of <Space><Esc> and replace it with <Space><Esc>, and locate <period><Esc> and replace with <period><Esc>. Remember that control characters in Hot Dots rules must be represented by one tilde followed by the hexadecimal value. is ~0D and Escape is ~1B. Here's the dialogue when using Global to create the rules:

A> global [Enter]

Global Search and Replace

Input file: d:diptxt.tmp [Enter]

Output file: d:diptxt.prn [Enter]

Load global replacements from disk? n [Enter]

Enter a blank rule to end rule table.

From: <Space>~1B [Enter]

To: <Space>~0D~1B [Enter]

From: .~1B [Enter]

To: .~0D~1B [Enter]

From: [Enter]

Save this table in a file (Y or N)? Y [Enter]

Table file name? dipfix.rul [Enter]

As long as you have issued the appropriate commands to your printer, this modified DIPTXT.PRN file will emboss correctly. The Dipner technique depends on your telling the printer to change its vertical and horizontal spacing. Check your printer manual for the actual commands. Many daisy-wheel printers respond to the following sequence: <Esc> . The at the end sets the vertical distance between dots. If you want to make that shorter, use . If you want to make it taller, use . Horizontal spacing can be set by the following sequence: <Esc> . Use an editor to create this file, naming it something like PRINTER.ESC.

Don't despair if you can't type control characters in your editor--use Global instead. Using EDLIN, create a file named PRINTER.ESC containing the single word "setup." Then use Global to replace the word "setup" with the vertical and horizontal sequences, shown here in hexadecimal:


Print this file immediately before the braille file you want Dipner-ed.

Modifiying Vertical Spacing

When you use the rules shown above, the braille lines are spaced fairly close together vertically. If you want more space between braille lines, add another Global rule. Change the four <Esc>-U characters (which appear every third Dipner line) to six <Esc>-U characters. If you do this, you will have more space between the dots 3 and 6 in one braille line and the dots 1 and 4 in the next. The <Esc> character is entered as ~1B in a Global rule.

The final step is actually printing your transformed file using DOS. Here's what you type:

A> print d:printer.esc d:diptxt.prn [Enter]

You can't use Hot Dots' Menu to print the file, because Hot Dots would undo all of your efforts.

Creating a Batch File

You now have all the pieces for the batch process. To make a workable batch file, you must decide on a consistent set of names for your batch file, rules file, and any textfiles you use. You cannot use DIPNER (since that's the name of the program used in one step of the batch process.) For the sake of example, we'll use the same filenames as we show in the step-by-step procedure. PRINTER.ESC contains the crucial set-up commands for your printer. DIPTXT.BFM is the formatted, translated input file, and DIPTXT.TMP is the Dipner-ized output file on disk. DIPTXT.TMP is used again as the input file to Global Search and Replace, DIPFIX.RUL contains the rules that fix the Dipner format (described earlier), and DIPTXT.PRN is the final output file that is printed using the DOS print command.

Creating your batch file using the built-in DOS Editor, EDLIN, looks like this:

A> edlin d:dipdots.bat [Enter]

New file


At EDLIN's asterisk prompt, get into insert mode by typing "i":

* i [Enter]

1: dipner.com d:diptxt.bfm d:diptxt.tmp [Enter]

2: global.exe d:diptxt.tmp d:diptxt.prn d:dipfix.rul [Enter]

If you have a bootable Hot Dots disk, you can add your DOS print command to the batch file, like so:

3: print d:printer.esc d:diptxt.prn [Enter]

To get out of insert mode, press control-C. At EDLIN's asterisk prompt press e [Enter] to exit EDLIN and save your batch file. Now all you have to do is copy your input file on to this disk with the name DIPTXT.BFM, and then type DIPDOTS.BAT [Enter] at the A> prompt.

After you have the final braille in hand, it's wise to erase your DIPTXT files. The next time you use the batch file, you recreate them, and Hots Dots can behave unpredictably when it's overwriting files. You could copy the files you want to keep to another disk, or simply rename them. You can delete all the DIPTXT files with a single DOS command: erase d:diptxt.* Isn't DOS wonderful?

A Different Approach for Better Spacing

There's an altogether different transformation to your text which creates braille with vertical spacing that's closer to the standard produced by a real embosser. This alternative method changes the <Esc>-U characters from Hot Dots' Dipner driver to pairs. At the end of each Dipner line, replace three <Esc>-U characters with a single pair of characters. Then you replace the remaining <Esc>-U with one , increasing the space between braille lines. The Global dialog would go like this:

A> global [Enter]

Global Search and Replace

Input file: d:diptxt.tmp [Enter]

Output file: d:diptxt.prn [Enter]

Load global replacements from disk? n [Enter]

Enter a blank rule to end rule table.

From: ~1BU~1BU~1BU [Enter]

To: ~0D~0A [Enter]

From: ~1BU [Enter]

To: ~0A [Enter]

From: [Enter]

Save this table in a file (Y or N)? Y [Enter]

Table file name? dipcrlf.rul [Enter]

A modified BATCH file for this approach would look like:

dipner.com d:diptxt.bfm d:diptxt.tmp

global.exe d:diptxt.tmp d:diptxt.prn d:dipcrlf.rul

print d:printer.esc d:diptxt.prn

Whatever method you use, we hope this information lets you create Dipner Dots with Hot Dots. Honesty demands that we warn you, however, that no matter how much you fuss with the spacing, Dipner Dots output is draft quality at best. To meet the Library of Congress standards for braille output, you have to use a real embosser.

Facts on File: Names and Addresses Mentioned in this Issue of the Newsletter

Code for Computer Braille Notation

Print: order number 7-24430-00, cost $5.13

Braille: 5-24430-00, cost $7.22

American Printing House for the Blind

1829 Frankfort Avenue

Louisville KY 40206

Telephone 502-895-2405

Report of the Computer Braille Code Workshop, May 1987

Print: $3 NBA members; $6 non-NBA members

Braille: $13.45 individuals; $39.20 agencies

National Braille Association

1290 University Avenue

Rochester NY 14607

CBC Home-study course in preparation

Hadley School for the Blind

700 Elm Street

Winnetka IL 60093

Telephone: 312-323-4283

Trademarks and Copyrights

Apple Computer and the Apple symbol are registered trademarks of Apple Computer Inc.; IBM-PC is a trademark of International Business Machines, Inc.; MS-DOS is a registered trademark of Microsoft, Inc.; PC-Write is a trademark of Bob Wallace and Quicksoft, Inc.; PostScript is a registered trademark of Adobe Systems, Inc.; TranscriBEX, BEX, and HOT DOTS are trademarks of Raised Dot Computing, Inc.; VersaBraille and VersaBraille II are trademarks of Telesensory Systems, Inc.