diff options
author | Karl Berry <karl@freefriends.org> | 2023-12-24 21:26:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-12-24 21:26:52 +0000 |
commit | 6212f57f9840af3d6b6ba678f0a3db3be9a9abd5 (patch) | |
tree | c2e41caf2f45206d79171ee963e443f4eb4a9aaf /Master/texmf-dist/tex/latex/frenchmath | |
parent | 8dff1f49a546b8ea8cabf0aaeae2597f0bd961a2 (diff) |
frenchmath (24dec23)
git-svn-id: svn://tug.org/texlive/trunk@69211 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/frenchmath')
-rw-r--r-- | Master/texmf-dist/tex/latex/frenchmath/frenchmath.sty | 218 |
1 files changed, 96 insertions, 122 deletions
diff --git a/Master/texmf-dist/tex/latex/frenchmath/frenchmath.sty b/Master/texmf-dist/tex/latex/frenchmath/frenchmath.sty index f9a114193ad..c2e86dcd246 100644 --- a/Master/texmf-dist/tex/latex/frenchmath/frenchmath.sty +++ b/Master/texmf-dist/tex/latex/frenchmath/frenchmath.sty @@ -22,22 +22,23 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{frenchmath} - [2023/03/08 v2.6 .dtx frenchmath file] + [2023/12/15 v2.7 .dtx frenchmath file] \newif\ifcapsit \DeclareOption{capsit}{\capsittrue} +\newif\iffrenchmathgreek % pour sauvegarder les lettres d'origine \newif\iflgrmath -\DeclareOption{lgrmath}{\lgrmathtrue} +\DeclareOption{lgrmath}{\lgrmathtrue\frenchmathgreektrue} \newif\ifupgreek -\DeclareOption{upgreek}{\upgreektrue} +\DeclareOption{upgreek}{\upgreektrue\frenchmathgreektrue} \newif\ifUpgreek -\DeclareOption{Upgreek}{\Upgreektrue\upgreektrue} +\DeclareOption{Upgreek}{\Upgreektrue\upgreektrue\frenchmathgreektrue} \newif\ifnoibrackets \DeclareOption{noibrackets}{\noibracketstrue} \ProcessOptions \relax \AtBeginDocument{ \@ifpackageloaded{mathdesign}{ - \PackageWarningNoLine{frenchmath}{Package mathdesign + \PackageInfo{frenchmath}{Package mathdesign is loaded, \MessageBreak I don't load mathrsfs and amssymb packages} }{ @@ -46,66 +47,98 @@ } } \RequirePackage{amsopn} % fournit \DeclareMathOperator -\@ifpackageloaded{mathptmx}{\RequirePackage{dotlessj}} -\iflgrmath +\@ifpackageloaded{mathptmx}{\RequirePackage{dotlessj}}{} + +\AtBeginDocument{ + \iflgrmath \@ifpackageloaded{lgrmath}{}{ \RequirePackage[font=fcm,style=french]{lgrmath}} -\fi -\ifupgreek - \@ifpackageloaded{upgreek}{}{\RequirePackage[Euler]{upgreek}} -\fi + \fi + \ifupgreek + \@ifpackageloaded{upgreek}{}{ + \RequirePackage[Symbol]{upgreek}} + \fi +} \RequirePackage{xspace} % utile pour les commandes \curs, \ssi, \Oij -\ifnoibrackets\else \RequirePackage{ibrackets} \fi % intelligent brackets +\ifnoibrackets\else\RequirePackage{ibrackets}\fi % intelligent brackets + +\RequirePackage{decimalcomma} % depuis frenchmath 2.7 + +\newcommand*\DeclareMathUp[1]{ + \DeclareMathSymbol{#1}{\mathalpha}{operators}{`#1}} + +\def\apply#1#2{\apply@#1#2,\apply@,} +\def\apply@#1#2,{\ifx\apply@#2\empty + \else #1{#2}\afterfi@{\apply@#1}\fi} +\def\afterfi@#1#2\fi{\fi#1} -\RequirePackage{ncccomma} % depuis frenchmath 1.6 -\@ifpackagewith{babel}{french}{}{ - \RequirePackage{iftex} - \ifluatex - \PackageWarningNoLine{frenchmath}{With LuaTeX engine, - \MessageBreak - load babel before frenchmath} - \fi -} -\AtBeginDocument{\mathcode`\,="8000\relax - \@ifpackageloaded{babel}{ - \addto\extrasfrench{\mathcode`\,="8000\relax} - }{} -} -\newcommand*\@mathup[1]{ - \DeclareMathSymbol{#1}{\mathalpha}{operators}{`#1} -} \ifcapsit\else - \AtBeginDocument{ - \@mathup{A} - \@mathup{B} - \@mathup{C} - \@mathup{D} - \@mathup{E} - \@mathup{F} - \@mathup{G} - \@mathup{H} - \@mathup{I} - \@mathup{J} - \@mathup{K} - \@mathup{L} - \@mathup{M} - \@mathup{N} - \@mathup{O} - \@mathup{P} - \@mathup{Q} - \@mathup{R} - \@mathup{S} - \@mathup{T} - \@mathup{U} - \@mathup{V} - \@mathup{W} - \@mathup{X} - \@mathup{Y} - \@mathup{Z} - } + \AtBeginDocument{ + \apply\DeclareMathUp{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z} + } \fi -\ifupgreek +\AtBeginDocument{\@ifpackageloaded{pstricks-add}{\psset{comma=true}}{}} +\DeclareMathSymbol{;}{\mathbin}{operators}{'73} % \mathpunct à l'origine + +\newcommand*\curs[1]{\mathscr{#1}} +\newcommand\infeg{\leqslant} +\newcommand\supeg{\geqslant} +\newcommand\vide{\varnothing} +\newcommand\paral{\mathrel{\ooalign{$\mkern-1.75mu/\mkern1.75mu$\cr% + $\mkern1.75mu/\mkern-1.75mu$}}} +\newcommand\ssi{si, et seulement si,\xspace} +\newcommand*\cmod[1]{\quad[#1]} + +\DeclareMathOperator{\pgcd}{pgcd} +\DeclareMathOperator{\ppcm}{ppcm} +\DeclareMathOperator{\card}{card} +\DeclareMathOperator{\Card}{Card} +\DeclareMathOperator{\Ker}{Ker} +\DeclareMathOperator{\Hom}{Hom} +\DeclareMathOperator{\rg}{rg} +\DeclareMathOperator{\Vect}{Vect} +\DeclareMathOperator{\ch}{ch} +\DeclareMathOperator{\sh}{sh} +\AtBeginDocument{\let\oldth\th %\th existe déjà (mode texte) + \renewcommand\th{\TextOrMath{\oldth}{\operatorname{th}}}} +\DeclareMathOperator{\cosec}{cosec} +\DeclareMathOperator{\cosech}{cosech} + +\newcommand\@Oij{% + \ensuremath{\left(O, \vec{\imath}, \vec{\jmath}\,\right)}\xspace} +\newcommand\@@Oij{% + \ensuremath{\left(O ; \vec{\imath}, \vec{\jmath}\,\right)}\xspace} +\newcommand\Oij{\@ifstar{\@@Oij}{\@Oij}} + +\newcommand\@Oijk{% + \ensuremath{% + \left(O, \vec{\vphantom{t}\imath}, \vec{\vphantom{t}\jmath}, + \vec{\vphantom{t}\smash{k}}\,\right)}% + \xspace} +\newcommand\@@Oijk{% + \ensuremath{% + \left(O ; \vec{\vphantom{t}\imath}, \vec{\vphantom{t}\jmath}, + \vec{\vphantom{t}\smash{k}}\,\right)}% + \xspace} +\newcommand\Oijk{\@ifstar{\@@Oijk}{\@Oijk}} + +\newcommand\@Ouv{% + \ensuremath{\left(O, \vec{u}, \vec{v}\,\right)}\xspace} +\newcommand\@@Ouv{% + \ensuremath{\left(O ; \vec{u}, \vec{v}\,\right)}\xspace} +\newcommand\Ouv{\@ifstar{\@@Ouv}{\@Ouv}} + +\AtBeginDocument{ + \renewcommand\ij{% + \ensuremath{\left(\vec{\imath}, \vec{\jmath}\,\right)}\xspace}} +\newcommand\ijk{% + \ensuremath{% + \left(\vec{\vphantom{t}\imath}, \vec{\vphantom{t}\jmath}, + \vec{\vphantom{t}\smash{k}}\,\right)}% + \xspace} + +\iffrenchmathgreek \@ifundefined{italpha}{\let\italpha\alpha}{ \PackageWarningNoLine{frenchmath}{Command \string\italpha\space already exist \MessageBreak @@ -146,7 +179,8 @@ \@ifundefined{itvarphi}{\let\itvarphi\varphi}{} \fi -\ifupgreek +\AtBeginDocument{ + \ifupgreek \renewcommand\alpha{\upalpha} \renewcommand\beta{\upbeta} \renewcommand\gamma{\upgamma} @@ -176,9 +210,9 @@ \renewcommand\varrho{\upvarrho} \renewcommand\varsigma{\upvarsigma} \renewcommand\varphi{\upvarphi} -\fi + \fi -\ifUpgreek + \ifUpgreek \renewcommand\Gamma{\Upgamma} \renewcommand\Delta{\Updelta} \renewcommand\Theta{\Uptheta} @@ -190,68 +224,8 @@ \renewcommand\Phi{\Upphi} \renewcommand\Psi{\Uppsi} \renewcommand\Omega{\Upomega} -\fi - -\AtBeginDocument{\@ifpackageloaded{pstricks-add}{\psset{comma=true}}{}} -\DeclareMathSymbol{;}{\mathbin}{operators}{'73} % \mathpunct à l'origine - -\newcommand*\curs[1]{\mathscr{#1}} -\newcommand\infeg{\leqslant} -\newcommand\supeg{\geqslant} -\newcommand\vide{\varnothing} -\newcommand\paral{\mathrel{\ooalign{$\mkern-1.75mu/\mkern1.75mu$\cr% - $\mkern1.75mu/\mkern-1.75mu$}} + \fi } -\newcommand\ssi{si, et seulement si,\xspace} -\newcommand*\cmod[1]{\quad[#1]} - -\DeclareMathOperator{\pgcd}{pgcd} -\DeclareMathOperator{\ppcm}{ppcm} -\DeclareMathOperator{\card}{card} -\DeclareMathOperator{\Card}{Card} -\DeclareMathOperator{\Ker}{Ker} -\DeclareMathOperator{\Hom}{Hom} -\DeclareMathOperator{\rg}{rg} -\DeclareMathOperator{\Vect}{Vect} -\DeclareMathOperator{\ch}{ch} -\DeclareMathOperator{\sh}{sh} -\AtBeginDocument{\let\oldth\th %\th existe déjà (mode texte) - \renewcommand\th{\TextOrMath{\oldth}{\operatorname{th}}}} -\DeclareMathOperator{\cosec}{cosec} -\DeclareMathOperator{\cosech}{cosech} - -\newcommand\@Oij{% - \ensuremath{\left(O, \vec{\imath}, \vec{\jmath}\,\right)}\xspace} -\newcommand\@@Oij{% - \ensuremath{\left(O ; \vec{\imath}, \vec{\jmath}\,\right)}\xspace} -\newcommand\Oij{\@ifstar{\@@Oij}{\@Oij}} - -\newcommand\@Oijk{% - \ensuremath{% - \left(O, \vec{\vphantom{t}\imath}, \vec{\vphantom{t}\jmath}, - \vec{\vphantom{t}\smash{k}}\,\right)}% - \xspace} -\newcommand\@@Oijk{% - \ensuremath{% - \left(O ; \vec{\vphantom{t}\imath}, \vec{\vphantom{t}\jmath}, - \vec{\vphantom{t}\smash{k}}\,\right)}% - \xspace} -\newcommand\Oijk{\@ifstar{\@@Oijk}{\@Oijk}} - -\newcommand\@Ouv{% - \ensuremath{\left(O, \vec{u}, \vec{v}\,\right)}\xspace} -\newcommand\@@Ouv{% - \ensuremath{\left(O ; \vec{u}, \vec{v}\,\right)}\xspace} -\newcommand\Ouv{\@ifstar{\@@Ouv}{\@Ouv}} - -\AtBeginDocument{ - \renewcommand\ij{% - \ensuremath{\left(\vec{\imath}, \vec{\jmath}\,\right)}\xspace}} -\newcommand\ijk{% - \ensuremath{% - \left(\vec{\vphantom{t}\imath}, \vec{\vphantom{t}\jmath}, - \vec{\vphantom{t}\smash{k}}\,\right)}% - \xspace} \endinput %% |