home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / HANDICAP / HOTDOTS3.ZIP / MAN2.TXT < prev    next >
Encoding:
Text File  |  1991-05-04  |  60.1 KB  |  1,252 lines

  1.                      Section 6: Braille Translation
  2.  
  3.      In most of this section we discuss translation from print into
  4. braille (forward translation). In the very last part of the section we
  5. discuss translation from braille into print (back translation).
  6.  
  7.                   What translation into Braille means
  8.  
  9.      Translating a file into braille means taking an inkprint file and
  10. making a braille copy. A grade 2 braille file contains the ASCII
  11. characters which create grade 2 braille on a braille device. When you
  12. examine a braille file on the screen or print it to an inkprint printer,
  13. you see the ASCII representation for each braille character. For
  14. example, the word think comes out as ?9k. The th in an inkprint file
  15. becomes a braille "th" sign in the braille file, represented in ASCII as
  16. a question mark. The letter combination in in an inkprint file becomes
  17. the "in" sign in the braille file, represented in ASCII as the digit 9.
  18.  
  19.      When you View a file (option 6), the right side of the screen shows
  20. a guide to "ASCII braille" (which braille cells the ASCII characters
  21. represent). The same information is found in the file ASCIIBRL.TXT on
  22. the Hot Dots manual disk.
  23.  
  24.               Three ways to translate a File into Braille
  25.  
  26.      There are three ways to translate a file using Hot Dots 3.0. You
  27. can use the DOTS menu, you can use a batch file, or you can use the
  28. G2FWD program at the command line.
  29.  
  30. Translation from the DOTS Menu
  31.  
  32.      Type DOTS to get to the menu. Enter 2 followed by <enter> to get to
  33. the translator. You are prompted for an input file and an output file.
  34. Always use the extension .BRL for the output file (to tell the formatter
  35. to format for braille output).
  36.  
  37. Translation from a batch file
  38.  
  39.      We supply two batch files that include translation from print to
  40. braille. DOTS1234 <file name> <word processor type> <output device>
  41. takes a file through all four steps (importation, translation,
  42. formatting, and output). DOTS234 <file name> <output device> takes an
  43. existing HD$ file and performs three steps (translation, formatting, and
  44. output).
  45.  
  46. Translation at the Command Line
  47.  
  48.      The program that does braille translation is called G2FWD. To
  49. translate a file from the command line, enter G2FWD <input file> <output
  50. file> <enter>. If you give the output file the extension .BRL, it will
  51. receive braille formatting by default in the formatting step which
  52. follows.
  53.  
  54.                            Quick Experiments
  55.  
  56.      Use CON (console) for the input file and output file to input at
  57. the keyboard and output to the screen (for quick experiments). Press
  58. <enter> to translate a line, and press <control-Z> <enter> to leave the
  59. translator. In the same way, you can also quickly check the results of
  60. other Hot Dots commands, without creating any temporary files.
  61.  
  62.               Special Handling: Carriage Returns, Dashes,
  63.             Discretionary Line Breaks, and Accented Letters
  64.  
  65.      The Print to braille translator turns each carriage return/linefeed
  66. into a space. Therefore, if you want to force a hard return in the
  67. braille output, use an indicator like ( $l ) in the .HD$ file.
  68.  
  69.      The Print to braille translator turns space, hyphen, space into two
  70. hyphens (with no spaces) in the braille file.
  71.  
  72.      The translator also places the discretionary line break character
  73. next to hyphens and dashes. This character is ASCII 30, which appears on
  74. the screen as a solid triangle pointing up (block up arrow). The
  75. formatter interprets this character as a signal to move to a new line if
  76. the rest of the word does not fit on the current line. The translator
  77. places this after a hyphen (dots 3-6) and before and after a dash (dots
  78. 3-6, 3-6).
  79.  
  80.      The "extended ASCII" system includes symbols for accented letters.
  81. For these symbols, the Print to braille translator generates dot 4
  82. followed by the base letter. For example, for ASCII 130 (e acute), the
  83. translator creates dot 4 followed by e; for ASCII 144 (capital E acute),
  84. it generates dot 6, dot 4, e. The translator also lets you to create the
  85. special braille cells for accented letters used in foreign language
  86. textbooks (discussed later in this Section in the list of "Other
  87. Translation Codes").
  88.  
  89.             Translating Nonliterary Punctuation into Braille
  90.  
  91.      Some punctuation marks, such as the backslash, are not covered by
  92. the grade two rules. These are especially common in text about
  93. computers. Furthermore, punctuation marks which are covered by the grade
  94. 2 rules are often used in a position not covered by the grade two rules.
  95. When the Print to braille translator encounters these punctuation marks,
  96. it generates a letter sign (dots 5-6) followed by the CBC symbol for
  97. that character. There are a few exceptions. For the less than sign and
  98. greater than sign, the translator creates dot 4 followed by the CBC
  99. symbol. For comma, semicolon, and period in a nonliterary context, the
  100. translator generates a letter sign followed by the usual grade two
  101. symbol. For a punctuation mark which has a literary (grade two)
  102. translation, you can force the regular translation (grade two) by
  103. placing @r (at-sign r) before the character in the inkprint file. You
  104. can also force the $ub display translation $uf (nonliterary) by placing
  105. @d (at-sign d) before the character.
  106.  
  107.            Translator Codes for Print to Braille Translation
  108.  
  109.      There may be times when you want to control the behavior of the
  110. translator. Hot Dots offers a rich supply of specialized codes to
  111. control the action of the translator. All the translator codes start
  112. with an at-sign (@).
  113.  
  114. Translation Modes
  115.  
  116.      The Print to braille translator has 4 separate modes. These are
  117. grade two (also known as literary mode), grade one, no translation, and
  118. British mode. The translator starts out in grade two translation. This
  119. produces standard American, contracted (abbreviated) braille. Grade one
  120. translation handles numbers, punctuation, and capitalization as in grade
  121. two, but there are no contractions. With no translation, the print text
  122. is not changed. The characters in the inkprint file are left unchanged
  123. in the braille file. No translation is designed for instances where you
  124. enter the braille directly. Do not confuse "no translation" with grade
  125. one. Ordinary text brailled with "no translation" (sometimes called MIT
  126. computer braille) has nonliterary numbers and punctuation and does not
  127. show capitalization. Finally, British translation mode in Hot Dots
  128. suppresses the use of the capitalization indicator (dot 6). If you turn
  129. on grade one translation while British translation is on, you get
  130. British grade one (no contractions and no capitalization indicators).
  131.  
  132.      Each code for changing the translation mode consists of three
  133. characters: an at-sign, a lowercase letter, and a space. These three
  134. characters disappear in the braille file, leaving no space. To change
  135. translation modes between words, leaving a space in the braille file,
  136. place a space before the at-sign code in the inkprint original. Here are
  137. the codes for these translation modes:
  138.  
  139. @l <space> -- literary translation mode (grade two)
  140.  
  141. @o <space> -- grade one translation mode (when entered from British
  142.      translation mode, does not restore capitalization indicators)
  143.  
  144. @n <space> -- no translation mode
  145.  
  146. @b <space> -- British translation mode (no capitalization indicators)
  147.  
  148.      Make sure you include the final space in these commands. You can
  149. change translation modes inside a word by leaving out the space before
  150. the at-sign, but you still need a space after the code letter. Don't
  151. worry, the Hot Dots translator will take out the space.
  152.  
  153.      The following data entry gives the word "think" in grade one in the
  154. middle of a sentence in grade two: So therefore, I @o think @l you are
  155. wrong.
  156.  
  157. Other Translation Codes
  158.  
  159.      Here is the list of other translation codes. All of them start with
  160. an at-sign (@). Some of them work only if you are in grade one
  161. translation mode.
  162.  
  163. @a -- accent Acute. Place this after the letter being accented. Use only
  164.      in grade one translation mode.
  165.  
  166. @g -- accent grave. Place this after the letter being accented. Use only
  167.      in grade one translation mode.
  168.  
  169. @, -- accent cedilla. Place this after the letter being accented. Use
  170.      only in grade one translation mode.
  171.  
  172. @" -- accent diaeresis or umlaut. Place this after the letter being
  173.      accented. Use only in grade one translation mode.
  174.  
  175. @^ -- accent circumflex. Place this after the letter being accented. Use
  176.      only in grade one translation mode.
  177.  
  178. @s -- Spanish accent. Place this after the letter being accented. Use
  179.      only in grade one translation mode.
  180.  
  181. @? -- Spanish question mark, regular or up-side-down).
  182.  
  183. @e -- diphthong with e. Use only in grade one translation mode. Place
  184.      this after the letter being accented.
  185.  
  186. @` -- generic accent for this letter (put dot 4 in front of it). Place
  187.      the command before the letter.
  188.  
  189. @; -- force a letter sign here.
  190.  
  191. @p -- prevent a letter sign.
  192.  
  193. @i -- inert sequence. To alter translation, place @i between letters
  194.      that you do not want contracted. You can also put @i between other
  195.      characters that you don't want the translator to find next to each
  196.      other. For example, the combination space, hyphen, space becomes
  197.      two hyphens (a braille dash) surrounded by the "discretionary line
  198.      break character." f you do not want this, place @i next to the
  199.      hyphen. As another example, when the translator finds a hyphen
  200.      followed by a letter, it places a discretionary line break
  201.      character after the hyphen. If there is a hyphen where you don't
  202.      want the line broken (as in stammering), place @i after the hyphen.
  203.  
  204. @f -- force a character. The next character is passed on in the
  205.      translation.
  206.  
  207. @t -- transcriber mark.
  208.  
  209. @d -- display punctuation with letter sign. Hot Dots places a letter
  210.      sign in front of non-traditional punctuation (i.e., potentially
  211.      confusing when read in grade 2 braille). An @d in front of
  212.      punctuation forces this special display.
  213.  
  214. @r -- regular punctuation. place this before punctuation if you want the
  215.      traditional grade two version (no matter how confusing it is).
  216.  
  217. @' -- regular apostrophe (dot 3, not a single quote).
  218.  
  219. @o' -- open single quote.
  220.  
  221. @c' -- close single quote.
  222.  
  223. @o" -- open double quote.
  224.  
  225. @c" -- close double quote.
  226.  
  227. @o- -- opening Spanish conversation sign.
  228.  
  229. @c- -- closing Spanish conversation sign.
  230.  
  231. @@ -- at-sign.
  232.  
  233. Underlining and Italics
  234.  
  235.      When the file file from your word processor calls for italics,
  236. underlining, or other kinds of emphasis, the file importation program
  237. encloses the material between $$ub and $$uf. To the Hot Dots inkprint
  238. formatter, the $$ub means "underline begin" and the $$uf means
  239. "underline finish". When you print the inkprint file with Hot Dots, the
  240. enclosed words are underlined.
  241.  
  242.      Underlining in inkprint is indicated in braille with the italics
  243. indicator. The translator looks for the underlining commands and inserts
  244. the correct indicators for braille italics. In an underlined passage of
  245. three or fewer words, the single italics indicator, dots 4-6, precedes
  246. each word. In an underlined passage of four or more words, the double
  247. italics indicator, two cells of dots 4-6, precedes the first word, and a
  248. single italics indicator precedes the last word.
  249.  
  250.             Report any Irregularities in Braille Translation
  251.  
  252.      Please report any translation errors you may encounter when using
  253. Hot Dots. At Raised Dot Computing, we strive towards the elusive goal of
  254. a perfect braille translator. You can assist us by reporting any
  255. glitches you encounter.
  256.  
  257.      From time to time, Raised Dot may offer discounts on future
  258. purchases to those who alert us to a glitch that we were previously
  259. unaware of. To qualify, all reports must be in writing. Contact Raised
  260. Dot Computing for more information about discount offers and
  261. restrictions which may apply.
  262.  
  263.      Raised Dot Computing will supply to any registered user, upon
  264. request, a description of all known Print to braille translation errors
  265. in Hot Dots 3.0.
  266.  
  267.                           The Back Translator
  268.  
  269.      The Back Translator is a poor cousin to the forward translator.
  270. While most Hot Dots users concentrate on translating inkprint into
  271. braille, a few hardy souls want to go in the other direction. Perhaps
  272. you accidentally deleted an inkprint file for which you have a braille
  273. copy. Perhaps you write in grade two on your VersaBraille and you want
  274. an inkprint copy. Whatever your motivation, you will find the Hot Dots
  275. back translator to be excellent and virtually error free.
  276.  
  277. Two Ways to Translate a File from Braille into Inkprint
  278.  
  279.      There are two ways to translate a file from braille to print using
  280. Hot Dots 3.0. You can use the DOTS menu, or you can use the G2BACK
  281. program at the command line.
  282.  
  283.      Type DOTS to get to the Hot Dots main menu. Enter 7 followed by
  284. <enter> to get to the back translator. You are prompted for an input
  285. file and an output file.
  286.  
  287.      The program that does back translation is called G2BACK. To
  288. translate a file from the command line, enter G2BACK <input file>
  289. <output file> <enter>.
  290.  
  291. Improving the Back Translation
  292.  
  293.      The back translator response to the two translation codes @n
  294. <space> for no back translation and @l <space> for literary back
  295. translation (translation from grade two). When material is enclosed
  296. between @n <space> and @l <space>, it is not affected at all by the back
  297. translator. If a passage in grade two might confuse the back translator,
  298. you can use MIT computer braille instead and enclose it between @n
  299. <space> and @l <space>.
  300.  
  301.      The at-sign is dot 4 on a braille device. But be careful. Dot 4 on
  302. your braille device can also be saved as the accent grave character. You
  303. may need to issue a command on your braille device to make the dot 4
  304. uppercase. In addition, you need to make sure that the letters n and l
  305. in these codes are lowercase. To avoid worrying about this, you may want
  306. to perform Global search and replace before back translation to replace
  307. the accent character with the at-sign and the uppercase letters N and L
  308. with the lowercase letters. The case of characters is not relevant for
  309. any other function of the back translator.
  310.  
  311.      One troublesome area is unusual punctuation, or punctuation used in
  312. a way not usually seen in normal text. One example is a period inside a
  313. word (as in an MS-DOS filename). If you just use a dropped d, the back
  314. translator creates dd inside the word. Instead, put a letter sign (dots
  315. 5-6) before the dropped d. When the back translator sees the letter
  316. sign, dropped d combination, it creates a period in the inkprint file.
  317. Please note: you only need the letter sign when you want to use the
  318. period in a way that would confuse the translator.
  319.  
  320.      Two other handy codes are letter sign dropped a for comma and
  321. letter sign dropped b for semicolon. For other punctuation marks, you
  322. can use letter sign followed by the CBC representation. For example, you
  323. can use letter sign followed by "st" sign for a slash; letter sign
  324. followed by "ou" sign for a backslash; letter sign, dots 4-5-6, "ou"
  325. sign for a vertical bar; and letter sign followed by the "ch" sign for
  326. an asterisk. The less than sign and greater than sign are exceptions.
  327. Use dot 4 followed by "gh" sign for the less than sign and dot 4
  328. followed by the "ar" sign for the greater than sign. These braille
  329. symbols are also created by the forward translator.
  330.  
  331.      When you are in doubt, you can use CON as the input file and output
  332. file to back translate individual lines from the keyboard.
  333.  
  334. Processing a File After Back Translation
  335.  
  336.      After you have used the back translator to create an inkprint file,
  337. you may want to check it over and edit it. However, you may need to add
  338. carriage returns before you can load it into your word processor. You
  339. can do that with the batch file DIRTY. Just type DIRTY <file name>
  340. <enter> to divide the text into lines of reasonable length and store the
  341. results in the same file. Then, before you run the formatter, remove the
  342. carriage returns with the batch file CLEAN. Type CLEAN <file name>
  343. <enter>, and the same file has the carriage returns removed.
  344.  
  345.                          Section 7: Formatting
  346.  
  347.                                 Overview
  348.  
  349.      This section discusses how to control what your text looks like
  350. when you send it out to a printer. After translation and before output,
  351. you need to format your text. Formatting takes a source file that
  352. contains encoded format information (dollar sign format commands) and
  353. creates an output file which is the character-for-character image of the
  354. actual hardcopy pages.
  355.  
  356.      When you import a file, the importation system places formatting
  357. commands in the Hot Dots .HD$ file. If you want to, you can use your
  358. word processor on the .HD$ file to modify the text or the format
  359. commands. The usual point at which to modify your text for braille
  360. output is after file importation but before translation, formatting, and
  361. output.
  362.  
  363.                     Braille vs. Inkprint Formatting
  364.  
  365.      Hot Dots can format text for either braille or inkprint output.
  366. Some format instructions (for paragraphs, page numbering, and
  367. underlining, for example) behave differently when formatted for braille
  368. or for inkprint output. Because the major focus of Hot Dots is braille,
  369. the formatter's default style is braille formatting, unless the carriage
  370. width is over 45. When you establish a carriage width over 45, the
  371. default style is inkprint formatting. When you format a file with the
  372. .BRL extension, the formatter performs braille style formatting (even if
  373. the carriage width is over 45). To force the mode to inkprint or to
  374. braille, use the FTEXT command at the command line with a slash I
  375. (inkprint) or slash B (braille) switch. These switches have the final
  376. say (see Section 10 for details).
  377.  
  378.                            New Line Commands
  379.  
  380.      There are four format commands which force a new line. These are as
  381. follows:
  382.  
  383. $p -- New paragraph symbol.
  384.  
  385. $l -- New line symbol (just like a carriage return)
  386.  
  387. $s -- Skip line symbol, same as a paragraph symbol only with an extra
  388.      blank line
  389.  
  390. $f -- Form feed (new output page)
  391.  
  392.      Each of these needs a space before it and a space after it. The
  393. paragraph symbol is very flexible. Depending on the previous commands, a
  394. paragraph can vary the indent and the number of blank lines between
  395. paragraphs. For inkprint formatting, the default is two carriage returns
  396. (one blank line) and five spaces. For braille formatting, the default is
  397. one carriage return (no blank line) and 2 spaces.
  398.  
  399.                       Three ways to Format a File
  400.  
  401.      There are three ways to format a file with Hot Dots 3.0. You can
  402. use the DOTS menu, you can use a batch file, or you can use the FTEXT
  403. program at the command line.
  404.  
  405. Formatting from the DOTS Menu
  406.  
  407.      Type DOTS to get to the menu. Enter 3 followed by <enter> to get to
  408. the formatter. You are prompted for carriage width and form length and
  409. then for an input file and an output file.
  410.  
  411. Formatting from a Batch File
  412.  
  413.      We supply two batch files that perform formatting. DOTS1234 <file
  414. name> <word processor type> <output device> takes a file through all
  415. four steps (importation, translation, formatting, and output). DOTS234
  416. <base name> <output device> takes the existing file <base name>.HD$ and
  417. performs three steps (translation, formatting, and output).
  418.  
  419. From the Command Line
  420.  
  421.      The program that does formatting at the command line is called
  422. FTEXT. To format a file at the command line, enter FTEXT <input file>
  423. <output file> <enter>. Several switches (slash codes listed on the
  424. command line) are available to establish carriage width, form length,
  425. and braille or print formatting (see Section 10 for details).
  426.  
  427.                      Dollar Dollar Format Commands
  428.  
  429.      Most of the format commands start with two dollar signs. Hot Dots
  430. recognizes format commands only when they're entered according to
  431. specific rules. Every $$ command must be preceded and followed by a
  432. space or carriage return. All letters in format commands must be
  433. lowercase. For example, $$np starts page numbering; $$NP just prints two
  434. dollar signs and uppercase NP in your text. Most format commands are
  435. mnemonic; the letters in the command represent the command's function.
  436. Some format commands contain numbers; numbers always follow letters. In
  437. these descriptions, we use #, the number sign, in place of a specific
  438. numeric value.
  439.  
  440.      When you enter format commands in your text, they appear on screen.
  441. When you format material, the format commands perform their function and
  442. the dollar sign commands do not show up in the formatted text.
  443.  
  444.      The formatter executes some commands differently when you're
  445. formatting for print than when you're formatting for braille; details of
  446. these differences are covered in the descriptions of individual
  447. commands.
  448.  
  449.                             Format Commands
  450.  
  451.      These commands must be preceded and followed by a space or carriage
  452. return. Command letters must be lowercase; when you use braille data
  453. entry, use computer braille for numbers.
  454.  
  455. $$a# -- advance to line # where # ranges from current line to form
  456.      length. Example: $$a# forces a series of new lines until the next
  457.      material begins on the 8th line.
  458.  
  459. $$c <space> -- center text in current output line plus all subsequent
  460.      output lines until next command which forces a new line. Use the
  461.      command $$c before text you want to center. At the bottom of a
  462.      page, $$c moves to the next page, to avoid separating a centered
  463.      heading from the text which follows. Compare with $$ve.
  464.  
  465. $$cx -- centering extended: center all lines until next left margin
  466.      command.
  467.  
  468. $$d -- reset everything except carriage width and form length to the
  469.      default: clear tabs and margins, clear headers and footers, single
  470.      line spacing, paragraph indent and line spacing as appropriate for
  471.      print or braille format.
  472.  
  473. ( $f ) -- immediately move to new page; form feed format indicator (four
  474.      keystrokes: space, dollar sign, lowercase f, space). Compare with $
  475.      $vn.
  476.  
  477. $$f# -- set form length (lines per page) to # lines; clears all commands
  478.      that affect a specific line number (such as page numbering or
  479.      running heads). If you use the $$f# command at all, use it at the
  480.      beginning of a file. Otherwise, you would have to reenter all
  481.      page-oriented commands that you still wanted. See the separate
  482.      heading on page size.
  483.  
  484. $$h -- center and underline current output line and all subsequent
  485.      output lines up to next ( $p ) or ( $s ). Underlines inkprint only;
  486.      does not create italics indicators in braille. Actually, any forced
  487.      new line stops the centering; ( $p ), ( $s ), or $$uf stops the
  488.      underlining.
  489.  
  490. $$i# -- indent each paragraph to start in absolute position # on the
  491.      line. This command affects subsequent paragraph indicators ( $p )
  492.      and ( $s ). The default is $$i5 for print format, $$i2 for braille
  493.      format. (Note to those who have used Hot Dots before version 3.0,
  494.      BEX, or BRAILLE-EDIT: $$i# now refers to absolute position #; in
  495.      those other programs it is relative to the left margin.)
  496.  
  497. $$i+# -- indent each paragraph # cells to the right of the current left
  498.      margin.
  499.  
  500. $$i-# -- outdent each paragraph # cells to the left of the current left
  501.      margin.
  502.  
  503. $$j -- move to the soft margin indent position. See the entry for $$ms#.
  504.  
  505. ( $l ) -- new line format indicator (four keystrokes: space, dollar
  506.      sign, lowercase l, space).
  507.  
  508. $$l# (lowercase l, not digit 1) -- line spacing for soft <CR>s and
  509.      explicit hard ( $l ) indicators. Default is $$l1 (single spacing)
  510.      for print and braille. Use $$l2 for double spacing, $$l3 for triple
  511.      spacing. Use single spacing in braille, except in some materials
  512.      for young children.
  513.  
  514. $$ml# -- set left margin at absolute position #; command letters are
  515.      lowercase m, lowercase l. Default is $$ml0 for print and braille
  516.      format. Use this command to change the position of the left margin.
  517.      The new left margin takes effect at the start of the next line. For
  518.      predictable results, use $$ml# just before forcing a new line with
  519.      ( $l ), ( $p ), etc. The characters set aside for the left margin
  520.      use up some of the carriage width. For example, with a carriage
  521.      width of 40 and a left margin of 4, there is room for a maximum of
  522.      36 characters per line (positions 0 through 3 are set aside as left
  523.      margin, and positions 4 through 39 are available).
  524.  
  525. $$ml+# -- increase left margin by # spaces; move left margin #
  526.      characters to the right of the current left margin.
  527.  
  528. $$ml-# -- decrease left margin by # spaces; move left margin #
  529.      characters to the left of the current left margin.
  530.  
  531. $$ml* -- set left margin at current character position on the output
  532.      line.
  533.  
  534. $$mr# -- set right margin # characters from the maximum carriage width;
  535.      default is $$mr0. Use this command to change the position of the
  536.      right margin. The new right margin takes effect immediately. It is
  537.      a good idea to use $$mr# right after forcing a new line with ( $l
  538.      ), ( $p ), etc. $$mr# uses up # positions at the right of the
  539.      carriage width. With a carriage width of 40 and $$mr4 in effect,
  540.      positions 36 through 39 are set aside as right margin.
  541.  
  542. $$mr+# -- increase right margin by # spaces; move right margin #
  543.      characters to the left of the current right margin.
  544.  
  545. $$mr-# -- decrease right margin by # spaces; move right margin #
  546.      characters to the right of the current right margin.
  547.  
  548. $$ms# -- soft margin indent of #: at soft returns indent # characters to
  549.      the right of the left margin. Default is $$ms0.
  550.  
  551. $$ms+# -- increase the soft margin indent by # characters.
  552.  
  553. $$ms-# -- decrease the soft margin indent by # characters.
  554.  
  555. $$np -- place page numbers on all pages, as appropriate for print or
  556.      braille format, beginning with page 1. In braille, places grade two
  557.      number in upper right (after at least three spaces). In print,
  558.      centers page number on bottom line and forces next-to-last line to
  559.      be blank.
  560.  
  561. $$n# -- set next output page number to #; use after a page numbering
  562.      command like $$np. By itself, $$np starts page numbering with 1.
  563.      Place $$n# after $$np to begin with page #. For example, to begin
  564.      page numbering with page 14, use $$np $$n14.
  565.  
  566. ( $p ) -- paragraph indicator (four keystrokes: space, dollar sign,
  567.      lowercase p, space). When the formatter encounters a paragraph
  568.      indicator, it generates carriage returns to move down and spaces to
  569.      indent to the proper position. You can control the number of
  570.      carriage returns with $$s# and the number of spaces with $$i#.
  571.      Default for print paragraphs is $$s2 $$i5; default for braille
  572.      paragraphs is $$s1 $$i2.
  573.  
  574. $$p# -- place text at absolute character position # on the output line.
  575.      If there was already text there, the new text overwrites it.
  576.  
  577. $$p+# -- place subsequent text # characters to right of current
  578.      character position on the output line.
  579.  
  580. $$p-# -- place subsequent text # characters to left of current character
  581.      position on the output line, which may overwrite existing
  582.      characters in output line.
  583.  
  584. $$r -- place output lines flush against the right margin. Affects
  585.      current output line and subsequent output lines up to the next new
  586.      line forced with ( $l ), ( $p ), etc.
  587.  
  588. $$s# -- paragraph line spacing: tells formatter to generate # <CR>s for
  589.      each subsequent paragraph indicator ( $p ). Defaults are $$s2 for
  590.      print and $$s1 for braille.
  591.  
  592. $$tc -- clear all tab stops. See the separate heading on tabs.
  593.  
  594. $$t# -- set a tab stop at absolute character position #. See the
  595.      separate heading on tabs.
  596.  
  597. $$t* -- establish a tab stop at the current character position on the
  598.      output line.
  599.  
  600. $$t+# -- establish a tab stop # characters to the right of the current
  601.      character position on the output line.
  602.  
  603. $$t-# -- establish a tab stop # characters to the left of the current
  604.      character position on the output line.
  605.  
  606. $$ <space> -- advance to next tab stop (four keystrokes: space, dollar
  607.      sign, dollar sign, space). See the separate heading on tabs.
  608.  
  609. $$ub -- underline begin (underlines inkprint only. Signals braille
  610.      translator to place italics indicators. When three or fewer words
  611.      are to be emphasized, the translator places a single cell of dots
  612.      4-6 before each word. When four or more words are to be emphasized,
  613.      the translator places two cells of dots 4-6 before the first word
  614.      and one cell of dots 4-6 before the last word.
  615.  
  616. $$uf -- underline finish (for inkprint). Signals braille translator to
  617.      finish placing italics indicators. See previous entry.
  618.  
  619. $$va -- place braille page numbers in lower right corner (after at least
  620.      three spaces).
  621.  
  622. $$vb -- place braille page numbers in upper right corner (after at least
  623.      three spaces). Same as $$np for braille formatting.
  624.  
  625. $$vd# -- place line of dropped c cells (dots 2-5) on line # on every
  626.      page. These lines are useful for folding braille letters.
  627.  
  628. $$ve -- unconditional centering: like $$c <space> but does not refuse to
  629.      center on the bottom line.
  630.  
  631. $$vf -- interpret current output line as running footer to place on
  632.      bottom line of all output pages; begin and end footer definition
  633.      with ( $p ), ( $l ), or ( $s ).
  634.  
  635. $$vg -- modify print or braille page numbering to lowercase Roman
  636.      numerals; maximum page number of xc (90); use after page numbering
  637.      command. In braille formatting, $$np $$vg gives Roman numeral page
  638.      numbers in upper right corner (for preliminary pages in "literary
  639.      format").
  640.  
  641. $$vh# -- interpret current output line as running header to place on
  642.      line # of every output page; begin and end header definition with $
  643.      p ), ( $l ), or ( $s ). Maximum number of headers is four; line 1
  644.      plus three other lines. The text of your running head can contain
  645.      almost anything. You can use other commands, like $$c, $$h, $
  646.      $r, or $$p# to format the text of the running head. However, you
  647.      must make sure that the running head is short enough to fit on a
  648.      single line. In braille formatting, use page numbering command $$np
  649.      before $$vh1 to get page numbers and running head on line 1. In the
  650.      text of the running head, you can use tilde (~) to stand for the
  651.      sequential page number; most useful in inkprint formatting. Here's
  652.      an example. Let's say you want the words "Section 7" to appear
  653.      centered on every page. Enter: $$vh1 $$c Section 7 $p (notice the
  654.      paragraph indicator to finish off the running head).
  655.  
  656. $$vk -- "kram" following "word" to end of line. Useful in tables of
  657.      contents and menus. See entry for $$vrx.
  658.  
  659. $$vl# -- move to a new output page if the current output page has fewer
  660.      than # lines remaining (counting the current output line).
  661.  
  662. $$vln -- clear table mode established by $$vlt (see next entry).
  663.  
  664. $$vlt -- table mode: do not place text on any line with a page number.
  665.      In textbook format, keeps text off of top and bottom lines.
  666.  
  667. $$vn -- move to new output page unless that creates a blank page. Acts
  668.      like ( $f ) except when it occurs at the top of an output page.
  669.  
  670. $$vo# -- make line # ordinary: clear any command affecting the line
  671.      which # references. Use $$vo1 to undo a running head and top line
  672.      page numbering. When # begins with minus sign, count up from the
  673.      bottom line. $$vo-0 refers to bottom line; use to undo running
  674.      footer and bottom line page numbering.
  675.  
  676. $$vp [word] -- in textbook format, make the following word, shown here
  677.      as [word], the current print page indicator. For example, when $$vt
  678.      is in effect, use $$vp 38 to start print page 38; tells the
  679.      formatter to place print page indicators for print page 38. The
  680.      word after $$vp does not have to be a number. It can be a Roman
  681.      numeral, a hyphenated number, etc.
  682.  
  683. $$vrx -- repeat any single character, shown here as X, across the output
  684.      line. In braille format, $$vr"$$vk [word] places braille guide dots
  685.      leading up to a word at end of line, shown here as [word]; use with
  686.      a right margin in effect ($$mr6 is recommended). Useful in braille
  687.      tables of contents and menus.
  688.  
  689. $$vs# -- skip line # on every output page. Handy for creating a blank
  690.      line after a running head or before a running footer. Use $$vs2 to
  691.      skip line 2 (useful if line 1 has running head). When # begins with
  692.      a minus sign, count up from the bottom line. Use $$vs-1 to skip the
  693.      next to last line on each page (useful if bottom line has running
  694.      footer).
  695.  
  696. $$vt -- begin textbook format (print page indicators in upper right,
  697.      braille page numbers in lower right, line of dashes to start new
  698.      print page in the middle of a braille page).
  699.  
  700. $$vyx -- place single character prefix, shown here as x, in front of the
  701.      braille page number.
  702.  
  703. $$vy= (equal sign after the y) -- clear prefix character for braille
  704.      page number.
  705.  
  706. $$vz -- if on line 2 after a running head, move down to line 3. Use in a
  707.      heading to prevent it from occurring on line 2 after a running
  708.      head.
  709.  
  710. $$w# -- set carriage width to # characters, clears margins. See separate
  711.      heading on page size.
  712.  
  713.                                   Tabs
  714.  
  715.      You can make tabs using Hot Dots formatting commands, but be aware
  716. that they work differently than tabs on a typewriter or in a WYSIWYG
  717. text editor. Here's an overview of the differences. No tabs are set when
  718. you start editing a file; you must establish each tab stop individually.
  719. You can't clear just one tab stop; you must clear them all at once. You
  720. can't use the Tab key on your keyboard to move to a tab stop in Hot
  721. Dots.
  722.  
  723.      The command to advance to the next tab stop is four keystrokes:
  724. space, dollar sign, dollar sign, space ( $$). To advance two tab stops,
  725. enter this command twice in a row: ( $$ $$). Notice that the trailing
  726. space of the first command serves as the leading space of the next.
  727.  
  728.      Use $$t#, $$t*, $$t+#, or $$t-# to set a tab stop. For example, $
  729. $t10 sets a tab stop at position 10 on the line.
  730.  
  731.      The tab stops are completely independent of the margins. When you
  732. enter ( $$) in your text, it positions the text that follows it at the
  733. next tab stop on that line. When there are no tab stops after the
  734. current position on the line, the formatter simply executes the ( $$)
  735. command as a single space. For example, you set tab stops at positions
  736. 15 and 30, and type this text:
  737. $l He made $$ $10,000, but she made over $$ $20,000.
  738. The first two words occupy positions 0 through 6; so the $10,000 is
  739. placed at the tab stop at position 15. The words following $10,000
  740. occupy positions 24 through 40; so the second ( $$) command is simply
  741. executed as a single space. The formatter can't put it at the tab stop
  742. at position 30.
  743.  
  744.      Only $$t#, with # an unsigned number, sets a tab stop at an
  745. absolute position on the line. The asterisk character and numbers with a
  746. plus or minus sign before them set tabs relative to your current
  747. position on the line.
  748.  
  749.      When you're working in a non-WYSIWYG editor, it's not always
  750. obvious just where your "current position" is. When you want to place a
  751. tab stop at a specific position on the line, use a plain number, or use
  752. the tab command shortly after a format indicator and count spaces. The
  753. asterisk character can be handy, however, when you want to make several
  754. things line up, but you don't care exactly where on the line it happens.
  755. Use the asterisk to tell the formatter, "Set a tab stop right here."
  756.  
  757.      You can set tabs to the left or right of the current position by
  758. using a number that begins with a plus or minus sign. Enter $$t+10 to
  759. set a tab stop ten positions to the right of the current position. Enter
  760. $$t-5 to set a tab stop five positions to the left of the current
  761. position.
  762.  
  763.                                Page Size
  764.  
  765.      When Hot Dots formats your text, it uses a default carriage width
  766. and form length unless it is instructed otherwise. The default carriage
  767. width is 40, and the default form length is 25 (reasonable values for
  768. brailling on 11.5 by 11 inch paper). There are several ways to change
  769. the carriage width and form length in Hot Dots. Here is the list:
  770.  
  771. Answer carriage width and form length prompts in option 3 - Format in
  772.      the Main Menu.
  773.  
  774. When you use the command FTEXT, use the switches /w=# to set carriage
  775.      width # and /f=# to set form length #. You can use this when you
  776.      are working directly at the command line or when you are writing or
  777.      modifying a batch file.
  778.  
  779. Set the environmental variables HDWIDTH and HDLENGTH. The command SET
  780.      HDWIDTH=# sets the carriage width to #; SET HDLENGTH=# sets the
  781.      form length to #. You can put these commands in your AUTOEXEC.BAT
  782.      file. These environmental variables affect carriage width and form
  783.      length only when you use the batch file DOTS1234 or DOTS234. When
  784.      you format with any other method, they have no effect.
  785.  
  786. Use the commands $$w# and $$f# at the very beginning of your document
  787.      file, before any other commands. The values set by these commands
  788.      have the final say; they override any other settings established
  789.      with a different method. For example, if you have set HDWIDTH to 42
  790.      and use DOTS1234, $$w32 still ensures that that file is formatted
  791.      with carriage width 32.
  792.  
  793.               Format Commands Placed by the File Importer
  794.  
  795.      The Hot Dots file importer does its best to interpret the format
  796. information in your original file and place appropriate format commands
  797. in the .HD$ file it creates. Nevertheless, there will be times when you
  798. want to intervene in the process and change the automatically placed
  799. format commands (see Section 3 for the mechanics of editing the .HD$
  800. file). The importer uses margin and paragraph indent commands designed
  801. for braille output. Below we discuss some of the format information
  802. placed by the file importer and the changes that you might want to make.
  803.  
  804. Page Numbering
  805.  
  806.      The file importer places $$np at the beginning of your file. When
  807. formatted for braille, this places the sequential braille page number in
  808. the upper right corner of every page (after at least three spaces).
  809. However, you may want a different kind of page numbering. For example, $
  810. $va places the sequential braille page number in the lower right corner
  811. of every page. If the file you imported contains print page numbers, you
  812. may want to use textbook formatting. Begin the file with $$vt instead of
  813. $$np. At the start of each new print page place $$vp followed by the
  814. print page number. The file importer places the inert command $$p+0$$p+0
  815. at each page transition that it knows about. This command sequence does
  816. not do anything to your output. It is there as something you can search
  817. for in order to place $$vp [page number] commands. You will probably
  818. need to move the page number to get it next to the $$vp command. You may
  819. be able to use Global replace for some of this work.
  820.  
  821. Soft vs. Hard Carriage Returns
  822.  
  823.      A soft carriage return in your original file is there only because
  824. the next word would not fit on the previous line. On the other hand, a
  825. hard carriage return in your original file was placed there on purpose
  826. to force a new line. For example, a hard carriage return may start a new
  827. paragraph or begin a new line in an address. In making the equivalent
  828. braille document, the goal is to preserve the hard returns but to ignore
  829. the soft returns, turning each soft return into a space. It places a
  830. paragraph indicator ( $p ) where it finds one or two hard returns or ( $
  831. s ) where it find three or more hard returns. It replaces each soft
  832. return with a space. This works well when the file importer can tell the
  833. difference between hard and soft returns in your original file. This
  834. task is easy for files imported from most word processors. This task
  835. calls for more "guesswork" by the file importer when you import an ASCII
  836. textfile. It is our experience that it does a good job at this overall.
  837. However, you may need to remove some paragraph indicators and insert
  838. others.
  839.  
  840. Tabs
  841.  
  842.      Where the file importer finds a tab in your original file, it
  843. places a space followed by $$p+1 in your .HD$ file. When formatted, this
  844. creates two spaces. You may find this acceptable in your application. If
  845. not, the formatter does not create $$p+1 for anything else. So you can
  846. change these to something more appropriate for tabs in your application.
  847. You may want to set appropriate tab stops and then use Global to replace
  848. $$p+1 <space> with $$ <space>. Or you may prefer to replace $$p+1
  849. <space> with <semicolon> <space>.
  850.  
  851. Emphasis
  852.  
  853.      Where the file importer finds underlining or italics (or both) in
  854. the original file, it places $$ub and $$uf to begin and finish inkprint
  855. underlining and braille italics. For a bold passage in your original
  856. file, it begins with $$ub$$p+0 and finishes with $$uf$$p+0. With the
  857. extra $$p+0, these commands still create inkprint underlining and
  858. braille italics. But they are also recognizable in your .HD$ file. You
  859. may not want to preserve bold from your original file with any special
  860. emphasis in Hot Dots. For example, you may have scanned your file into
  861. the computer with an optical scanner, and the markup for bold may come
  862. from irregularities in the print quality. To remove the emphasis that
  863. came from bold text, just use Global replace to replace each of the two
  864. sequences just mentioned with nothing at all.
  865.  
  866. Centering
  867.  
  868.      The file importer places $$cx, the extended centering command,
  869. wherever it finds a centering command in your original file. Where it
  870. finds the end of centering in your original file, it places $$ml+0 or
  871. another left margin command (to terminate the extended centering in Hot
  872. Dots).
  873.  
  874.      In addition, where the importer finds lines which begin with a lot
  875. of spaces, it places $$c <space>, the ordinary centering command. This
  876. centering lasts only up to the next forced new line. Since the importer
  877. is not so sure about whether this material should be centered, it does
  878. not risk extended centering. In any case, you may want to remove some
  879. occurrences of $$c <space>.
  880.  
  881. Indent and Runover
  882.  
  883.      Hot Dots uses the commands $$i# and $$ml# to set the "indent and
  884. runover" of paragraphs. $$i# sets the indent used at subsequent ( $p )
  885. and ( $s ) indicators. We call this the indent for paragraphs. $$ml#
  886. sets the margin used for soft returns (since the importer always leaves
  887. the $$ms# soft margin indent at 0). We call this the runover for
  888. paragraphs. So these two commands set the indent and runover for
  889. paragraphs. If the indent value is bigger than the runover value, the
  890. paragraph is normally indented. If the indent value is smaller than the
  891. runover value, the paragraph is outdented (sometimes called a paragraph
  892. with hanging indent). The importer tries to preserve indented and
  893. outdented paragraphs from your original file in the resulting Hot Dots
  894. file. The importer does not create "blocked paragraphs," paragraphs with
  895. the same value for indent and runover. Where it believes that a
  896. paragraph in your original file is blocked, it creates a normally
  897. indented paragraph in your Hot Dots file by adding 2 to the paragraph
  898. indent.
  899.  
  900.      To improve the resulting braille format, you may want to change
  901. some of the indent and runover values. For example, you can affect many
  902. subsequent runover values by inserting a $$ms# command to set a soft
  903. margin.
  904.  
  905. Tables of Contents and Menus
  906.  
  907.      Where the importer finds 5 or more periods (next to each other or
  908. separated by spaces) it places $$vr"$$vk to create braille guide dots.
  909. To make this format work right, enclose this kind of material between $
  910. $mr6$$vlt and $$mr0$$vln. This prevents conflicts between the text,
  911. flush right words, and sequential page numbers.
  912.  
  913.                     Section 9: Output to an Embosser
  914.  
  915.      See Section 12 for details on interfacing embossers to your
  916. computer.
  917.  
  918.      Once you have created a braille formatted file (a file with the
  919. .BFM extension), you can send it to your braille embosser in several
  920. ways using Hot Dots. You can use the DOTS menu, you can use the Hot Dots
  921. driver programs at the command line, you can use the batch files
  922. supplied with Hot Dots, or you can use a DOS command like PRINT or COPY.
  923. Unless you are writing your own batch files, there is little reason for
  924. using the Hot Dots driver programs at the command line. The
  925.  
  926.                Four Embossers That Need Special Treatment
  927.  
  928.      There are four embossers that require special treatment. These are
  929. the Cranmer, the LED-120, the Ohtsuki, and Dipner Dots. In these cases,
  930. we cannot send the raw BFM files to the embossers. For each of the
  931. output methods that are discussed below, special handling is required
  932. for these four embossers.
  933.  
  934.                         The Supplied Batch Files
  935.  
  936.      Typing DOTS1234 MAZE.DOC WPF5 LPT1 means you want the WordPerfect
  937. 5.0 file MAZE.DOC imported, translated, formatted (as a BFM file), and
  938. directed out through your parallel port (LPT1 is the PC's word for
  939. parallel port number 1). Using the DOTS1234 or DOTS234 batch file is
  940. easy and effective.
  941.  
  942.      These two batch files use a carriage width of 40 for formatting. If
  943. you need to change the carriage width that the batch files use for
  944. formatting, (for example, if you have a Braille Blazer), use the
  945. environmental variable HDWIDTH. Type SET HDWIDTH=34 <enter> at the
  946. command line or in your AUTOEXEC.BAT file to modify the formatting
  947. carriage width for the batch files.
  948.  
  949.      If you have one of the 4 special braillers listed above (Cranmer,
  950. LED-120, Ohtsuki, or Dipner Dots), then you have to set the
  951. environmental variable HDDRIVER. Set this variable to one of the
  952. following values: CRANMER, LED120, OHTSUKI, or DIPNER. For example, type
  953. SET HDDRIVER=CRANMER <enter> at the command line or in your AUTOEXEC.BAT
  954. file. When you have done this, the batch files create another file based
  955. on the .BFM file. This .BDV file includes the special handling needed
  956. for the specified brailler.
  957.  
  958.                           Using the DOTS Menu
  959.  
  960.      Hot Dots supports output to a wide variety of embossers. Option 4
  961. in the Main Menu is for output to an embosser or inkprint printer. When
  962. you choose option 4, you get the Output Menu with a choice of embosser
  963. types. When you press enter, you get the list of choices. Here is the
  964. list:
  965.  
  966. Output Menu - output to one of the following devices:
  967. A Bookmaker
  968. B Braille Blazer
  969. C Braillo
  970. D Cranmer Brailler
  971. E Dipner Dots
  972. F Index
  973. G Inkprint printer
  974. H LED-120
  975. I MBOSS-1
  976. J Ohtsuki
  977. K Other brailler or Unknown brailler
  978. L Personal Brailler
  979. M RESUS
  980. N Romeo
  981. O Thiel
  982. P VersaPoint
  983. Q cancel (go to Main Menu)
  984.  
  985.      When you use the DOTS menu, the program takes care of the special
  986. handling required for the four special embossers. However, inkprint
  987. Dipner Dots and output to the Ohtsuki with normal spacing are not
  988. available from the Output Menu (at the time of writing this manual). See
  989. Section 11 for instructions on getting these special kinds of output
  990. with the Hot Dots batch files.
  991.  
  992.                  Using the DOS commands PRINT and COPY
  993.  
  994.      The easiest way to output a braille formatted file (a .BFM file) or
  995. a braille device file (a .BDV file) is with the DOS PRINT command. To
  996. output SOUP.BFM from the command line, just type PRINT SOUP.BFM <enter>.
  997. This prints the file in background, so that you can use your computer
  998. for other purposes.
  999.  
  1000.      Another useful DOS command is COPY. You can type COPY SOUP.BFM COM2
  1001. <enter> to send the file SOUP.BFM to your second serial port.
  1002.  
  1003.      Do not use a DOS command to send a BFM file if you have a Cranmer,
  1004. an LED-120, an Ohtsuki, or Dipner Dots. Instead, use the Output Menu, or
  1005. use the DOS commands (PRINT or COPY) on the BDV file created by the
  1006. batch files (DOTS1234 or DOTS234).
  1007.  
  1008.                   Section 9: Global Search and Replace
  1009.  
  1010.                       What You Can Do With Global
  1011.  
  1012.      Hot Dots' power is greatly increased by the Global search and
  1013. replace option. It allows you to define your own keyboard shortcuts for
  1014. words and phrases that you type frequently or for strings of $$
  1015. formatting commands. For example, if you have to type "University of
  1016. Wisconsin--Madison" a lot, you can substitute "uwm" and then Globally
  1017. replace it later. You can use Global search and replace to make
  1018. systematic changes in format information, to fix translation errors, or
  1019. to perform other massaging needed in going from print to braille or
  1020. braille to print.
  1021.  
  1022.      When you use the Global search and replace function, you must
  1023. provide instructions on what changes to make. There are two main ways to
  1024. use Global search and replace. One way is to use a collection of
  1025. instructions that is already stored on disk: either one that you wrote
  1026. and saved to disk, or one that we supplied with Hot Dots. The other way
  1027. is to type new instructions when you need them by answering prompts from
  1028. Hot Dots. Before we discuss these methods in detail, we need to define
  1029. some terms.
  1030.  
  1031. The tools you need
  1032.  
  1033.      To use Global search and replace, you need a rules file. A rules
  1034. file tells Global what to search for, and what to substitute when it
  1035. finds something. The rules files we supplied with Hot Dots are easily
  1036. identifiable by the file extension .RUL. A rules file consists of one or
  1037. more transformation rules. Each transformation rule consists of a From
  1038. string and a To string. The From string is what you're looking for. When
  1039. Global search and replace finds the characters in the From string, it
  1040. removes them from the text and replaces them with the characters in the
  1041. To string.
  1042.  
  1043.      Each string may be up to 80 characters long. The To string may be
  1044. longer, shorter, or the same length as the From string.
  1045.  
  1046.                     Using Global Search and Replace
  1047.  
  1048.      Choose option 5 on the Hot Dots Main Menu. Hot Dots prompts for the
  1049. name of the input file and then for the name of the output file (the new
  1050. file that it creates with the specified changes). Hot Dots then asks:
  1051. Load global replacements from disk?. Answer no when you want to type a
  1052. new set of rules on the spot. Answer yes when you want to use a set of
  1053. rules that already exists in a rules file.
  1054.  
  1055. Loading a rules file from disk
  1056.  
  1057.      When you choose to load a rules file from disk, Hot Dots prompts
  1058. for the rules file name. When you type in the name, give its pathname if
  1059. it is not in your current directory. You can enter the name of only one
  1060. rules file (which may contain many transformation rules). Press <enter>
  1061. to signal that you have entered the name of the rules file. When Global
  1062. has found the file on disk, the replacement begins. If Global does not
  1063. find the rules file, you get an error message, and Global terminates. So
  1064. be sure that the rules file you plan to use is on the disk and directory
  1065. you specify.
  1066.  
  1067.      If your input file is longer than 30,000 characters, do not give
  1068. the output file the same name as the input file (overwriting the input
  1069. file). (If you have very little free memory available when you run
  1070. Global, the limit is less than 30,000.) If Global does run into a
  1071. problem because you use the same input file and output file, it informs
  1072. you of this problem and terminates without damaging your file.
  1073.  
  1074.      How long Global search and replace takes depends on several
  1075. factors: the length of the input file and the number of transformation
  1076. rules. With a longer input file and many rules, Global takes more time
  1077. than with a shorter input file and few rules.
  1078.  
  1079.      An example of using a rules file is using the CLEAN.RUL file
  1080. supplied on your Hot Dots disk. This rules file locates all carriage
  1081. returns and turns them into spaces. If you use Hot Dots to print an
  1082. inkprint file, use this file before using the Hot Dots formatter.
  1083. (Translating into braille removes carriage returns; use CLEAN.RUL to
  1084. remove carriage returns when you format a file that you have not
  1085. translated into braille.)
  1086.  
  1087.                          Creating a Rules File
  1088.  
  1089.      When you tell Hot Dots that you don't want to load a rules file
  1090. from disk, it begins prompting for transformation rules. First it
  1091. reminds you Enter a blank rule (just carriage return) to end rule
  1092. table.. Then it prompts From:.
  1093.  
  1094.      Type in the exact characters you want to search for. Global search
  1095. and replace is very literal minded. For example, when you want to
  1096. replace a string of characters that sometimes appears in uppercase and
  1097. sometimes in lowercase, you must write a separate transformation rule
  1098. for each case; Global does not consider "A to Z" to be the same as "a to
  1099. z". Press <enter> to end the From string.
  1100.  
  1101.      After you enter a From string, Hot Dots prompts To:. Again, type in
  1102. exactly the characters you want to create in your new file. Press
  1103. <enter> to end the To string.
  1104.  
  1105.      When you're finished writing transformation rules, press <enter> by
  1106. itself at the From: prompt. How long replacement takes depends on the
  1107. same factors as for an already written rules file.
  1108.  
  1109.      Here's an example of entering transformation rules directly. The
  1110. author always misspells the word "occurrence," and uses a typing
  1111. shortcut to represent "Hot Dots". After creating this rules file, we
  1112. want to save it to use again later.
  1113.  
  1114.      In showing the keyboard entry here, we write <space> where you are
  1115. supposed to type a space. Spaces are shown for readability.
  1116.  
  1117. Main menu. Enter option: 5
  1118. Global search and replace.
  1119. Input file: ROUGH.TXT <enter>
  1120. Output file: SMOOTH.TXT <enter>
  1121. Load global replacements from disk? N <enter>
  1122. Enter a blank rule (just carriage return) to end rule table.
  1123. From: occurence <enter>
  1124. To: occurrence <enter>
  1125. From: HD <enter>
  1126. To: Hot Dots <enter>
  1127. From: <enter>
  1128. Save this table in a file (Y or N)? Y <enter>
  1129. Table file name? SPELLFIX.RUL <enter>
  1130. Search and Replace started ...
  1131.  
  1132. Entering control characters in transformation rules
  1133.  
  1134.      You can enter control characters in your From and To strings. Alert
  1135. Hot Dots that the next character you type will be a control character by
  1136. pressing Ctrl-V. (V stands for "verbatim".) Then type the control
  1137. character itself. For example, you can enter your own version of
  1138. CLEAN.RUL to change carriage returns to spaces. Since pressing <enter>
  1139. marks the end of a string, you cannot specify searching for <enter> by
  1140. simply pressing <enter>. <enter> is also known as Ctrl-M Ctrl-J, or
  1141. carriage return/line feed. To put more than one control character in a
  1142. string, you must press Ctrl-V before each one. Type the From and To
  1143. strings like this:
  1144.  
  1145. From: <Ctrl-V> <Ctrl-M> <Ctrl-V> <Ctrl-J> <enter>
  1146. To: <space> <enter>
  1147.  
  1148.      The Ctrl-V is very important! In the example above, if you didn't
  1149. press Ctrl-V first, Hot Dots would interpret the first <Ctrl-M> as the
  1150. end of the From string, and hence the end of the transformation rules.
  1151.  
  1152.      Another way to put control characters in a From or To string (using
  1153. tilde followed by two hexadecimal digits) is discussed later in this
  1154. section, under "Editing a Rules File." That method is also available
  1155. here, and you must use that method if you want a From or To string to
  1156. include certain characters, like vertical bar or tilde.
  1157.  
  1158. Correcting mistakes
  1159.  
  1160.      When you're writing transformation rules, you can use the backspace
  1161. key to erase mistakes before ending the string with <enter>. (However,
  1162. you cannot use the escape key to return to the beginning of the string.)
  1163. Once you've pressed <enter>, there's no way to go back and correct a
  1164. mistake in a previous string.
  1165.  
  1166. Saving a rules file
  1167.  
  1168.      Before Global replace transforms your file, it asks Save this table
  1169. in a file (Y or N)?. When you answer no, the Global search and replace
  1170. function begins and you're returned to the Main menu when finished. When
  1171. you answer yes, you're prompted for the name of the rules file. Type the
  1172. filename (including extension). After the rules file is saved, Global
  1173. begins.
  1174.  
  1175. Editing a rules file
  1176.  
  1177.      You can edit a rules file just as you can edit any other file. The
  1178. From string appears first, and then a vertical bar separates it from the
  1179. To string. Do NOT delete this bar or enter any extra vertical bars. If
  1180. you did, the structure of the rules file would be changed and Hot Dots
  1181. would not be able to use this rules file correctly. You can add, delete,
  1182. or change text, but the vertical bar must still separate the From and To
  1183. strings.
  1184.  
  1185.      A control character in a From string or To string is represented in
  1186. the rules file with the tilde (~) character as an identifier followed by
  1187. its ASCII value expressed in two hexadecimal digits. Hexadecimal is the
  1188. numbering system you use if you have 16 fingers. The most important
  1189. character codes to know for control characters are ~0A for line feed,
  1190. ~0C for form feed, and ~0D for carriage return. If you want to insert
  1191. control characters in rules files using an editor, you must use this
  1192. tilde/ASCII-hex representation. Also, the character <space> can appear
  1193. as ~20. (If you typed the transformation rules on the fly and then saved
  1194. the rules file, every <space> you typed appears as ~20.) A tilde or
  1195. vertical bar character in a From or To string also has to be represented
  1196. in hexadecimal. A tilde is ~7E, and a vertical bar is ~7C.
  1197.  
  1198.                          Things to Think About
  1199.  
  1200.      Global search and replace is very literal minded. When you create a
  1201. From string, Global searches for exactly what you tell it to. Global's
  1202. literal mindedness includes the distinction between upper and lower case
  1203. letters. As far as global is concerned, "Word" is different from "word".
  1204. To replace all occurrences of a word with something else, you may have
  1205. to generate multiple rules to cover occurrences of the word with
  1206. different capitalization.
  1207.  
  1208.      Be careful about unusual letter combinations. For example, if you
  1209. use "ppi" to mean "print page indicator", you might change "floppies" to
  1210. "floprint page indicators".
  1211.  
  1212.                         Cascading rule Problems
  1213.  
  1214.      It may be tempting to write one rule to change A to B, and another
  1215. rule to change B to C, but it may not work. For each character in the
  1216. input file, global looks to see if any of its rules apply. Global only
  1217. goes through the input file once.
  1218.  
  1219.      This works fine for simple applications. For example, you can have
  1220. one rule that says "take two spaces and turn them into a single space".
  1221. If your file has 15 spaces in a row, the output file will have only 1
  1222. space, since this one rule continues to execute until it is reduced to a
  1223. single space. A single space no longer meets the conditions of this
  1224. rule. Only when no more rules apply does Hot Dots advance its pointer in
  1225. the file.
  1226.  
  1227.      If you are aware of how Global works, you can do a lot in its
  1228. single pass through the data. For example, suppose you are cleaning up
  1229. some data. You write a rules file with transformation rules to change
  1230. two spaces into one space and to change $p <space> $p into $p. You know
  1231. that some $p indicators are separated by more than one space, but you
  1232. expect the rule which changes two spaces into one space to take care of
  1233. that. It doesn't! In a place where there are several spaces between two
  1234. $p indicators, Global does shrink them down into one space. But by that
  1235. time, Global's pointer into the data is already past the first $p and it
  1236. cannot go back. However, if one of your rules changes $p followed by two
  1237. spaces into $p followed by one space, things work fine.
  1238.  
  1239.      If you write a rule that increases the length of the material
  1240. (i.e., the replacement string is longer than the original string), the
  1241. program jumps to the end of the inserted segment. This prevents infinite
  1242. loops. For example, if you wrote a rule that said "turn any occurrence
  1243. of x to xx", you would not want Global to fill your hard disk with x's.
  1244.  
  1245.      If you really need to "reach back" behind the current position,
  1246. then write more than one rules file. First execute Global replace on the
  1247. source file, using the first rules file. Then execute global again on
  1248. the output from the first Global replace operation, using the second
  1249. rules file. We had to do this with the rules files that we use to import
  1250. files.
  1251.  
  1252.