summaryrefslogtreecommitdiffstats
path: root/config/macros.tex
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2013-02-28 20:28:12 +0100
committerDavid A. Madore <david+git@madore.org>2013-02-28 20:28:12 +0100
commit4178e21c15a5cafcb368d70bac44f4d4afa699f4 (patch)
tree47758a02fd28b2d77efc65c5056c34783192dad5 /config/macros.tex
parentdab454d6594f533f1fcbe0c44f08b7865742625f (diff)
downloadgalois-4178e21c15a5cafcb368d70bac44f4d4afa699f4.tar.gz
galois-4178e21c15a5cafcb368d70bac44f4d4afa699f4.tar.bz2
galois-4178e21c15a5cafcb368d70bac44f4d4afa699f4.zip
Transformation en LuaTeX: gestion des caractères CJK, transformation de categories.tex
Diffstat (limited to 'config/macros.tex')
-rw-r--r--config/macros.tex83
1 files changed, 71 insertions, 12 deletions
diff --git a/config/macros.tex b/config/macros.tex
index 2b69620..fb55872 100644
--- a/config/macros.tex
+++ b/config/macros.tex
@@ -4,17 +4,40 @@
%% Macros pour les formules
%%
-%% Opérateurs en caractères romains
-\DeclareMathOperator{\Hom}{Hom}
-\DeclareMathOperator{\Id}{Id}
-\DeclareMathOperator{\Ker}{Ker}
-\DeclareMathOperator{\Fix}{Fix}
-\DeclareMathOperator{\pgcd}{pgcd}
-\DeclareMathOperator{\car}{car}
-\DeclareMathOperator{\Frob}{Frob}
-
-\DeclareMathOperator{\Tr}{Tr}
-\DeclareMathOperator{\N}{N}
+%% Opérateurs en caractères romains, etc.
+
+% Macro pour définir un opérateur dans une police quelconque
+\newcommand\DeclareMathOperatorWithFont[3]{%
+\newcommand{#1}{\mathop{\kern0pt\relax#2{#3}}\nolimits}}
+
+\DeclareMathOperatorWithFont{\Hom}{\mathsf}{Hom}
+\DeclareMathOperatorWithFont{\End}{\mathsf}{End}
+\DeclareMathOperatorWithFont{\Isom}{\mathsf}{Isom}
+\DeclareMathOperatorWithFont{\Aut}{\mathsf}{Aut}
+\DeclareMathOperatorWithFont{\Int}{\mathsf}{Int}
+\DeclareMathOperatorWithFont{\Out}{\mathsf}{Out}
+
+\DeclareMathOperatorWithFont{\Id}{\mathrm}{Id}
+\DeclareMathOperatorWithFont{\Ker}{\mathrm}{Ker}
+\DeclareMathOperatorWithFont{\Fix}{\mathrm}{Fix}
+
+\DeclareMathOperatorWithFont{\pgcd}{\mathrm}{pgcd}
+\DeclareMathOperatorWithFont{\ppcm}{\mathrm}{ppcm}
+
+\DeclareMathOperatorWithFont{\prlim}{\mathrm}{lim}
+\DeclareMathOperatorWithFont{\colim}{\mathrm}{colim}
+
+\DeclareMathOperatorWithFont{\car}{\mathrm}{car}
+\DeclareMathOperatorWithFont{\Frob}{\mathrm}{Frob}
+
+\DeclareMathOperatorWithFont{\Tr}{\mathrm}{Tr}
+\DeclareMathOperatorWithFont{\N}{\mathrm}{N}
+
+\DeclareMathOperatorWithFont{\ob}{\mathsf}{Ob}
+
+\newcommand{\op}{^{\mathsf{op}}}
+\newcommand{\sep}{^{\mathrm{sép}}}
+\newcommand{\alg}{^{\mathrm{alg}}}
%% Ensembles usuels
\newcommand{\ZZ}{\mathbf{Z}}
@@ -27,10 +50,18 @@
\newcommand{\GG}{\mathbf{G}}
%% Divers
-\newcommand{\bo}{/} % barre oblique apparaissant dans A/k
+% Barre oblique apparaissant dans A/k
+\newcommand{\bo}{/}
+
+% Symbole de Legendre
\newcommand{\Legendre}[2]{\left(\frac{#1}{#2}\right)}
+% Police pour les catégories
+\newcommand{\categ}[1]{\mathtt{#1}}
+
+\newcommand{\Ens}{\categ{Ens}}
+
%% Tiret et trait d'union en mode maths
% Trouvé sur <URL: http://tug.org/pipermail/luatex/2010-October/002192.html >
@@ -47,6 +78,25 @@
\DeclareUnicodeMathSymbol{\tiret}{\mathord}{operators}{"2013}
\DeclareMathSymbol{\traitdunion}{\mathord}{operators}{"2D}
+%% Symboles divers
+\DeclareUnicodeMathSymbol{\boxempty}{\mathord}{operators}{"25A1}
+
+%% Caractères japonais
+% On définit la police IPA Mincho. L'argument range semble ne pas fonctionner !
+\setmathfont[range={"4E00-"9FFF},Script=CJK]{IPAMincho}
+% On sauve le nom LaTeX de famille de cette police
+\ExplSyntaxOn
+\let\saveIPAMinchoFamily\um_symfont_tl
+\ExplSyntaxOff
+% Maintenant on peut définir les caractères eux-mêmes
+\Umathcode`米="0"\the\csname sym\saveIPAMinchoFamily\endcsname"7C73
+\DeclareUnicodeMathSymbol{\yone}{\mathord}{\saveIPAMinchoFamily}{"7C73}
+\Umathcode`田="0"\the\csname sym\saveIPAMinchoFamily\endcsname"7530
+\DeclareUnicodeMathSymbol{\yoneDA}{\mathord}{\saveIPAMinchoFamily}{"7530}
+
+% Voir <URL: http://tex.stackexchange.com/questions/95304/spacing-changes-when-using-unicode-math-range-feature-why >
+\setmathfont[range={}]{XITS Math}
+
%% Fabrice n'aime pas les noms anglais
\let\chap\widehat
\let\sur\overline
@@ -67,6 +117,7 @@
% Ce qui suit définit l'environnement {définition2} comme exactement synonyme de {definition2}
\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname définition2\endcsname\csname definition2\endcsname
\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname enddéfinition2\endcsname\csname enddefinition2\endcsname
+\newtheorem{convention2}[subsubsection]{Convention}
\newtheorem{remarque2}[subsubsection]{Remarque}
\newtheorem{remarques2}[subsubsection]{Remarques}
\newtheorem{exemple2}[subsubsection]{Exemple}
@@ -78,6 +129,8 @@
\expandafter\let\csname démo\endcsname\proof
\expandafter\let\csname enddémo\endcsname\endproof
+\renewcommand{\contentsname}{Table des matières}
+
%%
%% Macros générales
%%
@@ -88,3 +141,9 @@
%% Commentaires
\newcommand\commentaire[1]{\textcolor{Magenta}{#1}}
\newcommand\XXX{\textcolor{Magenta}{(XXX)}}
+
+%%
+%% Paramétrages divers
+%%
+\setcounter{tocdepth}{2}
+