 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%% 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

