home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 694 / gspool22 / docs / ctbmake.txt < prev    next >
Encoding:
Text File  |  1992-08-21  |  6.3 KB  |  264 lines

  1. *******************************************************************
  2. *                                                                 *
  3. *    CTB Make for use with GEM Spooler v2.2                       *
  4. *                                                                 *
  5. *    (c) Steven Van Rossen, Marc Billiet        June 1992         *
  6. *                                                                 *
  7. *******************************************************************
  8.  
  9.  
  10. What ?
  11. ------
  12.  
  13. CTBMAKE.TTP converts CTS files to CTB files. CTS files are text files
  14. (ASCII) that describe how an ASCII character should be sent to the printer.
  15. They are the "source" for the GEM Spooler character translation
  16. files: *.CTB
  17.  
  18.  
  19. How to build a CTS file ?
  20. -------------------------
  21.  
  22. 1. Introduction
  23. ---------------
  24.  
  25. The syntax of a CTS file is quite powerful. You can assign every character
  26. code a series of printer codes that will replace the character before it is
  27. sent to the printer. This way, you can totally adapt the spooler's output to
  28. your printer's capabilities.
  29. To help you define these CTS files, CTBMAKE allows you to define macros
  30. (C programmers are familiar with this technique). Macros can be nested (one
  31. macro makes a call to an other macro) and can be defined in a so called
  32. include file...
  33.  
  34.  
  35. 2. Syntax description
  36. ---------------------
  37.  
  38. CTS files understand the following keywords and symbols (optional keywords
  39. are put between square brackets [] ):
  40.  
  41. ---- Symbols: ----
  42.  
  43. *                    Marks a comment line, e.g. :
  44.                      * Here comes my CTS:
  45.  
  46. xxx                  x: 0, 1, ..., 9. Numbers. e.g. :
  47.                      192, 65, 97, 127
  48.  
  49. $                    Prefix for hex numbers, e.g. :
  50.                      $ff
  51.  
  52. %                    Prefix for binary numbers, e.g. :
  53.                      %10110001
  54.  
  55. =                    Equals. e.g. :
  56.                      139 = 105, 8, 22
  57.  
  58. 'x'                  Single quotes indicate an ASCII character x, e.g. :
  59.                      'ï' = 'i', 8, 22
  60.  
  61. "CTS name"           Double quotes indicate the name of this CTS. This name
  62.                      will appear in GEM Spooler's Printer dialog when the CTB
  63.                      (compiled CTS) is loaded. Maximum 16 characters. E.g. :
  64.  
  65.                      "HP Germany"
  66.  
  67.  
  68. Keywords:
  69.  
  70. include "myfile"
  71.  
  72.      Include directive. This directive tells CTBMAKE to compile all
  73.      information in "myfile"
  74.  
  75. macro  MYMACRO [(myparam)] code1, code2, ... [(myparam)] ...
  76.  
  77.      Define a macro. e.g. :
  78.  
  79.      macro ESCAPE         27
  80.      macro HPROMAN8       ESCAPE,40,56,85
  81.      macro NORMAL         HPROMAN8
  82.  
  83.      macro IBM1                   ESCAPE, '7'
  84.      macro IBM2                   ESCAPE, '6'
  85.      macro INTERNATIONAL          ESCAPE, 'R'
  86.      macro USA                    INTERNATIONAL, 0
  87.      macro GERMAN(char)           INTERNATIONAL, 2, char, USA
  88.  
  89.      A macro with parameter (myparam) will be executed with a value. This
  90.      value will replace myparam in the sequence of replacement codes.
  91.      Macros can be nested (one macro calls another macro) but not recursive
  92.      (a macro that makes a call to itself results in an endless loop).
  93.      A nested macro can not have parameters.
  94.      You can use previously defined macros when defining a new macro (as
  95.      shown above). E.g., to print the german character :
  96.  
  97.      126 = GERMAN(126)                (calls macro INTERNATIONAL)
  98.  
  99.  
  100. For a complete example of a CTS file, please look at the end of this text
  101. file.
  102.  
  103.  
  104. Starting CTBMAKE
  105. ----------------
  106.  
  107. CTBMAKE.TTP is a program that needs parameters (parameters enclosed in []
  108. are optional). The syntax is:
  109.  
  110.      [drive:path]infile [[drive:path]outfile]
  111.  
  112. If the outfile is not specified, CTBMAKE will use the infile's name but with
  113. the extension CTB as outfile.
  114.  
  115. An example: run CTBMAKE.TTP (double click it) on your desktop and a command
  116. line will appear; enter the source path and source file: c:\cts\epson.cts and
  117. hit OK. CTBMAKE will convert EPSON.CTS to EPSON.CTB
  118.  
  119. CTBMAKE can also be run from a TOS shell, e.g. :
  120.  
  121.       ctbmake c:\cts\epson.cts
  122.  
  123. will create a file named epson.ctb in c:\cts
  124.  
  125. Read the GEM Spooler manual for further information on Character
  126. Tables.
  127.  
  128.  
  129.                       Marc Billiet & Steven Van Rossen, June 1992
  130.  
  131.  
  132.  
  133. Example of a CTS file:
  134.  
  135. * -----------------------------------------------
  136. *
  137. * GEM Spooler v2.2 Character Table Source
  138. *
  139. * -----------------------------------------------
  140. *
  141.  
  142. * Filter name:
  143.  
  144. "PC-8 Denmark"
  145.  
  146. * Macro's:
  147.  
  148. macro NORMAL        PC8DENM
  149. macro HPROMAN8(x)   27,40,56,85,x,NORMAL
  150. macro ASCII(ascii)  27,40,48,85,ascii,NORMAL
  151. macro ECMA-94(x)    27,40,48,78,x,NORMAL
  152. macro PC8(x)        27,40,49,48,85,x,NORMAL
  153. macro PC850(x)      27,40,49,50,85,x,NORMAL
  154. macro PC8DENM       27,40,49,49,85
  155. macro ISO04(x)      27,40,49,69,x,NORMAL
  156. macro ISO11(x)      27,40,48,83,x,NORMAL
  157. macro ISO15(x)      27,40,48,73,x,NORMAL
  158. macro ISO16(x)      27,40,52,83,x,NORMAL
  159. macro ISO17(x)      27,40,50,83,x,NORMAL
  160. macro ISO21(x)      27,40,49,71,x,NORMAL
  161. macro ISO60(x)      27,40,48,68,x,NORMAL
  162. macro ISO69(x)      27,40,49,70,x,NORMAL
  163. macro LEGAL(x)      27,40,49,85,x,NORMAL
  164.  
  165. * Character translation data:
  166.  
  167. 'Ç' = 128
  168. 'ü' = 129
  169. 'é' = 130
  170. 'â' = 131
  171. 'ä' = 132
  172. 'à' = 133
  173. 'å' = 134
  174. 'ç' = 135
  175. 'ê' = 136
  176. 'ë' = 137
  177. 'è' = 138
  178. 'ï' = 139
  179. 'î' = 140
  180. 'ì' = 141
  181. 'Ä' = 142
  182. 'Å' = 143
  183. 'É' = 144
  184. 'æ' = 145
  185. 'Æ' = 146
  186. 'ô' = 147
  187. 'ö' = 148
  188. 'ò' = 149
  189. 'û' = 150
  190. 'ù' = 151
  191. 'ÿ' = 152
  192. 'Ö' = 153
  193. 'Ü' = 154
  194. '¢' = PC8(155)
  195. '£' = 156
  196. '¥' = PC8(157)
  197. 'ß' = PC8(225)
  198. 'ƒ' = PC8(159)
  199. 'á' = 160
  200. 'í' = 161
  201. 'ó' = 162
  202. 'ú' = 163
  203. 'ñ' = 164
  204. 'Ñ' = 165
  205. 'ª' = PC8(166)
  206. 'º' = PC8(167)
  207. '¿' = 168
  208. '⌐' = 218
  209. '¬' = 191
  210. '½' = PC8(171)
  211. '¼' = PC8(172)
  212. '¡' = 173
  213. '«' = PC8(174)
  214. '»' = PC8(175)
  215. 'ã' = 169
  216. 'õ' = 166
  217. 'Ø' = 157
  218. 'ø' = 155
  219. 'À' = HPROMAN8(161)
  220. 'Ã' = 170
  221. 'Õ' = 167
  222. '¨' = HPROMAN8(171)
  223. '´' = HPROMAN8(168)
  224. '†' = LEGAL(125)
  225. '¶' = 20
  226. '©' = LEGAL(94)
  227. '®' = LEGAL(92)
  228. '™' = LEGAL(126)
  229. '§' = 21
  230. '∞' = 236
  231. 'α' = 224
  232. 'β' = 225
  233. 'Γ' = 226
  234. 'π' = 227
  235. 'Σ' = 228
  236. 'σ' = 229
  237. 'µ' = 230
  238. 'τ' = 231
  239. 'Φ' = 232
  240. 'Θ' = 233
  241. 'Ω' = 234
  242. 'δ' = 235
  243. 'ϕ' = 237
  244. '∈' = 238
  245. '∩' = 239
  246. '≡' = 240
  247. '±' = 241
  248. '≥' = 242
  249. '≤' = 243
  250. '⌠' = 244
  251. '⌡' = 245
  252. '÷' = 246
  253. '≈' = 247
  254. '°' = 248
  255. '∙' = 249
  256. '·' = 250
  257. '√' = 251
  258. 'ⁿ' = 252
  259. '²' = 253
  260. '³' = PC-850(252)
  261. '¯' = ECMA-94(175)
  262.  
  263. * End of CTS
  264.