diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/t2/etc')
8 files changed, 414 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/t2/etc/mathtext.dtx b/Master/texmf-dist/doc/generic/t2/etc/mathtext.dtx new file mode 100644 index 00000000000..f00e2fcb8c4 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/mathtext.dtx @@ -0,0 +1,212 @@ +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\begin{document} +\DocInput{mathtext.dtx} +\end{document} +%</driver> +% \fi +% +% \begin{macrocode} +%<*mathtext> +\ProvidesPackage{mathtext} + [1999/01/28 v1.0 transparent text-and-math defs] +% \end{macrocode} +% +% This stuff is intended to be put into the LaTeX kernel. +% It adds new NFSS user-level command: |\DeclareTextMathSymbol|. +% It does not touch in any way the previous behavior for encodings +% which do not use |\DeclareTextMathSymbol|. +% +% The symbols defined via |\DeclareTextMathSymbol| work transparently +% in both text and math mode. And interestingly, they expand a bit +% faster than `normal' text-only symbols defined via |\DeclareTextSymbol|. +% +% This is a redefinition of the |\@@enc@update| defined in +% |ltfssbas.dtx|. The only change is that we added updating of +% new commands like |\T2A-tmcmd| to |\@current@tmcmd| or from +% |\@changed@tmcmd|. These changes are fully backward-compatible, +% and do not change the previous behavior. +% \begin{macrocode} +\def\@@enc@update{% + \expandafter\let\csname\cf@encoding-cmd\endcsname\@changed@cmd + \expandafter\let\csname\cf@encoding-tmcmd\endcsname\@changed@tmcmd + \expandafter\let\csname\f@encoding-cmd\endcsname\@current@cmd + \expandafter\let\csname\f@encoding-tmcmd\endcsname\@current@tmcmd + \default@T + \csname T@\f@encoding\endcsname + \csname D@\f@encoding\endcsname + \let\enc@update\relax + \let\cf@encoding\f@encoding +} +% \end{macrocode} +% This is a new command, |\@current@tmcmd|, which is an analog of +% |\@current@cmd| for `text and math' symbols. +% \begin{macrocode} +\def\@current@tmcmd#1#2#3{% + \ifx\protect\@typeset@protect + \@tmchar#2#3% + \else + \noexpand#1% + \fi} +%<!warn>\def\@tmchar#1#2{\if@mmode#2\else#1\fi} +%<warn>\def\@tmchar#1#2{\if@mmode\math@warn#2\else#1\fi} +% \end{macrocode} +% This is a new command, |\@changed@tmcmd|, which is an analog of +% |\@changed@cmd| for `text and math' symbols. +% \begin{macrocode} +\def\@changed@tmcmd#1#2#3{% + \ifx\protect\@typeset@protect + \@tmchar@#1% + \else + \noexpand#1% + \fi} +\def\@tmchar@#1{% + \if@mmode + \expandafter\ifx\csname\cf@encoding math\string#1\endcsname\relax + \expandafter\ifx\csname ?math\string#1\endcsname\relax + \expandafter\def\csname ?math\string#1\endcsname{% + \TextSymbolUnavailable#1% + }% + \fi + \global\expandafter\let + \csname\cf@encoding math\string#1\expandafter\endcsname + \csname ?math\string#1\endcsname + \fi +%<!warn> \csname\cf@encoding math\string#1% +%<warn> \expandafter\math@warn\csname\cf@encoding math\string#1% + \expandafter\endcsname + \else + \expandafter\ifx\csname\cf@encoding\string#1\endcsname\relax + \expandafter\ifx\csname ?\string#1\endcsname\relax + \expandafter\def\csname ?\string#1\endcsname{% + \TextSymbolUnavailable#1% + }% + \fi + \global\expandafter\let + \csname\cf@encoding \string#1\expandafter\endcsname + \csname ?\string#1\endcsname + \fi + \csname\cf@encoding\string#1% + \expandafter\endcsname + \fi} +\expandafter\let\csname?-tmcmd\endcsname\@changed@tmcmd +% \end{macrocode} +% We should add initialization of |\|\meta{encoding}|-tmcmd| +% to be |\@changed@tmcmd| when the new encoding is declared. +% \begin{macrocode} +\def\DeclareFontEncoding@#1#2#3{% + \expandafter + \ifx\csname T@#1\endcsname\relax + \def\cdp@elt{\noexpand\cdp@elt}% + \xdef\cdp@list{\cdp@list\cdp@elt{#1}% + {\default@family}{\default@series}% + {\default@shape}}% + \expandafter\let\csname#1-cmd\endcsname\@changed@cmd + \expandafter\let\csname#1-tmcmd\endcsname\@changed@tmcmd + \else + \@font@info{Redeclaring font encoding #1}% + \fi + \global\@namedef{T@#1}{#2}% + \global\@namedef{M@#1}{\default@M#3}% + \xdef\LastDeclaredEncoding{#1}% +% \end{macrocode} +% The following command is specific to the |mathtext| package, i.e.\ is +% not for `generic' transparent text and math: it declares a symbol font +% (which could then be redefined if necessary), which is needed to use +% the |\DeclareTextMathSymbol|. +% \begin{macrocode} + \DeclareSymbolFont{#1letters}{#1}\rmdefault\mddefault\updefault + } +% \end{macrocode} +% +% \begin{macro}{\DeclareTextMathSymbol} +% This is a new user-level NFSS macro. It is intended to be moved +% to |ltoutenc.dtx| or |ltfssdcl.dtx|. +% +% It was written by Werner Lemberg |<wl@gnu.org>|. +% +% Parameters are: name, encoding, category, math character class, +% and slot. +% +% \begin{macrocode} +\def\DeclareTextMathSymbol#1#2#3#4#5{% + \expandafter\def\expandafter#1% + \expandafter{% + \csname#2-tmcmd\expandafter\endcsname + \expandafter#1% + \csname#2\string#1\expandafter\endcsname + \csname#2math\string#1\endcsname + }% + \expandafter\chardef\csname#2\string#1\endcsname#5\relax + \expandafter\DeclareMathSymbol\csname#2math\string#1\endcsname + {#3}{#4}{#5}} +\@onlypreamble\DeclareTextMathSymbol +% \end{macrocode} +% \end{macro} +% +% The next few lines try to solve the following problem: if the first +% unexpandable token of a cell in |\halign| (or |\valign|) is a Cyrillic +% letter, then the look-ahead mechanism searching for possible |\omit| +% will expand the |\ifmmode| test used in definitions of Cyrillic +% letters, and e.g.~in the case of the |array| environment which +% switches to math mode, will return wrong result, which will lead to +% missing character or incorrect result. We use here some hackery and +% redefine the |\if@mmode| test for the |\halign| and |\valign| commands +% (as well as these commands). The really correct fix is possible within +% e-\TeX\ (so, one should make a support do use the best possible solution, +% and not only in this case). We ensure to execute this code only once, +% because otherwise an endless loop will arise (e.g. if both T2A and T2B +% are loaded in one document), because of |\halign| redefinition. +% \begin{macrocode} +\let\if@mmode\ifmmode +% \end{macrocode} +% This command stops look-ahead (protection is needed to avoid recursive +% expansion when |\protected@write| is used inside |\halign|): +% \begin{macrocode} +\DeclareRobustCommand\reset@if@mmode{\let\if@mmode\ifmmode} +\def\if@mmode@{\reset@if@mmode\ifmmode} +\let\org@halign\halign +\DeclareRobustCommand\halign{\let\if@mmode\if@mmode@\org@halign} +% \end{macrocode} +% wait until textcase and amsmath will not use "fake" |\valign| :-) +% \begin{macrocode} +%\let\org@valign\valign +%\DeclareRobustCommand\valign{\let\if@mmode\if@mmode@\org@valign} +% \end{macrocode} +% This is needed to make single Cyrillic letters (without braces) work as +% upper/lower indices (otherwise, |\let| will confuse \TeX). Do we need to +% set |\everydisplay| similarly (it seems that not)? +% \begin{macrocode} +\everymath\expandafter{\the\everymath\let\if@mmode\ifmmode} +% \end{macrocode} +% We redefine some \LaTeX{} text-only commands to work `transparently' +% in text and math mode. +% \begin{macrocode} +\def\DeclareTextSymbol#1#2#3{% + \DeclareTextMathSymbol#1{#2}\mathalpha{#2letters}{#3}} +% \end{macrocode} +% \begin{macro}{\gobble@math} +% \begin{macro}{\math@warn} +% These two commands are used for producing warning message +% if a symbol declared via |\DeclareTextMathSymbol| command occurs in +% math mode. This can be used e.g.\ to check that such symbols were not +% used unintentionally in math mode (say, some Cyrillic letter instead +% of similarly looking Latin letter; in general, Cyrillic letters are +% perfectly legal and certainly could be used in math mode). +% \begin{macrocode} +%<*warn> +\DeclareOption{warn}{% +\edef\reserved@a{\@backslashchar##1\expandafter\@gobble + \string\math\@backslashchar}% +\expandafter\def\expandafter\gobble@math\reserved@a{}% +\def\math@warn#1{#1\PackageWarning{mathtext}{letter + `\expandafter\gobble@math\string#1' used in math mode}}} +\let\math@warn\@empty +\ProcessOptions* +%</warn> +%</mathtext> +% \end{macrocode} +% \end{macro} +% \end{macro} +\endinput diff --git a/Master/texmf-dist/doc/generic/t2/etc/mathtext.ins b/Master/texmf-dist/doc/generic/t2/etc/mathtext.ins new file mode 100644 index 00000000000..61a532d2dec --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/mathtext.ins @@ -0,0 +1,8 @@ +\input docstrip +\keepsilent + +\generate{ + \file{mathtext.sty}{\from{mathtext.dtx}{mathtext,warn}} +} + +\endbatchfile diff --git a/Master/texmf-dist/doc/generic/t2/etc/rumkidx/README b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/README new file mode 100644 index 00000000000..4adc40f2142 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/README @@ -0,0 +1,44 @@ +This is `rumakeindex', a wrapper for `makeindex' which allows one to +get properly sorted index when Russian letters are used in index +entries. It is part of the T2 package. + +You will need: + +1) LaTeX setup based on a T2 package. + +2) MAKEINDEX utility which does not have problems with 8-bit characters. + mkidx32.exe in a emTeX distribution is Ok, as well as makeindex + from web2c distribution. + +3) SED binary. It is available on any UNIX box. For DOS you can find + it at + + ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/sed118b.zip + + Copy `sed.exe' to a directory contained in %PATH% environment + variable. + + Under UNIX, the `tr' utility is also used. It is emulated via the + `y' SED command in the DOS scripts. + +4) The `rumakeindex' script (or batch file `rumkidxd.bat' under DOS, + or `rumkidxw.bat' under Windows). + +If you are using the T2 package and are making indices with russian +letters, then run `rumakeindex' (or `rumkidxd.bat' under DOS, or +`rumkidxw.bat' under Windows) instead of `makeindex' (or `mkidx32.exe' +under DOS). + +If you are using emTeX under DOS, copy *.sed files to `\emtex\data' +directory, and copy `*.bat' files to `\emtex\bin' directory. + +If you are using UNIX, copy the `rumakeindex' shell script to +e.g. `/usr/local/bin' directory. + +Note: the encoding of generated .ind files is: + + koi8-r for `rumakeindex' (UNIX) + cp866 for `rumkidxd.bat' (MS-DOS) + cp1251 for `rumkidxw.bat' (MS-Windows) + +If you need some other encoding, just change the encoding of scripts. diff --git a/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumakeindex b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumakeindex new file mode 100644 index 00000000000..02598d38650 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumakeindex @@ -0,0 +1,77 @@ +#!/bin/sh + +BASE=`basename $1 .idx` +IDX=$BASE.idx +IND=$BASE.ind +ILG=$BASE.ilg + +sed ' +/^\\indexentry{/ { +s/\\IeC {\\CYRA }//g +s/\\IeC {\\cyra }//g +s/\\IeC {\\CYRB }//g +s/\\IeC {\\cyrb }//g +s/\\IeC {\\CYRV }//g +s/\\IeC {\\cyrv }//g +s/\\IeC {\\CYRG }//g +s/\\IeC {\\cyrg }//g +s/\\IeC {\\CYRD }//g +s/\\IeC {\\cyrd }//g +s/\\IeC {\\CYRE }//g +s/\\IeC {\\cyre }//g +s/\\IeC {\\CYRYO }//g +s/\\IeC {\\cyryo }//g +s/\\IeC {\\CYRZH }//g +s/\\IeC {\\cyrzh }//g +s/\\IeC {\\CYRZ }//g +s/\\IeC {\\cyrz }//g +s/\\IeC {\\CYRI }//g +s/\\IeC {\\cyri }//g +s/\\IeC {\\CYRISHRT }//g +s/\\IeC {\\cyrishrt }//g +s/\\IeC {\\CYRK }//g +s/\\IeC {\\cyrk }//g +s/\\IeC {\\CYRL }//g +s/\\IeC {\\cyrl }//g +s/\\IeC {\\CYRM }//g +s/\\IeC {\\cyrm }//g +s/\\IeC {\\CYRN }//g +s/\\IeC {\\cyrn }//g +s/\\IeC {\\CYRO }//g +s/\\IeC {\\cyro }//g +s/\\IeC {\\CYRP }//g +s/\\IeC {\\cyrp }//g +s/\\IeC {\\CYRR }//g +s/\\IeC {\\cyrr }//g +s/\\IeC {\\CYRS }//g +s/\\IeC {\\cyrs }//g +s/\\IeC {\\CYRT }//g +s/\\IeC {\\cyrt }//g +s/\\IeC {\\CYRU }//g +s/\\IeC {\\cyru }//g +s/\\IeC {\\CYRF }//g +s/\\IeC {\\cyrf }//g +s/\\IeC {\\CYRH }//g +s/\\IeC {\\cyrh }//g +s/\\IeC {\\CYRC }//g +s/\\IeC {\\cyrc }//g +s/\\IeC {\\CYRCH }//g +s/\\IeC {\\cyrch }//g +s/\\IeC {\\CYRSH }//g +s/\\IeC {\\cyrsh }//g +s/\\IeC {\\CYRSHCH }//g +s/\\IeC {\\cyrshch }//g +s/\\IeC {\\CYRHRDSN }//g +s/\\IeC {\\cyrhrdsn }//g +s/\\IeC {\\CYRERY }//g +s/\\IeC {\\cyrery }//g +s/\\IeC {\\CYRSFTSN }//g +s/\\IeC {\\cyrsftsn }//g +s/\\IeC {\\CYREREV }//g +s/\\IeC {\\cyrerev }//g +s/\\IeC {\\CYRYU }//g +s/\\IeC {\\cyryu }//g +s/\\IeC {\\CYRYA }//g +s/\\IeC {\\cyrya }//g +}' $IDX | makeindex -t $ILG | tr '' \ + 'ų' > $IND diff --git a/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidx1.sed b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidx1.sed new file mode 100644 index 00000000000..6c61f1c5b49 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidx1.sed @@ -0,0 +1,68 @@ +/^\\indexentry{/ { +s/\\IeC {\\CYRA }//g +s/\\IeC {\\cyra }//g +s/\\IeC {\\CYRB }//g +s/\\IeC {\\cyrb }//g +s/\\IeC {\\CYRV }//g +s/\\IeC {\\cyrv }//g +s/\\IeC {\\CYRG }//g +s/\\IeC {\\cyrg }//g +s/\\IeC {\\CYRD }//g +s/\\IeC {\\cyrd }//g +s/\\IeC {\\CYRE }//g +s/\\IeC {\\cyre }//g +s/\\IeC {\\CYRYO }//g +s/\\IeC {\\cyryo }//g +s/\\IeC {\\CYRZH }//g +s/\\IeC {\\cyrzh }//g +s/\\IeC {\\CYRZ }//g +s/\\IeC {\\cyrz }//g +s/\\IeC {\\CYRI }//g +s/\\IeC {\\cyri }//g +s/\\IeC {\\CYRISHRT }//g +s/\\IeC {\\cyrishrt }//g +s/\\IeC {\\CYRK }//g +s/\\IeC {\\cyrk }//g +s/\\IeC {\\CYRL }//g +s/\\IeC {\\cyrl }//g +s/\\IeC {\\CYRM }//g +s/\\IeC {\\cyrm }//g +s/\\IeC {\\CYRN }//g +s/\\IeC {\\cyrn }//g +s/\\IeC {\\CYRO }//g +s/\\IeC {\\cyro }//g +s/\\IeC {\\CYRP }//g +s/\\IeC {\\cyrp }//g +s/\\IeC {\\CYRR }//g +s/\\IeC {\\cyrr }//g +s/\\IeC {\\CYRS }//g +s/\\IeC {\\cyrs }//g +s/\\IeC {\\CYRT }//g +s/\\IeC {\\cyrt }//g +s/\\IeC {\\CYRU }//g +s/\\IeC {\\cyru }//g +s/\\IeC {\\CYRF }//g +s/\\IeC {\\cyrf }//g +s/\\IeC {\\CYRH }//g +s/\\IeC {\\cyrh }//g +s/\\IeC {\\CYRC }//g +s/\\IeC {\\cyrc }//g +s/\\IeC {\\CYRCH }//g +s/\\IeC {\\cyrch }//g +s/\\IeC {\\CYRSH }//g +s/\\IeC {\\cyrsh }//g +s/\\IeC {\\CYRSHCH }//g +s/\\IeC {\\cyrshch }//g +s/\\IeC {\\CYRHRDSN }//g +s/\\IeC {\\cyrhrdsn }//g +s/\\IeC {\\CYRERY }//g +s/\\IeC {\\cyrery }//g +s/\\IeC {\\CYRSFTSN }//g +s/\\IeC {\\cyrsftsn }//g +s/\\IeC {\\CYREREV }//g +s/\\IeC {\\cyrerev }//g +s/\\IeC {\\CYRYU }//g +s/\\IeC {\\cyryu }//g +s/\\IeC {\\CYRYA }//g +s/\\IeC {\\cyrya }//g +} diff --git a/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidx2.sed b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidx2.sed new file mode 100644 index 00000000000..7262921d807 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidx2.sed @@ -0,0 +1 @@ +y///
diff --git a/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidxd.bat b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidxd.bat new file mode 100644 index 00000000000..0556b6ccaf3 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidxd.bat @@ -0,0 +1,2 @@ +@echo off
+sed -f %EMTEXDIR%\data\rumkidx1.sed %1.idx | mkidx32 -t %1.ilg | sed -f %EMTEXDIR%\data\rumkidx2.sed > %1.ind
diff --git a/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidxw.bat b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidxw.bat new file mode 100644 index 00000000000..f62b6f96b80 --- /dev/null +++ b/Master/texmf-dist/doc/generic/t2/etc/rumkidx/rumkidxw.bat @@ -0,0 +1,2 @@ +@echo off
+sed -f %EMTEXDIR%\data\rumkidx1.sed %1.idx | mkidx32 -t %1.ilg | sed -f %EMTEXDIR%\data\rumkidx3.sed > %1.ind
|