summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mltex/testmlsw.tex
blob: dac77de892adf6ac87f32a322285010634ca8f72 (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
%%
%% 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}