summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-12-22 22:55:10 +0000
committerKarl Berry <karl@freefriends.org>2016-12-22 22:55:10 +0000
commit6add04a52f80b715c0e69f411ac56440589f3c75 (patch)
tree77308ba33dd4805fd511b598527971cd91b9f0ae
parent6831d08bfd5ba7d320cdbbae30d6080d5d05e571 (diff)
mathspec (22dec16)
git-svn-id: svn://tug.org/texlive/trunk@42773 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/xelatex/mathspec/README.txt (renamed from Master/texmf-dist/doc/xelatex/mathspec/README)7
-rw-r--r--Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdfbin344772 -> 166106 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex76
-rw-r--r--Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty84
4 files changed, 104 insertions, 63 deletions
diff --git a/Master/texmf-dist/doc/xelatex/mathspec/README b/Master/texmf-dist/doc/xelatex/mathspec/README.txt
index b20301440df..ff28cad7d9d 100644
--- a/Master/texmf-dist/doc/xelatex/mathspec/README
+++ b/Master/texmf-dist/doc/xelatex/mathspec/README.txt
@@ -1,16 +1,17 @@
The mathspec package
--------------------
Font selection for mathematics with XeLaTeX
-version 0.2
+version 0.2b
Andrew Gilbert Moschou
-Wednesday, 30 September 2009
+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.
diff --git a/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf b/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf
index 2d6a48a1ee6..dd2651fdbb2 100644
--- a/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf
+++ b/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex b/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex
index 578f0535107..31352961e4b 100644
--- a/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex
+++ b/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex
@@ -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@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@latex-project.org}).}\\\texttt{andmos@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 @@ This package provides mathematics alphabets in any of the same typefaces that ar
\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 @@ You can try the package \sty{MnSymbol}, which has greater (and more uniform) cov
\subsection{Examples}
+The following command:
\begin{example}
\setmathsfont(Digits,Latin,Greek)
[Numbers={Lining,Proportional}]{Minion Pro}
@@ -265,8 +306,7 @@ is equivalent to:
\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 @@ This command is equivalent to:
\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 @@ Note that this value corresponds to the inserted spaces on both sides for each s
\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 @@ Now, the spacing in equations~(\ref{eq:1}, \ref{eq:2}) are improved by:
\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}
diff --git a/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty b/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
index 6670cbf3249..e63a27d5efc 100644
--- a/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
+++ b/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
@@ -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.
+\RequirePackage{ifxetex}
\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,14 +68,23 @@
\providecommand\currentmathstyle{\relax}
-%% Check whether a package is loaded.
-%% \eu@package@loaded{<package>}
-\newcommand\eu@package@loaded[1]{
- \@ifpackageloaded{#1}
- {\eu@booltrue{eu@#1@loaded}}
- {\eu@boolfalse{eu@#1@loaded}}}
-%% Test for amsmath. Do I need to do this here or at all?
-\eu@package@loaded{amsmath}
+%% @-namespace fontspec variable:
+\ExplSyntaxOn
+\def\eu@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@enc { \g_fontspec_encoding_tl }
+\cs_set:Npn \zf@fontspec #1 #2
+ {
+ \fontspec_select:nn {#1} {#2}
+ \tl_set:Nn \zf@family { \l_fontspec_family_tl }
+ \tl_set:Nn \zf@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
@@ -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@cm@varTheta\varTheta}
+\ifdef{\varTheta}{\let\eu@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@boolfalse{Digits}
\fi
\eu@ifsomebooltrue{Digits}
- {\DeclareSymbolFont{Digits:m:n}{EU1}{\eu@Digitsmathsfont}{m}{n}}
+ {\DeclareSymbolFont{Digits:m:n}{\eu@enc}{\eu@Digitsmathsfont}{m}{n}}
\eu@ifbooltrue{Digits}
{\fontfamily\eu@Digitsmathsfont\selectfont
\DeclareMathSymbol{0}{\mathord}{\eu@DigitsArabic@symfont}{`0}
@@ -298,8 +302,8 @@
\eu@boolfalse{LatinLowercase}
\fi
\eu@ifsomebooltrue{LatinUppercase,LatinLowercase}
- {\DeclareSymbolFont{Latin:m:n}{EU1}{\eu@Latinmathsfont}{m}{n}
- \DeclareSymbolFont{Latin:m:it}{EU1}{\eu@Latinmathsfont}{m}{it}}
+ {\DeclareSymbolFont{Latin:m:n}{\eu@enc}{\eu@Latinmathsfont}{m}{n}
+ \DeclareSymbolFont{Latin:m:it}{\eu@enc}{\eu@Latinmathsfont}{m}{it}}
\eu@ifbooltrue{LatinUppercase}
{\fontfamily\eu@Latinmathsfont\selectfont
\DeclareMathSymbol{A}{\mathalpha}{\eu@LatinUppercase@symfont}{`A}
@@ -384,8 +388,8 @@
\eu@boolfalse{GreekLowercase}
\fi
\eu@ifsomebooltrue{GreekUppercase,GreekLowercase}
- {\DeclareSymbolFont{Greek:m:n}{EU1}{\eu@Greekmathsfont}{m}{n}
- \DeclareSymbolFont{Greek:m:it}{EU1}{\eu@Greekmathsfont}{m}{it}}
+ {\DeclareSymbolFont{Greek:m:n}{\eu@enc}{\eu@Greekmathsfont}{m}{n}
+ \DeclareSymbolFont{Greek:m:it}{\eu@enc}{\eu@Greekmathsfont}{m}{it}}
\eu@ifbooltrue{GreekUppercase}
{\fontfamily\eu@Greekmathsfont\selectfont
\XeTeXDeclareMathSymbol{Α}{\mathalpha}{\eu@GreekUppercase@symfont}{`Α}[\Alpha]
@@ -932,34 +936,34 @@
\ernewcommand\setmathrm[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathrm\zf@family
- \DeclareMathAlphabet{\mathrm}{EU1}{\eu@mathrm}{m}{n}
- \SetMathAlphabet{\mathrm}{bold}{EU1}{\eu@mathrm}{bx}{n}
- \DeclareMathAlphabet{\mathit}{EU1}{\eu@mathrm}{m}{it}
- \DeclareMathAlphabet{\mathbf}{EU1}{\eu@mathrm}{bx}{n}
- \SetMathAlphabet{\mathit}{bold}{EU1}{\eu@mathrm}{bx}{it}
- \DeclareSymbolFont{Operators:m:n}{EU1}{\eu@mathrm}{m}{n}
+ \DeclareMathAlphabet{\mathrm}{\eu@enc}{\eu@mathrm}{m}{n}
+ \SetMathAlphabet{\mathrm}{bold}{\eu@enc}{\eu@mathrm}{bx}{n}
+ \DeclareMathAlphabet{\mathit}{\eu@enc}{\eu@mathrm}{m}{it}
+ \DeclareMathAlphabet{\mathbf}{\eu@enc}{\eu@mathrm}{bx}{n}
+ \SetMathAlphabet{\mathit}{bold}{\eu@enc}{\eu@mathrm}{bx}{it}
+ \DeclareSymbolFont{Operators:m:n}{\eu@enc}{\eu@mathrm}{m}{n}
\def\operator@font{\expandafter\mathgroup\csname symOperators:m:n\endcsname}}
\ernewcommand\setmathcal[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathcal\zf@family
- \DeclareMathAlphabet{\mathcal}{EU1}{\eu@mathcal}{m}{n}}
+ \DeclareMathAlphabet{\mathcal}{\eu@enc}{\eu@mathcal}{m}{n}}
\ernewcommand\setmathsf[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathsf\zf@family
- \DeclareMathAlphabet{\mathsf}{EU1}{\eu@mathsf}{m}{n}
- \SetMathAlphabet{\mathsf}{bold}{EU1}{\eu@mathsf}{bx}{n}}
+ \DeclareMathAlphabet{\mathsf}{\eu@enc}{\eu@mathsf}{m}{n}
+ \SetMathAlphabet{\mathsf}{bold}{\eu@enc}{\eu@mathsf}{bx}{n}}
\ernewcommand\setmathtt[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathtt\zf@family
- \DeclareMathAlphabet{\mathtt}{EU1}{\eu@mathtt}{m}{n}}
+ \DeclareMathAlphabet{\mathtt}{\eu@enc}{\eu@mathtt}{m}{n}}
\ernewcommand\setmathfrak[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathfrak\zf@family
- \DeclareMathAlphabet{\mathfrak}{EU1}{\eu@mathfrak}{m}{n}}
+ \DeclareMathAlphabet{\mathfrak}{\eu@enc}{\eu@mathfrak}{m}{n}}
\ernewcommand\setmathbb[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathbb\zf@family
- \DeclareMathAlphabet{\mathbb}{EU1}{\eu@mathbb}{m}{n}}
+ \DeclareMathAlphabet{\mathbb}{\eu@enc}{\eu@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.