summaryrefslogtreecommitdiff
path: root/language/typingtex/email.dir/email-sp.sty
blob: 54af20bc7122525c9191dee87ec3d0100f1d11cf (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
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%% email-sp.sty: master posting on ftp matups.matups.fr
 %%%% Support: Laurent Siebenmann lcs@matups.matups.fr
 %%%% After \endinput see an alternate paste-in header version
 %%%% suitable for real email messages.
 %%%% There is documentation toward the end of this file.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% Succinct Spanish accentuation for Plain TeX (LS'93)
 %% After \input email-sp.sty, \spanishemail activates macros.
 %% Then '`^_ for \' \` \^ \c respectively and / for apostrophe.
 %% T\" is unchanged. The command \SmartQuotes permits syntax
 %%  "#1" for smart quotes; \noSmartQuotes annuls (makes " inactive).
 %% Warning: \input is forbidden with these macros in effect.
 %% Suggestion:  To avoid such problems use the syntax:
 %% \begingroup \spanishemail <your succinct typing> \endgroup
 %% for each block of succinct typing.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 \chardef\SPemailAt=\catcode`@ \catcode`@=11

 \def\gobble#1{} \let\EX@\expandafter

 \def\doSPemailChars@{\do/\do_\do^\do'\do`}

 \def\SPemailChActive{\edef\do##1{\EX@\catcode\string`##1=13}%
                \doSPemailChars@}
 \def\SPemailChOther{\edef\do##1{\EX@\catcode\string`##1=12}%
                \doSPemailChars@}

 \bgroup\catcode`\"=13\relax\SPemailChActive
  \gdef\@ActiveDQuote{"}
  \gdef\@ActiveSlash{/}
  \gdef\@ActiveULine{_}
  \gdef\@ActiveHat{^}
  \gdef\@ActiveRQuote{'}
  \gdef\@ActiveLQuote{`}
  \gdef\lqmole@{\ifx`\next\lq\lq\EX@\gobble\else\EX@\`\fi}
  \gdef\rqmole@{\ifx'\next\rq\rq\EX@\gobble\else\EX@\'\fi}
 \egroup

 \def\@@pprime{\futurelet\next\rqmole@}
 \edef\Excl@{\string!\string!\string!\string!}
 \bgroup\EX@\let\@ActiveDQuote\relax
    \xdef\@SmartDQ{\def\@ActiveDQuote##1\@ActiveDQuote
          {\lq\lq##1\rq\rq}}
 \egroup
 \def\SmartQuotes{\@SmartDQ\catcode`\"=13\relax}
 \def\noSmartQuotes{\catcode`\"=12\relax}

 \let\priminput\input
 %%% Special \input is needed with email-sp macros on:
  %% (a) If <file> needs /_^'` active
  %% \SPemailChOther \priminput <file> \SPemailChActive
  %% (b) If <file> needs /_^'` other
  %% \priminput <file> 
 %%% Similarly for " if active.

 \def\spanishemail{\SPemailChActive\noSmartQuotes
   \EX@\def\@ActiveULine{\ifmmode\sb\else\EX@\c\fi}%
   \EX@\def\@ActiveSlash{\ifmmode\string/\else\EX@\rq\fi}%
   \EX@\def\@ActiveHat{\ifmmode\sp\else\EX@\^\fi}%
   \EX@\def\@ActiveLQuote{\futurelet\next\lqmole@}
   \EX@\def\@ActiveRQuote{\@prime}%
    \def\@prime{\ifmmode\EX@\@@prime\else\EX@\@@pprime\fi}%
    \def\@@prime{\sp\bgroup\prim@s}%
    \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else
      \ifx^\next\let\nxt\pr@@@t\else\let\nxt\egroup\fi\fi \nxt}%
   \edef\input{\immediate\write16{} \errmessage{\Excl@ No \string
     \input\space please during email-sp typing \Excl@ }}%
   }

 \endinput



 %%% Header version for real email messages.
 %%% 
 %%% 
 %%% Insert the following header by cut and paste after your macros 
 %%% and \input's, just before the Spanish typing

VERSION 1.

 %-------- select
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% email-sp: header form : Succinct Spanish accenuation for TeX 
 %% allowing pleasant and readable typing (L.Siebenmann 4-93) 
 %% Syntax: \begingroup <these macros> <succinct typing> \endgroup
 %% The succinct typing: (bug reports to lcs@matups.matups.fr)
 %% 'n for \~n; ''u for \"u; and 
 %% 'a, 'e, 'i, 'o, 'u for \'a, \'e, \'i, \'o, \'u 
 %% No single quotes allowed: \lq...\rq instead
 %% No apostrophes: \rq instead 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% "#1" for smart double quotes if you activate the next line
 %\catcode`\"=13 \edef"#1"{\lq\lq#1\rq\rq}%
 \count255=\catcode`@ \catcode`@=11 \catcode`\'=13 
 \def'{\@prime} \let\EX@\expandafter \def\g@bble#1{}
 \def\@prime{\ifmmode\EX@\@@prime\else\EX@\@@pprime\fi}%
 \def\@@prime{\sp\bgroup\prim@s}%
 \def\@@pprime{\futurelet\next\rqmole@}
 \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else
      \ifx^\next\let\nxt\pr@@@t\else\let\nxt\egroup\fi\fi \nxt}%
 \def\rqmole@{\ifx'\next
          \EX@\EX@\EX@\rqrq@\EX@\g@bble\else\EX@\TildeOrAccute@\fi}
 \def\TildeOrAccute@{\ifx n\next\EX@\~\else\EX@\'\fi}
 \def\rqrq@{\futurelet\next\rqrqmole@}
 \def\rqrqmole@{\ifx\next u\EX@\"\else\rq\rq\fi}
 \catcode`@=\count255\let\currinput\input
 \def\input#1 {\catcode`\'=12\currinput#1 \catcode`\'=13}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %-------- copy

VERSION 2.

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%  email-sp (header form) Larry S.17-4-93 <lcs@matups.matups.fr>
 %%  Succinct Spanish-English typing: '<letter> for \'<letter>; 
 %% Hence ' NOT apostrophe, \rq instead (only no-no for typist!)
 %% ~n for \~n; (BUT ~ mostly kern; \~N for the rare capital ene) 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \count255=\catcode`@\catcode`@=11\catcode`\'=13
 \let\EX@\expandafter \def\g@bble#1{} \let\FL@\futurelet
 \def'{\ifmmode\EX@\@prime\else\EX@\@pprime\fi}%
 \def\@prime{\sp\bgroup\prim@s}\def\@pprime{\FL@\next\rqmole@}
 \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else
   \ifx^\next\let\nxt\pr@@@t\else\let\nxt\egroup\fi\fi \nxt}%
 \def\rqmole@{\ifcat a\next\EX@\'\else\EX@\rq@\fi}
 \def\rq@{\FL@\next\rqmole@@}
 \def\rqmole@@{\ifx\next'\rq\EX@\EX@\EX@\rq\EX@\g@bble\else\EX@\rq\fi}
 \let\oldtild@ ~\def~{\ifmmode\oldtild@\else\EX@\prosetild@\fi}
 \def\prosetild@{\FL@\next\tildemole@}
 \def\tildemole@{\ifx n\next\EX@\~\else\EX@\oldtild@\fi}
 \let\emailinput\input \def\IW@{\immediate\write16}
 \def\macroinput#1 {\catcode`\'=12\currinput#1 \catcode`\'=13}
 \edef\input{\IW@{}\IW@{ !!!! With email-sp macros use 
    \string\macroinput}  \IW@{ !!!! or \string\emailinput\space 
    for \string\input\space} \errmessage{}} \catcode`@=\count255
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

VERSION 3.

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%  email-sp (header form) Larry S.19-4-93 <lcs@matups.matups.fr>
 %%  Succinct Spanish-English typing: '<letter> for \'<letter>, 
 %% EXCEPT that 's and 'S give apostrophes (for English).
 %% ~n for \~n; (BUT ~ mostly kern; \~N for the rare capital ene) 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \count255=\catcode`@\catcode`@=11\catcode`\'=13\let\EX@\expandafter
 \def\EX@@{\EX@\EX@\EX@}\def\g@bble#1{} \let\FL@\futurelet
 \def'{\ifmmode\EX@\@prime\else\EX@\@pprime\fi}%
 \def\@prime{\sp\bgroup\prim@s}\def\@pprime{\FL@\next\rqmole@}
 \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else
   \ifx^\next\let\nxt\pr@@@t\else\let\nxt\egroup\fi\fi \nxt}%
 \def\rqmole@{\ifx\next'\rq\EX@@\rq\EX@\g@bble\else\EX@\rqmole@@\fi}
 \def\rqmole@@{\ifcat a\noexpand\next\EX@\rqmole@@@\else\EX@\rq\fi}
 \def\rqmole@@@#1{\ifnum\lccode`#1=`s\EX@\rq #1\else\EX@\'#1\fi}
 \let\oldtild@ ~\def~{\ifmmode\oldtild@\else\EX@\prosetild@\fi}
 \def\prosetild@{\FL@\next\tildemole@}
 \def\tildemole@{\ifx n\next\EX@\~\else\EX@\oldtild@\fi}
 \let\emailinput\input \def\IW@{\immediate\write16}
 \def\macroinput#1 {\catcode`\'=12\currinput#1 \catcode`\'=13}
 \edef\input{\IW@{}\IW@{ !!!! With email-sp macros use 
    \string\macroinput}  \IW@{ !!!! or \string\emailinput\space 
    for \string\input\space} \errmessage{}} \catcode`@=\count255
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

VERSION 4.

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%  email-sp (header form) Larry S.19-4-93 <lcs@matups.matups.fr>
 %%  Succinct Spanish-English typing: '<letter> for \'<letter>, 
 %%  EXCEPT that (i) 's and 'S give apostrophes (for English)
 %%  (ii) 'n or \~n  gives <ntilde>; 'N  or \~N  gives <Ntilde>.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \count255=\catcode`@\catcode`@=11\catcode`\'=13\let\EX@\expandafter
 \def\EX@@{\EX@\EX@\EX@}\def\g@bble#1{} \let\FL@\futurelet
 \def'{\ifmmode\EX@\@prime\else\EX@\@pprime\fi}%
 \def\@prime{\sp\bgroup\prim@s}\def\@pprime{\FL@\next\rq@}
 \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else
   \ifx^\next\let\nxt\pr@@@t\else\let\nxt\egroup\fi\fi \nxt}%
 \def\rq@{\ifx\next'\rq\EX@@\rq\EX@\g@bble\else\EX@\rq@@\fi}
 \def\rq@@{\ifcat a\noexpand\next\EX@\rq@@@\else\EX@\rq\fi}
 \def\rq@@@#1{\ifnum\lccode`#1=`s\EX@\rq #1%
   \else\ifnum\lccode`#1=`n\~#1\else\'#1\fi\fi}
 \let\emailinput\input \def\IW@{\immediate\write16}
 \def\macroinput#1 {\catcode`\'=12\currinput#1 \catcode`\'=13}
 \edef\input{\IW@{}\IW@{ !!!! With email-sp macros use 
    \string\macroinput}  \IW@{ !!!! or \string\emailinput\space 
    for \string\input\space} \errmessage{}} \catcode`@=\count255
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Notes on email-sp:

 --- email-sp is for Spanish in the the ASCII world of email and
ftp and telnet. The restriction to 7bit characters gives
portability. Other features are immediate TeXing, easy typing, 
and readability.

 --- email-sp typing can replace eight-bit typing. The converse
is impossible since email is 7bit and the only universal standard
is 7bit ASCII.

 --- Why are 'n and 'N proposed as typing for <ntilde> and 
<Ntilde>?  It seems impossible to use ~n for <ntilde>!  Indeed
\uppercase{~n} should then give the same as ~N.  But longstanding
TeX custom reserves ~N  for <unbreakable space>N, as in
R.~Nixon!
  
 --- primes in math are OK  (**)

 --- \uppercase{'e} is <Eaccute> etc. (**)

 --- English Apostrophe (rare): type O'{}Hara.

 --- French Apostrophe: To type small amounts of French with
email-sp note that the line

 \catcode`\/=13 \def/{\ifmmode\string/\else\string'\fi}%

would make / an apostrophe in prose. This allows efficient
typing: L/'eternel vs L'{}'eternel.



 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%% Spanish terminology; Maria Dolores 4239-1754
  %% \~n is called e\~ne  (tilde)
  %% \' is called agudos; past of verbs tom\'o
  %% \" is called di'eresis; example g\"uito=kernel, antig\"uedad

 Ref: Grammaire Espagnol, licence et classes preparatoires,
 par Jean Bouzet, E Belin, 8 r Ferou, Paris reimpression 1978 35F.

 Ref Curso de gram'atica hist'orica espa'nola, 
The evolution of Spanish, an introductory historical grammar,
T.A. Lathrup, 1980 c/o dept of languages and literature
univ delaware, app'endices y commentarios 
Juan Guti'errez Cuandrado y Ana Blas, 1984
Ariel (C'orciega, 270, Barcelona 8. 

. el punto   ... los puntos suspensivos
, comma     <<  >> las comillas
; el punto y coma   --- el gui'on
: los dos puntos    () entre par'entesis
??   ? signos de interrogati'on  !!   ! signos de admirati'on