summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mltex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/mltex
Initial commit
Diffstat (limited to 'macros/latex/contrib/mltex')
-rw-r--r--macros/latex/contrib/mltex/README81
-rw-r--r--macros/latex/contrib/mltex/lo1enc.def437
-rw-r--r--macros/latex/contrib/mltex/mlltxchg.def265
-rw-r--r--macros/latex/contrib/mltex/mltex.sty72
-rw-r--r--macros/latex/contrib/mltex/mltex.txt87
-rw-r--r--macros/latex/contrib/mltex/testmlft.tex134
-rw-r--r--macros/latex/contrib/mltex/testmlsw.tex105
7 files changed, 1181 insertions, 0 deletions
diff --git a/macros/latex/contrib/mltex/README b/macros/latex/contrib/mltex/README
new file mode 100644
index 0000000000..80e5b5b9ed
--- /dev/null
+++ b/macros/latex/contrib/mltex/README
@@ -0,0 +1,81 @@
+------------ README - MLTeX support files for LaTeX ------------
+
+This directory contains the following files to be used with
+MLTeX v2.2 and LaTeX2e:
+
+ - README This file you are currently reading
+ - mltex.txt ``How to use MLTeX with LaTeX'', the end-user
+ documentation---please read it!
+ - mltex.sty This LaTeX package is the simplest way how to enable
+ the MLTeX extensions within LaTeX; it automatically
+ loads all needed files and contains all necessary
+ declarations.
+
+ - lo1enc.def Font encoding definition for the new LaTeX font
+ encoding ``LO1'' aka ``mLtex's Ot1''.
+ - mlltxchg.def This file contains all LaTeX NFSS kernel macro
+ redefinitions.
+
+ - testmlft.tex
+ testmlsw.tex Two LaTeX documents to test MLTeX, the MLTeX package
+ and definition files.
+
+
+The package ``mltex'' can be also used with standard TeX, in which
+case the result should be the same as without this package. To make
+full use of all the capabilities of this package, you have to use an
+MLTeX extended TeX (which can not be called ``TeX'' anymore).
+
+
+Installation:
+-------------
+
+Put the files
+
+ mltex.sty
+ lo1enc.def
+ mlltxchg.def
+
+in a place where TeX will look for macros files.
+
+If you TeX system uses the TeX Directory Structure (TDS) standard you
+have to create a new directory
+
+ texmf/tex/latex/mltex/
+
+and move the three files into this directory. After you have done it,
+don't forget to update the file lookup cache files on some TeX
+systems!
+
+
+Error Reports:
+--------------
+
+Error Reports in case of UNCHANGED versions to
+
+ Bernd Raichle
+ Stettener Str. 73
+ 73732 Esslingen
+ Federal Republic of Germany
+ Email: raichle@Informatik.Uni-Stuttgart.DE
+
+Please apply the test file ``mltextst.tex'' to your MLTeX binary to
+make sure that your are using the newest version of MLTeX. If you are
+using an old version, update to the newest version before reporting an
+error.
+
+Include a _short_ TeX input file and the output of the log file in
+your error report. Add a note about your environment: TeX version,
+implementation, operating system.
+
+
+
+MLTeX is copyright (C) 1990-1992 by Michael J. Ferguson;
+MLTeX Version 2.2 is copyright (C) 1995-1998 by B. Raichle;
+all rights are reserved.
+
+--- Copyright (C) 1996-1998 Bernd Raichle. All rights reserved ---
+This file can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt; either
+version 1 of the License, or any later version.
diff --git a/macros/latex/contrib/mltex/lo1enc.def b/macros/latex/contrib/mltex/lo1enc.def
new file mode 100644
index 0000000000..678afb6910
--- /dev/null
+++ b/macros/latex/contrib/mltex/lo1enc.def
@@ -0,0 +1,437 @@
+%%
+%% This is file `lo1enc.def'.
+%% Copyright (C) 1996,1997,1998,1999 Bernd Raichle.
+%%
+%% -----------------------------------------------------------------
+%% IMPORTANT NOTICE:
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%% -----------------------------------------------------------------
+%%
+%% CHANGES:
+%% 1997/01/14 0.9b
+%% Formerly the \charsubdef assignments were done in a separate
+%% file loaded before all \DeclareMath... declarations. Because
+%% this file was an almost exact copy of `LO1enc.def' I have
+%% merged both files.
+%% (Conceptually the separation in two files is the cleaner
+%% solution but to do this for all possible MLTeX enhanced font
+%% encodings we have to include the font encoding name into this
+%% file's name. In practice a single file is simpler to maintain
+%% and the additions are very short.)
+%% 1997/09/03 0.9c
+%% 1998/10/22 0.9d
+%% Updated to `ot1enc.def' of <1998/06/01>: removed \aa, \AA, \SS.
+%% 1998/11/17 0.9e
+%% Only final release changes.
+%% Added new definition of \sh@ft from `plain.tex' 3.1415926
+%% as \loONEsh@ft because the type of its argument has
+%% changed from an integer to a length;
+%% adapted the definitions of \b and \d accordingly.
+%% 1998/12/21 0.9f
+%% Removed warning \message.
+%% 1999/03/08 0.9g
+%% Included missing macro definition of \(loONE)getf@ctor
+%% used for the accent macros \d and \b.
+%% Changed licensing conditions to LPPL.
+%% 1999/03/09 0.9h
+%% Changed `fontenc' to `mltex' in \PackageWarning*.
+%%
+%% ------------------------------------------------------------
+%%
+%\NeedsTeXFormat{LaTeX2e}[1994/12/01] % New \DeclareText...!
+\NeedsTeXFormat{LaTeX2e}[1996/12/01] % Need mono-case file names + \hb@xt@!
+%
+\ProvidesFile{lo1enc.def}[1999/03/09 v0.9h %
+ MLTeX/LaTeX fontenc definition: mLtex's Ot1 (br)]
+%
+\@ifundefined{DeclareFontDefinitionEncodingAlias}{%
+ \input{mlltxchg.def}}{}
+\@ifundefined{DeclareFontDefinitionEncodingAlias}{%
+ \@latex@error{File `mlltxchg.def' seems to be corrupted}%
+ {File `mlltxchg.def' has to define the new declaration
+ \noexpand\DeclareFontDefinitionEncodingAlias which is
+ not the case}%
+ }{}
+%%
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ===== BEGIN -- OT1enc.def:
+%%
+%% The following declarations are copied from
+%% file `OT1enc.def' resp. `ot1enc.def'
+%% replacing "OT1" by "LO1":
+%%
+\DeclareFontEncoding{LO1}{}{}
+%
+% Make LaTeX read OT1*.fd files for encoding LO1:
+\DeclareFontDefinitionEncodingAlias{LO1}{OT1}
+%
+\DeclareTextAccent{\"}{LO1}{127}
+\DeclareTextAccent{\'}{LO1}{19}
+\DeclareTextAccent{\.}{LO1}{95}
+\DeclareTextAccent{\=}{LO1}{22}
+\DeclareTextAccent{\^}{LO1}{94}
+\DeclareTextAccent{\`}{LO1}{18}
+\DeclareTextAccent{\~}{LO1}{126}
+\DeclareTextAccent{\H}{LO1}{125}
+\DeclareTextAccent{\u}{LO1}{21}
+\DeclareTextAccent{\v}{LO1}{20}
+\DeclareTextAccent{\r}{LO1}{23}
+%% from `plain.tex' upto 3.151592 and LaTeX <1998/06/01>:
+%\def\sh@ft#1{\dimen@.00#1ex\multiply\dimen@\fontdimen1\font
+% \kern-.0156\dimen@} % compensate for slant in lowered accents
+%% from `plain.tex' 3.1415926 (with slightly changes):
+\begingroup \catcode`P=12 \catcode`T=12 \lccode`P=`p \lccode`T=`t
+\lowercase{\endgroup \def\loONEgetf@ctor#1PT}{#1}%
+\def\loONEsh@ft#1{\dimen@#1%
+ \kern\expandafter\loONEgetf@ctor\the\fontdimen1\font
+ \dimen@} % kern by #1 times the current slant
+\DeclareTextCommand{\b}{LO1}[1]% \sh@ft{29}
+ {{\o@lign{\relax#1\crcr\hidewidth\loONEsh@ft{-3ex}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}}
+\DeclareTextCommand{\c}{LO1}[1]
+ {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
+ \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
+\DeclareTextCommand{\d}{LO1}[1]% \sh@ft{10}
+ {{\o@lign{\relax#1\crcr\hidewidth\loONEsh@ft{-1ex}.\hidewidth}}}
+\DeclareTextSymbol{\AE}{LO1}{29}
+\DeclareTextSymbol{\OE}{LO1}{30}
+\DeclareTextSymbol{\O}{LO1}{31}
+\DeclareTextSymbol{\ae}{LO1}{26}
+\DeclareTextSymbol{\i}{LO1}{16}
+\DeclareTextSymbol{\j}{LO1}{17}
+\DeclareTextSymbol{\oe}{LO1}{27}
+\DeclareTextSymbol{\o}{LO1}{28}
+\DeclareTextSymbol{\ss}{LO1}{25}
+\DeclareTextSymbol{\textemdash}{LO1}{124}
+\DeclareTextSymbol{\textendash}{LO1}{123}
+\DeclareTextSymbol{\textexclamdown}{LO1}{60}
+\DeclareTextSymbol{\textquestiondown}{LO1}{62}
+\DeclareTextSymbol{\textquotedblleft}{LO1}{92}
+\DeclareTextSymbol{\textquotedblright}{LO1}{`\"}
+\DeclareTextSymbol{\textquoteleft}{LO1}{`\`}
+\DeclareTextSymbol{\textquoteright}{LO1}{`\'}
+%\DeclareTextCommand{\aa}{LO1}
+% {{\accent23a}}
+%-%%--> \newcommand{\aa}{\r a}
+\DeclareTextCommand{\L}{LO1}
+ {\leavevmode\setbox\z@\hbox{L}\hb@xt@\wd\z@{\hss\@xxxii L}}
+\DeclareTextCommand{\l}{LO1}
+ {{\@xxxii l}}
+%\DeclareTextCommand{\AA}{LO1}
+% {\leavevmode\setbox\z@\hbox{h}\dimen@\ht\z@\advance\dimen@-1ex%
+% \rlap{\raise.67\dimen@\hbox{\char23}}A}
+%-%%--> \newcommand{\AA}{\r A}
+%\DeclareTextCommand{\SS}{OT1}
+% {SS}
+%-%%--> only declared in `t1enc.def' for T1
+\DeclareTextCommand{\textdollar}{LO1}{{%
+ \ifdim \fontdimen\@ne\font >\z@
+ \slshape
+ \else
+ \upshape
+ \fi
+ \char`\$}}
+\DeclareTextCommand{\textsterling}{LO1}{{%
+ \ifdim \fontdimen\@ne\font >\z@
+ \itshape
+ \else
+ \fontshape{ui}\selectfont
+ \fi
+ \char`\$}}
+%%
+%% ===== END -- OT1enc.def.
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ===== BEGIN -- MLTeX specific definitions:
+%%
+%% %%%%%%%%%% 1) MLTeX?
+%%
+%% Exists \charsubdef, i.e. are we using MLTeX?
+%% (The group construction keeps \charsubdef undefined.)
+%%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname charsubdef\endcsname\relax
+ \PackageWarningNoLine{mltex}%
+ {Encoding `LO1' assumes the use of MLTeX,\MessageBreak
+ but this TeX does not have the MLTeX extensions.\MessageBreak
+ I will proceed as if `LO1' are equal to `OT1'}%
+ \expandafter\endinput
+\fi
+%%
+%% %%%%%%%%%% 2) Additional declarations:
+%%
+%% Now declare
+%% - all character substitution definitions using \charsubdef
+%% (if not yet done)
+%% - all additional font encoding definitions
+%%
+%% ========== original MLTeX file "compatible.tex":
+%%
+%% \i \j \aa -- OT1enc.def
+%% \' \` \v \u \= \^ \. \H \~ \" \c -- OT1enc.def
+%% \^^_ \^^S \^^D -- removed
+%%
+%%
+%% ========== original MLTeX file "extdef.tex":
+%%
+%% \aa \AA \ae \AE \oe \OE \o \O \ss -- OT1enc.def
+%% copyright sterling ^^E -- removed
+%%
+%% \catcode, \lccode, \uccode assignments are not necessary
+%% or are done in `inputenc'.
+%%
+%% \charsubdef assignments are done only if not yet done
+%%
+%%
+%% `LO1enc.def' already loaded once, i.e. \charsubdef
+%% declarations already done? (Exists \@@charsubdef?)
+%%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname @@charsubdef\endcsname\relax
+\newcommand{\ml@DCT}[3]{%
+ % (a) assign \charsubdef using LO1/OT1 accent glyph codes
+ \global\charsubdef #3=%
+ % accent glyph:
+ \ifnum`#1=`\`18 %
+ \else\ifnum`#1=`\'19 %
+ \else\ifnum`#1=`\^94 %
+ \else\ifnum`#1=`\"127 %
+ \else\ifnum`#1=`\~126 %
+ \else\ifnum`#1=`\v20 %
+ \else\ifnum`#1=`\u21 %
+ \else\ifnum`#1=`\r23 %
+ \else\ifnum`#1=`\c24 %
+ \else\ifnum`#1=`\.95 %
+ \else\ifnum`#1=`\H125 %
+ \else 256 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ % base character glyph:
+ \ifx#2\i16%
+ \else\ifnum`#2=`\i16%
+ \else `#2\fi\fi\relax
+ % (b) assign \lccode, if \lccode = 0
+ % (necessary for hyphenation!)
+ \ifnum\lccode#3>\z@
+ \else
+ \begingroup \count@=#3\relax
+ % majuscule: 128-159 and 192-223
+ % minuscule: 160-191 and 224-255
+ % delta: +/- 32:
+ \ifnum\count@<224
+ \ifnum\count@>191
+ \advance\count@ 32\relax
+ \else \ifnum\count@<160
+ \advance\count@ 32\relax
+ \fi\fi
+ \fi
+ \def\x##1{\endgroup \lccode#3=##1\relax}%
+ \expandafter\x\expandafter{\number\count@}%
+ \fi
+ % (c) \DeclareTextComposite for font encoding LO1
+ \DeclareTextComposite{#1}{LO1}{#2}{#3}}
+\else
+\newcommand{\ml@DCT}[3]{%
+ % (a) assign \lccode, if \lccode = 0
+ % (necessary for hyphenation!)
+ \ifnum\lccode#3>\z@
+ \else
+ \begingroup \count@=#3\relax
+ % majuscule: 128-159 and 192-223
+ % minuscule: 160-191 and 224-255
+ % delta: +/- 32:
+ \ifnum\count@<224
+ \ifnum\count@>191
+ \advance\count@ 32\relax
+ \else \ifnum\count@<160
+ \advance\count@ 32\relax
+ \fi\fi
+ \fi
+ \def\x##1{\endgroup \lccode#3=##1\relax}%
+ \expandafter\x\expandafter{\number\count@}%
+ \fi
+ % (b) \DeclareTextComposite for font encoding LO1
+ \DeclareTextComposite{#1}{LO1}{#2}{#3}}
+\fi
+%
+%
+% ---------- `a 'a ^a ~a "a \u{a} \r{a}
+%
+\ml@DCT{\`}{A}{192}
+\ml@DCT{\'}{A}{193}
+\ml@DCT{\^}{A}{194}
+\ml@DCT{\~}{A}{195}
+\ml@DCT{\"}{A}{196}
+\ml@DCT{\`}{a}{224}
+\ml@DCT{\'}{a}{225}
+\ml@DCT{\^}{a}{226}
+\ml@DCT{\~}{a}{227}
+\ml@DCT{\"}{a}{228}
+%
+\ml@DCT{\u}{A}{128}
+\ml@DCT{\u}{a}{160}
+\ml@DCT{\r}{A}{197}
+\ml@DCT{\r}{a}{229}
+%
+% ---------- \c{c} 'c \v{c}
+%
+\ml@DCT{\c}{C}{199}
+\ml@DCT{\c}{c}{231}
+%
+\ml@DCT{\'}{C}{130}
+\ml@DCT{\v}{C}{131}
+\ml@DCT{\'}{c}{162}
+\ml@DCT{\v}{c}{163}
+%
+% ---------- \v{D} (\v{d} = d'!)
+%
+\ml@DCT{\v}{D}{132}
+%
+% ---------- `e 'e ^e "e \v{e}
+%
+\ml@DCT{\`}{E}{200}
+\ml@DCT{\'}{E}{201}
+\ml@DCT{\^}{E}{202}
+\ml@DCT{\"}{E}{203}
+\ml@DCT{\`}{e}{232}
+\ml@DCT{\'}{e}{233}
+\ml@DCT{\^}{e}{234}
+\ml@DCT{\"}{e}{235}
+%
+\ml@DCT{\v}{E}{133}
+\ml@DCT{\v}{e}{165}
+%
+% ---------- \u{g}
+%
+\ml@DCT{\u}{G}{135}
+\ml@DCT{\u}{g}{167}
+%
+% ---------- `i 'i ^i "i .i
+%
+\ml@DCT{\`}{I}{204}
+\ml@DCT{\'}{I}{205}
+\ml@DCT{\^}{I}{206}
+\ml@DCT{\"}{I}{207}
+\ml@DCT{\`}{i}{236}
+\ml@DCT{\`}{\i}{236}
+\ml@DCT{\'}{i}{237}
+\ml@DCT{\'}{\i}{237}
+\ml@DCT{\^}{i}{238}
+\ml@DCT{\^}{\i}{238}
+\ml@DCT{\"}{i}{239}
+\ml@DCT{\"}{\i}{239}
+%
+\ml@DCT{\.}{I}{157}
+\DeclareTextComposite{\.}{LO1}{i}{`\i}
+\DeclareTextComposite{\.}{LO1}{\i}{`\i}
+%
+% ---------- (\v{L} \v{l} => L' l'!)
+%
+% ---------- ~n 'n \v{n}
+%
+\ml@DCT{\~}{N}{209}
+\ml@DCT{\~}{n}{241}
+%
+\ml@DCT{\'}{N}{139}
+\ml@DCT{\v}{N}{140}
+\ml@DCT{\'}{n}{171}
+\ml@DCT{\v}{n}{172}
+%
+% ---------- `o 'o ^o ~o "o \H{o}
+%
+\ml@DCT{\`}{O}{210}
+\ml@DCT{\'}{O}{211}
+\ml@DCT{\^}{O}{212}
+\ml@DCT{\~}{O}{213}
+\ml@DCT{\"}{O}{214}
+\ml@DCT{\`}{o}{242}
+\ml@DCT{\'}{o}{243}
+\ml@DCT{\^}{o}{244}
+\ml@DCT{\~}{o}{245}
+\ml@DCT{\"}{o}{246}
+%
+\ml@DCT{\H}{O}{142}
+\ml@DCT{\H}{O}{174}
+%
+% ---------- 'r \v{r}
+%
+\ml@DCT{\'}{R}{143}
+\ml@DCT{\v}{R}{144}
+\ml@DCT{\'}{r}{175}
+\ml@DCT{\v}{r}{176}
+%
+% ---------- 's \v{s} \c{s}
+%
+\ml@DCT{\'}{S}{145}
+\ml@DCT{\v}{S}{146}
+\ml@DCT{\c}{S}{147}
+\ml@DCT{\'}{s}{177}
+\ml@DCT{\v}{s}{178}
+\ml@DCT{\c}{s}{179}
+%
+% ---------- \v{T} \c{t} (v{t} = t'!)
+%
+\ml@DCT{\v}{T}{148}
+\ml@DCT{\c}{T}{149}
+\ml@DCT{\c}{t}{181}
+%
+% ---------- `u 'u ^u "u \H{u} \r{u}
+%
+\ml@DCT{\`}{U}{217}
+\ml@DCT{\'}{U}{218}
+\ml@DCT{\^}{U}{219}
+\ml@DCT{\"}{U}{220}
+\ml@DCT{\`}{u}{249}
+\ml@DCT{\'}{u}{250}
+\ml@DCT{\^}{u}{251}
+\ml@DCT{\"}{u}{252}
+%
+\ml@DCT{\H}{U}{150}
+\ml@DCT{\r}{U}{151}
+\ml@DCT{\H}{u}{182}
+\ml@DCT{\r}{u}{183}
+%
+% ---------- 'y "y
+%
+\ml@DCT{\'}{Y}{221}
+\ml@DCT{\'}{y}{253}
+%
+\ml@DCT{\"}{Y}{152}
+\ml@DCT{\"}{y}{184}
+%
+% ---------- 'z \v{z} .z
+%
+\ml@DCT{\'}{Z}{153}
+\ml@DCT{\v}{Z}{154}
+\ml@DCT{\.}{Z}{155}
+\ml@DCT{\'}{z}{185}
+\ml@DCT{\v}{z}{186}
+\ml@DCT{\.}{z}{187}
+%
+%
+\let\ml@DCT=\undefined
+%%
+%%
+%% %%%%%%%%%% 3) Switch off \charsubdef
+%%
+\newcommand{\@@charsubdef}{}
+\let\@@charsubdef=\charsubdef % save primitive meaning
+%%
+\renewcommand{\charsubdef}{%
+ \PackageWarning{mltex}%
+ {\string\charsubdef\space declarations should not be\MessageBreak
+ changed in the midst of a document.\MessageBreak
+ I will proceed as if you haven't used\MessageBreak
+ this declaration}%
+ % Redefine \charsubdef <charnum> [=] <charnum> <charnum>
+ % to read all three <charnum>:
+ \begingroup \afterassignment\char@subdef \count@=}
+\newcommand{\char@subdef}{%
+ \afterassignment\char@@subdef \count@}
+\newcommand{\char@@subdef}{%
+ \afterassignment\endgroup \count@=}
+%%
+\endinput
+%%
+%% End of file `lo1enc.def'.
diff --git a/macros/latex/contrib/mltex/mlltxchg.def b/macros/latex/contrib/mltex/mlltxchg.def
new file mode 100644
index 0000000000..eb927edeb1
--- /dev/null
+++ b/macros/latex/contrib/mltex/mlltxchg.def
@@ -0,0 +1,265 @@
+%%
+%% This is file `mlltxchg.def'.
+%% Copyright (C) 1996,1997,1998,1999 Bernd Raichle.
+%%
+%% -----------------------------------------------------------------
+%% IMPORTANT NOTICE:
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%% -----------------------------------------------------------------
+%%
+%% CHANGES:
+%% 1997/09/03 0.1a
+%% Changes for LaTeX Kernel <1997/06/01>.
+%% 1998/10/21 0.1b
+%% Checked changes for LaTeX Kernel <1998/06/01>.
+%% 1998/11/17 0.9a
+%% Final release changes:
+%% Renamed file from ``mlltxchg.def'' to ``mlltxchg.def''.
+%% Added \Fd@<alias> to map from an alias to the original
+%% font encoding (needed for \mlfontencoding).
+%% 1998/12/21 0.9b
+%% Removed warning \message; added \GenericInfo that some
+%% NFSS kernel macros has to be changed.
+%% 1999/03/08 0.9c
+%% Changed licensing conditions to LPPL.
+%%
+%% ------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}[1996/12/01] % Need mono-case file names!
+
+\ProvidesFile{mlltxchg.def}%
+ [1999/03/08 v0.9c %
+ MLTeX/LaTeX changes of LaTeX Kernel (NFSS) (br)]
+\GenericInfo{(mlltxchg)}%
+ {MLTeX Support Info: Have to change NFSS kernel macros}
+
+%% Provide the new NFSS declaration
+%%
+%% \DeclareFontDefinitionEncodingAlias
+%% {<alias-fontenc>}{<fontenc>}
+%%
+%% which declares that for the font encoding <alias-fontenc>
+%% NFSS should access and use the fd files of <fontenc>.
+%% This can only be done if the fonts in font encoding <fontenc>
+%% are only subsets of the fonts in font encoding <alias-fontenc>.
+%%
+\newcommand{\DeclareFontDefinitionEncodingAlias}[2]{%
+ \expandafter\ifx\csname T@#2\endcsname\relax
+ \@font@warning{Font encoding #1 undefined %
+ (used for fd encoding alias)}%
+ \else
+ \expandafter\ifx\csname T@#1\endcsname\relax
+ \else
+ \@font@info{Redeclaring font def. encoding alias for #1}%
+ \fi
+ \expandafter\xdef\csname fD@#1\endcsname{#2}%
+ \expandafter\xdef\csname Fd@#2\endcsname{#1}%
+ \fi}
+\@onlypreamble\DeclareFontDefinitionEncodingAlias
+
+
+%% Load the .fd file of the FD Encoding Alias if it exists.
+%%
+%% From file: ``ltfssbas.dtx''
+%%
+%% .fd file has not to be loaded if
+%% - encoding+family was already loaded
+%% - an fd encoding alias was defined and
+%% the aliased encoding+family was already loaded
+%%
+
+%% Original definition from <1996/06/01>
+%\def\try@load@fontshape{%
+% \expandafter
+% \ifx\csname \f@encoding+\f@family\endcsname\relax
+% \@font@info{Try loading font information for
+% \f@encoding+\f@family}%
+% \global\expandafter\let
+% \csname\f@encoding+\f@family\endcsname\@empty
+% \makeatletter
+% \nfss@catcodes
+% \@input@{\f@encoding\f@family.fd}%
+% \fi
+%}
+%% Original definition from <1995/12/01>...<1998/06/01>
+%\def\try@load@fontshape{%
+% \expandafter
+% \ifx\csname \f@encoding+\f@family\endcsname\relax
+% \@font@info{Try loading font information for
+% \f@encoding+\f@family}%
+% \global\expandafter\let
+% \csname\f@encoding+\f@family\endcsname\@empty
+% % \makeatletter
+% \nfss@catcodes
+% \let\nfss@catcodes\relax
+% \edef\reserved@a{%
+% \lowercase{%
+% \noexpand\InputIfFileExists{\f@encoding\f@family.fd}}}%
+% \reserved@a\relax
+% {\@input@{\f@encoding\f@family.fd}}%
+% \fi}
+
+\def\ml@try@load@fontshape#1{%
+ \@font@info{Try loading font information for
+ \f@encoding+\f@family}%
+ \global\expandafter\let
+ \csname\f@encoding+\f@family\endcsname\@empty
+%-br%% following line from <1995/12/01>...<1997/06/01>, needed?
+%-br% \makeatletter
+ \nfss@catcodes
+ \let\nfss@catcodes\relax
+ \edef\reserved@a{%
+ \lowercase{%
+ \noexpand\InputIfFileExists{#1\f@family.fd}}}%
+ \reserved@a\relax
+ {\@input@{#1\f@family.fd}}%
+ }
+\def\try@load@fontshape{%
+ \expandafter
+ \ifx\csname \f@encoding+\f@family\endcsname\relax
+ \expandafter
+ \ifx\csname fD@\f@encoding\endcsname\relax
+ \ml@try@load@fontshape\f@encoding
+ \else
+ \expandafter
+ \ifx\csname \csname fD@\f@encoding\endcsname+\f@family\endcsname\relax
+ \expandafter\ml@try@load@fontshape\csname fD@\f@encoding\endcsname
+ \fi
+ \fi
+ \fi}
+
+
+%% Access the FD Encoding Alias as font encoding if it exists:
+%%
+%% From file: ``ltfssbas.dtx''
+%%
+
+%% Original definition from <1994/06/01>...<1998/06/01>
+%\def\curr@fontshape{\f@encoding/\f@family/\f@series/\f@shape}
+
+\def\curr@fontshape{%
+ \expandafter\ifx\csname fD@\f@encoding\endcsname\relax
+ \f@encoding
+ \else
+ \csname fD@\f@encoding\endcsname
+ \fi /\f@family/\f@series/\f@shape}
+
+
+%% When NFSS is checking defaults, use FD Encoding Alias it it exists:
+%%
+%% From file: ``ltfssdcl.dtx''
+%%
+
+%% Original definition from <1994/06/01>...<1998/06/01>
+%\def\process@table{%
+% \def\cdp@elt##1##2##3##4{%
+% \@font@info{Checking defaults for
+% ##1/##2/##3/##4}%
+% \expandafter
+% \ifx\csname##1/##2/##3/##4\endcsname\relax
+% \begingroup
+% \def\f@encoding{##1}\def\f@family{##2}%
+% \try@load@fontshape
+% \endgroup
+% \fi
+% \expandafter
+% \ifx\csname##1/##2/##3/##4\endcsname\relax
+% \@latex@error{This NFSS system isn't set up properly}%
+% {For encoding scheme ##1 the defaults
+% ##2/##3/##4 do not form a valid font shape}%
+% \else
+% \@font@info{... okay}%
+% \fi}%
+% \cdp@list
+% \begingroup
+% \escapechar\m@ne
+% \error@fontshape
+% \expandafter\ifx\csname \curr@fontshape\endcsname\relax
+% \begingroup
+% \try@load@fontshape
+% \endgroup
+% \fi
+% \expandafter\ifx\csname \curr@fontshape\endcsname\relax
+% \@latex@error{This NFSS system isn't set up properly}%
+% {The system maintainer forgot to specify a suitable
+% substitution
+% font shape using the \noexpand\DeclareErrorFont
+% command}%
+% \fi
+% \endgroup
+% \let\select@group\document@select@group
+% \fontencoding{\encodingdefault}%
+% \fontfamily{\familydefault}%
+% \fontseries{\seriesdefault}%
+% \fontshape{\shapedefault}%
+% \everyjob{}%
+%}
+
+\def\process@table{%
+ \def\cdp@elt##1##2##3##4{%
+ \@font@info{Checking defaults for
+ ##1/##2/##3/##4}%
+ \expandafter
+ \ifx\csname##1/##2/##3/##4\endcsname\relax
+ \begingroup
+ \def\f@encoding{##1}\def\f@family{##2}%
+ \try@load@fontshape
+ \endgroup
+ \fi
+%br% new - begin (uses \ifnum 0<0[1]\relax ... trick!)
+ \ifnum 0<0%
+%br% new - end
+ \expandafter
+ \ifx\csname##1/##2/##3/##4\endcsname\relax
+%br% new - begin
+ \expandafter
+ \ifx\csname fD@##1\endcsname\relax
+ 1%
+ \else
+ \expandafter
+ \ifx\csname \csname fD@##1\endcsname
+ /##2/##3/##4\endcsname\relax
+ 1%
+ \fi
+ \fi
+ \fi \relax
+%br% new - end
+ \@latex@error{This NFSS system isn't set up properly}%
+ {For encoding scheme ##1 the defaults
+ ##2/##3/##4 do not form a valid font shape}%
+ \else
+ \@font@info{... okay}%
+ \fi}%
+ \cdp@list
+ \begingroup
+ \escapechar\m@ne
+ \error@fontshape
+ \expandafter\ifx\csname \curr@fontshape\endcsname\relax
+ \begingroup
+ \try@load@fontshape
+ \endgroup
+ \fi
+ \expandafter\ifx\csname \curr@fontshape\endcsname\relax
+ \@latex@error{This NFSS system isn't set up properly}%
+ {The system maintainer forgot to specify a suitable
+ substitution
+ font shape using the \noexpand\DeclareErrorFont
+ command}%
+ \fi
+ \endgroup
+ \let\select@group\document@select@group
+ \fontencoding{\encodingdefault}%
+ \fontfamily{\familydefault}%
+ \fontseries{\seriesdefault}%
+ \fontshape{\shapedefault}%
+ \everyjob{}%
+}
+\@onlypreamble\process@table
+
+\endinput
+%%
+%% End of file `mlltxchg.def'.
diff --git a/macros/latex/contrib/mltex/mltex.sty b/macros/latex/contrib/mltex/mltex.sty
new file mode 100644
index 0000000000..53a80be131
--- /dev/null
+++ b/macros/latex/contrib/mltex/mltex.sty
@@ -0,0 +1,72 @@
+%%
+%% This is file `mltex.sty'.
+%% Copyright (C) 1996,1997,1998,1999 Bernd Raichle
+%%
+%% -----------------------------------------------------------------
+%% IMPORTANT NOTICE:
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%% -----------------------------------------------------------------
+%%
+%% CHANGES:
+%% 1998/11/17 0.9a
+%% New file; only final release changes.
+%% 1998/12/21 0.9b
+%% Removed warning \message.
+%% 1999/03/08 0.9c
+%% Added \selectfont after \fontencoding to force switching
+%% accent defs from OT1 to LO1.
+%% Changed licensing conditions to LPPL.
+%%
+%% ------------------------------------------------------------
+%%
+%% <1994/12/01> needed for \DeclareText...
+\NeedsTeXFormat{LaTeX2e}[1994/12/01] % Update your LaTeX version!
+
+\ProvidesPackage{mltex}[1999/08/03 v0.9c %
+ MLTeX/LaTeX package (br)]
+
+\input{lo1enc.def}
+
+\@ifundefined{mlfontencoding}{}{%
+ \PackageError{mltex}%
+ {Package was loaded twice}%
+ {This package will probably not work if loaded twice.}%
+}
+
+%% save original definition of \fontencoding
+\newcommand{\origfontencoding}{}%
+\let\origfontencoding=\fontencoding
+
+%% provide \mlfontencoding
+\newcommand{\mlfontencoding}[1]{%
+ \expandafter\ifx\csname Fd@#1\endcsname\relax
+ \origfontencoding{#1}%
+ \else
+ \expandafter\origfontencoding
+ \expandafter{\csname Fd@#1\endcsname}%
+ \fi}%
+
+\newif\if@mltexreplace
+\DeclareOption{switchonly}{\@mltexreplacefalse}
+\DeclareOption{replace}{\@mltexreplacetrue}
+
+\ExecuteOptions{replace}
+\ProcessOptions\relax
+
+\if@mltexreplace
+ \PackageInfo{mltex}{Redefining \noexpand\fontencoding!}%
+ \let\fontencoding=\mlfontencoding
+ \expandafter\fontencoding\expandafter{\f@encoding}\selectfont
+\else
+ \PackageInfo{mltex}{Switch to `LO1' font encoding only.}%
+ \fontencoding{LO1}\selectfont%
+ \renewcommand\encodingdefault{LO1}%
+\fi
+
+\endinput
+%%
+%% End of file `mltex.sty'.
diff --git a/macros/latex/contrib/mltex/mltex.txt b/macros/latex/contrib/mltex/mltex.txt
new file mode 100644
index 0000000000..8b629aeb2a
--- /dev/null
+++ b/macros/latex/contrib/mltex/mltex.txt
@@ -0,0 +1,87 @@
+ How to use MLTeX with LaTeX
+
+ Bernd Raichle
+
+ 17 November 1998
+
+
+This document contains instructions on how to use MLTeX's \charsubdef
+extension with LaTeX. Before reading this file, you should read
+`install.txt', which will explain how the LaTeX installation works.
+
+This file describes:
+
+ * How to create the LaTeX format with MLTeX.
+
+ * How to use MLTeX with LaTeX.
+
+
+
+CREATING THE LaTeX FORMAT
+=========================
+
+To create the LaTeX format, you should follow the standard LaTeX
+installation guide.
+
+ - Do NOT include any MLTeX specific file into your LaTeX format!
+
+ - Do NOT use the obsolete files `compatible.tex', `extdef.tex',
+ `masthyph.tex', or any other file from the old MLTeX distribution!
+
+ - Depending on your TeX implementation there is either a special
+ version of the `initex' program provided which is called `mlinitex',
+ `initex -mltex', or `tex -ini -mltex'.
+ Use this program resp. command line options when creating the LaTeX
+ format.
+
+As a result your LaTeX format file `latex.fmt' should not contain any
+MLTeX specific definitions or declarations.
+
+
+
+USING THE MLTeX EXTENSION
+=========================
+
+To enable the MLTeX extension, you simply use the standard LaTeX
+package `fontenc' with the MLTeX font encoding LO1 instead of OT1,
+e.g. replace
+
+ \usepackage[T1,OT1]{fontenc}
+
+by
+
+ \usepackage[T1,LO1]{fontenc}
+
+which will choose LO1 as the default font encoding. If you want to
+choose another default font encoding, you can switch to LO1 by
+
+ \fontencoding{LO1}\selectfont
+
+within your document. Nonetheless you have to declare the new font
+encoding `LO1' by loading it using the package `fontenc'.
+
+For LaTeX's font encoding OT1 the associated MLTeX font encoding is
+provided with a basic set of fd files. This font encoding is called
+LO1 (for M_L_TeX's _O_T1) and is a superset of OT1.
+
+
+Another simpler way to use this MLTeX extended font encoding is
+provided by the package `mltex'. By including
+
+ \usepackage{mltex}
+
+in the document preamble all references to OT1 will get replaced by
+LO1. If you don't want to hide OT1 totally, you can select LO1 as
+usual default font encoding by using the package option `switchonly',
+e.g. by including
+
+ \usepackage[switchonly]{mltex}
+
+in the document preamble.
+
+
+--- Copyright (C) 1996-1998 Bernd Raichle. All rights reserved ---
+This file can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt; either
+version 1 of the License, or any later version.
diff --git a/macros/latex/contrib/mltex/testmlft.tex b/macros/latex/contrib/mltex/testmlft.tex
new file mode 100644
index 0000000000..878a9420d2
--- /dev/null
+++ b/macros/latex/contrib/mltex/testmlft.tex
@@ -0,0 +1,134 @@
+%%
+%% This is file `testmlsw.tex'.
+%% Copyright (C) 1996-1998 Bernd Raichle; all rights reserved.
+%%
+%% See copyright statement in file `lo1enc.def'.
+%%
+%%
+%% - Checks hyphenation w.r.t font encoding alias.
+%% - Checks \DeclareTextComposite declarations.
+%% - Can and should be used with a standard TeX or MLTeX!
+%%
+%% CHANGES:
+%% 1998/11/17 0.9a
+%% First released version.
+%% 1999/03/09 0.9b
+%% Added lines with composite and special glyphs because
+%% I have missed a definition in `lo1enc.def' making the
+%% accent macros \d and \b fail for LO1.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{testmlft.tex}%
+ [1999/03/09 v0.9b Test file for MLTeX LaTeX support (br)]
+\documentclass{minimal}
+\nofiles
+\newcommand{\type}[1]{\typeout{^^J#1}#1}
+
+%% For non-MLTeX and/or TeX versions < 3.0
+%% define dummys for \charsubdefmax and \errorcontextlines,
+%% these registers are not changed within this test file.
+\ifx\charsubdefmax\undefined \chardef\charsubdefmax=0 \fi
+\ifx\errorcontextlines\undefined \else \errorcontextlines=2\fi
+
+\typeout{^^J=== charsubdefmax before: \number\charsubdefmax.^^J}
+\usepackage[switchonly]{mltex}
+\typeout{^^J=== charsubdefmax after: \number\charsubdefmax.^^J}
+
+\usepackage[latin1]{inputenc}
+
+\begin{document}
+
+\type{=== Current encoding is
+ \csname cf@encoding\endcsname\space
+ (\csname f@encoding\endcsname).}
+
+
+--- Simple Tests ---
+
+\type{=== Test using LO1 font encoding, accent macros, Latin-1 chars:}
+t\"ater \'el\`eve élève
+\showhyphens{\"ubertragen \'el\`eve élève}
+
+
+\expandafter\ifx\csname l@german\endcsname\relax \else
+{\language=\csname l@german\endcsname
+
+\type{=== Test using LO1 font encoding, german hyphenation patterns:}
+t\"ater \'el\`eve
+\showhyphens{\"ubertragen \'el\`eve}
+}
+\fi
+
+
+\expandafter\ifx\csname l@german\endcsname\relax \else
+{\language=\csname l@french\endcsname
+
+\type{=== Test using LO1 font encoding, french hyphenation patterns:}
+t\"ater \'el\`eve
+\showhyphens{\"ubertragen \'el\`eve}
+\showhyphens{abondamment abstinence anh\'eler d\'el\'egu\'e}
+
+\fontencoding{OT1}\selectfont
+\renewcommand{\encodingdefault}{OT1}%% for \showhyphens!
+\type{=== Test using OT1 font encoding, french hyphenation patterns:}
+t\"ater \'el\`eve d\'el\'egu\'e
+\showhyphens{\"ubertragen \'el\`eve}
+\showhyphens{abondamment abstinence anh\'eler d\'el\'egu\'e}
+}
+\fi
+
+
+\def\test{%
+
+\`A \'A \^A \~A \"A \u{A} \r{A}
+\`a \'a \^a \~a \"a \u{a} \r{a}
+
+\c{C} \'C \v{C} \c{c} \'c \v{c}
+\v{D}
+\u{G} \u{g}
+
+\`E \'E \^E \~E \"E \v{E}
+\`e \'e \^e \~e \"e \v{e}
+
+\`I \'I \^I \~I \"I \.I
+\`i \'i \^i \~i \"i \.i
+\`{\i} \'{\i} \^{\i} \~{\i} \"{\i} \.{\i}
+
+\~N \'N \v{N} \~n \'n \v{n}
+
+\`O \'O \^O \~O \"O \H{O}
+\`o \'o \^o \~o \"o \H{o}
+
+\'R \v{R} \'r \v{r}
+
+\'S \v{S} \c{S} \'s \v{s} \c{s}
+
+\v{T} \c{T} \c{t}
+
+\`U \'U \^U \~U \"U \H{U} \r{U}
+\`u \'u \^u \~u \"u \H{u} \r{u}
+
+\'Y \'y
+
+\'Z \v{Z} \.Z \'z \v{z} \.z
+
+composite glyphs:
+\"b \"B \'b \'B \.b \.B \=b \=B \^b \^B \`b \`B
+\~b \~B \H{b} \H{B} \u{b} \u{B} \v{b} \v{B} \r{b} \r{B}
+\b{b} \b{B} \c{b} \c{B} \d{b} \d{B}
+
+special glyphs: \AE \OE \O \ae \i \j \oe \o \ss
+\textemdash \textendash \textexclamdown \textquestiondown
+\textquotedblleft \textquotedblright
+\textquoteleft \textquoteright
+\L \l \textdollar \textsterling
+}
+
+--- Major Tests ---
+
+{\fontencoding{T1}\selectfont --- T1:\par \test\par}
+{\fontencoding{OT1}\selectfont --- OT1:\par \test\par}
+{\fontencoding{LO1}\selectfont --- LO1:\par \test\par}
+
+--- End of Tests ---
+\end{document}
diff --git a/macros/latex/contrib/mltex/testmlsw.tex b/macros/latex/contrib/mltex/testmlsw.tex
new file mode 100644
index 0000000000..dac77de892
--- /dev/null
+++ b/macros/latex/contrib/mltex/testmlsw.tex
@@ -0,0 +1,105 @@
+%%
+%% This is file `testmlsw.tex'.
+%% Copyright (C) 1996-1998 Bernd Raichle; all rights reserved.
+%%
+%% See copyright statement in file `lo1enc.def'.
+%%
+%%
+%% - Checks the font encoding switching/alias mechanism.
+%% - Can and should be used with a standard TeX or MLTeX!
+%%
+%% CHANGES:
+%% 1998/11/17 0.9a
+%% First released version.
+%% 1999/03/09 0.9b
+%% Added some comments in the output about the shown effects.
+%% Added \hfuzz=30pt to suppress overfull \hbox warnings.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{testmlsw.tex}%
+ [1999/03/09 v0.9b Test file for MLTeX LaTeX support (br)]
+\documentclass[a4paper]{article}
+\listfiles
+
+%%% Make MLTeX's OT1 called "LO1" the default encoding:
+\usepackage[LO1]{fontenc}
+
+%%% Make "OT1" (resp. "LO1") default encoding, load "LO1":
+%\usepackage[T1,LO1]{fontenc}
+
+%%% Make "T1" default encoding, load "LO1":
+%\usepackage[LO1,T1]{fontenc}
+
+%%% Make "T1" default encoding, do not load "LO1":
+%%% (this won't work, because the new font encoding "LO1" must
+%%% be declared before its first use, similar to "TS1").
+%\usepackage[T1]{fontenc}
+
+%% Make "LO1" default encoding, map all accesses
+%% of "OT1" to "LO1":
+%\usepackage{mltex}
+
+\usepackage[german]{babel}
+
+% Test for "Package Warning":
+\expandafter\ifx\csname charsubdef\endcsname\relax \else
+ \typeout{}\typeout{===== The following warning is ok:}
+ \charsubdef 228=\ifnum`\"=`\"24 \else 256\fi \ifx a\i16\else `Y\fi\relax
+\fi
+
+\typeout{}\typeout{===== OK, the NFSS system should be set up properly.}
+\begin{document}
+
+\typeout{======= \protect\encodingdefault=\encodingdefault\space =====}
+\setlength{\columnsep}{2pc}
+\twocolumn
+
+\newcommand{\testtext}{%
+ {\selectlanguage{german}%
+ Beim Treffen in M\"unster im M\"arz 1999 w\"urden \"au\ss erst
+ unerh\"orte \"Au\ss erungen \"uber verf\"ugbare \"Ubertragungen
+ st\"orender Einfl\"usse eingeschr\"ankter \"Offnungss\"atze
+ gew\"ohnlicher bl\"odsinniger G\"ansef\"u\ss chen \"uber
+ gebr\"auchliche Anf\"uhrungszeichen \"offentlich \"uberm\"a\ss ig
+ vorgef\"uhrt.
+ \par}%
+ %
+ Cette notice d\'ecrit comment utiliser l'option de style
+ ``french'' avec \TeX{} ou \LaTeX{} (appel\'ee \emph{extension}
+ dans ce dernier cas). Cette option a \'et\'e cr\'e\'ee pour
+ imprimer des documents typographiquement plus conformes \`a l'usage
+ fran\c{c}ais que ce que produisent \TeX{} et \LaTeX{} par d\'efaut.
+ Un grand nombre de commandes peuvent \^etre utilis\'ees mais
+ l'emploi courant de cette option ne n\'ecessite \emph{a priori}
+ aucune connaissance particuli\`ere ni une utilisation forcen\'ee de
+ commandes sp\'ecifiques. \ldots{} Son installation s'accompagne
+ normalement d'une cr\'eation de \emph{format} pour l'introduction,
+ notamment, des fichiers de motifs de c\'esure fran\c{c}ais.
+ \par
+}
+
+\newcommand{\maketest}[1]{\begingroup \hfuzz=30pt
+ \typeout{========== Format Text using Encoding: #1 ==========}%
+ \leavevmode\llap{#1: }%
+ \fontencoding{#1}\selectfont \testtext \par
+ \endgroup}
+
+
+{\slshape In the following paragraphs you can see the following
+ results. OT1: no hyphenation of words with umlauts and/or accents.
+ T1: hyphenation of these words. LO1: hyphenation of these words if
+ ML\TeX{} is used, otherwise no hyphenation. Additionally there can
+ be differences in paragraph breaking between LO1 and~T1 because of a
+ different font metric between CM and EC fonts.}
+
+
+
+\maketest{OT1}
+\maketest{LO1}
+\maketest{T1}
+\newpage
+\maketest{OT1}
+\textsl{-- Test of default enc.: ``\encodingdefault'' --}\par
+\maketest{\encodingdefault}
+
+\end{document}