home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / mag_discs / 14 / programs / quotes / !Quotes / !Help < prev    next >
Text File  |  1994-01-27  |  8KB  |  178 lines

  1. Smart Quotes version 1.01
  2. © Sam Kington 23rd December 1993
  3. See end of file for conditions of distribution.
  4. This program is freeware, *not* public domain - i.e., I retain copyright.
  5.  
  6.  
  7. Warning: this program uses a major feature of RISC OS 3.10 (namely
  8. post-filters), so will not run under RISC OS 2. If you haven’t upgraded to
  9. RISC OS 3.10 yet, **DO SO!!** You are cutting yourself off from a lot of
  10. nice free software (not just this)!
  11.  
  12. If you have RISC OS 3.00 or 3.10, but the program thinks you have RISC OS 2,
  13. try typing *RMReinit FilterManager from the command line (type F12 or
  14. Ctrl-F12 to get to the command line), then run the program.
  15.  
  16. This is a small utility to replace neutral quotes (e.g. "") by smart quotes
  17. (e.g. “”), on the fly, as you type. It avoids having to resort to the
  18. numeric keypad (ALT-148 and ALT-149 for open and closed double quotes
  19. respectively) or other obscure key-combinations (CTRL-SHIFT-[ and ] in
  20. Impression).
  21.  
  22. There are two parts to this utility: the module SmartQuotes, which
  23. intercepts key-presses and parses them accordingly, and the WIMP front-end,
  24. which provides an easier way of changing settings than entering *commands
  25. (see below). Both of them are very small, but at a pinch the module will
  26. work without the front-end (even though quitting the front-end automatically
  27. kills the module).
  28.  
  29. The front-end installs itself to the left of the Palette icon: you will
  30. rarely want to access it, so it stays out of the way. Clicking on the icon
  31. will always open the settings box, even if it is iconised.
  32.  
  33. Operation of the program is (hopefully ;-) ) self-explanatory; the
  34. principles behind it may not. What the program basically does is sit in the
  35. background, and intercept all the key presses, substituting double and
  36. single quotes according to the current settings. Double quotes are very
  37. simple: it just substitutes neutral quotes (") by “ and ” alternatively,
  38. which should be OK in the vast majority of cases (unless you are using lots
  39. of nested quotations). The problem is single quotes.
  40. Because SmartQuotes has no knowledge of what you have previously typed, it
  41. doesn’t know, when you type an apostrophe, whether you are starting or
  42. closing a quotation (e.g. ‘some text’), or whether the apostrophe is part of
  43. a word (e.g. “don’t”). So, left to itself, it will often get it wrong. As
  44. most people don’t use single quotes a lot, but use apostrophes all the time,
  45. SmartQuotes will automatically substitute neutral single quotes by
  46. apostrophes; however, there is an option to substitute neutral single quotes
  47. alternatively with ‘ and ’. Of course, if you’re still not satisfied, you
  48. can turn the whole thing off and stick to double quotes.
  49.  
  50. Default settings are stored in a file called “Choices” inside the
  51. !SmartQuotes directory. You can save the settings via the menu (see below).
  52.  
  53. One last thing: if you modify the SmartQuotes settings from the command
  54. line, the settings dialogue box will no longer be accurate, as the module
  55. has no way of telling the front end the settings have changed. Clicking on most of
  56. the icons to set all the settings by the dialogue box usually gets rid of
  57. the discrepancy.
  58.  
  59. Menu structure
  60. **************     
  61.  
  62. There are four options on the iconbar:
  63.  
  64.         Info : standard info dialogue box
  65.  
  66.         Settings... : opens the Quotes Settings dialogue box
  67.         
  68.         Save choices : saves the current settings, which will now be
  69.                        the default settings when the program starts up.
  70.  
  71.         Quit : quits the front end and the module, terminating quotes
  72.                substitution
  73.  
  74. Settings dialogue box
  75. *********************
  76.  
  77. Substitute quotes: when selected, neutral double quotes will be substituted
  78. by smart quotes (e.g. “”); otherwise, all quotes are unsubstituted ("").
  79.  
  80. Substitute single quotes: when selected, neutral single quotes will be
  81. substituted according to the single quotes option (see below). When
  82. unselected, neutral single quotes remain neutral.
  83.  
  84. Apostrophes only: when selected, neutral single quotes are replaced by
  85. apostrophes (e.g. ’).
  86.  
  87. Both single quotes: when selected, neutral single quotes are replaced by
  88. open and closed single quotes alternatively, like double quotes (e.g. ‘’).
  89.  
  90. Settings are changed immediately.
  91.  
  92. * commands
  93. **********
  94.  
  95. QuotesOn: turns double quote substitution on. Equivalent to selecting
  96. “Substitute quotes”.
  97.  
  98. QuotesOff: turns all substitution off. Equivalent to de-selecting
  99. “Substitute quotes”.
  100.  
  101. SingleOn: turns single quote substitution on. Equivalent to selecting
  102. “Substitute single quotes”.
  103.  
  104. SingleOff: turns single quote substitution off. Equivalent to de-selecting
  105. “Substitute single quotes”.
  106.  
  107. OnlyApos: single quotes are substituted by apostrophes. Equivalent to
  108. selecting “Apostrophes only”.
  109.  
  110. BothSingle: single quotes are substituted by alternate open and closed
  111. single quotes. Equivalent to selecting “Both single quotes”.
  112.  
  113.  
  114. Other comments
  115. **************
  116.  
  117. I would like to thank Acorn for this nice machine, and especially the bit in
  118. RISC OS 3.1 (the Filter Manager) that allows you to intercept other tasks’
  119. events and muck about with them as you please. It is exceedingly useful
  120. - look at all the other utilities around using filters! ;-).
  121.  
  122. I got the idea for this utility after reading a small news item in MacWorld
  123. about a similar program for the Mac, that sat in the background and
  124. substituted quotes for you. That one also substituted dashes for you - i.e.
  125. replaced “--” by “—”. However, I couldn’t get that to work, and it isn’t
  126. *that* important anyway.
  127.  
  128. Things that might be nice would be:
  129.     A code variable (SmartQuotes$Options for instance), to set settings from
  130. the command line or (more usefully) an Obey or Desktop file. I was going to
  131. rip off the code variable from Desktop+, but I decided it wouldn't be fair.
  132.     Changing the icon to reflect the status, i.e. show what the next
  133. substituted " and ' will be.
  134.     Substituting dashes.
  135.     Substituting foreign characters (i.e. type ’e and it subsitutes a é).
  136.     Expanding whole expressions (as in Impression’s abbreviations and
  137. Microsoft’s IntelliSense).
  138.     Adding/removing smart quotes from files dragged to the icon.
  139. The first three I haven’t managed to do (I’m not an assembler programmer and
  140. my hard disc isn’t working :-( so I can’t use C); the last one would
  141. probably take up too much memory. The program is basically a quick hack,
  142. hopefully an elegant one but not something I want to spend too much time on.
  143. (Apart from writing this Help file, that is ;-)).
  144.  
  145. Programmers take note!!
  146. ***********************
  147.  
  148. If you forget to turn off Smart Quotes substitution, you may get strange
  149. errors (“No such variable” or something), the cause of which may not be
  150. immediately obvious, especially if you are programming with an outline font
  151. rather than the System font. Replacing all spurious smart quotes with
  152. standard neutral quotes does wonders ;-).
  153.  
  154. Boring legal message
  155. ********************
  156. This application is freeware, that is, it can be distributed freely as long
  157. as only reasonable charges are made for media and distribution. I retain
  158. copyright on all program code and documentation.
  159.  
  160. If you use this at all, write to me or e-mail me (see below) telling me how
  161. wonderful it is etc. :-) or how atrocious it is :-( (surely not?); anyway,
  162. tell me. It would be nice to hear from people.
  163.  
  164. How to contact me
  165. *****************
  166.  
  167. E-mail: modsk@dish.gla.ac.uk (guaranteed until June 1996)
  168.  
  169. Snail-mail : QM Hall         (Term-time, until June 1994)
  170.              55 Bellshaugh Road
  171.              Glasgow G12 0SQ
  172.              SCOTLAND
  173.              
  174.              Merlhiot        (Home address, guaranteed)
  175.              24420 Savignac les Eglises
  176.              FRANCE
  177.  
  178.