summaryrefslogtreecommitdiff
path: root/language/typingtex/cortex-email.dir/Email&CorTeXQuedMac.doc
blob: de59b4545172c292f81be98d84ae3949e064d3f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
Email&CorTeXQuedMac  
    May 1993 alpha version (not yet complete)
    Master posting on  ftp   matups.matups.fr
    in directory TeX/TypingTeX.dir

 *************************************************
 ****** 
 ****** Conversions:
 ****** 
 ******      TeX <-- email-fr <--> CorTeX --> TeX 
 ****** 
 ****** on the Apple Macintosh.
 ****** 
 *************************************************

Note aux francophones :

     Des renseignements assez d'etaill'es sur CorTeX et email-fr
apparaissent avril-juin 1993 dans les transactions de la liste
'electronique GUT, affich'ees sur le serveur  ftp ftp.cicb.fr (login:
anonymous).   Voir aussi un r'esume 'eventuel juxtant ce fichier 
sur  ftp   matups.matups.fr.

************************************************* 

***** INTRODUCTION ***** 

************************************************* 

---  email-fr is a scheme for efficient typing of French
accented characters in which one types ' for \' (accute
accent), ` for \` (grave accent),  ^ for \^ (hat accent), and /
for for apostrophe (at least before before e and E).
The French abstract avove is in this style.

  --- CorTeX is a similar scheme which differs in that ' ^ `
follow the vowel, and / is not used for apostrophe. It was
set up by by Hubert Garavel (imag) and modified somewhat 
by Pascal Amsili <amsili@chm.irit.fr>.  See a partial posting
by Amsili  on ftp matups.matups.fr.  Many users find CorTeX
conventions just a bit more natural, probably because
they are closer to handwriting.

    CorTeX also allows  "  for diaressis following a vowel.
But one one should avoid its use on terminal vowels: 
type aigu\"e, Malm\"o, not aigue", Malmo" to avoid 
confusion with  "  as closing double quotes (guillemets).

    In both systems of typing Knuth's more prolix syntax 
for accents remains available.

    The email-fr typing is acceptable to TeX once a small macro
pakage email-fr.sty has been loaded;  email-fr is thus
perfectly portable.

    CorTeX requires a preprocessor, which is given as a lex
script (lex is a unix utility).  This script performs a couple 
of extra services:

 (a) Conversion of tabs to spaces.  This trivial feature is
neglected here since it can be done readily by a
wordprocessor at any time.

 (b) Conversion of oe to \oe when french typography
requires it. This non-trivial feature is retained here and
adopted for all conversions concerning email-fr since it manages
to do gracefully what many of us neglect.  Please complain
if mistakes result!

      Because lex is not conveniently accessible on the Mac but
the editor QedM is, there was a need for a QedM version of
CorTeX.  It is the macro:

    **post-acc2tex :     CorTeX --> TeX

For users of email-fr who want to have ".tex" file
blend most easily with Knuth's syntax (perhaps at 
the cost of readibility) there is also:

    **pre-acc2tex :     email-fr --> TeX

     For good measure converters between email-fr and CorTeX
are provided:

    **post-acc2pre-acc   :  email-fr <-- CorTeX

    **pre-acc2post-acc   :  email-fr  --> CorTeX

And also three converters from standard TeX typing to various
more readable formats:

    **tex2pre-acc   :  TeX to  email-fr 
    --- useful for making a French language .tex file readable
    without while leaving it portable ie ascii and typesettable
    anywhere.  Do not forget to add essential email-fr commands.

    **tex2mac   :  TeX to  full Macintosh 8-bit encoding (Mac Times)
    --- useful for spelling checks by Mac spelling checkers
    for French or for freeding to non-TeX Mac formatters
    such as Microsoft Word.

    **tex2swt   :  TeX to  Sweet 8-bit encoding (Sweet-teX).
    --- The font Sweet-teX is a 12 point bitmapped screen font 
for Macintosh that combines essential accents, formatting
"roadsigns", and math symbols.  It is part of the TeX 
preprocessor Sweet-teX for math typeseting that is available
on ftp matups.matups.fr.

     All these macros are located in an appendix in ascii form
