From c8298012226892dc8ff271a400afe8539498ae97 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 6 Feb 2017 23:37:01 +0000 Subject: eulerpx (6feb17) git-svn-id: svn://tug.org/texlive/trunk@43157 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/fonts/eulerpx/README | 26 ++++++++++++------------- Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty | 21 ++++++++++---------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Master/texmf-dist/doc/fonts/eulerpx/README b/Master/texmf-dist/doc/fonts/eulerpx/README index 2b40d66470c..652b0731859 100644 --- a/Master/texmf-dist/doc/fonts/eulerpx/README +++ b/Master/texmf-dist/doc/fonts/eulerpx/README @@ -4,8 +4,8 @@ = = ================================================================================ = = -= Version 0.1 Jabir Ali Ouassou = -= 2016-10-01 = += Version 0.2 Jabir Ali Ouassou = += 2017-02-03 = = = ================================================================================ @@ -15,19 +15,15 @@ other font packages, notably eulervm and newpxmath. Its purpose is twofold: 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. +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} -You may use the \sfmath and \rmmath macros to switch between serif and sans fonts -for the digits and operators. For instance, if you use a KOMA-Script class, you -can put the following in your preamble to switch all footnotes to a sans font: - - \addtokomafont{footnote}{\sffamily\sfmath} - 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 @@ -61,7 +57,11 @@ This work consists of the file eulerpx.sty. History ------- 2016-10-01: - v0.1: Initial eulerpx package created + 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. @@ -75,8 +75,8 @@ This package is based on the following existing packages: 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 \sfmath implementation is inspired by the `sansmath' package. I have, - however, modified this such that the macro does not alter the font used - for mathematical symbols, only the font for operators and numerals. This + - 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/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty b/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty index c34e81dac2f..bda6ba0af0f 100644 --- a/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty +++ b/Master/texmf-dist/tex/latex/eulerpx/eulerpx.sty @@ -1,5 +1,5 @@ %% eulerpx.sty -%% Copyright 2016 J. A. Ouassou +%% Copyright 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) @@ -16,8 +16,8 @@ %% % Package metadata -\def\fileversion{v0.1} -\def\filedate{2016/10/01} +\def\fileversion{v0.2} +\def\filedate{2017/02/03} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{eulerpx}[\filedate\space\fileversion] \typeout{Package: `eulerpx' \fileversion\space<\filedate>} @@ -26,7 +26,7 @@ \RequirePackage[T1]{fontenc} % Inherit math symbols from the `newpxmath' package -\RequirePackage[varbb]{newpxmath} +\RequirePackage[varbb,upint]{newpxmath} % Declare the math serif font \DeclareMathVersion{normal} @@ -38,19 +38,18 @@ \SetSymbolFont{operators}{sans}{T1}{\sfdefault}{m}{n} \SetMathAlphabet{\mathrm}{sans}{T1}{\sfdefault}{m}{n} -% Define a macro for toggling between serif and sans -\newcommand{\sfmath}{\mathversion{sans}} -\newcommand{\rmmath}{\mathversion{normal}} +% 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 +%% 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} -\DeclareSymbolFont{symbols} {U}{zeus}{m}{n} -\SetSymbolFont{symbols}{bold} {U}{zeus}{b}{n} -\DeclareSymbolFont{largesymbols} {U}{zeuex}{m}{n} \DeclareMathAlphabet{\mathbf} {U}{zeur}{b}{n} % Upper-case greek letters -- cgit v1.2.3