texlive[42773] Master/texmf-dist: mathspec (22dec16)
commits+karl at tug.org
commits+karl at tug.org
Thu Dec 22 23:55:10 CET 2016
Revision: 42773
http://tug.org/svn/texlive?view=revision&revision=42773
Author: karl
Date: 2016-12-22 23:55:10 +0100 (Thu, 22 Dec 2016)
Log Message:
-----------
mathspec (22dec16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf
trunk/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex
trunk/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/xelatex/mathspec/README.txt
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/xelatex/mathspec/README
Deleted: trunk/Master/texmf-dist/doc/xelatex/mathspec/README
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mathspec/README 2016-12-22 22:24:35 UTC (rev 42772)
+++ trunk/Master/texmf-dist/doc/xelatex/mathspec/README 2016-12-22 22:55:10 UTC (rev 42773)
@@ -1,48 +0,0 @@
-The mathspec package
---------------------
-Font selection for mathematics with XeLaTeX
-version 0.2
-Andrew Gilbert Moschou
-Wednesday, 30 September 2009
-
-This work is released under the LPPL v1.3c or later.
-
-The mathspec package provides an interface to select ordinary text fonts for
-typesetting mathematics with XeLaTeX.
-
-
-The package is developmental and later versions might to be incompatible with
-this version. This version is incompatible with earlier versions. The package
-requires at least version 0.9995 of XeTeX.
-
-Implementation
---------------
-
-\usepackage[<mathspec and fontspec options>]{mathspec}
-
-End user commands
------------------
-
-\setmathsfont(<set>)[<shapes, font features>]{<font name>}
-\setmathfont(<set>)[<shapes, font features>]{<font name>}
-
-\setmathrm[<font features>]{<font name>}
-\setmathsf[<font features>]{<font name>}
-\setmathtt[<font features>]{<font name>}
-\setmathcal[<font features>]{<font name>}
-\setmathbb[<font features>]{<font name>}
-\setmathfrak[<font features>]{<font name>}
-
-\setallmainfonts(<sets>)[<font features>]{<font name>}
-\setprimaryfont[<font features>]{<font name>}
-\setallsansfont[<font features>]{<font name>}
-\setallmonofonts[<font features>]{<font name>}
-
-\exchangeforms{<list>}
-\normalisevarforms[<list>]
-\normalizevarforms[<list>]
-
-"<character>
-\"<string>"
-\setminwhitespace
-
Added: trunk/Master/texmf-dist/doc/xelatex/mathspec/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mathspec/README.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/mathspec/README.txt 2016-12-22 22:55:10 UTC (rev 42773)
@@ -0,0 +1,49 @@
+The mathspec package
+--------------------
+Font selection for mathematics with XeLaTeX
+version 0.2b
+Andrew Gilbert Moschou
+22 Dec 2016
+
+* v0.2b by Will Robertson: a bug fix update for fontspec and the new TU encoding
+
+This work is released under the LPPL v1.3c or later.
+
+The mathspec package provides an interface to select ordinary text fonts for
+typesetting mathematics with XeLaTeX.
+
+The package is developmental and later versions might to be incompatible with
+this version. This version is incompatible with earlier versions. The package
+requires at least version 0.9995 of XeTeX.
+
+Implementation
+--------------
+
+\usepackage[<mathspec and fontspec options>]{mathspec}
+
+End user commands
+-----------------
+
+\setmathsfont(<set>)[<shapes, font features>]{<font name>}
+\setmathfont(<set>)[<shapes, font features>]{<font name>}
+
+\setmathrm[<font features>]{<font name>}
+\setmathsf[<font features>]{<font name>}
+\setmathtt[<font features>]{<font name>}
+\setmathcal[<font features>]{<font name>}
+\setmathbb[<font features>]{<font name>}
+\setmathfrak[<font features>]{<font name>}
+
+\setallmainfonts(<sets>)[<font features>]{<font name>}
+\setprimaryfont[<font features>]{<font name>}
+\setallsansfont[<font features>]{<font name>}
+\setallmonofonts[<font features>]{<font name>}
+
+\exchangeforms{<list>}
+\normalisevarforms[<list>]
+\normalizevarforms[<list>]
+
+"<character>
+\"<string>"
+\setminwhitespace
+
Modified: trunk/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex 2016-12-22 22:24:35 UTC (rev 42772)
+++ trunk/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex 2016-12-22 22:55:10 UTC (rev 42773)
@@ -30,16 +30,51 @@
style=latex,#1}}
{}
-\setmainfont[Numbers=OldStyle]{Sabon LT Std}
-\setallsansfonts[Numbers={OldStyle,Proportional},Scale=MatchLowercase]{Candara}
-\setallmonofonts[Numbers=OldStyle,Scale=MatchLowercase]{Consolas}
-\setmathsfont(Digits,Latin)[Scale=MatchLowercase]{Bembo MT}
-\setmathsfont(Greek)[Scale=MatchLowercase]{STIXGeneral}
-\setmathrm{Sabon LT Std}
+\linespread{1.05}
+\setmainfont[
+ Extension = .otf,
+ UprightFont = *-regular,
+ ItalicFont = *-italic,
+ BoldFont = *-bold,
+ BoldItalicFont = *-bolditalic,
+ Numbers=OldStyle,
+ Scale=MatchLowercase,
+ ]{texgyrepagella}
+\setallsansfonts[
+ Extension = .otf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ Numbers={OldStyle,Proportional},
+ Scale=MatchLowercase
+ ]{UniversalisADFStd}
+\setallmonofonts[
+ Scale=MatchLowercase,
+ BoldFont=Inconsolatazi4-Bold.otf,
+ AutoFakeSlant]{Inconsolatazi4-Regular.otf}
+\setmathsfont(Digits,Latin)[
+ Scale = 0.85,
+ Extension = .otf ,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ ]{LibreBaskerville}
+\setmathsfont(Greek)[
+ Extension = .otf ,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ Scale=MatchLowercase,
+ ]{STIX}
+\setmathrm[Scale=MatchLowercase]{LibreBaskerville-Regular.otf}
+
\exchangeforms{phi}
\setminwhitespace[750]
-\newfontfamily\MathematicalPi{Mathematical Pi LT Std}
+\newfontfamily\MathematicalPi{STIXMath-Regular.otf}
\newcommand\MP[1]{{\MathematicalPi #1}}
\makeatletter
@@ -132,8 +167,9 @@
pdfsubject={Font selection for mathematics with XeLaTeX},
pdfauthor={Andrew Gilbert Moschou}}
-\title{The \textsf{\spotcolor mathspec} package\\[0.25em]\mdseries\itshape\normalsize Font selection for mathematics with \XeLaTeX\\[1ex]\mdseries\upshape version 0.2}
-\author{Andrew Gilbert Moschou\\\texttt{andmos at gmail.com}}
+\title{The \textsf{\spotcolor mathspec} package\\[0.25em]\mdseries\itshape\normalsize Font selection for mathematics with \XeLaTeX\\[1ex]\mdseries\upshape version 0.2b}
+\author{Andrew Gilbert Moschou\thanks{v0.2b update by Will Robertson (\texttt{will.robertson at latex-project.org}).}\\\texttt{andmos at gmail.com}
+}
\makeatletter\let\@today\today\def\today{\scshape\MakeLowercase{\@today}}\makeatother
\hyphenation{in-com-pa-ti-ble Hoef-ler ma-the-ma-tics des-pite}
@@ -170,7 +206,11 @@
\cmditem{usepackage}\oprm{\sty{mathspec} and \sty{fontspec} options}|{mathspec}|
-\noindent To use the package, put \cmd{usepackage}|{mathspec}| in the preamble of the document. It is not necessary to put \cmd{usepackage}|{fontspec}| because \sty{mathspec} will ensure that \sty{fontspec} is loaded anyway. To load \sty{fontspec} with some options, parse them through \sty{mathspec}, for example, \cmd{usepackage}|[quiet]|\permitbreak|{mathspec}| is equivalent to \cmd{usepackage}\permitbreak|[quiet]|\permitbreak|{fontspec}|\cmd{usepackage}|{mathspec}|.
+\noindent To use the package, put \cmd{usepackage}|{mathspec}| in the preamble of the document. It is not necessary to put \cmd{usepackage}|{fontspec}| because \sty{mathspec} will ensure that \sty{fontspec} is loaded anyway. To load \sty{fontspec} with some options, parse them through \sty{mathspec}, for example, \cmd{usepackage}|[quiet]|\permitbreak|{mathspec}| is equivalent to:
+\begin{verbatim}
+ \usepackage[quiet]{fontspec}
+ \usepackage{mathspec}
+\end{verbatim}
Actually, \sty{mathspec} ordinarily loads \sty{fontspec} with the \opt{no-math} option. To cancel this, explicitly use the \opt{math} option: e.g.\ \cmd{usepackage}|[math]{mathspec}|.
@@ -253,6 +293,7 @@
\subsection{Examples}
+The following command:
\begin{example}
\setmathsfont(Digits,Latin,Greek)
[Numbers={Lining,Proportional}]{Minion Pro}
@@ -265,8 +306,7 @@
\end{example}
and indicates that all digits, Latin and Greek characters are to be set in Minion Pro with lining, proportional digits, with digits and uppercase Greek in regular and Latin and lowercase Greek in italic, which are the default shapes.
-\bigskip
-
+The following command:
\begin{example}
\setmathsfont(Digits,Greek)
[Uppercase=Plain,Lowercase=Regular,Scale=MatchLowercase]
@@ -353,7 +393,7 @@
\subsection{A further example}
-This document is typeset with the following:
+This document used to be typeset with the following:
\begin{example}
\setmainfont[Numbers=OldStyle]{Sabon LT Std}
@@ -511,10 +551,10 @@
\begin{table}
\begin{tabular}{@{}rl@{}}\topbottomrule
-Text & \fontspec{Bembo MT}\itshape abcdefghijklmnopqrstuvwxyz\\
+Text & \fontspec[ItalicFont=LibreBaskerville-Italic.otf]{LibreBaskerville-Regular.otf}\itshape abcdefghijklmnopqrstuvwxyz\\
Mathematics & $\"abcdefghijklmnopqrstuvwxyz"$\\\bottomrule
\end{tabular}
-\caption{Bembo \acr{MT} in text and spaced mathematics.\label{tab:stix}}
+\caption{Libre Baskerville in text and spaced mathematics.\label{tab:stix}}
\end{table}
\end{ltxsyntax}
@@ -523,16 +563,16 @@
\begin{example}
\begin{align}
"f\left("x\right) &= \sum_{"n = -\infty}^\infty"c_{"n}"e^{\"jnx"} \\
-"c_{"n} &= \frac{1}{2"π}\int_{-"π}^"π"f\left("x\right)"e^{-\"jnx"}\,\mathrm d"x
+"c_{"n} &= \frac{1}{2"π}\int_{-"π}^"π"f\bigl("x\bigr)"e^{-\"jnx"}\,\mathrm d"x
\end{align}
\end{example}
\begin{align}
"f\left("x\right) &= \sum_{"n = -\infty}^\infty "c_{"n}"e^{\"jnx"}\\
-"c_{"n} &= \frac 1{2"π}\int_{-"π}^{"π}"f\left("x\right)"e^{-\"jnx"}\,\mathrm d"x
+"c_{"n} &= \frac 1{2"π}\int_{-"π}^{"π}"f\bigl("x\bigr)"e^{-\"jnx"}\,\mathrm d"x
\end{align}
-Also note that the spacing is improved by replacing |(x)| with |\left(x\right)| (which you should be doing anyway).
+Also note that the spacing is improved by replacing |(x)| with |\bigl(x\bigr)| (which you should be doing anyway). %% changed from \left..\right to \bigl..\bigr (WSPR)
\section{Compatability}
Modified: trunk/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty 2016-12-22 22:24:35 UTC (rev 42772)
+++ trunk/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty 2016-12-22 22:55:10 UTC (rev 42773)
@@ -1,14 +1,12 @@
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mathspec}
- [2009/09/30 v0.2 LaTeX Package (Mathematics font selection for XeLaTeX)]
+ [2016/12/22 v0.2b LaTeX Package (Mathematics font selection for XeLaTeX)]
-%% Require etoolbox for convenience and amstext for well sized text in maths
-%% mode. ifxetex is obvious.
+%% Requirements:
\RequirePackage{etoolbox}
\RequirePackage{amstext}
+
\RequirePackage{ifxetex}
-
-%% Require a recent XeTeX version.
\RequireXeTeX
\ifcsundef{XeTeXglyphbounds}
{\PackageError{mathspec}
@@ -51,7 +49,7 @@
\ifnumcomp{#3}{<}{#1}{\boolfalse{temp}}{\relax}%
\ifbool{temp}}
-%% Options.
+%% Options:
\DeclareOption{normalskips}
{\PackageWarning{mathspec}
{Package option `normalskips' is deprecated}}
@@ -70,15 +68,24 @@
\providecommand\currentmathstyle{\relax}
-%% Check whether a package is loaded.
-%% \eu at package@loaded{<package>}
-\newcommand\eu at package@loaded[1]{
- \@ifpackageloaded{#1}
- {\eu at booltrue{eu@#1 at loaded}}
- {\eu at boolfalse{eu@#1 at loaded}}}
-%% Test for amsmath. Do I need to do this here or at all?
-\eu at package@loaded{amsmath}
+%% @-namespace fontspec variable:
+\ExplSyntaxOn
+\def\eu at enc{\g_fontspec_encoding_tl}
+\ExplSyntaxOff
+%% This is needed to transition to the TU encoding instead of EU1 (WSPR)
+%% Deprecated commands in fontspec:
+\ExplSyntaxOn
+\tl_set:Nn \zf at enc { \g_fontspec_encoding_tl }
+\cs_set:Npn \zf at fontspec #1 #2
+ {
+ \fontspec_select:nn {#1} {#2}
+ \tl_set:Nn \zf at family { \l_fontspec_family_tl }
+ \tl_set:Nn \zf at basefont { \l_fontspec_font }
+ }
+\ExplSyntaxOff
+%% These are still defined in fontspec at time of writing but maybe be removed in the future. (WSPR)
+
%% Define the undefined Greek letters. Include all variant forms (same as normal
%% forms if variant forms are unavailable). Latin F for digamma is better than
%% nothing. If Digamma is available, then Capital and Lowercase the are same.
@@ -97,15 +104,12 @@
\DeclareMathSymbol{\Chi}{\mathalpha}{operators}{"58}
\DeclareMathSymbol{\omicron}{\mathord}{letters}{"6F}
\let\varbeta\beta
-\ifdef{\varkappa}
- {\relax}
+\ifdef{\varkappa}{\relax}
{\let\varkappa\kappa}
-\ifdef{\varTheta}
- {\let\eu at cm@varTheta\varTheta}
+\ifdef{\varTheta}{\let\eu at cm@varTheta\varTheta}
{\relax}
\let\varTheta\Theta
-\ifdef{\digamma}
- {\let\Digamma\digamma}
+\ifdef{\digamma}{\let\Digamma\digamma}
{\DeclareMathSymbol{\Digamma}{\mathalpha}{operators}{"46}
\DeclareMathSymbol{\digamma}{\mathord}{letters}{"46}}
@@ -257,7 +261,7 @@
\eu at boolfalse{Digits}
\fi
\eu at ifsomebooltrue{Digits}
- {\DeclareSymbolFont{Digits:m:n}{EU1}{\eu at Digitsmathsfont}{m}{n}}
+ {\DeclareSymbolFont{Digits:m:n}{\eu at enc}{\eu at Digitsmathsfont}{m}{n}}
\eu at ifbooltrue{Digits}
{\fontfamily\eu at Digitsmathsfont\selectfont
\DeclareMathSymbol{0}{\mathord}{\eu at DigitsArabic@symfont}{`0}
@@ -298,8 +302,8 @@
\eu at boolfalse{LatinLowercase}
\fi
\eu at ifsomebooltrue{LatinUppercase,LatinLowercase}
- {\DeclareSymbolFont{Latin:m:n}{EU1}{\eu at Latinmathsfont}{m}{n}
- \DeclareSymbolFont{Latin:m:it}{EU1}{\eu at Latinmathsfont}{m}{it}}
+ {\DeclareSymbolFont{Latin:m:n}{\eu at enc}{\eu at Latinmathsfont}{m}{n}
+ \DeclareSymbolFont{Latin:m:it}{\eu at enc}{\eu at Latinmathsfont}{m}{it}}
\eu at ifbooltrue{LatinUppercase}
{\fontfamily\eu at Latinmathsfont\selectfont
\DeclareMathSymbol{A}{\mathalpha}{\eu at LatinUppercase@symfont}{`A}
@@ -384,8 +388,8 @@
\eu at boolfalse{GreekLowercase}
\fi
\eu at ifsomebooltrue{GreekUppercase,GreekLowercase}
- {\DeclareSymbolFont{Greek:m:n}{EU1}{\eu at Greekmathsfont}{m}{n}
- \DeclareSymbolFont{Greek:m:it}{EU1}{\eu at Greekmathsfont}{m}{it}}
+ {\DeclareSymbolFont{Greek:m:n}{\eu at enc}{\eu at Greekmathsfont}{m}{n}
+ \DeclareSymbolFont{Greek:m:it}{\eu at enc}{\eu at Greekmathsfont}{m}{it}}
\eu at ifbooltrue{GreekUppercase}
{\fontfamily\eu at Greekmathsfont\selectfont
\XeTeXDeclareMathSymbol{Α}{\mathalpha}{\eu at GreekUppercase@symfont}{`Α}[\Alpha]
@@ -932,34 +936,34 @@
\ernewcommand\setmathrm[2][]{
\zf at fontspec{#1}{#2}
\let\eu at mathrm\zf at family
- \DeclareMathAlphabet{\mathrm}{EU1}{\eu at mathrm}{m}{n}
- \SetMathAlphabet{\mathrm}{bold}{EU1}{\eu at mathrm}{bx}{n}
- \DeclareMathAlphabet{\mathit}{EU1}{\eu at mathrm}{m}{it}
- \DeclareMathAlphabet{\mathbf}{EU1}{\eu at mathrm}{bx}{n}
- \SetMathAlphabet{\mathit}{bold}{EU1}{\eu at mathrm}{bx}{it}
- \DeclareSymbolFont{Operators:m:n}{EU1}{\eu at mathrm}{m}{n}
+ \DeclareMathAlphabet{\mathrm}{\eu at enc}{\eu at mathrm}{m}{n}
+ \SetMathAlphabet{\mathrm}{bold}{\eu at enc}{\eu at mathrm}{bx}{n}
+ \DeclareMathAlphabet{\mathit}{\eu at enc}{\eu at mathrm}{m}{it}
+ \DeclareMathAlphabet{\mathbf}{\eu at enc}{\eu at mathrm}{bx}{n}
+ \SetMathAlphabet{\mathit}{bold}{\eu at enc}{\eu at mathrm}{bx}{it}
+ \DeclareSymbolFont{Operators:m:n}{\eu at enc}{\eu at mathrm}{m}{n}
\def\operator at font{\expandafter\mathgroup\csname symOperators:m:n\endcsname}}
\ernewcommand\setmathcal[2][]{
\zf at fontspec{#1}{#2}
\let\eu at mathcal\zf at family
- \DeclareMathAlphabet{\mathcal}{EU1}{\eu at mathcal}{m}{n}}
+ \DeclareMathAlphabet{\mathcal}{\eu at enc}{\eu at mathcal}{m}{n}}
\ernewcommand\setmathsf[2][]{
\zf at fontspec{#1}{#2}
\let\eu at mathsf\zf at family
- \DeclareMathAlphabet{\mathsf}{EU1}{\eu at mathsf}{m}{n}
- \SetMathAlphabet{\mathsf}{bold}{EU1}{\eu at mathsf}{bx}{n}}
+ \DeclareMathAlphabet{\mathsf}{\eu at enc}{\eu at mathsf}{m}{n}
+ \SetMathAlphabet{\mathsf}{bold}{\eu at enc}{\eu at mathsf}{bx}{n}}
\ernewcommand\setmathtt[2][]{
\zf at fontspec{#1}{#2}
\let\eu at mathtt\zf at family
- \DeclareMathAlphabet{\mathtt}{EU1}{\eu at mathtt}{m}{n}}
+ \DeclareMathAlphabet{\mathtt}{\eu at enc}{\eu at mathtt}{m}{n}}
\ernewcommand\setmathfrak[2][]{
\zf at fontspec{#1}{#2}
\let\eu at mathfrak\zf at family
- \DeclareMathAlphabet{\mathfrak}{EU1}{\eu at mathfrak}{m}{n}}
+ \DeclareMathAlphabet{\mathfrak}{\eu at enc}{\eu at mathfrak}{m}{n}}
\ernewcommand\setmathbb[2][]{
\zf at fontspec{#1}{#2}
\let\eu at mathbb\zf at family
- \DeclareMathAlphabet{\mathbb}{EU1}{\eu at mathbb}{m}{n}}
+ \DeclareMathAlphabet{\mathbb}{\eu at enc}{\eu at mathbb}{m}{n}}
%% If amsmath is loaded, it must be loaded before mathspec. Checking for its
%% existence \AtBeginDocument is too late because the damage is already done
@@ -988,14 +992,10 @@
%% conditions of the LaTeX Project Public License, either version 1.3c
%% 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.3c or later is part of all recent distributions of LaTeX.
%%
%% This work has the LPPL maintenance status ‘maintained’.
-%%
%% The Current Maintainer of this work is Andrew Gilbert Moschou.
-%%
-%% This work consists of the files mathspec.sty and mathsepc4.tex.
+%% This work consists of the files mathspec.sty and mathspec.tex.
More information about the tex-live-commits
mailing list