or as a binary Macintosh file of type QMAC and creator
QED1.


*************************************************

***** USE OF THE MACROS *****

*************************************************

  (0)  Only the macros whose names begin with stars **...
are intended to be used directly; the rest are
"subroutines". Choose a work folder by opening a file in
it.  Run the macro ***initialize  to be sure that a work
file "ctwk" exists in it. The action of a two-star macro
such as **post-acc2tex  will be restricted to the active
window and further it will not change that window without
approval of the user; instead, auxiliary files are used.

  (1)  To process a file open it and save a copy to the
folder work folder. The window of the fiel to process must
be selected a macor is run.  Further, if some text is
SELECTED in the active window the macro ignores everything
but the selection. This is useful to make a quick trial
run on a critical part of the typescript. This may equally
be useful and necessary to avoid parts of a typescript
that are typed in distinct fashion.  In such heterogeneous
typescripts, QuedM allows one to mark various chunks of
the typescript in such a way that they can be selected
instantly at any time. (Select the chunk and use the Set
Marker... option in the Search menu.)  For example, one
might mark text from \beginemailFR to  \endemailFR for
conversion to ordinary tex syntax.  If one takes care to
use a *copy* of the original typescript, one can then
progressively paste in the converted chunks offered by the
macros.

  (2)  Contrary to the original CorteX policy, the
character  "  following a terminal vowel is not interpreted
as a dieresis thereon, but as a double quote --- unless the
word in question is aigue" or Malmo" or oither exceptions to
be added.  This allows Knuth's use of  "  for closing
double quotes to be maintained in practice.

  (3)  A fundamental weakness of these macros is that they
do not distinguish math mode rigourously. In math mode ^,
_ or  <comma>, ', (each without \ before it)  have
meanings that may conflict with their meanings in prose.
Hence the inspection macros will be provided in a separate
macro file to warn of possible conflicts with the CorTeX
and email syntax.  They give a report on possible
difficulties.  It should suffice to arrange that the above
characters are separated by a space or at least something
that avoids possible interpretation as an accent. These
inspector macros will also warn of possible problems
outside of mathematics.


    Laurent Siebenmann, May-June, 1993

    <lcs@matups.matups.fr>


*************************************************

***** USE OF THE MACROS *****

*************************************************

  (0)  Only the macros whose names begin with stars **...
are intended to be used directly; the rest are
"subroutines". The action of a macro  will be restricted to
the active window and further it will not change that
window without approval of the user; instead, auxiliary
files are used.

  (1)  If some text is SELECTED in the active window the
macro ignores everything but the selection. This is useful
to make a quick trial run on a critical part of the
typescript. This may equally be useful and necessary to
avoid parts of a typescript that are typed in distinct
fashion.  In such heterogeneous typescripts, QuedM allows
one to mark various chunks of the typescript in such a way
that they can be selected instantly at any time. (Select
the chunk and use the Set Marker... option in the Search
menu.)  For example, one might mark text from \beginemailFR
to  \endemailFR for conversion to ordinary tex syntax.  If
one takes care to use a *copy* of the original typescript,
one can then progressively paste in the converted chunks
offered by the macros.

  (2)  Contrary to the original CorteX policy, the
character  "  following a terminal vowel is not interpreted
as a dieresis thereon, but as a double quote --- unless the
word in question is aigue" or Malmo" or oither exceptions to
be added.  This allows Knuth's use of  "  for closing
double quotes to be maintained in practice.

  (3)  A fundamental weakness of these macros is that they
do not distinguish math mode rigourously. In math mode ^,
_ or  <comma>, ', (each without \ before it)  have
meanings that may conflict with their meanings in prose.
Hence the inspection macros will be provided in a separate
macro file to warn of possible conflicts with the CorTeX
and email syntax.  They give a report on possible
difficulties.  It should suffice to arrange that the above
characters are separated by a space or at least something
that avoids possible interpretation as an accent. These
inspector macros will also warn of possible problems
outside of mathematics.


    Laurent Siebenmann, May-June, 1993

    <lcs@matups.matups.fr>


 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

APPENDIX: TEXT FORM OF THE MACINTOSH QEDM MACROS

