summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eulerpx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-14 20:16:39 +0000
committerKarl Berry <karl@freefriends.org>2022-07-14 20:16:39 +0000
commit0b8488c78a724e5502da4c748bc875bdc3afcdd9 (patch)
tree1850c73538ef0a062de0a417aa4ef2ad7184567f /Master/texmf-dist/tex/latex/eulerpx
parenteaaf9faef83392a61ca18d110442330a4a636416 (diff)
eulerpx (14jul22)
git-svn-id: svn://tug.org/texlive/trunk@63890 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eulerpx')
-rw-r--r--Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty281
1 files changed, 152 insertions, 129 deletions
diff --git a/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty b/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty
index cc26a46e9a7..33cc0ae11e2 100644
--- a/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty
+++ b/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty
@@ -1,33 +1,123 @@
-%% eulerpx.sty
-%% Copyright 2016-2017 J. A. Ouassou
-%% Copyright 2021 L. Tijssen
-%%
-%% This work may be distributed and/or modified under the conditions of the LaTeX
-%% Project Public License, either version 1.3 of this license or (at your option)
-%% any later version. The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This work has the LPPL maintenance status `maintained'.
-%%
-%% The Current Maintainer of this work is L. Tijssen.
-%%
-%% This work consists of the file eulerpx.sty.
-%%
-
-% Package metadata
-\def\fileversion{v0.3.1}
-\def\filedate{2021/07/12}
+% eulerpx.sty
+%
+% Copyright (C) 2016, 2017 Jabir Ali Ouassou
+% Copyright (C) 2021, 2022 Luuk Tijssen
+%
+% This work may be distributed and/or modified under the conditions of the LaTeX
+% Project Public License, either version 1.3 of this license or (at your option)
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Luuk Tijssen.
+%
+% This work consists of the file eulerpx.sty.
+
+\def\fileversion{v1.0}
+\def\filedate{2022/07/14}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{eulerpx}[\filedate\space\fileversion]
-\typeout{Package: `eulerpx' \fileversion\space<\filedate>}
+\typeout{Package: `eulerpx' \fileversion\space <\filedate>}
-% Inherit custom integral definitions from `amsmath'
\RequirePackage{amsmath}
+\RequirePackage{xkeyval}
+
+%% Macro definitions
+
+% Apply font-wide scaling factor
+\def\epx@scale#1{%
+ \xdef\zeu@Scale{#1}%
+ \xdef\zeu@@Scale{s*[#1]}%
+}
+
+% Use text symbols in math
+\def\epx@mathsymbol#1{%
+ \mathchoice
+ {\mbox{{\normalsize#1}}}
+ {\mbox{{\normalsize#1}}}
+ {\mbox{{\scriptsize#1}}}
+ {\mbox{{\tiny#1}}}%
+}
+\def\epx@mathop#1{%
+ \mathchoice
+ {\vcenter{\hbox{{\normalsize#1}}}}
+ {\vcenter{\hbox{{\normalsize#1}}}}
+ {\vcenter{\hbox{{\scriptsize#1}}}}
+ {\vcenter{\hbox{{\tiny#1}}}}%
+}
+
+% \let#1=#2, only if #2 exists
+\def\epx@let#1#2{%
+ \ifdefined#2
+ \let#1=#2
+ \else
+ \PackageWarning{eulerpx}{%
+ Missing character `\protect#2',\MessageBreak
+ substituting `\protect#1'%
+ }
+ \fi
+}
+
+%% Package options
-% Inherit math symbols from the `newpxmath' package
-\RequirePackage{newpxmath}
+\newif\ifepx@npxmath
+\newif\ifepx@slant
+\DeclareOptionX{scale}{\epx@scale{#1}}
+\DeclareOptionX{scaled}{\epx@scale{#1}}
+\DeclareOptionX{nonpxmath}{\epx@npxmathfalse}
+\DeclareOptionX{noslant}{\epx@slantfalse}
+
+\epx@scale{1.0}
+\epx@npxmathtrue
+\epx@slanttrue
+\ProcessOptionsX
+
+%% Font setup
+
+\ifepx@npxmath
+ %\@ifpackageloaded{newpxmath}{%
+ % \PackageWarning{eulerpx}{%
+ % Package `newpxmath' already loaded\MessageBreak
+ % package options may differ%
+ % }}{%
+ \RequirePackage[upint,scaled=\zeu@Scale]{newpxmath}%
+ % }%
+\fi
+
+\ifepx@slant
+ \epx@let{\geq}{\geqslant}
+ \let\ge=\geq
+ \epx@let{\leq}{\leqslant}
+ \let\le=\leq
+ \epx@let{\ngeq}{\ngeqslant}
+ \epx@let{\nleq}{\nleqslant}
+\fi
+
+% eulervm.sty, ca. lines 133--146/
+% newpxmath.sty, ca. lines 197--209
+% Miscellaneous text font symbols
+\DeclareMathSymbol{,}{\mathpunct}{operators}{44}
+\DeclareMathSymbol{.}{\mathord}{operators}{46}
+\DeclareMathSymbol{\ldotp}{\mathpunct}{operators}{46}
+%\def\mathsection{\epx@mathsymbol{\textsection}} % doesn't respect \boldmath
+
+% Declare text font as operator font
+\DeclareSymbolFont{operators}{OT1}{\rmdefault}{m}{n}
+\SetSymbolFont{operators}{bold}{OT1}{\rmdefault}{b}{n}
+\def\operator@font{\mathgroup\symoperators}
+
+% Declare text font as math alphabets
+\DeclareSymbolFontAlphabet{\mathrm}{operators}
+\DeclareMathAlphabet{\mathsf}{\encodingdefault}{\sfdefault}{m}{n}
+\DeclareMathAlphabet{\mathit}{OT1}{\rmdefault}{m}{it}
+\DeclareMathAlphabet{\mathtt}{\encodingdefault}{\ttdefault}{m}{n}
+\SetMathAlphabet{\mathsf}{bold}{\encodingdefault}{\sfdefault}{b}{n}
+\SetMathAlphabet{\mathit}{bold}{OT1}{\rmdefault}{b}{it}
+\SetMathAlphabet{\mathtt}{bold}{\encodingdefault}{\ttdefault}{b}{n}
+\DeclareMathAlphabet{\mathbf}{OT1}{\rmdefault}{b}{n}
% Declare Euler Roman as symbol font
\DeclareSymbolFont{EulerRoman}{U}{zeur}{m}{n}
@@ -36,14 +126,32 @@
% Declare Euler math alphabets
% Euler Script
+\let\varmathscr=\mathscr
\let\mathscr=\undefined
\DeclareMathAlphabet\mathscr{U}{zeus}{m}{n}
\SetMathAlphabet\mathscr{bold}{U}{zeus}{b}{n}
+% eulervm.sty, ca. lines 217--227
% Euler Fraktur
+\DeclareFontFamily{U}{euf}{}%
+\DeclareFontShape{U}{euf}{m}{n}{%
+ <-6>\zeu@@Scale eufm5%
+ <6-9>\zeu@@Scale eufm7%
+ <9->\zeu@@Scale eufm10%
+}{}%
+\DeclareFontShape{U}{euf}{b}{n}{%
+ <-6>\zeu@@Scale eufb5%
+ <6-9>\zeu@@Scale eufb7%
+ <9->\zeu@@Scale eufb10%
+}{}%
+
+\let\varmathfrak=\mathfrak
+\let\mathfrak=\undefined
\DeclareMathAlphabet\mathfrak{U}{euf}{m}{n}
\SetMathAlphabet\mathfrak{bold}{U}{euf}{b}{n}
+%% Symbol declarations
+
% Upper-case Greek letters
\DeclareMathSymbol{\Gamma}{\mathalpha}{EulerRoman}{0}
\DeclareMathSymbol{\Delta}{\mathalpha}{EulerRoman}{1}
@@ -88,7 +196,7 @@
\let\varrho=\rho
\DeclareMathSymbol{\varphi}{\mathord}{EulerRoman}{39}
-%% Arabic (lining) numerals
+% Arabic (lining) numerals
%\DeclareMathSymbol{0}{\mathalpha}{EulerRoman}{48}
%\DeclareMathSymbol{1}{\mathalpha}{EulerRoman}{49}
%\DeclareMathSymbol{2}{\mathalpha}{EulerRoman}{50}
@@ -101,6 +209,7 @@
%\DeclareMathSymbol{9}{\mathalpha}{EulerRoman}{57}
%
%\DeclareMathSymbol{.}{\mathord}{EulerRoman}{58}
+%\DeclareMathSymbol{\ldotp}{\mathpunct}{EulerRoman}{58}
%\DeclareMathSymbol{,}{\mathpunct}{EulerRoman}{59}
\DeclareMathSymbol{\partial}{\mathord}{EulerRoman}{64}
@@ -167,111 +276,25 @@
\DeclareMathSymbol{\jmath}{\mathord}{EulerRoman}{124}
\DeclareMathSymbol{\wp}{\mathord}{EulerRoman}{125}
-\DeclareMathSymbol{\hslash}{\mathord}{EulerRoman}{128}
-\let\hbar=\hslash
-
-% Renew the definition of #1 to #3, only if #3 exists,
-% and store the old definition of #1 in #2
-\def\epx@renewifdefined#1#2#3{%
- \ifdefined#3%
- \let#2=#1%
- \let#1=#3%
- \fi%
-}
-
-% Change geq, leq and their shorthands/negations to slanted versions
-\epx@renewifdefined{\geq}{\geqnormal}{\geqslant}
-\let\ge=\geq
-\epx@renewifdefined{\leq}{\leqnormal}{\leqslant}
-\let\le=\leq
-\epx@renewifdefined{\ngeq}{\ngeqnormal}{\ngeqslant}
-\epx@renewifdefined{\nleq}{\nleqnormal}{\nleqslant}
-
-% Upright integrals
-\epx@renewifdefined{\smallint}{\smallintsl}{\smallintup}
-\epx@renewifdefined{\smalliint}{\smalliintsl}{\smalliintup}
-\epx@renewifdefined{\smalliiint}{\smalliiintsl}{\smalliiintup}
-\epx@renewifdefined{\smalloint}{\smallointsl}{\smallointup}
-\epx@renewifdefined{\smalloiint}{\smalloiintsl}{\smalloiintup}
-\epx@renewifdefined{\smalloiiint}{\smalloiiintsl}{\smalloiiintup}
-\epx@renewifdefined{\smallvarointclockwise}{\smallvarointclockwisesl}{\smallvarointclockwiseup}
-\epx@renewifdefined{\smallointctrclockwise}{\smallointctrclockwisesl}{\smallointctrclockwiseup}
-\epx@renewifdefined{\smallsumint}{\smallsumintsl}{\smallsumintup}
-\epx@renewifdefined{\smalliiiint}{\smalliiiintsl}{\smalliiiintup}
-\epx@renewifdefined{\smallfint}{\smallfintsl}{\smallfintup}
-\epx@renewifdefined{\smallsqint}{\smallsqintsl}{\smallsqintup}
-
-\epx@renewifdefined{\intop}{\intslop}{\intupop}
-\epx@renewifdefined{\iintop}{\iintslop}{\iintupop}
-\epx@renewifdefined{\iiintop}{\iiintslop}{\iiintupop}
-\epx@renewifdefined{\ointop}{\ointslop}{\ointupop}
-\epx@renewifdefined{\oiintop}{\oiintslop}{\oiintupop}
-\epx@renewifdefined{\oiiintop}{\oiiintslop}{\oiiintupop}
-\epx@renewifdefined{\varointclockwiseop}{\varointclockwiseslop}{\varointclockwiseupop}
-\epx@renewifdefined{\ointctrclockwiseop}{\ointctrclockwiseslop}{\ointctrclockwiseupop}
-\epx@renewifdefined{\sumintop}{\sumintslop}{\sumintupop}
-\epx@renewifdefined{\iiiintop}{\iiiintslop}{\iiiintupop}
-\epx@renewifdefined{\fintop}{\fintslop}{\fintupop}
-\epx@renewifdefined{\sqintop}{\sqintslop}{\sqintupop}
-
-% Sans-serif maths
-\DeclareOption{sansmath}{
- % Declare the math serif font
- \DeclareMathVersion{normal}
- \SetSymbolFont{operators}{normal}{T1}{\rmdefault}{m}{n}
- \SetMathAlphabet{\mathrm}{normal}{T1}{\rmdefault}{m}{n}
-
- % Declare the math sans font
- \DeclareMathVersion{sans}
- \SetSymbolFont{operators}{sans}{T1}{\sfdefault}{m}{n}
- \SetMathAlphabet{\mathrm}{sans}{T1}{\sfdefault}{m}{n}
-
- % Make the package toggle between sans/serif math automatically
- \let\oldrmfamily=\rmfamily
- \let\oldsffamily=\sffamily
- \renewcommand{\rmfamily}{\oldrmfamily\mathversion{normal}}
- \renewcommand{\sffamily}{\oldsffamily\mathversion{sans}}
-}
+% Miscellaneous Euler symbols
+%\DeclareMathSymbol{\hslash}{\mathord}{EulerRoman}{128}
+%\let\hbar=\hslash
+% don't respect \boldmath
+\def\Re{\epx@mathsymbol{\usefont{U}{zeus}{m}{n}\char60}}
+\def\Im{\epx@mathsymbol{\usefont{U}{zeus}{m}{n}\char61}}
+\let\varaleph=\aleph
+\def\aleph{\epx@mathsymbol{\usefont{U}{zeus}{m}{n}\char64}}
+\def\mathsection{\epx@mathsymbol{\usefont{U}{zeus}{m}{n}\char120}}
-% Unicode input
-\DeclareOption{utf8}{
- \DeclareUnicodeCharacter{0393}{\Gamma}
- \DeclareUnicodeCharacter{0394}{\Delta}
- \DeclareUnicodeCharacter{0398}{\Theta}
- \DeclareUnicodeCharacter{039B}{\Lambda}
- \DeclareUnicodeCharacter{039E}{\Xi}
- \DeclareUnicodeCharacter{03A0}{\Pi}
- \DeclareUnicodeCharacter{03A3}{\Sigma}
- \DeclareUnicodeCharacter{03A5}{\Upsilon}
- \DeclareUnicodeCharacter{03A6}{\Phi}
- \DeclareUnicodeCharacter{03A8}{\Psi}
- \DeclareUnicodeCharacter{03A9}{\Omega}
- \DeclareUnicodeCharacter{03B1}{\alpha}
- \DeclareUnicodeCharacter{03B2}{\beta}
- \DeclareUnicodeCharacter{03B3}{\gamma}
- \DeclareUnicodeCharacter{03B4}{\delta}
- \DeclareUnicodeCharacter{03B5}{\epsilon}
- \DeclareUnicodeCharacter{03B6}{\zeta}
- \DeclareUnicodeCharacter{03B7}{\eta}
- \DeclareUnicodeCharacter{03B8}{\theta}
- \DeclareUnicodeCharacter{03B9}{\iota}
- \DeclareUnicodeCharacter{03BA}{\kappa}
- \DeclareUnicodeCharacter{03BB}{\lambda}
- \DeclareUnicodeCharacter{03BC}{\mu}
- \DeclareUnicodeCharacter{03BD}{\nu}
- \DeclareUnicodeCharacter{03BE}{\xi}
- \DeclareUnicodeCharacter{03C0}{\pi}
- \DeclareUnicodeCharacter{03C1}{\rho}
- \DeclareUnicodeCharacter{03C2}{\sigma}
- \DeclareUnicodeCharacter{03C3}{\sigma}
- \DeclareUnicodeCharacter{03C4}{\tau}
- \DeclareUnicodeCharacter{03C5}{\upsilon}
- \DeclareUnicodeCharacter{03C6}{\varphi}
- \DeclareUnicodeCharacter{03C7}{\chi}
- \DeclareUnicodeCharacter{03C8}{\psi}
- \DeclareUnicodeCharacter{03C9}{\omega}
+\def\epx@smallsum{\epx@mathop{\usefont{U}{zeuex}{m}{n}\char80}}
+\def\epx@sum{\epx@mathop{\usefont{U}{zeuex}{m}{n}\char88}}
+\let\varsum=\sum
+\let\sum=\undefined
+\DeclareMathOperator*{\sum}{%
+ \mathchoice{\epx@sum}{\epx@smallsum}{\epx@smallsum}{\epx@smallsum}%
}
-\ProcessOptions\relax
+%\let\varsmallsum=\smallsum
+%\def\smallsum{\epx@mathop{\usefont{U}{zeur}{m}{n}\char6}}
\endinput