summaryrefslogtreecommitdiff
path: root/macros/latex/exptl/mem/yatest.tex
blob: 268457c384678a37dc6c248b4fe96e61fda53899 (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
%$Lamed
\documentclass{article}

\usepackage{bookman}

%\tracingmacros2
%\tracingcommands2
\usepackage[charset = isolat1, english, usenglish, russian, spanish]{mem}

\languageproperties{russian}{rmfamily = omlgc}
%\scriptproperties{Cy}{rmfamily = omlgc}

% ======
% This is an example showing how new components for new
% tasks can be added on the fly. (It's self-explanatory.)

\languageunset

\DeclareLanguageComponent{spelling}

\SetDialect{usenglish}
\DeclareLanguageCommand{\colxr}{spelling}{color}

\SetDialect{english}
\DeclareLanguageCommand{\colxr}{spelling}{colour}

\SetLanguage{spanish}
\AddLanguageProcess{text}{percent}
\SetLanguageProcess{percent}{}

\languagereset

% ======

\sloppy

\parindent0pt
\parskip4pt

\ini{documento}

\ndicegeneral

\seccin{Dates and dialects}

\hoy.  Era en espaol.  Pero algo en ingls: \englishtext{The very
\arabicth{day} of next month and \hoy\dots} and in American
\usenglishtext{\hoy}.  Two spellings (with a macro with different
definitions for \texttt{english} and \texttt{usenglish}):
\englishtext{\colxr} and \usenglishtext{\colxr} (outside:
\meaning\colxr).

\seccin{Escaping to Unicode.}

Ligatures fi \verb+fi+:

\cuadratn f in text, i escaped to Unicode:

\dcuadratn UTF-8: f\utfstring{i} \verb+f\utfstring{i}+

\dcuadratn Unicode code: f\unichar{"69} \verb+f\unichar{"69}+

\dcuadratn Unicode text: f\unitext{^^^^0069} \verb+f\unitext{^^^^0069}+

\cuadratn Now f escaped and i in text:

\dcuadratn UTF-8: \utfstring{f}i \verb+\utfstring{f}i+

\dcuadratn Unicode code: \unichar{"66}i \verb+\unichar{"66}i+

\dcuadratn Unicode text: \unitext{^^^^0066}i \verb+\unitext{^^^^0066}i+

\textbullet\cuadratn At this point, \verb+\ini{languageset}[names]{russian}+

\ini{languageset}[names]{russian}

\seccin{\normalfont\utfstring{Предисловіе}}

\chaptername.
\utfstring{Предисловіе}.
And more .....\textsection{}  (Russian).

\fin{languageset}

And more .....\textsection{} (Not Russian any more: barred O,
long s, one half, three quarters, section as macro).

\seccin{Accents}

t\unichar{"0326} \verb|t\unichar{"0326}|.

\`{\b{\"{x}}} $=$ \verb|\`{\d{\"{x}}}| \cuadratn
\b{\`{\"{x}}} $=$ \verb|\d{\`{\"{x}}}| \cuadratn
\`{\"{\b{x}}} $=$ \verb|\`{\"{\d{x}}}|

W\v{} $=$ \verb|W\v{}| \cuadratn W\v{\"{u}} $=$ \verb|W\v{\"{u}}|.

\seccin{Adding processes}

Percent in Spanish: 100\% [\%] (\verb+100\% [\%]+).

\textbullet\cuadratn In the preamble:
\begin{verbatim}
\SetLanguage{spanish}
\AddLanguageProcess{text}{percent}
\SetLanguageProcess{percent}{}
\end{verbatim}

\textbullet\cuadratn And at this point: \verb+\SetLanguageProcess{percent}{sppcent}+ (with
\verb+\SelectProcesses+)

\SetLanguageProcess{percent}{sppcent}
\SelectProcesses

Again: 100\% [\%] (\verb+100\% [\%]+, as before; note 
the thin space between the number and the sign, and only at this place.)

The only expression in \texttt{sppcent} is
\begin{verbatim}
(`0'-`9')@"E125   => \1 "\kern.25em " \2;
\end{verbatim}



\end{documento}