NB. The working form is the resource file:

     **Post&PreAcc7BitTeX-QuedMac 

which is a Macintosh binary file.



%%%%% ***documentation
%%%%% ***initialize
%%%%% **post-acc2tex
%%%%% **post-acc2pre-acc
%%%%% **pre-acc2post-acc
%%%%% **tex2mac
%%%%% **tex2pre-acc
%%%%% **tex2swt

  %%%%%% Auxiliary macros
  %%%   de-oemacros
  %%%   re-oemacros
  %%%   de-verbatim
  %%%   re-verbatim
  %%%   de-verbatim-loop
  %%%   re-verbatim-loop
  %%%   post-acc-pre-trans
  %%%   pre-acc-post-trans
  %%%   post-acc-tex-trans
  %%%   oe
  %%% tex-mac-trans 
  %%% tex-pre-acc-trans
  %%% tex-swt-trans




%%%%% ***documentation
<Option>thedoc


%%%%% ***initialize
New "ctwk"
Key   

Save
Set Line Width...
Key 

Chicago
12 Point

 
%%%%% **pre-acc2post-acc

preamble
pre-acc-post-trans
postamble
Key post-
Key <enter>


%%%%% **post-acc2pre-acc

preamble
post-acc-pre-trans
postamble
Key pre-
Key <enter>


%%%%%**post-acc2tex

preamble
post-acc-tex-trans
postamble
Key std-
Key <enter>


%%%%% **tex2mac

preamble
tex-mac-trans
postamble
Key mac-
Key <enter>

%%%%% **tex2pre-acc

preamble
tex-pre-acc-trans
postamble
Key pre-
Key <enter>


%%%%% **tex2swt

preamble
tex-swt-trans
postamble
Key swt-
Key <enter>


%%%%% preamble

Save As
Copy "8"
Key <command>.
sub-preamble
Open "ctwk"
Select All
Paste
Key <cursor-left>
Copy "0"  ""
Copy "1"  ""
Copy "2"  ""
Copy "3"  ""
Copy "4"  ""
de-verbatim


%%%%% sub-preamble

Copy "0"
Set Marker "the-sel"
Select All
Copy "1"
Jump "END"
Key  
Find "^"  "gt"
Key  
Jump "the-sel"
Key <shift><cursor-left><shift><cursor-right>
Jump "the-sel"
Copy "4"
Open "ctwk"
Select All
Paste "4"
Clipboard 1
Find "..."   "gT"
Copy "8" "ctwk"
Clipboard 0


%%%%% postamble

oe
re-verbatim
Open "verbatims"
Clear
Close

Clipboard 8
Open  "ctwk"
Save As
Paste "8"
Select All
Key <cursor left>


%%%%%  de-verbatim

Open...
Open "ctwk"
Find "...zzz..."   "tE"
Clipboard 9
Copy "9" ""
de-verbatim-loop
New "verbatims"
Clipboard 9
Paste
Copy "9" ""
Clipboard 0
Save

%%%%% de-verbatim-loop

Change "\(\\begin\s*\r-\s*\{verbatim\*-\}.*\\end\s*\r-\s*\{verbatim\*-\}|\\verb\s*\r-\s*\(.\):.*\2\)"  to   " zzzverbatimzzz " "grT"
<shift>Copy "9"  '\1 \r\r'   "tg"

de-verbatim-loop


%%%%%  re-verbatim

Open "verbatims"
Find "...yyy..."   "tE"

Open "ctwk"
Find "...zzz..."   "tE"

Clipboard 9
Copy "9" ""

re-verbatim-loop


%%%%%  re-verbatim-loop

Copy "9" ""
Clipboard 0
Open  "verbatims"
Find "\(\\begin\{verbatim\*-\}.*\\end\{verbatim\*-\}|\\verb\|.*\|\)"  "gtTr"
Key  < cursor left>
Copy "9"  '\1'   "g"

Open  "ctwk"
Find "zzzverbatimzzz"   "tT"
Paste

re-verbatim-loop


%%%%% post-acc-tex-trans

Open...
Open "ctwk"

Change  "\\[A-Za-z]+:>["",\'\`^]"   "& "   "agt"

