%--------------------------------------------------
% montchapet.tex
% macros générales pour usage avec LuaTeX
% M. Quercia, 01/09/2010
%--------------------------------------------------

% autorise @ dans les noms
\catcode64=11

% \catcodetable1 = table sans aucun caractère spécial
\def\desactive{%
 \initcatcodetable1
 \catcodetable1
 \catcode`\\=12
 \catcode13=12
 \catcode32=12
 \catcode`\%=12
 \catcodetable0
}
\desactive
\let\desactive\undefined

%--------------------------------------------------
% Gestion des polices
%--------------------------------------------------

% familles mathématiques
\chardef\rmfam=0
\chardef\ifam=1
\chardef\syfam=2
\chardef\exfam=3
\newfam\msafam
\newfam\msbfam
\chardef\bbbfam=\msbfam % ou \bffam
\def\sc{\tensc}

% conversion décimal -> hexadécimal
{\def\hex#1{%
\ifnum#1<10 \number#1\else
\ifnum#1=10 A\else
\ifnum#1=11 B\else
\ifnum#1=12 C\else
\ifnum#1=13 D\else
\ifnum#1=14 E\else
\ifnum#1=15 F\fi\fi\fi\fi\fi\fi\fi}
\xdef\msa@{\hex\msafam}
\xdef\msb@{\hex\msbfam}
}

