home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / nfbtr745.zip / NFBTRANS.FMT < prev    next >
Text File  |  1996-03-28  |  83KB  |  1,658 lines

  1. ~r~f0~p2 Braille Translator User Documentation Release 7.45 March 27, 1996 ~s
  2.  
  3. ~cTABLE of CONTENTS
  4. ~f+
  5. PART 1: Introduction
  6. PART 2: Requirements
  7. PART 3: How to Use This Program
  8. PART 4: Command Line Options
  9. PART 5: Formatting Commands
  10. PART 6: Braille Considerations
  11. PART 7: Sample Formats
  12. PART 8: Braille Symbols and Contractions
  13. PART 9: Changing the Table
  14. PART 10: External Format Language
  15. PART 11: Other Considerations
  16.  
  17.      ~f- ~pa ~n1
  18.      PART 1: Introduction
  19.      The NFB braille translator is a computer program designed to
  20. easily and quickly produce Grade 2 braille from text entered using a word
  21. processing program. The program has been designed to be as easy to use as we
  22. can make it. Most operators can start producing grade 2 braille with
  23. half-an-hour practice. There are a number of commands that enable you to format
  24. the braille output for almost any purpose.
  25.  
  26.      Braille, by its very nature, does not have the same format as print text.
  27. A typical braille page consists of twenty-five lines, each of which is forty
  28. characters long. Unlike the standard printed page, most braille documents do
  29. not utilize either a top or bottom printed margin. In other words, on a typical
  30. braille page, all twenty-five lines are used for text. In some cases, the first
  31. line is used for a running header. In braille produced by this program, with
  32. the exception of braille page 1, the upper right corner of the page will
  33. contain a braille page number. See Interpoint printing described later.
  34. Also see the ~0fp= ~2option if you want to number page one.
  35.  
  36.      Blank lines in braille text are kept to a minimum. In contrast to many
  37. printed formats, braille paragraphs are not separated by a blank line. A
  38. braille paragraph is denoted by an indented line which starts in braille
  39. position three. A blank line in braille might well be used to offset large
  40. portions of quoted text or to precede a centered heading.
  41.  
  42.      By using advanced formatting it is possible to create special format
  43. documents with the NFB braille translator. There are frequently requirements to
  44. produce documents that present information in outline format, for example, a
  45. restaurant menu or a schedule (see SAMPLE FORMATS section of this
  46. documentation.)
  47.  
  48.      PART 2: Requirements
  49.      In general, you will need a computer, an embossor, and word processing
  50. software to use this program. You will need to be familiar with your operating
  51. system and your word processing system. Please be familiar with the various
  52. copying and setup procedures appropriate to your system.
  53.  
  54.      You must also have a brailling device. This can be any embossor or
  55. paperless braille device that uses the Triformation ~aLED-120 coding scheme.
  56. These include the Triformation series, the Thiel, the ~aTED, the Cranmer
  57. Modified Perkins, the Romeo, Juliet, and the Braillo.
  58.      You or your hardware supplier should be sure that the embossor is properly
  59. connected to the computer and is working. The braille translator expects the
  60. embossor to be connected to the default list device. Because the computer could
  61. have more than one print device, the operating system provides ways to change
  62. the default device path. You can redirect the standard list output using the
  63. MODE command, for example, ~0MODE LPT1:=COM1: ~2.
  64.  
  65.      The NFB braille translator does not include a word processor, but is
  66. designed to allow you to use the word processing software of your choice. For
  67. example, you can use WordStar, Word, Perfect Writer, Multimate, or any other
  68. word processing program that can produce a print image disk file. Some word
  69. processing programs, such as WordStar, will permit the braille translator to
  70. work directly on the internal format files. You might try this out with your
  71. word processing software--it will spare you the extra step of creating a print
  72. image file.
  73.      If you are not familiar with the steps required to create a print image
  74. file, consult your word processing user's manual, or someone in your
  75. organization who may know. A print image file, stated simply, is the image of
  76. your file printed to the disk instead of to the paper in your printer.
  77.      If you have problems obtaining a print image file to process, you can
  78. install a disk spooling program if you are using an MS-DOS based system. The
  79. disk spooling program can capture the print output from ANY program and direct
  80. it to a disk file.
  81.  
  82.      PART 3: How to Use This Program
  83.      1. Connect embossor.
  84.  
  85. 2. Include the location
  86. of nfbtrans in the path in your autoexec.bat file. This allows nfbtrans to be
  87. run from any directory. Nfbtrans looks for nfbtrans.cnf in three places.
  88. First, you can define an environment variable NFBTRANS to point to the
  89. directory containing nfbtrans.cnf.  In DOS use ~0set NFBTRANS=c:\NFBTRANS.
  90. ~2Second the program searches in the current directory.  Third, the program
  91. location is used in MSDOS or ~0/usr/local/lib ~2in Unix.  If nfbtrans.cnf
  92. is found that directory is used to search for all table files as well as
  93. the hyphenization dictionary.  In other words, ~0nfbtrans.cnf ~2and ~1braille.tab
  94. ~2must be in the same directory.
  95.  
  96.      3. After the prompt, type NFBTRANS, for example:
  97.      (prompt) NFBTRANS Nfbtrans then displays version and copyright messages
  98. depending on the contents of your nfbtrans.cnf file.
  99.  
  100.      4. The program will then ask a series of questions depending on
  101. nfbtrans.cnf. Many questions can be eliminated by placing options in
  102. nfbtrans.cnf.  Each question except the
  103. name of the file to be translated will be followed by a standard default
  104. response. To select the default, simply press the RETURN. The questions and
  105. defaults are as follows:
  106.      Please select
  107.      1 to Translate a Text File, 2 to emboss a File that has been Translated
  108. 3 Backtranslate a Grade 2 file
  109. Choice? 1
  110.      You may either translate a file that you have entered with a word
  111. processing program, emboss a file that has already been translated or
  112. translate a Grade 2 file back to text.    Select
  113.  
  114.      Source file name?
  115.      Enter the name of the file you want to translate, such as
  116. B:LETTER.DOC or A:REPORT. Wildcard characters may be used to specify
  117. several files. If multiple files are specified, they are sorted and processed
  118. in alphabetical order. Files beginning with the @ "at" sign are assumed to
  119. contain lists of files to be translated.  You should put only one file name
  120. per line and wildcard characters are allowed in the list.  Blank lines
  121. are ignored.
  122.  
  123.      Enter number of spaces before left margin of source file (usually 1) 1
  124.      Use another number if the document you want to translate does not fully
  125. left justify. Enter the column of the beginning of the left margin.
  126.  
  127.      Enter number of braille cells to emboss on a Line (usually 40) 40
  128.      You can specify an alternate line length, such as 42 cells. Just press
  129. return to use default.
  130.  
  131.      Display Source Text (Y/N): N
  132.      If you do not want to see the source text as it translates or embosses,
  133. enter N.
  134.  
  135.      Display Translated Text (Y/N): Y
  136.      If you do not want to see the translated text as it translates or
  137. embosses, enter N. Most sighted people like to see it.
  138.  
  139.      Number of lines per page? 25
  140.      Enter the number of lines per braille page, usually 25. Press return to
  141. use default.
  142.  
  143.      Number of Line Skips between Pages (99-FF, 999-VT)? 99
  144.      Enter the blank lines between pages to get to the top of the next page. If
  145. you want to use the form feed command (FF), enter 99. The Thiel embossor works
  146. well with the FF command. If you want to use the vertical tab (VT), enter 999.
  147. The old Triformation ~ALED-120 may require the VT depending on the version of
  148. the embossor you have. 0 tells nfbtrans to output blank lines to go to the top
  149. of the next page. Most embossors use the Form Feed--99. Press return to use
  150. default.
  151.  
  152.      Please select 1 to translate and store in a file or 2 translate and emboss
  153. immediately. Choice? 2
  154.      Select the first option if you want to store a translated file for future
  155. embossing. While the translator is fast, it is even faster to simply emboss a
  156. file that has already been translated. If you only need one copy, select option
  157. 2 and emboss the file immediately. See sp= for backround embossing.
  158.  
  159.      Enter starting page: 1
  160.      Normally, enter a 1 to start at the beginning. If you want to start
  161. further into the document, enter the BRAILLE PAGE NUMBER at which you want to
  162. start.    You may enter the ending page at this time by separating it from the
  163. starting page with a dash, comma, or space, for example 1 20.  If ~0ip=1 ~2is in effect,
  164. the starting page must be odd.    If not, nfbtrans subtracts 1.  You can specify
  165. Roman Numeral pages by placing a lowercase ~lr after the page number.
  166. Entering 3r-5r causes the program to output Roman pages 3-5.  Entering
  167. 3r-15 outputs Roman page 3 and later and arabic pages 1-15.
  168.  
  169.      Enter last page to emboss:9999
  170.      Normally, enter a 9999 to emboss the entire document. If you want to
  171. emboss fewer pages, enter the BRAILLE PAGE NUMBER at which you want to stop.
  172.  
  173.      Number of Copies: 1
  174.      Enter the number of copies you want.
  175.  
  176. PART 4: Command Line Options
  177.      Syntax: nfbtrans [option 1] [option 2] [...] file1 file2 ...
  178. Options are of the form ~0xx=value ~2 for example ~0pw=43 ~2will set the
  179. page width to 43.  Options may be specified in several ways:  1. On the
  180. command line,  2. In nfbtrans.cnf,  3. In any table file,  4. In the file being
  181. translated,  5. In an external format language file, and 6. In initialization
  182. strings.  Most options may be used in all six places but several cannot.
  183. For example the initialization options ~0i0= ~2can only be used in
  184. nfbtrans.cnf.  The program reports an error if you use an option
  185. where it is not allowed.
  186.  
  187.      NFBTRANS processes all options in nfbtrans.cnf, then any options on the
  188. command line.  Next it processes any options in the table file.  The
  189. configuration file is read again for each subsequent file if more than one file
  190. was specified.    The table file may or may not be re-read depending on the file
  191. being translated.  The translation mode remains the same once chosen.  For
  192. example if you translate files from ascii to braille, you cannot back translate
  193. files unless you restart the program.
  194.  
  195.      Note that several options have integer arguments which require
  196. an understanding of how to set or clear bits in the integer.   The behavior of
  197. these options is determined by which bits are set.  An integer has sixteen
  198. bits, bit zero through fifteen.  B0 corresponds to 1, B1 to 2,
  199. B2 to 4, B3 to 8, B4 to 16, B5 to 32, B6 to 64 and so on.  For example if you
  200. need to set bits 1 and 3 for an option the number you would use is
  201. 2 plus 8 equals 10.
  202.  
  203.      list of options:
  204.  
  205.      ~0be=freq,duration ~2outputs a beep.  This can be used for debugging,
  206. for example, when a particular table gets loaded.  ~0be=440,500 ~2beeps
  207. the speaker at 440HZ for half a second.
  208.  
  209.      ~0bm=book_mode ~2tell nfbtrans how to handle textbook page breaks using
  210. the (tilde)b formatting command. If bit zero is set the program will put
  211. a line of dashes before the ink-print page number.  If bit one is set
  212. nfbtrans will put the print page in the upper right and the braille page in the
  213. lower right corner of the page.  If bit two is set and
  214. your document has a Table of Contents where nfbtrans generates page numbers,
  215. both the print and braille page numbers are output.  If bit three is set
  216. a TOC header will be put before the beginning of the TOC and at the beginning
  217. of each subsequent TOC page. The TOC header has two lines each with three
  218. columns: ~_
  219. Title Print Braille ~_
  220. blank Page Page ~_
  221. and then a blank line. Many braille magazines have this type of TOC. Bit three
  222. implies bit two.  (See    the ~0tc= ~2option described later).
  223.  
  224. ~0ca=capital_marks ~2defines how upper case words or letters are brailled.
  225. Default is ~0ca=,|,,|; ~2meaning a single uppercase letter is preceeded
  226. by a dot 6, while multiple uppercase letters by two dot 6's and that the letter
  227. sign is dots 56.  Note that a vertical bar separates the strings.
  228.  
  229.       ~0cf=filename ~2 specifies another name for nfbtrans.cnf.
  230.  
  231.      ~0cl=nn ~2 Specify the maximum length of lines during centering. Maximum value
  232. is page width minus 6. Default is 32.
  233.  
  234.      ~0co=nn ~2 number of copies example ~0co=3 ~2Use ~0co=0 ~2to always be prompted for
  235. number of copies.
  236.  
  237.      ~0cs=nn ~2 specifies number of characters your printer can print per second.
  238. It is used to estimate embossing time before file is sent to the DOS
  239. print command. Estimates are given only if 2 minutes or more. Default
  240. is ~0cs=40. ~2
  241.  
  242.      ~0db=0 ~2 or 1 display braille 0 no 1 yes -1 to be prompted.
  243.  
  244.      ~0de=delay ~2 specifies delay in MS between lines of embossed output. If
  245. handshaking is working properly use ~0de=0. ~2
  246.  
  247.      ~0dm=message ~2outputs message to standard error.
  248. For example the line ~_ ~0dm="reading configuration file"
  249. ~2could be placed in nfbtrans.cnf to indicate that it is being read.
  250.  
  251.      ~0ds=display ~2 source 0 for no 1 for yes -1 to be prompted.
  252.  
  253.      ~0ef=n ~2 default is ~0ef=1 ~2 If bit 0 is set,
  254. NFBTRANS will process the corresponding ~0.efl ~2 file if it exists.
  255. If the file exists and there is a syntax error, an error message is displayed and
  256. the program aborts.  If bit 0 is clear, the program will not look for a ~0.efl
  257. ~2 file.  If bit 1 is set, the program will abort if the ~0.efl ~2 file is not
  258. found. If bit 2 is set, the user is notified when a ~0.efl ~2is processed.
  259.  
  260.      ~0ex= extension_definition. ~2 You can tell nfbtrans to take certain actions
  261. depending on the extension of the input file. The extensions are followed by
  262. "euqal" and then by a number. For example ~0ex==0c=1h=1pas=1brl=2 ~2 says that files
  263. with no extension use strings from the ~0i0= ~2 option and ~0.c .h and .pas ~2 files are
  264. associated with i1 and brl i2. You can tell nfbtrans to skip files with certain
  265. extensions using '-' as in ~0ex=exe=- ~2 The extensions can be in any order and you
  266. may have several ~0ex= ~2 options in nfbtrans.cnf. The program can store up to
  267. 45 extension definitions.  The ~0ex= ~2 option can also be used to specify the
  268. basename of a file.  If a file has no extension, its name is compared to the
  269. ~0ex= ~2 options.  For example ~0ex=makefile=1 ~2 associates a file named
  270. makefile with i1.  See nfbtrans.cnf for examples.
  271.  
  272.      ~0fc=fill_char ~2specifies the character to use as a fill character
  273. in a Table of Contents (tilde)F entry.    Default is a quote character.
  274.  
  275.      ~0fp=1 ~2 Number first page. Otherwise do not number first page.
  276.  
  277.      ~0fs=format_char ~2 specifies the format character, usually tilde.
  278. Use ~0fs= ~2 if your document has embedded tilde or carat symbols that are not
  279. nfbtrans format commands.
  280.  
  281.      ~0gd=n ~2sets the minimum number of guide dots that will be output with
  282. a (tilde)f command. The default is two meaning that if the translated line
  283. has less than two guide dots, they will be converted to blanks.
  284.  
  285.      ~0gm=0/1/2 ~2 Sets graphics mode default is ~0gm=0. ~2Normally nfbtrans
  286. ignores extended graphics characters, characters whose ascii value is
  287. greater than 127.  If ~0gm=1 ~2the high bit is removed. If ~0gm=2 ~2the
  288. character is left intact. Place the appropriate entries in ~1braille.tab ~2
  289. if you want to expand these characters.  Nfbtrans will report an error and
  290. abort if a graphics character is used but not defined in the table.
  291.  
  292.      ~0hb=rejected_word_file ~2specifies the name of the file to store
  293. rejected words you don't want added to the dictionary.  Default is
  294. ~0hb=bad.dic. ~2
  295.  
  296.      ~0hd=hyphenization_dictionary ~2specifies the name of a hyphenization
  297. dictionary file.  This file should contain a lexically sorted list of uppercase
  298. words with dashes where the word could be hyphenated. When a word is too
  299. long to fit on the current line, the dictionary is searched to see if part
  300. of the word will fit. Use the vertical bar no translation character if you
  301. don't want certain split words contracted. For example ~0num-|ber ~2prevents
  302. the program from using the ~aBE sign. There is no limit on the size of the
  303. hyphenization dictionary.  Large dictionaries will slow the operation of nfbtrans
  304. but not as much as you might think.  The program stores the start of words
  305. beginning with B, C, D ...  For example if nfbtrans searches the dictionary
  306. for the word youngster, it starts from the beginning of the file if it is the
  307. first search.  While searching, it stores the position of the B, C ... through
  308. Y words.  The search is unsuccessful if a word is found that is greater
  309. lexically than youngster. On a second search for the word helper the program
  310. already knows where the H words start.    If you do a third search for a word
  311. beginning with Z, the program starts at the Y words adding the start of the
  312. Z words. (See the ~0ht= ~2option to test your hyphenization dictionary file).
  313. The dictionary may contain words starting with uppercase letters as well as
  314. extended graphics characters.
  315. Nfbtrans operates at about two-thirds normal speed with a nine-thousand
  316. word hyphenization dictionary. You can put the dictionary on a ram drive for
  317. a slight improvement. If the first character is a slash or the second character
  318. of the dictionary file is a colon,
  319. the program does not use the location of nfbtrans to find the file.
  320. There is no default hyphenization dictionary, you must use the ~0hd= ~2option to
  321. make it active. Use two double or single quotes to disable the hyphenization
  322. dictionary. The dictionary is not searched for computer braille words i.e.
  323. Grade zero. (See the ~0hm= ht= hv= ~2and ~0rw= ~2options described later.)
  324.  
  325.      Note for Unix users. Remove the carriage returns in the dictionary file.
  326. Also, the filename must be uppercase.
  327.  
  328.      ~0hk=1 ~2 enables hot keys meaning you don't need to press RETURN when entering
  329. a single digit or answering Y/N.
  330.  
  331. ~0hl=min_length ~2specifies the minimum length of words considered for
  332. hyphenization; default is four.
  333.  
  334.      ~0hm=hyphen_mode ~2specifies several options concerning word
  335. hyphenization.    Bit zero activates the hyphenization dictionary. The ~0hd=
  336. ~2option automatically sets bit zero leaving the other bits unchanged. In
  337. other words, you can temporarily disable hyphen dictionary searches after the
  338. ~0hd= ~2option by clearing bit zero and enable dictionary searching later by
  339. resetting bit zero.  Note that if only bit zero is set, words with leading or
  340. trailing punctuation will not be hyphenated.  Bit one attempts to split
  341. words containing dashes.  This is true regardless of whether the hyphenization
  342. dictionary is active.  Bit two will attempt to split words containing leading
  343. punctuation. (See the ~0lp= ~2option described later).
  344. Bit three attempts to split words with trailing punctuation marks. For example
  345. the word number followed by a comma and a quote is searched by removing the
  346. comma and quote and if split, they are appended to the split word. (See the
  347. ~0tp= ~2option described later).
  348. Bit four outputs words that are split to standard error.
  349. Bit five outputs words that were not found which can later be added to your
  350. dictionary. If you follow the number with a character string, the output from
  351. this option will be sent to that file rather than standard error. For example
  352. ~0hm=15h:file.txt ~2stores the output in a file called ~0file.txt. ~2If the
  353. file already exists, the output is appended.  Setting bit six tells the program
  354. to add new words to the dictionary.  This is done as follows: When a word is
  355. encountered that is not in the dictionary you are asked whether you want to
  356. add it.  If no, the rejected word is placed in a file named bad.dic.  If yes,
  357. you will be prompted for the new word as it should appear in the dictionary.
  358. The program inserts the new word in the proper place.  You must have enough
  359. disk space for a temporary copy of the dictionary.
  360. If bit fifteen is set consistency checks on the hyphenization
  361. dictionary are not done automatically when the dictionary is updated.
  362.  
  363.      ~0hn=n ~2specifies how often a consistency check is done on the
  364. dictionary when bit six is set with the ~0hm= ~2option.  Default is ~0hn=5. ~2
  365.  
  366.      ~0hp=n ~2specifies the number of hyphenated words allowed per page,
  367. default is 99.
  368.  
  369.      ~0ht=hyphenization dictionary ~2is used to test consistency of your
  370. hyphenization dictionary file. The file is examined to make sure all words
  371. are in uppercase and that they are sorted properly. If no errors are found,
  372. you are prompted to enter a word or press enter to exit. If the word is found
  373. the line number of the word in the dictionary is shown. If the word is not
  374. found the line number where the word should be placed is shown. This should
  375. make adding and removing words easier.
  376. The program automatically tests a dictionary file when the ~0hd= ~2option
  377. loads a file whose date has changed since it was last loaded with an ~0hd=
  378. ~2option. Nfbtrans keeps track of up to five dictionary files and their
  379. corresponding dates by re-writing the nfbtrans.cnf file and placing dictionary
  380. information in the ~0hv= ~2option. The consistency check will only be done
  381. if the dates do not match.
  382.  
  383.      ~0hv=file1=nnn|file2=nnn|file3=nnn|file4=nnn|file5=nnn ~2specifies up to
  384. five file date pairs used to tell when a dictionary has been updated. Nfbtrans
  385. places this option before any ~0hd= ~2options.
  386.  
  387.      ~0hx=max_consec_hyphens ~2specifies the maximum number of consecutive
  388. hyphenated words, default is three.
  389.  
  390.      ~0i0= ~2 through ~0i9= ~2& ~0ia= ~2through ~0ie= ~2specifies a set of
  391. three strings that can be associated with a given extension defined with
  392. the ~0ex= ~2 option. The strings are ~0pre_init, post_init, ~2and
  393. ~0format_string. Pre_init ~2is processed before the file is embossed
  394. or stored and ~0post_init ~2after. These strings may contain format commands to
  395. invoke grade two, change page length and so forth. Escape sequences can also be
  396. sent. I use this with the Juliet to switch to 8 dot braille for ~0.c .h ~2 and
  397. ~0.pas ~2 files. The strings are separated by a vertical bar. The ~0format_string
  398. ~2specifies characters considered format characters, usually tilde or carat.
  399. ~0.c ~2 files have tilde and carat characters as part of the program text so
  400. ~0format_string ~2should be empty. For example ~0i0=pre_init|post_init|format_chars. ~2
  401. See sample nfbtrans.cnf for a real example.
  402.  
  403.      ~0if=string. ~2This option tells nfbtrans to ignore the format commands
  404. given in string.  For example ~0if=0123 ~2will ignore all (tilte) 0 1 2 and
  405. 3 formatting commands.    These are the only commands that will be ignored.
  406.  
  407.      ~0ip=n ~2 specifies interpoint mode printing on both sides of the page. Even
  408. page numbers are not printed. Printer advances to beginning of next odd page
  409. after file is printed. Use ~0ip=2 ~2 to tell printer to advance an entire blank
  410. page so you can reach a perferation below the bottom page. Note that if ~0sp=1 ~2
  411. is in effect the embossor only advances to the next page rather than skipping an
  412. entire blank page. Otherwise there would be a blank page between each file.
  413.  
  414.      ~0it=char ~2specifies the character used for italics, the default is
  415. underscore which translates to dots 46 in ~1braille.tab. ~2
  416.  
  417.      ~0kc=0/1 ~2 if 1 do not convert control characters to spaces.
  418.  
  419.      ~0kf=0/1 ~2if used during back translation keeps the format of the Grade
  420. 2 file.  Each line of the ascii output corresponds to one line of Grade 2
  421. input.    Braille page numbers are not removed.  This option should normally
  422. be used in the ~0back.tab ~2table before other options.
  423.  
  424.      ~0l0=string.  ~2This option removes the space after any character in
  425. "string."  For example ~0l0=,; ~2removes spaces after words ending in
  426. a comma or semicolon. If there isn't enough room for the joined word,
  427. the second word is placed on the next line. This option is used in
  428. some of the foreign language tables.
  429.  
  430.      ~0l1=- ~2 joins a word containing a single dash to the preceeding word.
  431. This option is normally used only in certain foreign language tables.
  432.  
  433.      ~0l2=word_list ~2joins a type 12 word to the next word if that word is in
  434. the list.  Words in the list are separated by the vertical bar.  Default is
  435. ~0l2=de|een|het.  ~2the list may contain up to nine words. This option was
  436. requested for Dutch braille.
  437.  
  438.      ~0le=file ~2loads an external format language file.  The program looks in
  439. the current directory and then in the same directory as ~0nfbtrans.cnf.
  440. ~2Errors are reported according to the ~0ef= ~2option.    The contents of any
  441. previously loaded .efl file are lost.  This allows you to have a global .efl
  442. file that will always be loaded for a given extension.
  443.  
  444.      ~0lf=loadfile ~2 Use the ~0lf=loadfile ~2 option to emboss a large document
  445. consisting of several files. The ~0lf= ~2 option cannot be used on the command
  446. line or in nfbtrans.cnf. The ~0lf= ~2 option can only be invoked with a format
  447. command so formatting must not be disabled. For example if you have your
  448. document broken in to files ~0ch1.fmt ~2and ~0ch2.fmt, ~2place ~0tilde-lf=ch2.fmt ~2 as the
  449. last word of ~0ch1.fmt. ~2 This causes nfbtrans to continue translation by reading
  450. ~0ch2.fmt. ~2 Page numbering and so forth continues as if only one file were being
  451. translated.
  452.  
  453.      ~0li=string ~2will append "string" to the last word of each input line.
  454. The string is appended after translation.
  455.  
  456.      ~0lm=left_margin ~2 use ~0lm=0 ~2 to be prompted for left margin.
  457.  
  458.      ~0lp=leading_punctuation ~2specifies up to seven characters to consider
  459. as leading punctuation if B2 is set in the ~0hm= ~2option. By default only the
  460. left parenthesis is considered leading punctuation.
  461.  
  462.      ~0ls=n ~2 lines to skip between pages. use ~0ls=-1 to ~2always be prompted for
  463. this. ~0ls=0 ~2 is allowed now. I like printing 27 lines per page. My Juliet
  464. automatically advances over the paper fold after the 27TH line. No formfeeds
  465. are output if ~0ls=0. ~2 Use ~0ls=99 ~2 for formfeeds.
  466.  
  467.      ~0ma=0/1/2/+/- ~2The math options are an attempt to ease the brailling
  468. of mathematical equations.  See the ~0ms= ~2and ~0mt= ~2options described
  469. later.    ~0ma=+ ~2loads the math table.    The math table remains in effect
  470. until a ~0ma=- or tf= ~2is encountered.  The math table can contain any rules
  471. you want.  If you would like to write a correct Nemeth Code table, I would
  472. be happy to include it with nfbtrans.
  473.      ~0ma=1 ~2loads the math table if the
  474. program thinks a word is an equation.  The default table will be reloaded
  475. if a word is deemed not to be an equation.  ~0ma=2 ~2also outputs "equations"
  476. to standard error.  The ~0ma=+ ~2option does an ~0ma=0. ~2See the ~0ms=
  477. ~2option described later.
  478.  
  479.      ~0ms=math_symbols ~2is used to determine if a word causes the math table
  480. to be automatically loaded if ~0ma=1 or ma=2 ~2is in effect.  The default is
  481. ~0ms==<> ~2A word with any of these symbols that also contains a digit is
  482. considered an equation. I'm still thinking of how to do this more
  483. reliably.
  484.  
  485.      ~0mt=math_table default is mt=math.tab. ~2This option allows you to
  486. change the name of the math table.
  487.  
  488.      ~0nc=1 ~2 skip copyright message.
  489.  
  490.      ~0ob=option_mask ~2resets permission mask for the given option.  Each
  491. option has an associated integer which specifies when it may be used.  For
  492. example, the integer associated with the ~0i0 ~2option is two, which means
  493. it may only be used in nfbtrans.cnf.  The option ~0ob=i0=6 ~2would allow
  494. this option in a table file.  If b7 is set as in ~0ob=fp=256 ~2 all future
  495. ~0fp= ~2options will be ignored until b7 is cleared.  Examine the source code
  496. if you have any further questions.
  497.  
  498.      ~0oc=0/1/2/3 ~2selects output case default is uppercase.  If bit zero
  499. is set output will be uppercase.  If bit one is set output from Grade
  500. zero or computer braille will be uppercase if bit zero is set.    Default
  501. is ~0oc=3 meaning all output in uppercase.
  502.  
  503.      ~0ow=1 ~2 If an output file is created, you will not be warned if the file
  504. already exists.
  505.  
  506.      ~0pa=n ~2 where n is an integer. Use this option if your brailler and
  507. synthesizer are connected to the same port. ~0pa=10 ~2 causes the program to pause
  508. and beep once a second for 10 seconds giving you time to switch between your
  509. synthesizer and brailler. This only happens when you emboss, not when you just
  510. write to disk. Nothing will be written through the bios to the screen while
  511. you are embossing. Pressing any key during the pause will cause the program to
  512. wait until another key is pressed before continuing with the pause sequence. If
  513. escape was pressed the program aborts and returns to DOS. When embossing is
  514. complete the program beeps and waits for a keypress before continuing. This
  515. prevents the DOS prompt or other program output from being brailled. The
  516. ~0pa= ~2 and ~0sp= ~2 options cannot both be used.  The last one given is used.
  517.  
  518.      ~0pd=1/2 ~2 and ~0pf=1 ~2 causes date and filename to be printed on the first
  519. line of the first page of your document. ~0file.txt 05/30/93 14:56 ~2
  520. is the format.
  521. Use ~0pf=2 ~2 to print just the file name rather than the whole path.  For example
  522. with ~0pf=2 nfbtrans c:\dir1/dir2/myfile.txt ~2 will be embossed as
  523. ~0myfile.txt ~2 on the first line of output. Use ~0pd=2 ~2 to print the
  524. date without the time.
  525.  
  526.      ~0pe=ending_page ~2 -1 to always be prompted.
  527.  
  528.      ~0pl=nn ~2 page length default ~0pl=25 ~2
  529.  
  530.      ~0pn=prn ~2 print device for your brailler if ~0sp=0. ~2  By default, ~0pn=prn. ~2
  531.  
  532.      ~0ps=page_start ps=-1 ~2 to be prompted.
  533.  
  534.      ~0pw=page_width ~2 default ~0pw=40. ~2
  535.  
  536.      ~0qm=0/1 ~2 sets quiet mode.  If ~0qm=1, ~2 page number progress messages are
  537. not output.
  538.  
  539.      ~0rc=command ~2is used to execute a formatting command in any
  540. table or in nfbtrans.cnf.  For example the option ~0rc=(tilde)u ~2will turn page
  541. numbering off.
  542.  
  543.      ~0rp=0/1 ~2instructs NFBTRANS to remove braille page numbers during
  544. back translation.  This is done as follows: The input text is scanned to
  545. determine the page width.  If the line has a word conforming to a Grade 2
  546. page number all the way to the right and it is preceeded by at least two
  547. spaces, the word is removed.  Roman numeral page numbers are also removed.
  548.  
  549.      ~0rw=number ~2 tells nfbtrans how to treat hyphenated words that
  550. appear in the input file.  A word is considered to be hyphenated if the
  551. following is true:  1. The last word
  552. on a line ends in a dash and the preceeding character is a letter and
  553. the word does not contain other dashes and the word does not contain math
  554. symbols.  2.  The following word starts with at least
  555. two letters.  3.  The rejoined word is found in the hyphenization dictionary.
  556. During back translation the criteria for considering a word as hyphenated is
  557. relaxed so that the word may contain math symbols which of course have different
  558. meanings in Grade 2.  If the word is not in the dictionary, it is rejoined
  559. leaving the dash in between.  If the dictionary is not open or bit zero is
  560. clear, the words are not rejoined and will be output as two separate words.  If
  561. bit one is set, the rejoined words are output to standard error.  If bit
  562. two is set, the words not rejoined are output to standard error.  The output
  563. of this option will be stored in a file if the integer is followed by a
  564. file name, for example ~0rw=7h:temp. ~2
  565.  
  566.      ~0s0=pre-init ~2 string sent to printer if in spool mode. Use to tell printer
  567. to ignore formfeeds. the dos print command appends a ff at the end of each
  568. file.
  569.  
  570.      ~0si=file ~2 specifies the file name nfbtrans uses if input is redirected.
  571.      For example if you have ~0si=stdin.c ~2 in nfbtrans.cnf and issue the
  572. command nfbtrans ~0<myfile, ~2 the file myfile will be treated as if it were a
  573. ~0.c ~2 file because nfbtrans will see the name ~0stdin.c. ~2  Default is ~0si=stdin. ~2
  574.  
  575.      ~0sp=0/1/2 ~2 sets spool mode. Output to be embossed is sent to a temporary
  576. file and then that file is printed with the dos print command. If your
  577. printer supports it, tell it to ignore formfeeds with ~0s0=. ~2  Your
  578. printer will continue ignoring formfeeds until it is powered down or reset
  579. because nfbtrans has no way of resetting it. It is important that the
  580. print command is resident before nfbtrans is run. Otherwise memory may not be
  581. released properly.  The temporary file is usually placed on your ram disk.
  582. Use the environment variable TMP or TEMP to tell nfbtrans where to put it,
  583. otherwise it goes in your current directory. You must have sufficient memory
  584. to execute the print command while nfbtrans is running. Otherwise nfbtrans
  585. reports the error and exits. These temporary files aren't deleted when printing
  586. is complete so its best if they are on a ram drive. The files are created
  587. from the hour, minute and second 183742 for example.
  588. There is a limit, approximately 9, on the number of files in the print queue.
  589. So if you run ~0nftrans *.* ~2 all the files will be stored as the
  590. temporary files but only the first 9 may be printed.  Use the syntax
  591. nfbtrans ~0*.*;n ~2 to start embossing at the nth file.
  592. Use ~0sp=2 ~2 to pause for the estimated embossing time.  Press any key to
  593. translate the next file immediately.  In theory this should prevent
  594. program from overflowing the print queue. ~0pa= ~2 and ~0sp= ~2 cannot be
  595. used at the same time.    The last one specified will be the one used.
  596.  
  597.      ~0so=0 or 1 ~2 turns sound off or on. Turn sound off if you are annoyed
  598. by the beeps and clicks. Pressing <SPACE> during translation toggles sound
  599. on or off.
  600.  
  601.      ~0st=filename ~2 specifies the name of a file containing statistics about the
  602. file you just translated. Here is an example of a statistics file translating
  603. this file with comments explaining certain entries:
  604. ~s ~0
  605.  
  606.   wed 02/21/96 17:39
  607.   Input File: nfbtrans.fmt
  608.   Translation time: 0 minutes 56 seconds
  609.   LinesPerPage: 27
  610.   LineLength: 43
  611.   Words: 13101
  612.   Pages: 64
  613.   Words per Page: 204
  614.   Words per Second: 233
  615.   Characters per Second: 1116
  616.   Passes: 2 ;because of table of contents
  617.   Estimated Embossing Time: 29 Minutes ;Juliet 35 chars per second
  618.   Hyphen Searches: 498 ;searched because there was room for a three letter word
  619.   on line
  620.   Hyphen Matches: 218 ;word was found in dictionary
  621.   Hyphens Used: 126 ;split hyphenated word fit on line
  622.   Hyphens Skipped: 2 ;too many consecutive hyphens or too many per page
  623.   Total Cells: 62531
  624.   Total Dots: 140768
  625.   Dot1:  28017 = 19%
  626.   Dot2:  26158 = 18%
  627.   Dot3:  25784 = 18%
  628.   Dot4:  25675 = 18%
  629.   Dot5:  20861 = 14%
  630.   Dot6:  14273 = 10%
  631.   Dot 7:   2129 ;uppercase chars of lines of computer braille
  632.   Input file length: 81667
  633.   Output file length: 66115
  634.   Output is 80% of input
  635.   Entries in table: 898
  636.  
  637. If the statistics file already exists, the new output is appended to the file.
  638.  
  639.      ~0tc=string ~2specifies the two lines of the Table of Contents header
  640. (See ~0bm= ~2option). String is a list of six words separated by vertical
  641. bars. The first three words are for line one and the last three are for line
  642. two. The default is ~0tc=,TITLE|,PR9T|,BRL||,PAGE|,PAGE.
  643.  
  644. ~0td=table_definition ~2 defines the format for a table with multiple columns.
  645. The table definition string follows the same format as the ~0sprintf ~2
  646. function familiar to C programmers. The table definition string is made
  647. from one or more field specifiers. A field specifier begins with a percent
  648. sign, the field width, and a lowercase ~ls.  There may be spaces or other
  649. characters between field specifiers. A negative field width as in ~0%-8s ~2
  650. defines a field of eight characters that is left justified. A positive field
  651. width is right justified. If the table definition contains spaces use double
  652. or single quotes.
  653.  
  654. The table definition is applied to each input line and the columnized line
  655. is output. You must use some common sense in the table definition. The sum
  656. of all the field widths plus any characters must be less than or equal to the
  657. page width. You can have up to eight fields defined in a table definition.
  658. It is important that  output fields not be larger than the corresponding
  659. field definition.  If you are translating to grade 2 the length of the output
  660. field could be larger for example when the dollar sign is expanded. Lines
  661. with page numbers can contain a table entry if there is room, otherwise the
  662. table will continue on the next line.
  663.  
  664. If a column translates to an accent mark, the column is output as spaces.
  665. If the table is in Grade 2, precede the accent with a vertical bar. One use
  666. for this would be if you want to right justify a five column field on a line
  667. width of 40 characters.  The table definition would be
  668. (tilde)~0-td="%15s%15s%10s" ~2 so if you want to right justify hello you
  669. would immediately follow the table definition line with two vertical bar,
  670. accent pairs and then hello.
  671.  
  672. Example: Define a table of four columns all right justified with column 1
  673. being 5 characters, columns 2 3 and 4 8 characters.
  674. The table definition would be (tilde)~0-td=%5s%8s%8s%8s ~2 Since 5 plus 8
  675. plus 8 plus 8 equals 29, the width of the table output is 29 characters.
  676. Each input line is translated and then output according to the field
  677. specifiers in the table definition.  Suppose the input line is 23 5.7 6.2 7.8.
  678. This line has four fields; the first will be output according to the first
  679. field specifier which is ~0%5s ~2 which means right justified in a field of
  680. five characters.
  681.  
  682. Table output is terminated by a blank line or another table definition.
  683. (See the file tvfreqs.fmt for an example of how
  684. to define a table).
  685.  
  686.      ~0te=table_entry ~2allows you to change the replace string for the
  687. specified entry in the table of translation rules. This option is only allowed
  688. during translation. The match and replace strings must be separated by a space
  689. character, otherwise the replace string will be null.  For example to change
  690. the table entry for the left bracket  to the Grade 2 parenthesis,
  691. use the option ~0te="[ 7" ~2Remember to use quotes since the string contains a
  692. space.
  693.  
  694.      ~0tf=table_file;backtrans_table_file ~2 immediately loads the given table
  695.      file containing translation rules.  The back translation table may also
  696. be specified with a semicolon and the file name.   The translation mode
  697. in effect determines which table will be loaded.  The default value for this
  698. option is ~0tf=braille.tab;back.tab. ~2
  699. This option can be used to load different rules for
  700. different languages. This new table remains in effect until another table
  701. is loaded. If you plan to translate more than one file using wildcards, the
  702. original ~1braille.tab ~2 file should be reloaded at the end of the file.
  703. For example you could set up nfbtrans.cnf to load russian.tab every time
  704. a .rus file was translated. To do this, add ~0rus=9 ~2 to an ~0ex= ~2 option
  705. assuming ~0i9 ~2 is not in use. Then add the line
  706. ~0i9=(tilde)-tf=russian.tab|(tilde)-tf=braille.tab| ~2
  707. You could also reload a default table in nfbtrans.cnf.    The table file is
  708. assumed to be in the same directory as nfbtrans.cnf unless the second character
  709. is a colon.
  710.  
  711.      ~0tm=translation_mode. ~2 ~0tm=1 ~2 chooses 1 for the first choice requesting a
  712. number. ~0tm=21 ~2 chooses 1 for the first and 2 for the second input.
  713.  
  714.      ~0tn=xy ~2specifies the default number displayed when asked for numeric
  715. input.
  716.  
  717.      ~0to=toc_format ~2specifies the format string for a TOC title default
  718. is (tilde)s2(tilde)cf which skips a line and centers the title.
  719.  
  720.      ~0tp=trailing_punctuation ~2specifies characters considered to be
  721. trailing punctuation when B3 is set in the ~2hm= ~2option.  By default
  722. comma, colon, semicolon, period, exclamation, and question are considered
  723. trailing punctuation.
  724.  
  725.      ~0ts=file ~2 specifies a file for storing information about how words
  726. are translated using the rules supplied in the translation table.  This file
  727. can get very large so this option should only be used when you want to examine
  728. how a word is translated.  You can put a starting line number before the
  729. filename for example ~0ts=1400h:table ~2will store table statistics starting
  730. at line 1400 of the input file.
  731.  
  732.      ~0tv=number ~2 sets timing value. Only used with nfbasm and Microsoft C. On
  733. faster machines the delay may not be long enough. Turbo C automatically takes
  734. your machine's clock speed into account.
  735.  
  736.      ~0vc=vowels|consonants ~2specifies which characters are vowels and which
  737. are consonants. This is used only for types 13 through 15. The strings must
  738. be separated by the vertical bar character. The default vowels include A, E,
  739. I, O, U plus some extended graphics characters used in the French language.
  740.  
  741.      PART 5: Formatting Commands
  742.      The braille translator recognizes several commands that will change its
  743. actions. The computer differentiates a command from some other character string
  744. because the command starts with a special character, usually the tilde.
  745. The command itself is not translated into
  746. braille, but instead only modifies the action in the program. Formatting may be
  747. disabled for a given extension using the ~0i0 -i9= ~2option.
  748. Nfbtrans will terminate if an unknown format
  749. command is encountered. Disabling format commands also disables special
  750. treatment of ||.
  751.      For example, you can switch from grade 2 braille output to grade 1 braille
  752. output within a document by using the (tilde)1 to indicate grade 1 and then the
  753. (tilde)2 to indicate grade 2. The translator will go from grade 2
  754. (the default) to grade 1 and then back to grade 2. Note that the case of
  755. the command doesn't matter (tilde)A is equivilent to (tilde)a.  See the
  756. ~0fs= ~2option to change the format character.
  757.  
  758.      Here is a list of the commands and a brief description of their actions:
  759.  
  760.      (tilde)A PUT THIS WORD ONLY IN GRADE ONE: (Acronym for National Education
  761. Association will look like this: ~ANEA; otherwise, it would look like N, or N
  762. comma.) Read Braille Symbols and Contractions section of documentation to
  763. determine whether there might be a conflict when brailling acronyms.
  764.  
  765. (tilde)B TEXTBOOK PAGE BREAK IN INKPRINT DOCUMENT: Follow the (tilde)B
  766. immediately with a number to indicate the textbook page. The Braille translator
  767. will flush any translation in progress, insert a line of dots 3 6, and
  768. terminate the line with the text page number indicated. The indicated print
  769. page number prefixed by a letter to indicate the relative Braille page will be
  770. embossed at the top of each Braille page. The actual Braille page number will be
  771. embossed in the lower right-hand corner of the page. (See the ~0bm=book_mode
  772. ~2option described earlier.)
  773.  
  774.      (tilde)C CENTERING LINES: Put centering command in front of word.
  775.      Centering is in effect until a new paragraph is encountered. This could be
  776. a blank line or one beginning with blanks.
  777. Nfbtrans automatically breaks
  778. lines up in to the proper length for centering. You can specify this using
  779. the ~0cl= ~2 option.
  780.  
  781.      (tilde)D DOUBLE SPACES BRAILLE DOCUMENT: PUT ON A LINE BY ITSELF. This
  782. command will cause a blank line to appear after each full Braille line.
  783. Use (tilde)~lD to terminate
  784. this feature.
  785.  
  786.      (tilde)E POETRY FORMAT: The poetry command can be helpful in
  787. translating poems. This can be considered the opposite of text format (tilde)t
  788. as far as the generated Braille output is concerned. Indented lines of text in
  789. the print image file will cause the Braille output to be written flush against
  790. the left margin with subsequent Braille lines indented two spaces--in other
  791. words, a Braille hanging paragraph. Lines not indented in the print image file
  792. will cause the Braille output to be indented two spaces from the left margin.
  793. Terminate poetry formatting by using (tilde)t.
  794.  
  795. (tilde)F TABLE OF CONTENTS LINE: (Dot 5
  796. fill): This command has several modes of operation.
  797.  
  798. If (tilde)f is followed by a letter or punctuation other than plus or minus:
  799.  Set up your table of contents page at the head of the document using
  800. zeroes for page numbers, and the (tilde)F. For example: ~_
  801. (tilde)FWHAT IS THE NATIONAL FEDERATION OF THE BLIND 00 ~_
  802. The (tilde)F will cause the text to be left justified, the
  803. page numbers to be right justified, and dot 5 fill between them. Braille out
  804. the document noting the page numbers of the actual sections. Reedit the
  805. document, replacing the zeroes with the actual page numbers. Finally, Braille
  806. out the finished version. The translator will handle multiple lines if you
  807. continue the table of contents line in cell one of the following line. For
  808. example:
  809. (tilde)FAll Publications and Brochures Distributed by the National
  810. Federation of the Blind, Job Opportunities for the Blind, and the American
  811. Brotherhood for the Blind 00
  812. By default, Table of Contents lines are broken at the pagewidth minus seven
  813. column. This may be changed by placing a colon immediately after the ~lf
  814. and then the number.  For example (tilde)~0f:12 ~2 Chapter Five
  815. will cause TOC lines to be broken at column 31 width pagewidth of 43.
  816.  
  817.      You can tell nfbtrans the last word of a table
  818. of contents line.  Doing this prevents lines with only guide dots and the
  819. last word from being output. Words starting with a dollar sign or accent
  820. at the end of an input line are considered to be the last table
  821. of contents word.  If the word starts with an accent, the accent character
  822. is removed.  If you are making a table with items and prices using the
  823. (tilde)f command, lines will always be output with both item and price on
  824. a single braille line since the last word on the input line contains a
  825. dollar sign as the first character.
  826.  
  827. If (tilde)f is followed by digits:
  828. You can tell nfbtrans to automatically put the
  829. correct braille page in your Table of Contents.  You can use this new method
  830. for creating a Table of Contents and still use the old method for other
  831. types of tables.  Carefully follow these steps:
  832.  
  833.      1.  Place a (tilde)f0 at the beginning of your document.  If you want to
  834. use the ~0pf= or pd= ~2 options, the (tilde)f0 must come first.  (tilde)f0
  835. tells nfbtrans that two passes are required and that your document will be embossed
  836. or written to disk on the second pass.    If the (tilde)f0 is not first, nfbtrans
  837. may output lines before it determines a second pass is required.  This
  838. would certainly mess up the format of your document when the second pass
  839. begins.
  840.  
  841. 2.  Set up the Table of Contents entries with the (tilde)f followed by a number.
  842. Later on in your document use the (tilde)f followed by that same number to
  843. indicate that that first entry corresponds to this title. Do not put a page
  844. number as the last word on the first Table of Contents line, nfbtrans will do
  845. that.
  846.       Starting with version 7.44 the matching (tilde)fnn is no longer required
  847.       if the title matches the TOC entry. The program stores all TOC entries in
  848. a file named ~0tocfile.$$$. ~2Each input line is compared to the first TOC
  849. entry. If a case-insensitive match is found a (tilde)s (tilde)c and (tilde)f
  850. followed by the TOC number is inserted in the input line.
  851. The next line is read from the TOC file and
  852. the process is repeated.  This method assumes the following: 1. All
  853. TOC entries are in order and none are skipped for example (tilde)f1
  854. (tilde)f2 ... 2. There is a subsequent input line that matches the TOC line
  855. without the (tilde)fnn. 3. you want the TOC title centered. 4. You want a
  856. blank line before the TOC title. (See the ~0to= ~2option described earlier).
  857.  
  858.      Following the (tilde)f by a plus sign puts NFBTRANS in TOC mode. All
  859.      subsequent lines are considered to be TOC entries until a (tilde)f- is
  860.      encountered.  The program removes any numbers and guide marks from the
  861.      end of the input line. The appropriate (tilde)f is inserted before each
  862.      input line while this mode is in effect. So if you are brailling a
  863.      document containing a print Table of Contents, simply put a (tilde)f+
  864.      before and a (tilde)f- after to completely automate the process.
  865. Here is an example to illistrate:
  866.  
  867. (tilde)f1Chapter 1 Getting Started
  868.  
  869. (tilde)f2Introduction
  870.  
  871. (tilde)f3Installation
  872.  
  873. (tilde)f4Chapter 2
  874.  
  875. (tilde)f5 chapter 3
  876.  
  877.  
  878. Then any time later in your document you could have the line
  879.  
  880. Chapter 1
  881.  
  882. Then later on after any number of pages you could have the line
  883.  
  884. Introduction
  885.  
  886. The program reports an error if there is a (tilde)f1 with no previous (tilde)f0.
  887. You currently can have up to 200 toc entry/title pairs.
  888. If you have a (tilde)f75 entry, you must have a matching (tilde)f75 title entry.
  889. The program verifies this after pass 1 is complete.  Also you cannot have more
  890. than two entries with the same number.    The entries can be in any order
  891. as long as there are exactly two entries with the same number.
  892.      The program assumes the first occurrence of (tilde)f14
  893. for example is a TOC entry and the second (tilde)f14 is on the page corresponding
  894. to that entry. Note that if you emboss a range of pages for example page 5 to 16,
  895. the program does a complete pass one to do error checking and then outputs
  896. the desired pages on pass two.
  897.  
  898.  
  899.      Note that (tilde)f0 with no other TOC entries can be used to verify
  900. that your document has no errors before embossing begins.
  901.  
  902.      (tilde)G SET RIGHT MARGIN: PUT ON LINE BY ITSELF. Follow
  903. this command with a number.
  904.  
  905.      (tilde)H HEADERS: Use this command to cause a
  906. header at the top of each Braille page. Terminate the headers with a (tilde)J or
  907. change the header with another (tilde)H.
  908.  
  909.      (tilde)I ITALIC SIGN: In Braille, italics replace
  910. underlining. If there are three words or less underlined, put an italics sign
  911. in front of each word. If there are four or more words, put two italics before
  912. the first word and one italic before the last word. Use ~0(tilde)i ~2followed
  913. by a backslash to turn on italics mode. The program outputs two italics
  914. before the current word. Another ~0(tilde)i ~2backslash turns off italics mode
  915. and outputs a single italics mark.
  916.  
  917.      (tilde)J TERMINATE HEADER: Turns off the header feature.
  918.  
  919.      (tilde)K TERMINATE FOOTER: Turns off footer feature.
  920.  
  921.      (tilde)L LETTER SIGN: In Braille, letters that stand alone are often
  922. preceded by a letter sign, (dots 5-6). The (tilde)l command is used to
  923. generate this symbol. For example, a capital B standing alone represents
  924. the word, ~abut; C, ~acan, and so on, emphasizing the need for a letter
  925. sign. Put the letter sign before or in a word, Apartment 3-~lC.
  926.  
  927.      (tilde)M CHANGE MARGIN: PUT ON LINE BY ITSELF. Follow
  928. this immediately with a number indicating the column in which the
  929. Braille left margin should begin--normally, column one. It is best to put the
  930. margin command on a line by itself. The next line will be indented to the
  931. declared new margin. For example, to change left margin, do (tilde)M03 and to
  932. change back, do (tilde)M01 (line return). You see margin changes commonly in
  933. print to se toff large chunks of quoted material. In Braille, however, handle
  934. such a chunk of information with the same print margins as the rest of the text.
  935. But separate the chunk from the rest of the text by placing a blank line (tilde)s
  936. before the material and a (tilde)s blank line after the material.
  937.  
  938.      (tilde)N SET PAGE NUMBER: You may set or reset the page number by including
  939. a (tilde)N followed immediately by the page number of the next page.
  940. (tilde)NNN PUT ON LINE BY ITSELF.
  941.  
  942.      (tilde)O INDENTS HANGING PARAGRAPH: PUT ON LINE BY ITSELF. If
  943. there are reasons that you would prefer to have a hanging paragraph indented
  944. more than two spaces, use this command followed by a number such as
  945. 5.
  946.  
  947.      (tilde)P Page command.   This command has several
  948. modes. If you place (tilde)p as the only characters in the word the command
  949. will cause the Braille embossor to skip to
  950. the top of the next page.  If followed by a letter, (tilde)pa for example, the
  951. program skips to the top of the next odd numbered page if you are using
  952. interpoint mode.  Use this to begin embossing at the top of the next right
  953. facing page.
  954.  
  955.      If followed by a dash (tilde)P- page numbers including roman numerals
  956. will not be translated to a braille number with a leading number sign. Use
  957. a plus sign to go back to normal braille page numbering.
  958.  
  959. If followed by a number for example (tilde)p4, the program skips to the next
  960. page if there is a blank line within 4 lines from the bottom of the page. This
  961. can be used to prevent centered titles and so forth from being printed on
  962. the bottom of a page. The command is normally given in the beginning of the
  963. document and remains in effect until another (tilde)p number command is
  964. issued.
  965.  
  966. If followed by a colon and a number for example ~0(tilde)p:5 ~2 causes a
  967. page break if the output is within four lines of the bottom of the page.
  968. This could be used if you have a paragraph you didn't want split on two pages.
  969. Note that the (tilde)p colon command does a (tilde)p0 and then restores the
  970. original value at the beginning of the next page.
  971.  
  972.      (tilde)Q CLEAR ALL TABS: This clears all tabs inserted in the formatted
  973. document by using the (tilde)V.
  974.  
  975.      (tilde)R MAKE ROMAN NUMERALS: This command makes Roman numerals on each
  976. Braille page. Use (tilde)N to switch to Arabic.
  977.  
  978.      (tilde)S INSERT A BLANK LINE.  If followed by a digit for example
  979. (tilde)s3 a blank line will be inserted only if the program is on at
  980. least the third line of the braille page. Otherwise, the translator will
  981. eliminate all blank lines. The program will now
  982. treat a blank line like a paragraph indent even if the following line is left
  983. justified.
  984.  
  985.      (tilde)T TEXT FORMAT: PUT ON LINE BY ITSELF. The text format is the
  986. default format--that is, the format that the translator uses unless it is told
  987. to do otherwise. When the translator normally formats text, it forces all
  988. indentation to the third cell, wraps all overflow to the first cell of the next
  989. line, and appends following left-justified lines. The program will now treat a
  990. blank line like a paragraph indent even if the following line is left
  991. justified.
  992.  
  993.      (tilde)U TURN OFF ALL PAGE NUMBERING: Use this command to disable all page
  994. numbering.
  995.  
  996.      (tilde)V SET TAB: A (tilde)V followed by a column number will set a tab
  997. to this location. Now you may use the (tilde)X to skip to this column.
  998.  
  999.      (tilde)W FOOTER LINE: The footer command will cause a line to emboss at the
  1000. ottom of every page.
  1001.  
  1002.      (tilde)X TAB: This command causes a skip to the next tab. If no tabs have
  1003. been specified, the output will skip to a space. If the command is followed
  1004. by a number, the output will skip the number of spaces specified.
  1005.  
  1006.      (tilde)Y LIST FORMAT:
  1007. PUT ON LINE BY ITSELF. This feature keeps information at the left margin with
  1008. runovers of any line followed in the print text by a line return being indented
  1009. two spaces (cell 3). If list items exceed one print line in length, the first
  1010. word of the second line must be preceded by five spaces in order to be
  1011. formatted properly.
  1012.  
  1013.      (tilde)Z TERMINATION COMMAND: The termination command inserts a
  1014. termination sign (dot 6 followed by dot 3) into the text wherever it is placed.
  1015. The termination sign in Braille is used to indicate the emphasis in a word that
  1016. is only partly underlined or italicized. For example, if you wanted to
  1017. emphasize the ~1dis ~2in dismount: ~idis ~zmount.
  1018.  
  1019. (tilde) underscore: causes a hard carriage return beginning a new braille line.
  1020.  
  1021.      (tilde)0 DISABLE ALL TRANSLATION:
  1022. This command causes the program to do no translation at all. The output will be
  1023. what is sometimes called "Computer Braille." The output file will have the same
  1024. case as the input file. Please note that letters ~lA through ~lZ will be lower
  1025. case, that is, without capital marks. (tilde)01 produces a modified grade 0
  1026. output. I have experimented with 8-dot braille and found it takes some getting
  1027. used to. (tilde)01 is grade 0 with braille capital marks. It is more compact
  1028. than 8 dot braille. This does not conform to any braille code I know of but is
  1029. an alternative to 8 dot braille. It can be used to braille ~0.c, .cpp or .h~2
  1030. files. It also is useful for brailling unix man pages where the case of the
  1031. options is very important. note that an error is reported if you put two
  1032. grade commands on a word.  This is because all format commands are processed
  1033. before the word is translated.    For example if you had (tilde)0this(tilde)2
  1034. the (tilde)2 would be in effect for the whole word.
  1035.  
  1036.      (tilde)1 TRANSLATE TO GRADE ONE BRAILLE: This command causes grade 1
  1037. Braille output.
  1038.  
  1039.      (tilde)2 TRANSLATE TO GRADE TWO BRAILLE: This command causes grade two
  1040. output.
  1041.  
  1042.      (tilde)3 TRANSLATE TO GRADE THREE BRAILLE: This command causes grade three
  1043. output.
  1044. You can translate to Grade Three in stages.  Use (tilde)31 to use dot 4, 5, 45 and 456
  1045. letter contractions.  Use (tilde)32 to use dots 4, 5, 45 and 456 number
  1046. contractions.  Use (tilde)34 to include dot 4, 5, 45 and 456 contractions with
  1047. characters other than number or letter characters. If you want letter and
  1048. number contractions, add the values for letters and numbers 1+2  = 3 =
  1049. (tilde)33.
  1050.  
  1051.      (tilde)4 BLOCK MODE.
  1052.  
  1053.      (tilde)5 BLOCK PARAGRAPH, blank line of input causes new
  1054. braille paragraph.
  1055.  
  1056. (tilde)6 Automatic formatting.    The program examines up to the first 1000 lines
  1057. of a file before translation.  If the number of blank lines is greater than
  1058. the number of lines starting with four spaces then block paragraphs are assumed.
  1059.  
  1060.      (tilde) left square bracket ~0[ ~2 sends ESC or ~0chr$(27) ~2 to the printer.
  1061. Any text after the bracket will also be sent up to the next tilde
  1062. character in the word.
  1063.  
  1064.      (tilde)~0-xx=string ~2 where
  1065. ~0xx=string ~2 is a valid command line or ~0nfbtrans.cnf ~2 option. For example
  1066. (tilde)~0-pl=25 ~2 sets page length to 25.
  1067.  
  1068.      (tilde)~0.extension ~2applies the formatting and options associated
  1069. with a given extension.  For example if you are translating a file to
  1070. Grade 2 braille and you want to translate a ~0.c ~2program segment, use
  1071. (tilde)~0.c ~2and when finished with the C segment do a (tilde)~0.fmt.
  1072. ~2The ~0post_init ~2string is ignored and the format string is not changed.
  1073.  
  1074.      (tilde)' FORCED APOSTROPHE: The forced apostrophe eliminates
  1075. ambiguity where the single quote mark is used. For example, if you had to force
  1076. an apostrophe in vernacular, "~'ave a ~'eart, me love."
  1077.  
  1078.      (tilde) right square bracket ~0']' ~2 Force leading and trailing outer
  1079. quotes at any time.
  1080.  
  1081.      (tilde) right curly brace ~0'}' ~2 Force inner quotes at any time.
  1082.  
  1083.      You can insert any character without translation by preceding it with the
  1084. (bar symbol) character. For example, |,| b|en will prevent the BE sign from
  1085. appearing since that is not correct Braille usage.
  1086.  
  1087.      TO INTERRUPT NFBTRANS AT A PROMPT: Control SCROLL LOCK or BREAK key on
  1088. your keyboard will exit NFBtrans and take you to the ~lC prompt. Pressing <ESC>
  1089. during output causes program to abort.
  1090.  
  1091.              PART 6: Braille Considerations
  1092.      You cannot underline in braille - use italics for emphasis.
  1093.      Never use the letter L for the number 1.
  1094.      When typing fractions, type 8-1/2 instead of 8 1/2 (There must be a hyphen
  1095. between the whole number and fraction)
  1096.      Type the word "times" in mathematical formats.
  1097. Type the word "equal" or "equals." Type the word "divide" for the division
  1098. sign. Type the word "percent" when the percent sign stands alone. Never use the
  1099. number sign. Type the word "dollar."
  1100.      The translation program ignores empty lines -- use the (tilde)S to skip
  1101. a line in the braille output.
  1102.      A simple way to check that the embossor is working properly is to turn it
  1103. on, start up the computer, and, while you are still at the operating system
  1104. level enter a CONTROL-P at the keyboard.
  1105.      This will cause anything you type or the computer displays to be echoed to
  1106. the default list device. Since your default list device should be the brailler,
  1107. the characters you type should be echoed to the braille embossor. If they are,
  1108. then everything should be ready for the translator to work. Type a CONTROL-P
  1109. to turn off this echo feature. This technique allows you to determine that the
  1110. path from the operating system to the embossor is working properly.
  1111.  
  1112. PART 7: Sample Formats
  1113.  
  1114.      Following are some sample formats to help you get an idea of
  1115. the differences between braille format and print format.  If you
  1116. look these over you will see how easy it is to edit print text to
  1117. make it braille out in the proper format.
  1118.  
  1119. CHART
  1120.  
  1121. (tilde)~CTitle of chart           (centered)
  1122. (tilde)~S                  (skip a line)
  1123. (tilde)~Y                  (left justify)
  1124. Expenses:
  1125.  
  1126. (tilde)~M3                 (indent to cell 3)
  1127. Business
  1128.  
  1129. (tilde)~M5                 (indent to cell 5)
  1130. 1984: $1234.56
  1131. 1985: $3222.23
  1132.  
  1133. (tilde)~M3                 (back to cell 3)
  1134. Personal
  1135.  
  1136. (tilde)~M5                 (indent to cell 5)
  1137. 1984: $341.12
  1138. 1985: $678.90
  1139.  
  1140. (and so on....) ~m1
  1141.  
  1142.      FORCED APOSTROPHE
  1143.  
  1144. (tilde)(apostrophe)--FORCED APOSTROPHE:  The forced
  1145. apostrophe eliminates ambiguity where the single quote mark is
  1146. used.  For example, if you had to force an apostrophe in
  1147. vernacular:
  1148.  
  1149.      She said, "He always dropped his aitches when he said,
  1150. '(tilde)(apostrophe)Ave a ~'eart, me love.'"   (Note the forced
  1151. apostrophe before ~'ave~'.)
  1152.  
  1153. SIMPLE LETTER
  1154.  
  1155. (tilde)~Y           (to left justify header lines)
  1156. Date
  1157. Addressee
  1158. Address
  1159. City, State Zip
  1160. (tilde)~S           (skip a line)
  1161. Dear So and So:
  1162. (tilde)~T           (normal text format)
  1163.  
  1164.   Paragraph text. ------ ----------- ----------- ------- --------
  1165. ---- ------ ---------- ------ ------------ ---------- ------- ------
  1166. -------- ------- - ----------- --------- - - ----------- -- ----------
  1167. ------- --------- ------ ---------- ----------.
  1168.   Paragraph text. ------- ----------- -------- ------ -----------
  1169. ------- --------- ------------ ------------- ------------- -------
  1170. ----- --------- -------- ------- -------------.
  1171.  
  1172. (tilde)~S           (skip a line)
  1173. (tilde)~Y           (to left justify trailer)
  1174. Sincerely,
  1175. Name
  1176. Title
  1177. (tilde)~S           (skip line)
  1178. enclosures
  1179.  
  1180. LIST FORMAT
  1181.  
  1182.      In some cases, as in the brailling of poems or agendas, it
  1183. is desirable to set up a "hanging paragraph" arrangement in
  1184. braille--that is, where the first line of a paragraph begins at
  1185. the left margin and all subsequent lines of the paragraph are
  1186. indented two spaces. Refer to the poetry format (tilde)E for
  1187. further information about how to accomplish this.
  1188.  
  1189.      Individual elements in the list are often separated by
  1190. semicolons, as below.
  1191.      Example:
  1192.  
  1193. ~T
  1194.     Following is a list of items for sale, quantities on hand,
  1195. and the cost of each:
  1196. ~Y
  1197. Finest brass banjo picks; 100; $1.50
  1198. Flannel lined puppy baskets; 12; 13.50
  1199. Genuine surplus space program sky hooks; 17; $324.00
  1200. Slightly used soft leather turkey booties; 43; $2.25
  1201. ~t
  1202.  
  1203. POETRY FORMAT
  1204.  
  1205. ~e
  1206.      I have a little shadow that goes in and out with me,
  1207.      and what can be the use of him is more than I can see.
  1208.      He is very, very like me from the heels up to the head;
  1209.      and I see him jump before me, when I jump into my bed.
  1210. ~t (if returning to text)
  1211.  
  1212. OUTLINE FORMAT
  1213.  
  1214. ~CTitle of Document           (centered)
  1215. ~S                   (skip a line)
  1216. ~Y                   (left justify)
  1217. I. Heading
  1218.  
  1219. ~M03                   (indent to cell 3)
  1220. ~LA. Subheading            (note letter sign)
  1221.  
  1222. ~M05                   (indent to cell 5)
  1223. 1. Information text ----------- -------------- ------ ------------
  1224.    -------- -------------- ------------------- --------- ----------
  1225.    ----- ----- ------------.         (note that if information block
  1226.                     continues it is INDENTED)
  1227. 2. Information text ----------- -------- --- - --------- -----------
  1228.    ----------- ---------------- -------------- ------------- ------
  1229.    -- --------- -----------.
  1230.  
  1231. ~M03                   (back to cell 3)
  1232. ~LB. Subheading            (note letter sign)
  1233.  
  1234. ~M5                  (indent to cell 5)
  1235. 1. Information text --------- ------- ------------ ---------------
  1236.    ----- ----------- ---------------- ----------- ----------- ------
  1237.    -- -------------- ------.
  1238. 2. Information text -------------- ---------- --------- ----------
  1239.    ----- ----------- ------.
  1240.  
  1241. (and so on....) ~m1
  1242.  
  1243. SUBHEADINGS AND TEXT MIXED
  1244.  
  1245. ~CTitle of the Document        (centered)
  1246. ~S                   (skip a line)
  1247. ~Y                   (left justify subhead)
  1248.  
  1249. Subtitle
  1250. ~T                   (normal text)
  1251.  
  1252.   Paragraph text. ---------- ----- ------- ------------- -----------
  1253. ----- --------- ------------------ ----------------- --------- ------
  1254. ------ -------- ----------- -------- --------- ------ ------ ----------
  1255. ----- ------ ------------- -------.
  1256.   Paragraph text. ------- ---------- ------------ ----- ------------
  1257. ---- --------- ------------ --------- ---------------- --------------
  1258. ----- ------ -------- ----- -------.
  1259.  
  1260. ~S                   (skip line)
  1261. ~Y                   (left justify subhead)
  1262. Subtitle
  1263. ~T                   (normal text)
  1264.  
  1265.   Paragraph text. ---------- --- - - -- ----- ------ --------- ---------
  1266. ------- ---- -------------- ------.
  1267.   Paragraph text. ---------- ------ ----------- --------- -------- -----
  1268. --------- --------- ------ ------------ - -----
  1269. -- ------- ------ --------- -------- ------ ----------- --------- ------
  1270. -- -------- ----------- ----------.
  1271. ~t
  1272.      There are frequently requirements to produce documents that
  1273. present information in outline format, for example, a restaurant
  1274. menu or a schedule.
  1275.  
  1276.      Such a document could be setup as follows:
  1277.  
  1278. ~CSample Schedule of Events      (Center Title)
  1279. ~CFirst Annual Potato Festival
  1280. ~S                  (Skip a Line)
  1281.  
  1282.      The First Annual Great Potato Festival will be held in
  1283. beautiful Spud Auditorium on the campus of Tuber University.  The
  1284. fee for the event will be $25.00 which includes the Tuesday night
  1285. banquet and dance.  The dance will feature the crowning of the
  1286. Potato Queen and her court, as well as live music by Rocky and
  1287. the Mashers.
  1288.  
  1289. ~S
  1290. ~Y                  (Change to List Format)
  1291. Tuesday Events
  1292. ~M3                 (Indent to cell three)
  1293. 10:30 - 12:30  Introductions and Registration
  1294. 1:00 - 2:00 Luncheon
  1295. 2:30 - 3:30 Potatoes and the International Balance of Trade
  1296. 4:00 - 5:00 Ten new ways to use Potato Skins in the Home
  1297. 7:00 - ? Banquet and Dance
  1298. ~T ~m1                     (Reset to Text)
  1299. ~S
  1300.    Seminars will be held in the Peeler Room.  The banquet will
  1301. take place in the Grand Potato Ballroom.  Refreshments and drinks
  1302. can be purchased in Mr. Chips' lounge.
  1303.  
  1304. TABLE OF CONTENTS
  1305.  
  1306. ~FIntroduction to Bagpipes 00
  1307. ~FRecorded History of Bagpipes in Europe 00
  1308. ~FTypes of Bagpipes found in the British Isles 00
  1309. ~FBagpipes in War and Politics 00
  1310. ~FBagpipe Music Today 00
  1311.  
  1312.      The (tilde)F will cause the text to be left justified, the
  1313. page number to be right justified, and dot 5 fill between them.
  1314. Braille out the document noting the page numbers of the actual
  1315. sections.  Reedit the document, replacing the zeroes with the
  1316. actual page numbers.  Finally, braille out the finished version.
  1317. The translator will handle multiple lines if you continue the
  1318. table of contents line in cell one of the following line.  For
  1319. example:
  1320.  
  1321.      ~FA Long and somewhat tedious description of the impact of
  1322. Bagpipe music on indoor plants 00
  1323.  
  1324. (See automatic page numbering for Table of Contents described earlier)
  1325.  
  1326. UNDERLINING
  1327.      Italics and underlining in braille are indicated by an
  1328. italic sign, as there is no other way to create an underline or
  1329. special slanted character.  The (tilde)I can be used to
  1330. generate the italic or underline indicator.  Indicate that a word
  1331. is underlined or italicized by preceding it with the (tilde)I
  1332. command.  If there are more than three words in a row to be
  1333. italicized, precede the first word with TWO italic commands.  For
  1334. example, suppose you had text as follows:
  1335.  
  1336.      The American people will (start italics) not (end italics) tolerate
  1337. the concept of (start italics) rule by a vocal but small minority.(end
  1338. italics)
  1339.  
  1340.      You may produce the desired effect in braille by entering
  1341. the following:
  1342.  
  1343.      The American people will ~Inot tolerate the concept of
  1344. ~I~Irule by a vocal but small~I minority.
  1345.  
  1346.         PART 8: Braille Symbols and Contractions
  1347.  
  1348.      The complete table of contractions is available for
  1349. modification. Treat it carefully!  Always keep a backup!
  1350.  
  1351.      These are some of the contraction and punctuation symbols
  1352. used by the braille translator.  Note -- the capital sign looks
  1353. like a comma.
  1354.  
  1355. AND   &
  1356. FOR   =
  1357. WITH  )
  1358. (percent)     3P
  1359. AR    >
  1360. GG    7
  1361. (zero)       J
  1362. (semicolon)    2
  1363. BB    2
  1364. GH    <
  1365. (one)      A
  1366. (comma)     1
  1367. BE    2
  1368. HIS   8
  1369. (two)      B
  1370. (exclamation)      6
  1371. BLE   #
  1372. ING   +
  1373. (three)     C
  1374. (question)     8
  1375. BY    0
  1376. IN    9
  1377. (four)       D
  1378. (colon)     3
  1379. CC    3
  1380. OF    (
  1381. (five)       E
  1382. (slash)     /
  1383. CH    *
  1384. OU    \
  1385. (six)      F
  1386. (ellipses)   '''
  1387. COM   -
  1388. OW    [
  1389. (seven)      G
  1390. (period)     4
  1391. CON   3
  1392. SH    %
  1393. 8     H
  1394. (dash)      --
  1395. DD    4
  1396. ST    /
  1397. (nine)       I
  1398. (hyphen)     -
  1399. DIS   4
  1400. THE   !
  1401. (left paren)     7
  1402. (start quote)      8
  1403. EA    1
  1404. TH    ?
  1405. (right paren)      7
  1406. (end quote)    0
  1407. ED    $
  1408. TO    6
  1409. (left brace)     ,8
  1410. (apostrophe)     '
  1411. EN    5
  1412. WAS   0
  1413. (right brace)      8'
  1414. (plus sign)    +
  1415. ER    }
  1416. WERE  7
  1417. (ampersand)    @&
  1418. (reverse slash)     ;
  1419. FF    6
  1420. WH    :
  1421. (asterisk)     99
  1422. (dollarsign)     4
  1423.  
  1424. PART 9: CHANGING THE TABLE
  1425.  
  1426.      The table of braille contractions exists in ~1braille.tab ~2and ~1back.tab.
  1427. ~2It is read just prior to file translation.
  1428. The table gets read again only when necessary for example
  1429. when going from Grade Two to Three or Grade Three to Two or when a new table
  1430. file is specified with the ~0tf= ~2option.
  1431.  
  1432. A portion of the table appears below:
  1433.   1(bar)AFTERNOON(bar)AFN
  1434.   1(bar)AFTERWARD(bar)AFW
  1435.   1(bar)AFTER(bar)AF
  1436.   2(bar)AGAINST(bar)AG/
  1437.   2(bar)AGAIN(bar)AG
  1438.   1(bar)AGREEA(bar)AGREEA
  1439.  
  1440.      Each table entry consists of three parts separated by the vertical bar.
  1441. The first part of an entry is a type indicator, the second part is the match
  1442. string, and the third part is the replacement string.
  1443. The simplest types are as follows:
  1444. 1-replace anytime, 2-replace only if whole word match, and 3-replace if whole
  1445. word or at beginning of word.  See the comments in braille.tab for a complete
  1446. list of types.    Note that types 17-18 are defined for back translation
  1447. but not for Grade 2 or 3 translation.  Types 11-16 are not defined during
  1448. back translation.
  1449.      The table is stored in alphabetic order with the more specific string
  1450. ahead of the more general string. Study the table carefully before you change
  1451. it. Be sure you keep the original. Improper braille.tab entries will produce
  1452. incorrect braille. If errors are found, the program reports the type and line
  1453. number of the error, and then aborts. Entries are converted to upper
  1454. case but must be in the proper order.
  1455.  
  1456.      Every character in the input file must have
  1457. an entry in the table.    For example if the pound symbol |# is in the file,
  1458. it must also be defined in the table.
  1459.  
  1460.      Graphics and control characters may also be defined in the table.
  1461. Type 28 indicates a graphics or control character and type 29 indicates an
  1462. upper case graphics character.    extended graphics characters may be entered
  1463. within brackets for example ~_
  1464. ~0 1|[134][140]b|$ ~2is a valid table entry. Graphics
  1465. characters may also be entered directly in the table. Graphics characters
  1466. 128-255 may also have types 1-16.  Characters with type 1-16 are only used in
  1467. Grade 2 or Grade 3 braille.  If you want a graphics character translated in
  1468. Grade 1, it must be type 28 or 29.  If Grade 2 or 3 is in effect, the
  1469. program will skip passed a type 28 or 29 entry if there is another entry
  1470. for that character.  This allows a different translation for grade 2.
  1471. Remember that control characters are ignored unless you set ~0kc=1 ~2 and
  1472. graphics characters are modified unless you set ~0gm=2. ~2Graphics characters
  1473. are normally used only in foreign language tables.
  1474.  
  1475.      The output or replace string may also have brackeTed entries.  For
  1476. example the back.tab table contains the line ~03|6|TO[32] ~2 so the word ~06!
  1477. ~2 is changed to ~0to ~2followed by a space and then the word ~0the.  Note that
  1478. the only way to include a space in the replace string is to use 32 in brackets.
  1479.  
  1480.      Grade 3 is only partially implemented. Type entries greater than 32 are for grade 3
  1481. and entries less than 0 indicate the entry is not to be used if in Grade 3.
  1482.  
  1483.      Match strings can be up to twenty characters and replace strings up to
  1484. eleven characters long.  There can be up to 1400 entries in the table.
  1485.  
  1486.      PART 10: EXTERNAL FORMAT LANGUAGE
  1487.  
  1488.      The NFB Braille Translation Program includes an external format
  1489. language. The external format file is created with a word processor. This file
  1490. is used by the translation program to format the file in addition or instead of
  1491. imbedded tilde commands. NOTE-ALL THE TILDE COMMANDS WORK AS THEY ALWAYS HAVE.
  1492. The external format language was developed to ease the brailling of standard
  1493. columnar computer reports, but it can be used for many other standard formatting
  1494. tasks. External Format Language files must have a .efl extension.  If the option
  1495. ~0ef=1 ~2 is specified the program searches for the .efl file with the same name
  1496. as the file you are translating.  If you are translating myfile.txt, myfile.efl
  1497. is processed if it exists.  ~0ef=2 ~2 tells nfbtrans to abort if myfile.efl is
  1498. not found.  Add four to the number if you want nfbtrans to output the name
  1499. of the .efl file and the message saying processing is complete.
  1500. The external format language tells the translator how to process a given input
  1501. file. The file may or may not have imbedded tilde commands.
  1502.  
  1503. The external format
  1504. file is made up of command sets. Each command set starts with the word LINE
  1505. followed by one or two numbers. The first number refers to the starting, or
  1506. only, line, and the second number if present refers to the ending line for this
  1507. command set. The commands in the command set following the LINE command are in
  1508. effect only for the lines specified. As each line is read from the input file,
  1509. the program checks each LINE command to determine if it applies to the line
  1510. read. Of course, the beginning and ending line can be such that all the lines
  1511. in the text input file can be affected. For example,~_
  1512.      LINE 1 9999~_
  1513.      would cause the program to apply this command set to lines 1 through 9999.
  1514.      The LINE command can be followed by subcommands that affect braille
  1515. translation as follows:
  1516.      LIST -- change formatting to list format with hanging indent.
  1517.      TEXT -- change to normal text formatting.
  1518.      CENTER -- center the line when it is brailled.
  1519.      DELETE -- delete this line entirely.
  1520.      SKIP -- skip a line.
  1521.      INDENT -- indent unmatched lines.
  1522.      PAGE # -- set page length of input text.
  1523.      MATCH # # 'ccccc' -- search for match with columns.
  1524.      FIELD # # -- define a field.
  1525.      OMIT -- delete defined field.
  1526.      STATE -- expand two character state codes.
  1527.      APPEND 'ccccc' -- append character(s) to field.
  1528.      The last three commands, OMIT, STATE, and APPEND always follow a FIELD
  1529. command.
  1530.      For instance, to center line two, you might enter a command line in the
  1531. external format language file as follows:
  1532.      LINE 2 CENTER
  1533.      You may stack multiple commands. For instance, you could enter
  1534.      LINE 3 LIST DELETE SKIP
  1535.      which will change the format at line three to list from whatever it may
  1536. have been, delete the line from the braille output, and insert a blank line.
  1537.  
  1538.      The PAGE command has no counterpart in the imbedded commands. It is used
  1539. to specify the page length of the source document. If the PAGE is specified as
  1540. zero, the input text file will be treated as a single page no matter how long
  1541. it is. The default page size is 66. The page line counter will be reset every
  1542. 66 lines or at the top of page character, whichever comes first.
  1543.  
  1544. The MATCH command is also unique to the external format language. This command makes all
  1545. the commands that follow it in the command set dependent on a matching
  1546. condition. The program scans the lines specified in the LINE command within the
  1547. columns specified on the MATCH command for the character string following the
  1548. column specifiers. You may use spaces if the character string is enclosed in
  1549. quotes. The two numbers immediately following the MATCH command specify the
  1550. beginning and ending columns. If there is no match, the program will proceed to
  1551. the next LINE command. If there is a match, the program will apply the
  1552. following commands in the command set.
  1553.      The INDENT command is also unique to the external format language. It
  1554. tells the translation program to indent any lines which are not MATCHED, and
  1555. for which a FIELD command is active. This facilitates the creation of subtotal
  1556. groups in financial reports. An example is provided.
  1557.      The FIELD command must be followed by two numbers defining the starting
  1558. and ending columns of a field. This field can be deleted by adding the OMIT
  1559. subcommand. If the field is a two character state code, you can cause the
  1560. translator to expand it to the full state name by using the STATE subcommand.
  1561. Finally, you can append data to the field by using the APPEND subcommand. Most
  1562. often, you will append a delimiter such as a semi-colon or a comma to a field.
  1563. However, you can also use the append command to add any text, even including
  1564. spaces if you use quotes.
  1565.      For example, let us assume a columnar report showing states ranked by
  1566. number of bagpipe-playing tugboat captains. There are three columns: rank,
  1567. state code, and count. We can format the columnar part of the report with a
  1568. command set as follows:
  1569.      LINE 10 60 FIELD 20 21 STATE APPEND ; FIELD 1 19 APPEND ;
  1570.      We assume the columns occur from lines 10 through 60, as specified
  1571. following the LINE command. We ignore the count field since we do not need to
  1572. append a delimiter--the count field is at the end of the line. We tell the
  1573. program to select the field starting at column 20 and ending at column 21,
  1574. translate it to a full state name from a state code, and append a semi-colon.
  1575. Then, we tell the program to select a field from column 1 through column 19 and
  1576. append a semi-colon. These field commands are applied from lines 10 through 60.
  1577. NOTE THAT WE START WITH THE RIGHTMOST FIELD. The reason for this is that the
  1578. program processes the commands in order. The field command changes the location
  1579. of the columns to the right. Hence, the column alignment is lost. By starting
  1580. with the rightmost field first, columns to the left are still properly aligned.
  1581. ALWAYS START WITH THE RIGHTMOST FIELD. The program verifies that the fields
  1582. are in the proper order and that they don't overlap. The program aborts if
  1583. it finds an error.
  1584.  
  1585.      ~0option option_string ~2 can be used to execute a command line option
  1586. in the EFL.
  1587.  
  1588.      ~0line line_string ~2can be used to place the input line number in the
  1589. embossed output.  The line string will be placed before the line number.
  1590.  
  1591.      ~0graphics graphics_string ~2is used to display the decimal equivilent
  1592. of graphics characters.  The graphics string is placed before the number.
  1593.  
  1594. There are three REPLACE commands in the EFL. These commands are
  1595. followed by two strings; the first is the search and the second is the replace
  1596. string which may be empty. The search strings are case insensitive.
  1597.  
  1598. 1. repl search replace.  This command searches the specified lines.  If the
  1599. line contains the search string, the entire line is replaced with the
  1600. replacement string.  The line will be deleted if the replacement string is
  1601. empty. For example the .EFL line line 1 9999 repl "copyright 1994" "" would
  1602. delete all input lines containing the string "copyright 1994".  Note that quotes
  1603. are used because the string to be replaced contains a space.
  1604.  
  1605. 2. reps search replacement replaces the search string with the
  1606. replacement string. The string is replaced without regard to word boundaries.
  1607. For example the command line 1 9999 reps "is not" isn't replaces every
  1608. occurrence of "is not" with isn't.
  1609.  
  1610. 3. repw search replace.  This searches a line for the search string. The
  1611. entire word containing the search string is deleted and the replace string
  1612. is substituted. For example in the RFB DOS 6.0 manual headings are
  1613. indicated by heading1, heading2 ... with tildes before the ~lh and after the
  1614. number.  These titles could be centered with the command
  1615. line 1 9999 (tilde)heading (tilde)c.  Each heading specifier will be replaced
  1616. by (tilde)c which is the nfbtrans centering format command.
  1617.  
  1618.      The External Format Language feature is quite powerful, and can save you a
  1619. great deal of editing effort, particularly for columnar reports or frequently
  1620. produced reports in specific formats. For most documents, you will probably
  1621. find it just as easy to continue to use the imbedded commands. For computer
  1622. reports, and financial reports, you should consider setting up a EFL command
  1623. file to save yourself time and effort.
  1624. The external formatting language is a bit tricky, but it has considerable power.
  1625.  
  1626. PART 11: Other considerations
  1627.  
  1628. Translate your files from scratch for brailling rather than embossing an
  1629. already existing file.    Nfbtrans outputs over 1500 characters per second in
  1630. Grade 2 mode on a 20MHZ 386 machine so translation time shouldn't be a
  1631. problem. One possible problem is that this version may format documents
  1632. slightly differently than earlier versions.  This means that page 25 may
  1633. be different between this and earlier versions.
  1634.      When embossing an existing file with lineskips = 0, make sure the correct
  1635. lines per page value is in effect. If it isn't, there is no way the program can
  1636. tell what page you are printing.
  1637.  
  1638.      This version of NFBTRANS has the ability to translate a Grade 2 file
  1639. back into text.
  1640. The formatting of the text will most likely
  1641. not be the same as the original text.  The program automatically removes
  1642. braille page numbers.  (See the ~0rp= ~2option).
  1643. Several options have been placed in back.tab to customize NFBTRANS for back
  1644. translation.  ~0Back.tab ~2has been designed to work with the latest
  1645. ~0braille.tab ~2although it should work reasonably well with any Grate 2 file.
  1646. Formatting should be disabled or set to tilde, otherwise unexpected errors may
  1647. occur.    NFBTRANS will not output a tilde character with the current
  1648. ~0braille.tab. ~2
  1649.  
  1650.      I would be interested in hearing from anyone who has compared the back
  1651. translation of NFBTRANS and other translation programs.  There is plenty of
  1652. room in back.tab for additional entries to improve accuracy.  Some improvements
  1653. may not be possible unless the code is modified.
  1654.  
  1655.      Send all bug reports and any suggested improvements to
  1656. inge@netcom.com. ~2If that address bounces, leave a message on the mailing list
  1657. ~0blind-l. ~2
  1658.