Change "\([aA]\)\([`^]\)" to   "\\\2\1"  "gat"
Change "\([eE]\)\([\`\'^]\)"   to   "\\\2\1"   "gat"
Change "\([\i\I]\)\([\^]\)"    to  "\\\2\1"   "gat"
Change "\([oO]\)\([\^]\)"    to  "\\\2\1"   "gat"
Change "\([uU]\)\([\`^]\)"    to  "\\\2\1"   "gat"
Change "\([aeiouAEIOU]\)"":>[a-zA-Z]"  to  "\\""\1"   "gat"
Change "\(aigu\)\(e\)"""  to "\1\\""\2"   "gat"
Change "\([M]alm\)\(o\)"""  to  "\1\\""\2"    "gat"
Change "\([cC]\)\(,\):>[aAoOuU]"    to  "\\c{\1}"   "gat"

%%%%% post-acc-pre-trans

Open...
Open "ctwk"

Change  "\\[A-Za-z]+:>["",\'\`^]"   "& "   "agt"

Change  "\(\(^|[^A-Za-z]\)[CDLMNSTcdlmnst]\)'\([Ee][A-Za-z]:<[^AEIOUaeiou]\)"   "\1/\3"  "gat"

Change "\([aA]\)\([`^]\)" to   "\2\1"  "gat"
Change "\([eE]\)\([\`\'^]\)"   to   "\2\1"   "gat"
Change "\([\i\I]\)\([\^]\)"    to  "\2\1"   "gat"
Change "\([oO]\)\([\^]\)"    to  "\2\1"   "gat"
Change "\([uU]\)\([\`^]\)"    to  "\2\1"   "gat"
Change "\([cC]\)\(,\):>[aAoOuU]"    to  "_\1"   "gat"
Change "\([aeiouAEIOU]\)"":>[a-zA-Z]"  to  "\\""\1"   "gat"
Change "\(aigu\)\(e\)"""  to "\1\\""\2"   "gat"
Change "\([M]alm\)\(o\)"""  to  "\1\\""\2"    "gat"

%%%%% pre-acc-post-trans

Open...
Open "ctwk"

Change  "\\[A-Za-z]+:>["",\'\`^]"   "& "   "agt"

Change  "\(\(^|[^A-Za-z]\)[CDLMNSTcdlmnst]\)/\(['^`][aeiou][A-Za-z]:<[^aeiouAEIOU]\)"   "\1'\3"   "agt"

Change "\([`^]\)\([aA]\)" to   "\2\1"  "gat"
Change "\([\`\'^]\)\([eE]\)"   to   "\2\1"   "gat"
Change "\([\^]\)\([\i\I]\)"    to  "\2\1"   "gat"
Change "\([\^]\)\([oO]\)"    to  "\2\1"   "gat"
Change "\([\`^]\)\([uU]\)"    to  "\2\1"   "gat"
Change "_\([cC]\)"    to  "\1,"   "gat"


%%%%% oe

de-oemacros

Change "[o][e]:>[BbCcDdIiKkLlNnSsTtUu]" to "\\oe " "gat"
Change "[O]e:>[BbCcDdIiKkLlNnSsTtUu]" to "\\OE " "gat"

Change "\(m\)\\oe \(lle\)" to "\1oe\2" "gat"
Change "\(m\)\\OE \(lle\)" to "\1OE\2" "gat"

Change "\(oe\)\(rstite\)" to "\\\oe \2" "gat"
Change "\([O]e\)\(rstite\)" to "\\\OE \2" "gat"
Change "\([O]\)\(ersted\)" to "\\OE rsted" "gat"

Change "\(mes|hyp|pr\)\\oe:b*\r*:b*" to "\1oe" "gat"

re-oemacros


%%%%% de-oemacros

Change "\([\\][A-Za-z]*o\)\(e\)" to "\1qqq\2"  "gatT"

de-oemacros

%%%%% re-oemacros

Change "\([\\][A-Za-z]*o\)qqq\(e\)" to "\1\2"  "gatT"

re-oemacros


