%$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 \sección{Dates and dialects} \hoy. Era en español. Pero algo en inglés: \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). \sección{Escaping to Unicode.} Ligatures fi \verb+fi+: \cuadratín f in text, i escaped to Unicode: \dcuadratín UTF-8: f\utfstring{i} \verb+f\utfstring{i}+ \dcuadratín Unicode code: f\unichar{"69} \verb+f\unichar{"69}+ \dcuadratín Unicode text: f\unitext{^^^^0069} \verb+f\unitext{^^^^0069}+ \cuadratín Now f escaped and i in text: \dcuadratín UTF-8: \utfstring{f}i \verb+\utfstring{f}i+ \dcuadratín Unicode code: \unichar{"66}i \verb+\unichar{"66}i+ \dcuadratín Unicode text: \unitext{^^^^0066}i \verb+\unitext{^^^^0066}i+ \textbullet\cuadratín At this point, \verb+\ini{languageset}[names]{russian}+ \ini{languageset}[names]{russian} \sección{\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). \sección{Accents} t\unichar{"0326} \verb|t\unichar{"0326}|. \`{\b{\"{x}}} $=$ \verb|\`{\d{\"{x}}}| \cuadratín \b{\`{\"{x}}} $=$ \verb|\d{\`{\"{x}}}| \cuadratín \`{\"{\b{x}}} $=$ \verb|\`{\"{\d{x}}}| W\v{ü} $=$ \verb|W\v{ü}| \cuadratín W\v{\"{u}} $=$ \verb|W\v{\"{u}}|. \sección{Adding processes} Percent in Spanish: 100\% [\%] (\verb+100\% [\%]+). \textbullet\cuadratín In the preamble: \begin{verbatim} \SetLanguage{spanish} \AddLanguageProcess{text}{percent} \SetLanguageProcess{percent}{} \end{verbatim} \textbullet\cuadratín 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}