diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/eulerpx |
Initial commit
Diffstat (limited to 'fonts/eulerpx')
-rw-r--r-- | fonts/eulerpx/README | 85 | ||||
-rw-r--r-- | fonts/eulerpx/eulerpx.sty | 178 |
2 files changed, 263 insertions, 0 deletions
diff --git a/fonts/eulerpx/README b/fonts/eulerpx/README new file mode 100644 index 0000000000..593f66d513 --- /dev/null +++ b/fonts/eulerpx/README @@ -0,0 +1,85 @@ +================================================================================ += = += Eulerpx: A Modern Interface to the Euler math fonts = += = +================================================================================ += = += Version 0.2.1 Jabir Ali Ouassou = += 2017-04-10 <jabirali at switzerlandmail dot ch> = += = +================================================================================ + +This package provides the `eulerpx' font, which started as a hybrid of multiple +other font packages, notably eulervm and newpxmath. Its purpose is twofold: + (1) To use the eulervm symbols for greek and latin letters, but the newpxmath + font for braces and brackets, and the text font for digits and operators; + (2) To make it easy to change between a sans and serif font for the digits and + operators, so that the font can be used seamlessly in documents using both. + As of v0.2, this is done automatically when you use \sffamily and \rmfamily. +This package was put together with the intent to use it with the Palatino and +Optima fonts (newpxtext and classico), but may work with other combinations too; +for instance, using it with the Kepler and Biolinum fonts (kpfonts and biolinum). + +To use the package, add this to your preamble: + + \usepackage{eulerpx} + +Note that in contrast to the eulervm package, bold math characters are accessed +through the \mathbf macro. If the option `utf8' is provided, the package will +also declare the Greek unicode range; i.e., if the package is included with + + \usepackage[utf8]{inputenc} + \usepackage[utf8]{eulerpx} + +then you may write your equations in the form $α+β$ instead of $\alpha+\beta$. + + + +License +------- +Copyright 2016-2017 J. A. Ouassou + +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 J. A. Ouassou. + +This work consists of the file eulerpx.sty. + + + +History +------- +2016-10-01: + v0.1: Initial eulerpx package created. +2017-02-03: + v0.2: Fixed a bug that messed up symbols like braces and brackets. Redefined + the macros \sffamily and \rmfamily so that they automatically change + the alphabet used for operators and numbers to match the environment. +2017-04-10: + v0.2.1: Fixed a bug that prevented \infty from displaying correctly. + [Thanks to Georg Bube for reporting the problem and solution.] + + + +Credits +------- +This package is based on the following existing packages: + - The package `newpxmath' is loaded as a base font, to provide parentheses, + brackets, relations, \mathbb, etc. This was done because in the authors' + opinion, the newpx brackets are much more aesthetic than the Euler ones. + - The Euler symbols for latin and greek letters are then loaded. This part + is based directly on the `eulervm' package, but it has been modified to + not use e.g. Euler digits and brackets. For maintainability, the support + for other encodings than T1 has been removed. + - The \mathversion implementation is inspired by the `sansmath' package. I + have modified this such that the macro does not alter the font used for + mathematical symbols, only the fonts used for operators and numerals. This + is useful for people that want to consistently use the Euler symbols in + *all* environments, and only typeset operators and digits in sans/serif. diff --git a/fonts/eulerpx/eulerpx.sty b/fonts/eulerpx/eulerpx.sty new file mode 100644 index 0000000000..1af6c7b773 --- /dev/null +++ b/fonts/eulerpx/eulerpx.sty @@ -0,0 +1,178 @@ +%% eulerpx.sty +%% Copyright 2016-2017 J. A. Ouassou +%% +%% 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 J. A. Ouassou. +%% +%% This work consists of the file eulerpx.sty. +%% + +% Package metadata +\def\fileversion{v0.2.1} +\def\filedate{2017/04/10} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{eulerpx}[\filedate\space\fileversion] +\typeout{Package: `eulerpx' \fileversion\space<\filedate>} + +% Make sure we have support for T1 symbols +\RequirePackage[T1]{fontenc} + +% Inherit math symbols from the `newpxmath' package +\RequirePackage[varbb,upint]{newpxmath} + +% 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}} + +%% Get rid of the existing \mathbf font +\let\mathbf=\relax + +% Declare Euler math alphabets +\DeclareSymbolFont{letters} {U}{zeur}{m}{n} +\SetSymbolFont{letters}{bold} {U}{zeur}{b}{n} +\DeclareMathAlphabet{\mathbf} {U}{zeur}{b}{n} + +% Upper-case greek letters +\DeclareMathSymbol{\Gamma} {\mathalpha}{letters}{"00} +\DeclareMathSymbol{\Delta} {\mathalpha}{letters}{"01} +\DeclareMathSymbol{\Theta} {\mathalpha}{letters}{"02} +\DeclareMathSymbol{\Lambda} {\mathalpha}{letters}{"03} +\DeclareMathSymbol{\Xi} {\mathalpha}{letters}{"04} +\DeclareMathSymbol{\Pi} {\mathalpha}{letters}{"05} +\DeclareMathSymbol{\Sigma} {\mathalpha}{letters}{"06} +\DeclareMathSymbol{\Upsilon} {\mathalpha}{letters}{"07} +\DeclareMathSymbol{\Phi} {\mathalpha}{letters}{"08} +\DeclareMathSymbol{\Psi} {\mathalpha}{letters}{"09} +\DeclareMathSymbol{\Omega} {\mathalpha}{letters}{"0A} + +\DeclareMathSymbol{\upOmega} {\mathord}{letters}{"0A} +\DeclareMathSymbol{\upDelta} {\mathord}{letters}{"01} + +% Lower-case greek letters +\DeclareMathSymbol{\alpha} {\mathalpha}{letters}{"0B} +\DeclareMathSymbol{\beta} {\mathalpha}{letters}{"0C} +\DeclareMathSymbol{\gamma} {\mathalpha}{letters}{"0D} +\DeclareMathSymbol{\delta} {\mathalpha}{letters}{"0E} +\DeclareMathSymbol{\epsilon} {\mathalpha}{letters}{"0F} +\DeclareMathSymbol{\zeta} {\mathalpha}{letters}{"10} +\DeclareMathSymbol{\eta} {\mathalpha}{letters}{"11} +\DeclareMathSymbol{\theta} {\mathalpha}{letters}{"12} +\DeclareMathSymbol{\iota} {\mathalpha}{letters}{"13} +\DeclareMathSymbol{\kappa} {\mathalpha}{letters}{"14} +\DeclareMathSymbol{\lambda} {\mathalpha}{letters}{"15} +\DeclareMathSymbol{\mu} {\mathalpha}{letters}{"16} +\DeclareMathSymbol{\nu} {\mathalpha}{letters}{"17} +\DeclareMathSymbol{\xi} {\mathalpha}{letters}{"18} +\DeclareMathSymbol{\pi} {\mathalpha}{letters}{"19} +\DeclareMathSymbol{\rho} {\mathalpha}{letters}{"1A} +\DeclareMathSymbol{\sigma} {\mathalpha}{letters}{"1B} +\DeclareMathSymbol{\tau} {\mathalpha}{letters}{"1C} +\DeclareMathSymbol{\upsilon} {\mathalpha}{letters}{"1D} +\DeclareMathSymbol{\phi} {\mathalpha}{letters}{"1E} +\DeclareMathSymbol{\chi} {\mathalpha}{letters}{"1F} +\DeclareMathSymbol{\psi} {\mathalpha}{letters}{"20} +\DeclareMathSymbol{\omega} {\mathalpha}{letters}{"21} +\DeclareMathSymbol{\varepsilon} {\mathalpha}{letters}{"22} +\DeclareMathSymbol{\vartheta} {\mathalpha}{letters}{"23} +\DeclareMathSymbol{\varpi} {\mathalpha}{letters}{"24} +\DeclareMathSymbol{\varphi} {\mathalpha}{letters}{"27} + +\let\varsigma=\sigma +\let\varrho=\rho + +% Math accents +\DeclareMathAccent{\acute}{\mathalpha}{operators}{1} +\DeclareMathAccent{\grave}{\mathalpha}{operators}{0} +\DeclareMathAccent{\ddot}{\mathalpha}{operators}{4} +\DeclareMathAccent{\tilde}{\mathalpha}{operators}{3} +\DeclareMathAccent{\bar}{\mathalpha}{operators}{9} +\DeclareMathAccent{\breve}{\mathalpha}{operators}{8} +\DeclareMathAccent{\check}{\mathalpha}{operators}{7} +\DeclareMathAccent{\hat}{\mathalpha}{operators}{2} +\DeclareMathAccent{\dot}{\mathalpha}{operators}{10} + +% Numbers +\DeclareMathSymbol{0}{\mathord}{operators}{`0} +\DeclareMathSymbol{1}{\mathord}{operators}{`1} +\DeclareMathSymbol{2}{\mathord}{operators}{`2} +\DeclareMathSymbol{3}{\mathord}{operators}{`3} +\DeclareMathSymbol{4}{\mathord}{operators}{`4} +\DeclareMathSymbol{5}{\mathord}{operators}{`5} +\DeclareMathSymbol{6}{\mathord}{operators}{`6} +\DeclareMathSymbol{7}{\mathord}{operators}{`7} +\DeclareMathSymbol{8}{\mathord}{operators}{`8} +\DeclareMathSymbol{9}{\mathord}{operators}{`9} + +% Punctuation +\DeclareMathSymbol{!}{\mathclose}{operators}{"21} +\DeclareMathSymbol{,}{\mathpunct}{operators}{`\,} +\DeclareMathSymbol{.}{\mathord}{operators}{`\.} +\DeclareMathSymbol{:}{\mathrel}{operators}{`\:} +\DeclareMathSymbol{;}{\mathpunct}{operators}{`\;} +\DeclareMathSymbol{?}{\mathclose}{operators}{`\?} + +% Miscellaneous +\DeclareMathSymbol{\hbar}{\mathord}{letters}{128} +\DeclareMathSymbol{\infty}{\mathord}{symbols}{49} + +% 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} +} + +\ProcessOptions\relax |