%%%%% tex-mac-trans (sorry about the eight bit octets after `to' !)

Open...
Open "ctwk"

Change "\\\(\'\):b*\r*:b*\([E]|{[E]}\)" to   ""  "gat"
Change "\\\(\'\):b*\r*:b*\([e]|{[e]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([A]|{[A]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([a]|{[a]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([E]|{[E]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([e]|{[e]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([I]|{[I]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([i]|{[i]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([O]|{[O]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([o]|{[o]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([U]|{[U]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([u]|{[u]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([A]|{[A]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([a]|{[a]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([E]|{[E]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([e]|{[e]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([I]|{[I]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([i]|{[i]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([O]|{[O]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([o]|{[o]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([U]|{[U]}\)" to   ""  "gat"
Change "\\"":b*\r*:b*\([u]|{[u]}\)" to   ""  "gat"
Change "\\[\^]:b*\r*:b*\(\\i\(:b+\r*:b*|\r+:b*\)|{\\i}\)" to   ""   "gat"
Change "\\`:b*\r*:b*\([A]|{[A]}\)" to   ""  "gat"
Change "\\`:b*\r*:b*\([a]|{[a]}\)" to   ""  "gat"
Change "\\`:b*\r*:b*\([E]|{[E]}\)" to   ""  "gat"
Change "\\`:b*\r*:b*\([e]|{[e]}\)" to   ""  "gat"
Change "\\`:b*\r*:b*\([U]|{[U]}\)" to   ""  "gat"
Change "\\`:b*\r*:b*\([u]|{[u]}\)" to   ""  "gat"
Change "\\[c]\(:b+\r*:b*|\r+:b*\)\(c|{c}\)\([aouAOU]\)" to   "_\3"  "gat"
Change ":<[_\^`']{\([aeiouAEIOU]\)}" to   "\1"  "gat"


%%%%% tex-pre-acc-trans

Open...
Open "ctwk"

Change "\(:[^a-zA-Z\-][cdlmnstCDLMNST]\)'\(\\'|'\)-\(\s*\r*\s*\)\(e\)" to   "\1/\2\4"  "gat"
Change "\\\(\'\)\(:b*\r*:b*\)\(e|{e}\)" to   "\1\3"  "gat"
Change "\\\([\^]\)\(:b*\r*:b*\)\([aeiouAEIOU]|{[aeiouAEIOU]}\)" to   "\1\3"  "gat"
Change "\\[\^]:b*\r*:b*\(\\i\(:b+\r*:b*|\r+:b*\)|{\\i}\)" to   "^i"   "gat"
Change "\\\([`]\)\(:b*\r*:b*\)\([aeuAEU]|{[aeuAEU]}\)" to   "\1\3"  "gat"
Change "\\[c]\(:b+\r*:b*|\r+:b*\)\(c|{c}\)\([aouAOU]\)" to   "_\3"  "gat"
Change ":<[_\^`']{\([cCaeiouAEIOU]\)}" to   "\1"  "gat"


%%%%% tex-swt-trans

Open...
Open "ctwk"

Change "\\\':b*\r*:b*\([e]|{[e]}\)" to   ""  "gat"
Change "\\\^:b*\r*:b*\([aeiouAEIOU]|{[aeiouAEIOU]}\)" to   "\1"  "gat"
Change "\\\^:b*\r*:b*\(\\i\(:b+\r*:b*|\r+:b*\)|{\\i}\)" to   "i"   "gat"
Change "\\"":b*\r*:b*\([aeiouAEIOU]|{[aeiouAEIOU]}\)" to   "\1"  "gat"
Change "\\\([`]\)\(:b*\r*:b*\)\([a]|{[a]}\)" to   ""  "gat"
Change "\\\([`]\)\(:b*\r*:b*\)\([e]|{[e]}\)" to   ""  "gat"
Change "\\\([`]\)\(:b*\r*:b*\)\([u]|{[u]}\)" to   ""  "gat"
Change "\\[c]\(:b+\r*:b*|\r+:b*\)\([c]|{[c]}\)" to   "" "gat"

Change "{\([\^""]-[aeiouAEIOU]\)}" to   "\1"  "gat"

Change "\$\$\(:.:+\)\$\$" to "\1" "gatr"

Change "\$\(:.:+\)\$" to "\1" "gatr"


 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%