% accents en mode math
\def\bar{\mathaccent"7409\relax}
\def\dot{\mathaccent"740A\relax}
\def\hat{\mathaccent"7402\relax}
\def\tilde{\mathaccent"7403\relax}
\def\interieur{\mathaccent"7406\relax}

% sélection des polices
% syntaxe : xx=yyyy,z -> utiliser la police yyyy pour le mode xx
%           si z=f alors on accole la taille (10,7,5) à yyyy
%           si z=p on conserve le nom yyyy pour toutes les tailles

\def\computermodern{\installfonts{%
 rm=ec-lmr,f    % roman
 it=ec-lmri,f   % italique
 sl=ec-lmro,f   % penché
 bf=ec-lmbx,f   % gras
 sc=ec-lmcsc,f  % petites capitales
 tt=ec-lmtt,f   % machine à écrire
 i=lmmi,f       % math italique
 sy=lmsy,f      % symboles
 ex=lmex,f      % symboles extensibles
 msa=msam,f     % AMS a
 msb=msbm,f     % AMS b
}}
\def\computermodernbright{\installfonts{%
 rm=ebmr10,p    % roman
 it=ebmo10,p    % italique
 sl=ebmo10,p    % penché
 bf=ebsr10,p    % gras
 sc=ec-lmcsc,f  % petites capitales
 tt=ebtl10,p    % machine à écrire
 i=cmbrmi10,p   % math italique
 sy=cmbrsy10,p  % symboles
 ex=lmex,f      % symboles extensibles
 msa=msam,f     % AMS a
 msb=msbm,f     % AMS b
}}
\def\concretemath{\installfonts{%
 rm=eorm,f      % roman
 it=eoti,f      % italique
 sl=eosl,f      % penché
 bf=ec-lmbx,f   % gras
 sc=eocc,f      % petites capitales
 tt=ec-lmtt,f   % machine à écrire
 i=xccmi,f      % math italique
 sy=xccsy,f     % symboles
 ex=xccex,f     % symboles extensibles
 msa=xccam,f    % AMS a
 msb=xccbm,f    % AMS b
}}
\def\concreteeuler{\installfonts{%
 rm=eorm,f      % roman
 it=eoti,f      % italique
 sl=eosl,f      % penché
 bf=ec-lmbx,f   % gras
 sc=eocc,f      % petites capitales
 tt=ec-lmtt,f   % machine à écrire
 i=eurm,f       % math italique
 sy=cmsy,f      % symboles
 ex=cmex,f      % symboles extensibles
 msa=msam,f     % AMS a
 msb=msbm,f     % AMS b
}}
\def\kurier{\installfonts{%
 rm=ec-kurierr,p    % roman
 it=ec-kurierri,p   % italique
 sl=ec-kurierri,p   % penché
 bf=ec-kurierb,p    % gras
 sc=ec-kurierlcap,p % petites capitales
 tt=ec-lmtt,f       % machine à écrire
 i=mi-kurierri,p    % math italique
 sy=sy-kurierrz,p   % symboles
 ex=ex-kurierr,p    % symboles extensibles
 msa=msam,f         % AMS a
 msb=msbm,f         % AMS b
}}
\def\anttor{\installfonts{%
 rm=ec-anttr,p    % roman
 it=ec-anttri,p   % italique
 sl=ec-anttri,p   % penché
 bf=ec-anttb,p    % gras
 sc=ec-anttlcap,p % petites capitales
 tt=ec-lmtt,f     % machine à écrire
 i=mi-anttri,p    % math italique
 sy=sy-anttrz,p   % symboles
 ex=ex-anttr,p    % symboles extensibles
 msa=msam,f       % AMS a
 msb=msbm,f       % AMS b
}%
% Redéfinition des longues flèches.
% Attention ! Ces redéfinitions vont s'appliquer jusqu'à la fin du groupe qui
% a appelé \anttor. Ne pas basculer vers un autre jeu de caractères avant
% d'être sorti du groupe.
\mathchardef\equalleft="32CD
\mathchardef\equalright="32CC
\mathchardef\equalc="32CB
\mathchardef\Rightarrow="32D1
\mathchardef\Leftarrowj="32D0
\mathchardef\minusleft="32C9
\mathchardef\minusright="32CA
\mathchardef\minusc="32C8
\mathchardef\rightarrow="32CF
\mathchardef\leftarrow="32CE
\def\joinrel{\mathrel{\mkern-4mu}}%
\def\Longrightarrow{\equalleft\joinrel\Rightarrow}%
\def\Longleftarrow{\Leftarrowj\joinrel\equalright}%
\def\longrightarrow{\minusright\joinrel\rightarrow}%
\def\longleftarrow{\leftarrow\joinrel\minusleft}%
\def\rightarrowfill{$\m@th\minusright\mkern-7mu%
  \cleaders\hbox{$\mkern-2mu\minusc\mkern-2mu$}\hfill
  \mkern-7mu\mathord\rightarrow$}%
\def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
  \cleaders\hbox{$\mkern-2mu\minusc\mkern-2mu$}\hfill
  \mkern-7mu\minusleft$}%
}
\def\palatino{\installfonts{%
 rm=p1xr,p      % roman
 it=p1xi,p      % italique
 sl=p1xsl,p     % penché
 bf=p1xb,p      % gras
 sc=p1xsc,p     % petites capitales
 tt=t1xtt,p     % machine à écrire
 i=pxmi,p       % math italique
 sy=pxsy,p      % symboles
 ex=pxex,p      % symboles extensibles
 msa=pxsya,p    % AMS a
 msb=pxsyb,p    % AMS b
}}
\def\txtimes{\installfonts{%
 rm=t1xr,p      % roman
 it=t1xi,p      % italique
 sl=t1xsl,p     % penché
 bf=t1xb,p      % gras
 sc=t1xsc,p     % petites capitales
 tt=t1xtt,p     % machine à écrire
 i=txmi,p       % math italique
 sy=txsy,p      % symboles
 ex=txex,p      % symboles extensibles
 msa=txsya,p    % AMS a
 msb=txsyb,p    % AMS b
}}

% installation d'un jeu de polices : on définit les macros
% \petit(8pt), \normal(10pt), \gros(12pt) et \Gros(14.4pt)
\def\installfonts#1{%
 \def\petit{\installfonts@loop  {8,6.1,4.8}#1end=}%
 \def\normal{\installfonts@loop {10,7,5}#1end=}%
 \def\gros{\installfonts@loop   {12,9.1,7.2}#1end=}%
 \def\Gros{\installfonts@loop   {14.4,10.9,8.6}#1end=}%
 \normal
}

% boucle sur la liste des polices : récupère le nom xx à définir
% (rm,it,..,msb) et appelle la macro \installfonts@xx.
% Cette macro est censée rappeler \installfonts@loop pour passer
% au nom suivant. La fin de la boucle est assurée par la macro
% \installfonts@end
\def\installfonts@loop#1#2={\csname installfonts@#2\endcsname#1,#2=}

% forme un nom de fonte avec une taille
% #1 = taille voulue en pt
% #2 = racine du nom de la fonte
% #3 = suffixe de taille (10,7,5)
% #4 = "f" pour accoler le suffixe, "p" pour ne pas en tenir compte
% ex: \installfonts@name {12} {cmr}  {10} {f} -> cmr10 at 12pt
%     \installfonts@name {12} {tx1r} {10} {p} -> tx1r at 12pt
\def\installfonts@name#1#2#3#4{\if#4f#2#3 at #1pt\else#2 at #1pt\fi}

% rm,bf,i,sy,msa,msb
% on définit \tenxx,\sevenxx,\fivexx et on les affecte à \textfont\xxfam,
% \scriptfont\xxfam et \scriptscriptfont\xxfam
\def\installfonts@rm#1,#2,#3,#4=#5,#6 {%
 \expandafter\font\csname ten#4\endcsname=\installfonts@name{#1}{#5}{10}{#6}%
 \expandafter\font\csname seven#4\endcsname=\installfonts@name{#2}{#5}{7}{#6}%
 \expandafter\font\csname five#4\endcsname=\installfonts@name{#3}{#5}{5}{#6}%
 \expandafter\textfont\csname#4fam\endcsname=\csname ten#4\endcsname
 \expandafter\scriptfont\csname#4fam\endcsname=\csname seven#4\endcsname
 \expandafter\scriptscriptfont\csname#4fam\endcsname=\csname five#4\endcsname
 \installfonts@loop{#1,#2,#3}%
}
\let\installfonts@bf=\installfonts@rm
\let\installfonts@i=\installfonts@rm
\let\installfonts@sy=\installfonts@rm
\let\installfonts@msa=\installfonts@rm
\let\installfonts@msb=\installfonts@rm

% it, sl, tt
% on définit seulement \tenxx et \textfont\xxfam
\def\installfonts@it#1,#2,#3,#4=#5,#6 {%
 \expandafter\font\csname ten#4\endcsname=\installfonts@name{#1}{#5}{10}{#6}%
 \expandafter\textfont\csname#4fam\endcsname=\csname ten#4\endcsname
 \installfonts@loop{#1,#2,#3}%
}
\let\installfonts@sl=\installfonts@it
\let\installfonts@tt=\installfonts@it

% sc
% on définit seulement \tenxx
\def\installfonts@sc#1,#2,#3,#4=#5,#6 {%
 \expandafter\font\csname ten#4\endcsname=\installfonts@name{#1}{#5}{10}{#6}%
 \installfonts@loop{#1,#2,#3}%
}

% ex
% on définit \tenxx et on l'affecte à \textfont\xxfam, \scriptfont\xxfam
% et \scriptscriptfont\xxfam
\def\installfonts@ex#1,#2,#3,#4=#5,#6 {%
 \expandafter\font\csname ten#4\endcsname=\installfonts@name{#1}{#5}{10}{#6}%
 \expandafter\textfont\csname#4fam\endcsname=\csname ten#4\endcsname
 \expandafter\scriptfont\csname#4fam\endcsname=\csname ten#4\endcsname
 \expandafter\scriptscriptfont\csname#4fam\endcsname=\csname ten#4\endcsname
 \installfonts@loop{#1,#2,#3}%
}

% fin de boucle
% définit les polices euro,
% règle l'interligne en fonction de la taille de base
% passe en mode \rm
\def\installfonts@end#1,#2,#3,#4={%
 \font\eurofont@rm=feymr10 at #1pt%
 \font\eurofont@bf=feybr10 at #1pt%
 \font\eurofont@sl=feymo10 at #1pt%
 \font\blackboard=msbm10 at #1pt%
 \normallineskip=#1pt\divide\normallineskip by 10
 \normalbaselineskip=12\normallineskip
 \rm
}

% intercepte les changement de police et définit \euro en conséquence
{\let\@tmp\rm\xdef\rm{\@tmp\def\noexpand\euro{{\noexpand\eurofont@rm e}}}
 \let\@tmp\bf\xdef\bf{\@tmp\def\noexpand\euro{{\noexpand\eurofont@bf e}}}
 \let\@tmp\sl\xdef\sl{\@tmp\def\noexpand\euro{{\noexpand\eurofont@sl e}}}
 \let\@tmp\it\xdef\it{\@tmp\def\noexpand\euro{{\noexpand\eurofont@sl e}}}}

% polices par défaut = computermodern
\computermodern

%--------------------------------------------------
% Symboles mathématiques
%--------------------------------------------------

% lettres
%𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ
\catcode`𝔸\active\def𝔸{{\fam\bbbfam A}}
\catcode`𝔹\active\def𝔹{{\fam\bbbfam B}}
\catcode`ℂ\active\defℂ{{\fam\bbbfam C}}
\catcode`𝔻\active\def𝔻{{\fam\bbbfam D}}
\catcode`𝔼\active\def𝔼{{\fam\bbbfam E}}
\catcode`𝔽\active\def𝔽{{\fam\bbbfam F}}
\catcode`𝔾\active\def𝔾{{\fam\bbbfam G}}
\catcode`ℍ\active\defℍ{{\fam\bbbfam H}}
\catcode`𝕀\active\def𝕀{{\fam\bbbfam I}}
\catcode`𝕁\active\def𝕁{{\fam\bbbfam J}}
\catcode`𝕂\active\def𝕂{{\fam\bbbfam K}}
\catcode`𝕃\active\def𝕃{{\fam\bbbfam L}}
\catcode`𝕄\active\def𝕄{{\fam\bbbfam M}}
\catcode`ℕ\active\defℕ{{\fam\bbbfam N}}
\catcode`𝕆\active\def𝕆{{\fam\bbbfam O}}
\catcode`ℙ\active\defℙ{{\fam\bbbfam P}}
\catcode`ℚ\active\defℚ{{\fam\bbbfam Q}}
\catcode`ℝ\active\defℝ{{\fam\bbbfam R}}
\catcode`𝕊\active\def𝕊{{\fam\bbbfam S}}
\catcode`𝕋\active\def𝕋{{\fam\bbbfam T}}
\catcode`𝕌\active\def𝕌{{\fam\bbbfam U}}
\catcode`𝕍\active\def𝕍{{\fam\bbbfam V}}
\catcode`𝕎\active\def𝕎{{\fam\bbbfam W}}
\catcode`𝕏\active\def𝕏{{\fam\bbbfam X}}
\catcode`𝕐\active\def𝕐{{\fam\bbbfam Y}}
\catcode`ℤ\active\defℤ{{\fam\bbbfam Z}}

%𝟙𝟚ß
\catcode`𝟙\active\def𝟙{{\hbox{\blackboard 1}}}
\catcode`𝟚\active\def𝟚{{\hbox{\blackboard 2}}}
\catcode`ß\active\defß{{\char255}}

%𝓐𝓑𝓒𝓓𝓔𝓕𝓖𝓗𝓘𝓙𝓚𝓛𝓜𝓝𝓞𝓟𝓠𝓡𝓢𝓣𝓤𝓥𝓦𝓧𝓨𝓩
\catcode`𝓐\active\def𝓐{{\cal A}}
\catcode`𝓑\active\def𝓑{{\cal B}}
\catcode`𝓒\active\def𝓒{{\cal C}}
\catcode`𝓓\active\def𝓓{{\cal D}}
\catcode`𝓔\active\def𝓔{{\cal E}}
\catcode`𝓕\active\def𝓕{{\cal F}}
\catcode`𝓖\active\def𝓖{{\cal G}}
\catcode`𝓗\active\def𝓗{{\cal H}}
\catcode`𝓘\active\def𝓘{{\cal I}}
\catcode`𝓙\active\def𝓙{{\cal J}}
\catcode`𝓚\active\def𝓚{{\cal K}}
\catcode`𝓛\active\def𝓛{{\cal L}}
\catcode`𝓜\active\def𝓜{{\cal M}}
\catcode`𝓝\active\def𝓝{{\cal N}}
\catcode`𝓞\active\def𝓞{{\cal O}}
\catcode`𝓟\active\def𝓟{{\cal P}}
\catcode`𝓠\active\def𝓠{{\cal Q}}
\catcode`𝓡\active\def𝓡{{\cal R}}
\catcode`𝓢\active\def𝓢{{\cal S}}
\catcode`𝓣\active\def𝓣{{\cal T}}
\catcode`𝓤\active\def𝓤{{\cal U}}
\catcode`𝓥\active\def𝓥{{\cal V}}
\catcode`𝓦\active\def𝓦{{\cal W}}
\catcode`𝓧\active\def𝓧{{\cal X}}
\catcode`𝓨\active\def𝓨{{\cal Y}}
\catcode`𝓩\active\def𝓩{{\cal Z}}

%ΓΔΘΛΞΠΣΥΦΨΩ
\catcode`Γ\active\defΓ{{\mit\Gamma}}
\catcode`Δ\active\defΔ{{\mit\Delta}}
\catcode`Θ\active\defΘ{{\mit\Theta}}
\catcode`Λ\active\defΛ{{\mit\Lambda}}
\catcode`Ξ\active\defΞ{{\mit\Xi}}
\catcode`Π\active\defΠ{{\mit\Pi}}
\catcode`Σ\active\defΣ{{\mit\Sigma}}
\catcode`Υ\active\defΥ{{\mit\Upsilon}}
\catcode`Φ\active\defΦ{{\mit\Phi}}
\catcode`Ψ\active\defΨ{{\mit\Psi}}
\catcode`Ω\active\defΩ{{\mit\Omega}}

%αβγδεζηθικλµνξπρστυφχψω
\catcode`α\active\letα\alpha
\catcode`β\active\letβ\beta
\catcode`γ\active\letγ\gamma
\catcode`δ\active\letδ\delta
\catcode`ε\active\letε\varepsilon
\catcode`ζ\active\letζ\zeta
\catcode`η\active\letη\eta
\catcode`θ\active\letθ\theta
\catcode`ι\active\letι\iota
\catcode`κ\active\letκ\kappa
\catcode`λ\active\letλ\lambda
\catcode`µ\active\letµ\mu
\catcode`ν\active\letν\nu
\catcode`ξ\active\letξ\xi
\catcode`π\active\letπ\pi
\catcode`ρ\active\letρ\rho
\catcode`σ\active\letσ\sigma
\catcode`τ\active\letτ\tau
\catcode`υ\active\letυ\upsilon
\catcode`φ\active\letφ\varphi
\catcode`χ\active\letχ\chi
\catcode`ψ\active\letψ\psi
\catcode`ω\active\letω\omega

%ℵℏⅈⅉℓ℘ℜℑ∂∞∅𝛻⊤⊥∠∥∀∃∄¬€
\catcode`ℵ\active\letℵ\aleph
\catcode`ℏ\active\mathchardefℏ"0\msb@7E
\catcode`ⅈ\active\letⅈ\imath
\catcode`ⅉ\active\letⅉ\jmath
\catcode`ℓ\active\letℓ\ell
\catcode`℘\active\let℘\wp
\catcode`ℜ\active\letℜ\Re
\catcode`ℑ\active\letℑ\Im
\catcode`∂\active\let∂\partial
\catcode`∞\active\let∞\infty
\catcode`∅\active\mathchardef∅"0\msb@3F
\catcode`𝛻\active\let𝛻\nabla
\catcode`⊤\active\let⊤\top
\catcode`⊥\active\let⊥\bot
\catcode`∥\active\let∥\|
\catcode`∠\active\let∠\angle
\catcode`∀\active\def∀{{\forall\,}}
\catcode`∃\active\def∃{{\exists\,}}
\catcode`∄\active\def∄{{\mathchar"0\msb@40\,}}
\catcode`¬\active\let¬\neg
\catcode`€\active\def€{\euro}

% opérateurs
%⅀ℿ∫∮⋂⋃∐⋁⋀⨀⨂⨁⨄
\catcode`⅀\active\let⅀\sum
\catcode`ℿ\active\letℿ\prod
\catcode`∫\active\let∫\int
\catcode`∮\active\let∮\oint
\catcode`⋂\active\let⋂\bigcap
\catcode`⋃\active\let⋃\bigcup
\catcode`∐\active\let∐\bigsqcup
\catcode`⋁\active\let⋁\bigvee
\catcode`⋀\active\let⋀\bigwedge
\catcode`⨀\active\let⨀\bigodot
\catcode`⨂\active\let⨂\bigotimes
\catcode`⨁\active\let⨁\bigoplus
\catcode`⨄\active\let⨄\biguplus

%∬∭∱
\catcode`∬\active\def∬{\int\mskip-3\thinmuskip\int}
\catcode`∭\active\def∭{\int\mskip-3\thinmuskip\int\mskip-3\thinmuskip\int}
\catcode`∱\active\def∱{%
 \raise0.8pt\hbox{$\scriptstyle\mathchar"0\msb@79$}%
 \mskip-6\thinmuskip\int}

% grandes intégrales
\def\∫{\displaystyle\int}
\def\∬{\∫\mskip-3\thinmuskip\∫}
\def\∭{\∫\mskip-3\thinmuskip\∫\mskip-3\thinmuskip\∫}

%±∓∖×∗∘∙÷∩∪⊎⊓⊔⊲⊳≀∆∇∨∧⊕⊖⊗⊘⊙†‡
\catcode`±\active\let±\pm
\catcode`∓\active\let∓\mp
\catcode`∖\active\let∖\setminus
\catcode`×\active\let×\times
\catcode`∗\active\let∗\ast
\catcode`∘\active\let∘\circ
\catcode`∙\active\let∙\bullet
\catcode`÷\active\let÷\div
\catcode`∩\active\let∩\cap
\catcode`∪\active\let∪\cup
\catcode`⊎\active\let⊎\uplus
\catcode`⊓\active\let⊓\sqcap
\catcode`⊔\active\let⊔\sqcup
\catcode`⊲\active\let⊲\triangleleft
\catcode`⊳\active\let⊳\triangleright
\catcode`≀\active\let≀\wr
\catcode`∆\active\let∆\bigtriangleup
\catcode`∇\active\let∇\bigtriangledown
\catcode`∨\active\let∨\vee
\catcode`∧\active\let∧\wedge
\catcode`⊕\active\let⊕\oplus
\catcode`⊖\active\let⊖\ominus
\catcode`⊗\active\let⊗\otimes
\catcode`⊘\active\let⊘\oslash
\catcode`⊙\active\let⊙\odot
\catcode`†\active\let†\dagger
\catcode`‡\active\let‡\ddagger

% relations
%⩽≺≼≪⊂⊆⊑∈⊢⏝⏜⩾≻≽≫⊃⊇⊒∋⊣│║≡∼≃≍≈≅⨝∝⊧≐┻
\catcode`⩽\active\mathchardef⩽"3\msa@36
\catcode`≺\active\let≺\prec
\catcode`≼\active\mathchardef≼"3\msa@34
\catcode`≪\active\let≪\ll
\catcode`⊂\active\let⊂\subset
\catcode`⊆\active\let⊆\subseteq
\catcode`⊑\active\let⊑\sqsubseteq
\catcode`∈\active\let∈\in
\catcode`⊢\active\let⊢\vdash
\catcode`⏝\active\let⏝\smile
\catcode`⏜\active\let⏜\frown
\catcode`⩾\active\mathchardef⩾"3\msa@3E
\catcode`≻\active\let≻\succ
\catcode`≽\active\mathchardef≽"3\msa@3C
\catcode`≫\active\let≫\gg
\catcode`⊃\active\let⊃\supset
\catcode`⊇\active\let⊇\supseteq
\catcode`⊒\active\let⊒\sqsupseteq
\catcode`∋\active\let∋\ni
\catcode`⊣\active\let⊣\dashv
\catcode`│\active\let│\mid
\catcode`║\active\let║\parallel
\catcode`≡\active\let≡\equiv
\catcode`∼\active\let∼\sim
\catcode`≃\active\let≃\simeq
\catcode`≍\active\let≍\asymp
\catcode`≈\active\let≈\approx
\catcode`≅\active\let≅\cong
\catcode`⨝\active\let⨝\bowtie
\catcode`∝\active\let∝\propto
\catcode`⊧\active\let⊧\models
\catcode`≐\active\let≐\doteq
\catcode`┻\active\let┻\perp

%≠∉≮≯≰≱⊄⊅⊊⊋
\catcode`≠\active\let≠\neq
\catcode`∉\active\let∉\notin
\catcode`≮\active\def≮{{\not<}}
\catcode`≯\active\def≯{{\not>}}
\catcode`≰\active\def≰{{\not\leq}}
\catcode`≱\active\def≱{{\not\geq}}
\catcode`⊄\active\def⊄{{\not\subset}}
\catcode`⊅\active\def⊅{{\not\supset}}
\catcode`⊊\active\mathchardef⊊"3\msb@24
\catcode`⊋\active\mathchardef⊋"3\msb@25

% flèches
%←⇐→⇒↔⇔↦↩↼↽⇌⟵⟸⟶⟹⟷⟺⟼↪⇀⇁↑⇑↓⇓↕⇕↗↘↙↖
\catcode`←\active\let←\leftarrow
\catcode`⇐\active\let⇐\Leftarrow
\catcode`→\active\let→\rightarrow
\catcode`⇒\active\let⇒\Rightarrow
\catcode`↔\active\let↔\leftrightarrow
\catcode`⇔\active\let⇔\Leftrightarrow
\catcode`↦\active\let↦\mapsto
\catcode`↩\active\let↩\hookleftarrow
\catcode`↼\active\let↼\leftharpoonup
\catcode`↽\active\let↽\leftharpoondown
\catcode`⇌\active\let⇌\rightleftharpoons
\catcode`⟵\active\def⟵{\mathop{\longleftarrow}\limits}
\catcode`⟸\active\def⟸{\mathop{\Longleftarrow}\limits}
\catcode`⟶\active\def⟶{\mathop{\longrightarrow}\limits}
\catcode`⟹\active\def⟹{\mathop{\Longrightarrow}\limits}
\catcode`⟷\active\def⟷{\mathop{\longleftrightarrow}\limits}
\catcode`⟺\active\def⟺{\mathop{\Longleftrightarrow}\limits}
\catcode`⟼\active\def⟼{\mathop{\longmapsto}\limits}
\catcode`↪\active\let↪\hookrightarrow
\catcode`⇀\active\let⇀\rightharpoonup
\catcode`⇁\active\let⇁\rightharpoondown
\catcode`↑\active\let↑\uparrow
\catcode`⇑\active\let⇑\Uparrow
\catcode`↓\active\let↓\downarrow
\catcode`⇓\active\let⇓\Downarrow
\catcode`↕\active\let↕\updownarrow
\catcode`⇕\active\let⇕\Updownarrow
\catcode`↗\active\let↗\nearrow
\catcode`↘\active\let↘\searrow
\catcode`↙\active\let↙\swarrow
\catcode`↖\active\let↖\nwarrow

% délimiteurs
%⦃⦄⟦⟧〈〉⎡⎣⎤⎦
\catcode`⦃\active\let⦃\lbrace
\catcode`⦄\active\let⦄\rbrace
\catcode`⟦\active\def⟦{[\![}
\catcode`⟧\active\def⟧{]\!]}
\catcode`〈\active\let〈\langle
\catcode`〉\active\let〉\rangle
\catcode`⎡\active\let⎡\lceil
\catcode`⎣\active\let⎣\lfloor
\catcode`⎤\active\let⎤\rceil
\catcode`⎦\active\let⎦\rfloor
% norme triple, non extensible
\def\∥{\hbox{\kern0.8pt\vrule height 7pt depth 3pt\kern0.8pt\vrule\kern0.8pt\vrule\kern0.8pt}}

% indices et exposants
%₀₁₂₃₄₅₆₇₈₉₊₋
\catcode`₀\active\def₀{_0}
\catcode`₁\active\def₁{_1}
\catcode`₂\active\def₂{_2}
\catcode`₃\active\def₃{_3}
\catcode`₄\active\def₄{_4}
\catcode`₅\active\def₅{_5}
\catcode`₆\active\def₆{_6}
\catcode`₇\active\def₇{_7}
\catcode`₈\active\def₈{_8}
\catcode`₉\active\def₉{_9}
\catcode`₊\active\def₊{_+}
\catcode`₋\active\def₋{_-}

%⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻ⁿ°
\catcode`⁰\active\def⁰{^0}
\catcode`¹\active\def¹{^1}
\catcode`²\active\def²{^2}
\catcode`³\active\def³{^3}
\catcode`⁴\active\def⁴{^4}
\catcode`⁵\active\def⁵{^5}
\catcode`⁶\active\def⁶{^6}
\catcode`⁷\active\def⁷{^7}
\catcode`⁸\active\def⁸{^8}
\catcode`⁹\active\def⁹{^9}
\catcode`⁺\active\def⁺{^+}
\catcode`⁻\active\def⁻{^-}
\catcode`ⁿ\active\defⁿ{^n}
\catcode`°\active\def°{^\circ}

% divers
%…⋯⋮⋱⋰
\catcode`…\active\let…\dots
\catcode`⋯\active\let⋯\cdots
\catcode`⋮\active\let⋮\vdots
\catcode`⋱\active\let⋱\ddots
\def\adots{%
 \mathinner{%
  \mkern 1mu\raise  \p@ \hbox {.}%
  \mkern 2mu\raise 4\p@ \hbox {.}%
  \mkern 2mu\raise 7\p@\vbox{\kern 7\p@\hbox {.}}%
  \mkern 1mu}}
\catcode`⋰\active\let⋰\adots

%√∛∜
\catcode`√\active\let√\sqrt
\catcode`∛\active\def∛{\root3\of}
\catcode`∜\active\def∜{\root4\of}

%𝕕«»¼½¾⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞
\catcode`𝕕\active\def𝕕{{\rm d}}
\catcode`«\active\def«{{\char19}}
\catcode`»\active\def»{{\char20}}
\catcode`¼\active\def¼{{1\over4}}
\catcode`½\active\def½{{1\over2}}
\catcode`¾\active\def¾{{3\over4}}
\catcode`⅓\active\def⅓{{1\over3}}
\catcode`⅔\active\def⅔{{2\over3}}
\catcode`⅕\active\def⅕{{1\over5}}
\catcode`⅖\active\def⅖{{2\over5}}
\catcode`⅗\active\def⅗{{3\over5}}
\catcode`⅘\active\def⅘{{4\over5}}
\catcode`⅙\active\def⅙{{1\over6}}
\catcode`⅚\active\def⅚{{5\over6}}
\catcode`⅛\active\def⅛{{1\over8}}
\catcode`⅜\active\def⅜{{3\over8}}
\catcode`⅝\active\def⅝{{5\over8}}
\catcode`⅞\active\def⅞{{7\over8}}

%--------------------------------------------------
% pictogrammes clavier
%--------------------------------------------------

\def\kbup{\hbox{%
 \setbox0=\hbox{\tenmsa\char78}%
 \hbox to\wd0{\hfil\vrule height 3pt depth 2pt width 0.8pt\hfil}\kern-\wd0
 \raise 3pt\box0
}}

\def\kbdn{\hbox{%
 \setbox0=\hbox{\tenmsa\char72}%
 \raise\ht0\hbox to\wd0{%
  \hfil\vrule height 3pt depth 2pt width 0.8pt\hfil}\kern-\wd0
 \lower2pt\box0
}}

\def\kbUP{\hbox{%
 \setbox0=\hbox{\tenmsa\char78}%
 \hbox to\wd0{\hfil\vrule height 3pt depth 2pt width 0.8pt\hfil}\kern-\wd0
 \raise1pt\hbox to \wd0{\hss\vrule width 5pt height 0.4pt\hss}\kern-\wd0
 \lower0.5pt\hbox to \wd0{\hss\vrule width 5pt height 0.4pt\hss}\kern-\wd0
 \lower2pt\hbox to \wd0{\hss\vrule width 5pt height 0.4pt\hss}\kern-\wd0
 \raise 3pt\box0
}}

\def\kbDN{\hbox{%
 \setbox0=\hbox{\tenmsa\char72}%
 \raise\ht0\hbox to\wd0{%
  \hfil\vrule height 3pt depth 2pt width 0.8pt\hfil}\kern-\wd0
 \dimen0=\ht0\advance\dimen0 2.5pt
 \raise\dimen0\hbox to \wd0{\hss\vrule width 5pt height 0.4pt\hss}\kern-\wd0
 \advance\dimen0-1.5pt
 \raise\dimen0\hbox to \wd0{\hss\vrule width 5pt height 0.4pt\hss}\kern-\wd0
 \advance\dimen0-1.5pt
 \raise\dimen0\hbox to \wd0{\hss\vrule width 5pt height 0.4pt\hss}\kern-\wd0
 \lower2pt\box0
}}

\def\kbleft{\hbox{%
  \setbox0=\hbox{\tenmsa\char74}%
  \dimen0=\ht0\advance\dimen0-\dp0\divide\dimen0 2
  \lower\dimen0\box0\kern-1pt
  \vrule height 0.4pt depth 0.4pt width 5pt
}}

\def\kbright{\hbox{%
  \setbox0=\hbox{\tenmsa\char73}%
  \dimen0=\ht0\advance\dimen0-\dp0\divide\dimen0 2
  \vrule height 0.4pt depth 0.4pt width 5pt
  \kern-1pt\lower\dimen0\box0
}}

\def\kbback{\hbox{%
  \setbox0=\hbox{\tenmsa\char74}%
  \dimen0=\ht0\advance\dimen0-\dp0\divide\dimen0 2
  \lower\dimen0\box0\kern-1pt
  \vrule height 0.4pt depth 0.4pt width 15pt
}}

\def\kbtab{\hbox{%
  \setbox0=\hbox{\vrule width 0.8pt\kern-1pt\tenmsa\char74\kern-1pt}%
  \setbox1=\hbox{\kern-1pt\tenmsa\char73\kern-1pt\vrule width 0.8pt}%
  \dimen0=\ht0\advance\dimen0\dp0\divide\dimen0 2
  \raise\dp0\box0
  \raise\dimen0\hbox{\vrule height 0.4pt depth 0.4pt width 10pt}%
  \kern -\wd1\kern-10pt
  \lower\dimen0\hbox{\vrule height 0.4pt depth 0.4pt width 10pt}%
  \lower\ht1\box1
}}

\def\kbenter{\hbox{%
  \setbox0=\hbox{\tenmsa\char74}%
  \dimen0=\ht0\advance\dimen0-\dp0\divide\dimen0 2
  \lower\dimen0\box0\kern-1pt
  \vrule height 0.4pt depth 0.4pt width 10pt
  \vrule height 4pt depth 0.4pt width 0.8pt
}}

\def\kbhome{\hbox{%
  \setbox0=\hbox{\tenmsa\char72}%
  \copy0\kern-0.5\wd0\kern-0.4pt
  \setbox0=\hbox{\tenmsb\char114}%
  \lower1.4pt\copy0\kern-\wd0\kern0.2pt
  \lower1.2pt\copy0\kern-\wd0\kern0.2pt
  \lower1.0pt\copy0
}}

\def\kbshift{\hbox{%
  \setbox0=\hbox{\tensy\char94}%
  \lower2pt\hbox to \wd0{%
    \kern0.5pt
    \vrule height 4pt depth -3.6pt width 1.5pt
    \vrule height 4pt depth 0pt width 0.4pt
    \hrulefill
    \vrule height 4pt depth 0pt width 0.4pt
    \vrule height 4pt depth -3.6pt width 1.5pt
    \kern0.5pt
  }\kern-\wd0
  \raise2pt\box0
}}

\def\kblock{\hbox{%
  \setbox0=\hbox{\kern-1pt\tensy\char91\kern-1pt}%
  \dimen0=\ht0\advance\dimen0 -2pt
  \raise\dimen0\hbox to\wd0{\hss\fivesy\char92\hss}\kern-\wd0
  \raise\dimen0\hbox{\vrule height 0.2pt depth 0.2pt width\wd0}\kern-\wd0
  \raise\dimen0\hbox to\wd0{%
    \hfil\vrule height 0pt depth 2pt width 0.8pt\hfil}\kern-\wd0
  \lower2pt\box0
}}

%--------------------------------------------------
% abréviations
%--------------------------------------------------

% noms de fonction
\def \fct#1{\mathop{\rm#1}\nolimits}
\def \argch {\fct{argch}}
\def \argsh {\fct{argsh}}
\def \argth {\fct{argth}}
\def \car   {\fct{car}}
\def \card  {\fct{card}}
\def \ch    {\fct{ch}}
\def \codim {\fct{codim}}
\def \com   {\fct{com}}
\def \cotan {\fct{cotan}}
\def \diag  {\fct{diag}}
\def \id    {\fct{id}}
\def \Im    {\fct{Im}}
\def \Ker   {\fct{Ker}}
\def \pgcd  {\fct{pgcd}}
\def \ppcm  {\fct{ppcm}}
\def \Re    {\fct{Re}}
\def \rg    {\fct{rg}}
\def \sh    {\fct{sh}}
\def \sp    {\fct{sp}}
\def \th    {\fct{th}}
\def \tcom  {{}^t\!\fct{com}}
\def \tr    {\fct{tr}}
\def \vect  {\fct{vect}}

% texte
\def\text#1{%
\relax
\ifmmode\mathchoice
{\hbox{\tenrm   #1}}%      % mode display
{\hbox{\tenrm   #1}}%      % mode textstyle
{\hbox{\sevenrm #1}}%      % mode scriptstyle
{\hbox{\fiverm  #1}}%      % mode scriptscriptstyle
\else #1\fi}               % mode texte

\def\tq{\text{ tq }}            % tq
\def\pmod#1{\,({\rm mod}\,#1)}  % modulo

%--------------------------------------------------
% matrices
%--------------------------------------------------

% redéfinition de \matrix avec ressorts réglables
\def\matrix#1{%
 \null
 \,
 \vcenter{%
   \normalbaselines
   \m@th
   \ialign{%
     \matrixlefthfil
     $##$%
     \matrixrighthfil
     &&\quad
     \matrixlefthfil
     $##$%
     \matrixrighthfil
     \crcr
     \mathstrut
     \crcr
     \noalign{\kern -\baselineskip} 
     #1\crcr 
     \mathstrut
     \crcr
     \noalign{\kern -\baselineskip}%
    }%
  }%
  \,}

% ressorts
\let\matrixlefthfil\hfil
\let\matrixrighthfil\hfil

% choix de la taille et des ressorts
\def\mat{\bgroup\petit\mat@suite}
\def\matl{\bgroup\petit
  \let\matrixlefthfil\relax
  \let\matrixrighthfil\hfil
  \mat@suite}
\def\matr{\bgroup\petit
  \let\matrixlefthfil\hfil
  \let\matrixrighthfil\relax
  \mat@suite}
\def\matc{\bgroup\petit
  \let\matrixlefthfil\hfil
  \let\matrixrighthfil\hfil
  \mat@suite}
\def\Mat{\bgroup\mat@suite}
\def\Matl{\bgroup
  \let\matrixlefthfil\relax
  \let\matrixrighthfil\hfil
  \mat@suite}
\def\Matr{\bgroup
  \let\matrixlefthfil\hfil
  \let\matrixrighthfil\relax
  \mat@suite}
\def\Matc{\bgroup
  \let\matrixlefthfil\hfil
  \let\matrixrighthfil\hfil
  \mat@suite}

% choix des délimiteurs
\def\mat@suite{\afterassignment\mat@fin\let\next=}
\def\mat@fin{%
       \ifx\next(\def\next##1){\left(\matrix{##1\crcr}\right)\egroup}%
  \else\ifx\next[\def\next##1]{\left[\matrix{##1\crcr}\right]\egroup}%
  \else\ifx\next⦃\def\next##1⦄{\left⦃\matrix{##1\crcr}\right⦄\egroup}%
  \else\ifx\next|\def\next##1|{\left|\matrix{##1\crcr}\right|\egroup}%
  \else\ifx\next∥\def\next##1∥{\left∥\matrix{##1\crcr}\right∥\egroup}%
  \else\message{délimiteur de matrice inconnu}%
  \fi\fi\fi\fi\fi
  \next
}

%--------------------------------------------------
% applications
%    1: | 2  ----> 3
%       | 4  |---> 4'
%       | 4" |---> 4"'
%         etc.
%
\def \appmult #1#2#3#4{%
{#1}:\;                                             % nom de l'application
\left\{\,%}                                         % accolade
\vcenter{%                                          % empiler par le bas
\normalbaselines                                    % interligne normale
\m@th                                        % pas d'espace entre les formules
\ialign{\hfil$##$                                   % cadre a droite,
        &$\hskip 3mm \longmapsto \hskip 3mm         % bequillon
        ##$\hfil                                    % cadre a gauche
        &\hskip 3mm $##$\hfil\cr                    % condition
        #2                                          % ensemble de depart
        &\omit\hskip 3mm$\longrightarrow\hskip 3mm  % fleche sans bequillon
        #3$\hfil\cr                                 % ensemble d'arrivee
        \noalign{\vskip 1mm}%                       % petit espace vertical
        #4}%                                        % elements et images
}\,\right.}                                         % petit espace final

%
%     1: | 2 ----> 3
%        | 4 |---> 5
%
\def\application#1#2#3#4#5{\appmult {#1}{#2}{#3}{{#4}&{#5}\cr}}

%--------------------------------------------------
% fractions
%--------------------------------------------------

\def \dfrac#1#2{\mathchoice
{{\displaystyle#1\over\displaystyle\strut#2}}%     % mode = display
{{\textstyle#1\over\textstyle\strut#2}}%           % mode = texte
{#1/#2}%                                           % mode = indice
{#1/#2}}                                           % mode = indice d'indice

\def\frac#1#2{\mathchoice                          % petite fraction
{{\textstyle #1\over\textstyle#2}}%                % mode = display
{{#1\over#2}}%                                     % mode = texte
{#1/#2}%                                           % mode = indice
{#1/#2}}                                           % mode = indice d'indice

\def\dbin#1#2{\mathchoice
{{\displaystyle#1\choose\displaystyle#2}}%         % mode = display
{{\textstyle#1\choose\textstyle#2}}%               % mode = texte
{#1\choose#2}%                                     % mode = indice
{#1\choose#2}}                                     % mode = indice d'indice

\def\bin#1#2{\mathchoice
{{\textstyle#1\choose\textstyle#2}}%               % mode = display
{#1\choose#2}%                                     % mode = texte
{#1\choose#2}%                                     % mode = indice
{#1\choose#2}}                                     % mode = indice d'indice


%--------------------------------------------------
% encadrement
%--------------------------------------------------
% \cadrefin{...}     ->  filet fin (0.4pt)
% \cadredouble{...}  ->  double filet fin
% \cadreombre{...}   ->  filet fin et ombre décalée (3pt)
% \cadrerond{...}    ->  filet fin et coins arrondis
%      Toutes ces macros entourent {...} d'un blanc de 1mm puis encadrent
%      l'ensemble. La ligne de base du resultat est celle de {...}.

% options : on peut inserer entre "\cadrexxx" et "{..}" une suite de commandes
% de la forme :
% \w = <dimension>   : fixe la largeur externe du cadre
% \h = <dimension>   : fixe la hauteur externe du cadre
% \d = <dimension>   : fixe la profondeur externe du cadre
% \m = <dimension>   : fixe la marge a utiliser

% Multilignage : Le texte du cadre est compose par "\halign{\hfil#\hfil\cr ...}"
% donc il suffit de separer les différentes lignes par \cr, et d'insérer des
% \hfill eventuellement pour compenser le centrage.
% On peut modifier l'interligne par "\openup ..." dans la chaine d'options

\def\cadre@interne#1#2#{%     #1 = bords, #2 = options
 \bgroup
 \let\cadre@w\w               % sauve les macros \w,\h,\d,\m
 \let\cadre@h\h
 \let\cadre@d\d
 \let\cadre@m\m
 \dimendef\w=255 \w=0pt       % largeur externe
 \dimendef\h=254 \h=0pt       % hauteur externe
 \dimendef\d=253 \d=0pt       % profondeur externe
 \dimendef\m=252 \m=1mm       % marge
 #2%                          % exécute les options
 \cadre@suite{#1}%            % continue après avoir lu le texte
}
\def\cadre@suite#1#2{%        % #1 = bords, #2 = texte
 \let\w\cadre@w               % restaure \w,\h,\d,\m
 \let\h\cadre@h
 \let\d\cadre@d
 \let\m\cadre@m
 \setbox0=\hbox{\vbox{\halign{\hfil##\hfil\cr#2\crcr}}}% texte
 \dimendef\w=255              % remet en place les variables de dimension
 \dimendef\h=254
 \dimendef\d=253
 \dimendef\m=252
 \offinterlineskip            % pas d'interligne
 \csname cadre@#1\endcsname   % ajoute les bords
 \egroup                      % terminé
}

\def\cadre@dims#1#2#3{% ajuste les dimensions de \box0 en fonction
% des dimensions \w,\h,\d et \m demandées
% et de l'encombrement du cadre #1 = largeur, #2 = hauteur, #3 = profondeur
 \ifdim\w=0pt\w=\wd0\advance\w2\m\else\advance\w-#1\fi
 \setbox0=\hbox to \w{\hss\box0\hss}%
 \ifdim\h=0pt\h=\ht0\advance\h\m\else\advance\h-#2\fi\ht0=\h
 \ifdim\d=0pt\d=\dp0\advance\d\m\else\advance\d-#3\fi\dp0=\d
}

\def\cadre@fin{%
 \cadre@dims{0.8pt}{0.4pt}{0.4pt}%
 \vtop{\vbox{\hrule\hbox{\vrule\box0\vrule}}\hrule}%
}
\def\cadrefin{\cadre@interne{fin}}

\def\cadre@double{%
 \cadre@dims{3.6pt}{1.8pt}{1.8pt}%
 \setbox0=\hbox{\kern1pt\vrule\vtop{\vbox{\hrule\box0}\hrule}\vrule\kern1pt}%
 \hbox{\vrule\vtop{\vbox{\hrule\kern1pt\box0}\kern1pt\hrule}\vrule}%
}
\def\cadredouble{\cadre@interne{double}}

\def\cadre@ombre{%
 \cadre@dims{2.4pt}{0.4pt}{2pt}%
 \setbox0=\hbox{\vrule\vtop{\vbox{\hrule\box0}\hrule}\vrule}%
 \setbox1=\hbox to 0pt{\hss\vrule height\ht0 depth\dp0 width 1.6pt}%
 \setbox2=\hbox{\kern1.6pt\vrule height 1.6pt depth 0pt width\wd0}%
 \hbox{\vtop{\box0\box2}\lower 1.6pt\box1}%
}
\def\cadreombre{\cadre@interne{ombre}}

\def\cadre@rond{%
 \cadre@dims{0.8pt}{0.4pt}{0.4pt}%
 \font\qc=lcircle10\qc
 \setbox2=\hbox{\char7}%
 \advance\w-\wd2\advance\h-\dp2\advance\d-\ht2\advance\d 0.4pt
 \setbox1=\hbox{%
  \kern0.2pt\char7\kern-0.5\wd2
  \vrule width\w height 0.4pt depth 0pt
  \kern0.5\wd2\char4\kern-\wd2\kern-0.2pt}%
 \setbox2=\hbox{%
  \kern0.2pt\char6\kern-0.5\wd2
  \vrule width\w height 0.4pt depth 0pt
  \kern0.5\wd2\char5\kern-\wd2\kern-0.2pt}%
 \ht1=0.4pt\dp1=0pt\ht2=0.4pt\dp2=0pt
 \vtop{\vbox{%
  \box1
  \hbox{\vrule height\h depth\d\box0\vrule height\h depth\d}}%
  \box2}%
}
\def\cadrerond{\cadre@interne{rond}}

%--------------------------------------------------
% date
%--------------------------------------------------
\def\date{{%
\leavevmode
%
\countdef\M=0\M=\month                             % \M = mois
\countdef\Y=1\Y=\year                              % \Y = année
\countdef\D=2\D=\day                               % \D = jour
\countdef\aux=3
%
\advance\M by -3                                   % fait commencer l'année ...
\ifnum\M < 0 \advance\M by 12\advance\Y by -1 \fi  % ... au 1er mars
\advance\Y by -1980                                % origine des temps = 1980
\multiply\Y by 5\divide\Y by 4                     % décalage de 5j par 4ans
\multiply\M by 26\advance\M by 5\divide\M by 10    % décalage de 2.6j par mois
\advance\D by \M\advance\D by\Y                    % cumule les décalages
\aux=\D\divide\aux by 7\multiply\aux by 7\advance\D by -\aux % réduit modulo 7
%
\ifcase\D vendredi    % écrit le jour de la semaine
      \or samedi      % Tous calculs faits, le 0 mars 1980 est un vendredi ...
      \or dimanche
      \or lundi
      \or mardi
      \or mercredi
      \or jeudi
\fi
\number\day           % écrit le quantieme du mois
\ifnum\day=1er\fi\    % 1er et non 1
\ifcase\month         % écrit le mois
      \or janvier
      \or février
      \or mars
      \or avril
      \or mai
      \or juin
      \or juillet
      \or août
      \or septembre
      \or octobre
      \or novembre
      \or décembre
\fi
\number\year                           % écrit l'annee
}}

%--------------------------------------------------
% mode verbatim
%--------------------------------------------------

\def\verbatim#1{%
 \begingroup
 \let\endverbatim\endgroup
 \tt
 \catcodetable1
 \catcode`#1=0%
 \obeyspaces
 \def\par{\endgraf\leavevmode}\obeylines
}

%--------------------------------------------------
% terminé
\catcode64=\active
