summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-03 14:59:49 +0000
committerKarl Berry <karl@freefriends.org>2009-10-03 14:59:49 +0000
commit7ec4d6d5210183afdb6a9b9564e4eb691e99d18d (patch)
tree413b77909923cb7433f1aff1698caad8109edd79
parent556ccc6a2633ddbc27a22319d2e16e8a5d7483d1 (diff)
mathspec 0.2 (30sep09)
git-svn-id: svn://tug.org/texlive/trunk@15603 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/xelatex/mathspec/README71
-rw-r--r--Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdfbin175457 -> 344772 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex595
-rw-r--r--Master/texmf-dist/source/xelatex/mathspec/mathspec.dtx1380
-rw-r--r--Master/texmf-dist/source/xelatex/mathspec/mathspec.ins40
-rw-r--r--Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty1549
6 files changed, 1553 insertions, 2082 deletions
diff --git a/Master/texmf-dist/doc/xelatex/mathspec/README b/Master/texmf-dist/doc/xelatex/mathspec/README
index e4c4fdfc7e3..b20301440df 100644
--- a/Master/texmf-dist/doc/xelatex/mathspec/README
+++ b/Master/texmf-dist/doc/xelatex/mathspec/README
@@ -1,41 +1,48 @@
The mathspec package
+--------------------
+Font selection for mathematics with XeLaTeX
+version 0.2
Andrew Gilbert Moschou
-v0.16 2009/08/29
+Wednesday, 30 September 2009
This work is released under the LPPL v1.3c or later.
-The mathspec package provides an interface to select arbitrary
-text fonts for typesetting mathematics in XeLaTeX documents.
+The mathspec package provides an interface to select ordinary text fonts for
+typesetting mathematics with XeLaTeX.
-Usage
+
+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}
-Commands
- \setmathsfont[Set=<set>,<shapes>,<font features>]{<font name>}
- Specifies the mathematics fonts.
- <set>: Latin, Greek or Symbols;
- <shapes>: Optional comma separated list of keys and values
- Keys: Uppercase, Lowercase, Digits
- Values: Regular,Italic,Plain
- <font features>: Optional fontspec font features
- <font name>: fontspec font name
-
- \setmathrm[<font features>]{<font name>}
- \setmathcal[<font features>]{<font name>}
- \setmathsf[<font features>]{<font name>}
- \setmathtt[<font features>]{<font name>}
- \setmathfrak[<font features>]{<font name>}
- \setmathbb[<font features>]{<font name>}
-
- \setprimaryfont[<font features>]{<font name>}
- \setsansfonts[<font features>]{<font name>}
- \setmonofonts[<font features>]{<font name>}
-
- \normalfvarforms
- \varforms
-
- \+[<size>]
- Inserts a <size> mu (1/18 em) space in mathematics mode.
- Default <size> is 1.
-
+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
+
diff --git a/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf b/Master/texmf-dist/doc/xelatex/mathspec/mathspec.pdf
index 64028733dee..2d6a48a1ee6 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
new file mode 100644
index 00000000000..578f0535107
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/mathspec/mathspec.tex
@@ -0,0 +1,595 @@
+\documentclass{ltxdockit}
+
+\usepackage{amsmath}
+\usepackage{mathspec}
+\usepackage{xltxtra,eukdate}
+
+\renewcommand\contentsname{table of contents}
+\addtokomafont{sectionentry}{\rmfamily\mdseries\scshape\lowercase}
+\addtokomafont{section}{\rmfamily\mdseries\scshape\color{spot}\lowercase}
+\addtokomafont{subsection}{\rmfamily\mdseries\itshape\color{spot}}
+\makeatletter
+ \def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\hspace{\marglistsep}}}
+\makeatother
+\hypersetup{linkcolor=black,urlcolor=black}
+
+\definecolor{spot}{rgb}{0.6,0,0}
+\definecolor{boxframe}{rgb}{0.6,0,0}
+\definecolor{boxfill}{rgb}{1,.95,.95}
+
+\lstnewenvironment{example}[1][]
+ {\lstset{%
+ aboveskip=1.5\lstenvsep,
+ xleftmargin=3pt,
+ xrightmargin=3pt,
+ frame=single,
+ backgroundcolor=\color{boxfill},
+ rulecolor=\color{boxframe},
+ framesep=2.5pt,
+ framerule=0.5pt,
+ 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}
+\exchangeforms{phi}
+\setminwhitespace[750]
+
+\newfontfamily\MathematicalPi{Mathematical Pi LT Std}
+\newcommand\MP[1]{{\MathematicalPi #1}}
+
+\makeatletter
+ \setlogokern{eT}{-0.074em}
+ \setlogokern{Xe}{-0.063em}
+ \setlogokern{eL}{-0.068em}
+ \setlogokern{La}{-0.305em}
+ \setlogokern{aT}{-0.07313em}
+ \setlogokern{X2}{0.101em}
+ \setlogodrop{0.131em}
+ \setLaTeXa{%
+ \ifdim\fontdimen\@ne\font=\z@\else
+ \addfontfeature{FakeSlant=\the\fontdimen\@ne\font}%
+ \fi
+ \if b\expandafter\@car\f@series\@nil
+ \check@mathfonts\fontsize\sf@size\z@
+ \math@fontsfalse\selectfont A%
+ \else
+ \scshape a%
+ \fi}
+ \setLaTeXee{\mbox{$\epsilon$}}
+ \seteverylogo{%
+ \if b\expandafter\@car\f@series\@nil%
+ \setlogokern{Te}{-0.075em}%
+ \setlogokern{eX}{-0.068em}%
+ \else
+ \setlogokern{Te}{-0.084em}%
+ \setlogokern{eX}{-0.063em}%
+ \fi}
+ \newcommand\tablerowa[3]{$\csname #1#3\endcsname$ & \cmd{#1#3} & $\csname #2#3\endcsname$ & \MakeLowercase{\cmd{#2#3}}}
+ \newcommand\tablerowb[1]{$\csname #1\endcsname$ & $\csname var#1\endcsname$ & \cmd{var#1}}
+ \def\topbottomrule{\noalign{\ifnum0=`}\fi
+ \@aboverulesep=\aboverulesep
+ \global\@belowrulesep=\belowrulesep
+ \global\@thisruleclass=\@ne
+ \@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}}
+ \renewcommand{\topfraction}{.75}
+ \renewcommand{\bottomfraction}{.75}
+ \renewcommand{\textfraction}{.25}
+ \renewcommand{\floatpagefraction}{.75}
+ \setcounter{topnumber}{9}
+ \setcounter{bottomnumber}{9}
+ \setcounter{totalnumber}{20}
+ \setcounter{dbltopnumber}{9}
+ \def\fps@figure{htb!}
+ \g@addto@macro\table{\collecttable}
+ \newlength\captionwidth
+ \newlength\mincaptionwidth
+ \setlength\mincaptionwidth{50mm}
+ \long\def\collecttable#1\caption#2{%
+ \toks@{#1}%
+ \sbox\z@{\ignorespaces\the\toks@\unskip}%
+ \setlength\captionwidth{\wd\z@}%
+ \ifdim\captionwidth <\mincaptionwidth
+ \captionwidth\mincaptionwidth
+ \fi
+ \caption{#2}%
+ \centerline{\box\z@}}
+ \def\formatcaption#1:#2\@nil{{\spotcolor\scshape\MakeLowercase{#1}}\hspace{1em}#2}
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{\formatcaption#1:#2\@nil}%
+ \ifdim\wd\@tempboxa >\captionwidth
+ \centerline{\parbox[t]{\captionwidth}{\formatcaption#1:#2\@nil}}%
+ \else
+ \global\@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+ \newenvironment{advanced}
+ {\begin{minipage}[t]{\textwidth}\begin{description}\item[\rmfamily\mdseries\scshape\footnotesize\spotcolor advanced]\itshape\footnotesize}
+ {\end{description}\end{minipage}}
+\makeatother
+
+\usepackage{eukdate}
+\usepackage{booktabs}
+\usepackage{multirow}
+\usepackage{shortvrb}
+\MakeShortVerb{|}
+
+\newcommand\permitbreak{\linebreak[0]}
+\newrobustcmd*{\sprm}[1]{%
+ \mbox{%
+ {\verbatimfont(}%
+ \prm{#1}%
+ {\verbatimfont)}}}
+
+\hypersetup{
+ pdftitle={The mathspec package},
+ 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}}
+\makeatletter\let\@today\today\def\today{\scshape\MakeLowercase{\@today}}\makeatother
+
+\hyphenation{in-com-pa-ti-ble Hoef-ler ma-the-ma-tics des-pite}
+
+\frenchspacing
+\begin{document}
+\maketitle
+
+\tableofcontents
+
+\section{Preamble}
+
+This document describes the \sty{mathspec} package, a package that provides an interface to select ordinary text fonts for typesetting mathematics with \XeLaTeX. It relies on \sty{fontspec} to work and familiarity with \sty{fontspec} is advised. I thank Will Robertson for his useful advice and suggestions!
+
+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.
+
+Should you be using this package? If you are using another \LaTeX\ package for some mathematics font, then you should not (unless you know what you are doing). If you want to use Asana Math or Cambria Math (or the final release version of the \acr{STIX} fonts) then you should be using |unicode-math|.
+
+Some paragraphs in this document are marked \textsc{\spotcolor advanced}. Such paragraphs may be safely ignored by basic users.
+
+\section{Introduction}
+
+Since Jonathan Kew released \XeTeX, an extension to \TeX\ that permits the inclusion of system wide Unicode fonts and modern font technologies in \TeX\ documents, users have been able to easily typeset documents using readily available fonts such as Hoefler Text and Times New Roman (This document is typeset using Sabon \acr{LT} Std). Will Robertson’s \XeLaTeX\ package \sty{fontspec} provides an automatic font selection process for such fonts. Still, mathematics typesetting has not benefited from this development to the same extent as text typesetting, which is not surprising given the font requirements that are demanded.
+
+Will Robertson has in development a package \sty{unicode-math} that is used to typeset mathematics using some font that has an OpenType mathematics table. Currently, the only two that are available are Cambria Math, a new design, by Microsoft and Asana Math, ultimately based on Hermann Zapf’s Palatino, by Apostolos Syropoulos. It is expected that the \acr{STIX} fonts, based on Times, may also be used.
+
+Thus, it is evident that a book designer is confronted with such narrow variety in mathematics typefaces, even considering already established \LaTeX\ fonts such as \acr{AMS} Euler (and Computer Modern, of course!) that are dedicated to providing mathematics typefaces; and the book designer is challenged to find a suitable pair of matching typefaces for mathematics and body text.
+
+This package provides mathematics alphabets in any of the same typefaces that are available to \XeTeX, using \sty{fontspec} as a back end. Other mathematics symbols such as arrows and operators, whose designs are largely independent of an alphabetic typeface, can be taken from collections like MnSymbol or Computer Modern and are not covered by the scope of this package.
+
+\section{Implementation}
+
+\begin{ltxsyntax}
+
+\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}|.
+
+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}|.
+
+\end{ltxsyntax}
+
+\section{Setting fonts}
+
+\subsection{Letters and Digits}
+
+\begin{ltxsyntax}
+
+\cmditem{setmathsfont}(sets)[shapes, font features]{font name}
+\cmditem{setmathfont}(sets)[shapes, font features]{font name}
+
+This single command is used to entirely describe the desired font for some use. For each character set (Digits, Latin, Greek), there is a (possibly shared) \cmd{setmathsfont} command. The command can be used only in the preamble. Then, there can be only one typeface for each character set in a single document.
+
+For basic use, \sprm{sets} is mandatory. \oprm{shapes, font features} is optional and may be omitted.
+
+\begin{marglist}
+
+\item[\prm{sets}]
+A comma separated value list of any of the following: \opt{Digits}, \opt{Latin}, \opt{Greek}.
+
+\begin{advanced}
+\prm{sets} may also take the value \opt{Special}. \sprm{sets} is actually optional and if it is omitted, then |(Special)| is asumed. For basic use, it is safe to ignore \opt{Special}, so \sprm{sets} would effectively be a mandatory argument.
+
+If the value of \prm{sets} is \opt{Special}, then {\spotcolor\cmd{eu@ScopeSet@Special}\oprm{font features}\mprm{font name}} is executed, but this command is provided by \sty{mathspec} to gobble its arguments (that is, it does nothing). The command {\spotcolor\cmd{eu@ScopeSet@Special}} maybe predefined before \sty{mathspec} is loaded (or redefined after \sty{mathspec} is loaded) to cause the command to do something else. This effectively means that
+{\spotcolor\cmd{setmathsfont}\sprm{sets}\oprm{font features}\mprm{font name}}
+is a \sty{mathspec} command, but
+{\spotcolor\cmd{setmathsfont}\oprm{font features}\mprm{font name}}
+is an external command which another package might use.
+\end{advanced}
+
+\item[\prm{shapes}]
+A comma separated value list of keys and their values. The permitted keys and their values are:
+
+\begin{optionlist}
+
+\optitem[]{Uppercase}{\opt{Regular}, \opt{Italic}, \opt{Plain}}
+
+\optitem[]{Lowercase}{\opt{Regular}, \opt{Italic}, \opt{Plain}}
+
+\optitem[]{Arabic}{\opt{Regular}, \opt{Italic}, \opt{Plain}}
+
+\end{optionlist}
+To set the symbols in an upright font, choose \opt{Regular}. To set the symbols in an italic font, choose \opt{Italic}. Choose \opt{Plain} to indicate that no font is assignment is to be performed by \sty{mathspec}, so that the symbols will remain with their default font (usually Computer Modern). If a value’s key is omitted, its default value, which depends on the \prm{set}, as shown in table~\ref{tab:defaultshapes} is chosen.
+
+The default values are very good and you would be wise not to change the shapes for the \opt{Latin} and \opt{Digit} sets. The \opt{Greek} shapes may be changed, if needed, to adhere to some particular style, for example all \opt{Italic} or all \opt{Regular}.
+
+\begin{table}\centering
+\begin{tabular}{@{}ccc@{}}\topbottomrule
+Set & Key & Default value \\\midrule
+\opt{Digits} & \opt{Arabic} & \opt{Regular}\\
+\opt{Latin} & \opt{Uppercase} & \opt{Italic}\\
+\opt{Latin} & \opt{Lowercase} & \opt{Italic}\\
+\opt{Greek} & \opt{Uppercase} & \opt{Regular}\\
+\opt{Greek} & \opt{Lowercase} & \opt{Italic}\\\bottomrule
+\end{tabular}
+\caption{The default shapes for the symbol sets.}\label{tab:defaultshapes}
+\end{table}
+
+\item[\smash{\begin{tabular}[t]{@{}r@{}}\prm{font features}\\\prm{font name}\end{tabular}}]
+\prm{font features} and \prm{font name} follow directly from \sty{fontspec} to select the font and its features. See \sty{fontspec}’s documentation for details.
+
+\end{marglist}
+
+Note that if \prm{sets} contains multiple sets, the command is iterated over each set. Each of these iterations share the same \prm{shapes and font features} and \prm{font name}. If you require that the different sets have individual options and font names, they must be specified in separate commands. However, if a value’s key is omitted, the individual default values are still applied.
+
+These same command options follow through to the other commands of this package.
+
+\end{ltxsyntax}
+
+\subsection{Symbols}
+
+There is currently no way to set the font for general mathematical symbols such as:
+\begin{center}
+\MP =, \MP ×, \MP ↦, \MP ∂, \MP ∅, \MP ∈, \MP ∫, \MP ⊂
+\end{center}
+You can try the package \sty{MnSymbol}, which has greater (and more uniform) coverage, with the package option \opt{MnSymbol}, e.g.\ \cmd{usepackage}|[MnSymbol]|\permitbreak|{mathspec}|. Note that \sty{MnSymbol} is a third party package by Achim Blumensath, which can only be used if additionally installed.
+
+\subsection{Examples}
+
+\begin{example}
+\setmathsfont(Digits,Latin,Greek)
+ [Numbers={Lining,Proportional}]{Minion Pro}
+\end{example}
+is equivalent to:
+\begin{example}
+\setmathsfont(Digits)[Numbers={Lining,Proportional}]{Minion Pro}
+\setmathsfont(Latin)[Numbers={Lining,Proportional}]{Minion Pro}
+\setmathsfont(Greek)[Numbers={Lining,Proportional}]{Minion Pro}
+\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
+
+\begin{example}
+\setmathsfont(Digits,Greek)
+ [Uppercase=Plain,Lowercase=Regular,Scale=MatchLowercase]
+ {GFS Porson}
+\end{example}
+is equivalent to:
+\begin{example}
+\setmathsfont(Digits)
+ [Uppercase=Plain,Lowercase=Regular,Scale=MatchLowercase]{GFS Porson}
+\setmathsfont(Greek)
+ [Uppercase=Plain,Lowercase=Regular,Scale=MatchLowercase]{GFS Porson}
+\end{example}
+and indicates that all digits and lowercase Greek charaters are to be set in GFS Porson, scaled so that its x-height matches the main font’s, in regular. Uppercase Greek characters remain unchanged (probably from Computer Modern).
+
+\subsection{Declaring alphabets}
+
+The mathematics alphabets like \cmd{mathrm} and \cmd{mathcal} can be set using these commands.
+
+\begin{ltxsyntax}
+
+\cmditem{setmathrm}[font features]{font name}
+
+This command defines \cmd{mathrm}, \cmd{mathit}, \cmd{mathbf} and the font for operators like $\sin$ and $\log$.
+
+\cmditem{setmathsf}[font features]{font name}
+
+This command defines \cmd{mathsf}.
+
+\cmditem{setmathtt}[font features]{font name}
+
+This command defines \cmd{mathtt}.
+
+\cmditem{setmathcal}[font features]{font name}
+
+This command defines \cmd{mathcal}.
+
+\cmditem{setmathbb}[font features]{font name}
+
+This command defines \cmd{mathbb}.
+
+\cmditem{setmathfrak}[font features]{font name}
+
+This command defines \cmd{mathfrak}.
+
+\end{ltxsyntax}
+
+\subsection{Shorthands}
+
+These commands are useful to save typing the same information multiple times, if the same font is used for different purposes.
+
+\begin{ltxsyntax}
+
+\cmditem{setallmainfonts}(sets)[shapes, font features]{font name}
+
+This command is equivalent to:
+
+\cmd{setmainfont}\oprm{font features}\mprm{font name}\\
+\cmd{setmathsfont}\sprm{sets}\oprm{shapes, font features}\mprm{font name}\\
+\cmd{setmathrm}\oprm{font features}\mprm{font name}
+
+If \sprm{sets} is omitted, then |(Digits,Latin,Greek)| is assumed.
+
+\cmditem{setprimaryfont}[shapes, font features]{font name}
+
+This command is equivalent to:
+
+\cmd{setallmainfonts}|(Digits,Latin)|\oprm{shapes, font features}\mprm{font name}
+
+\cmditem{setallsansfonts}[font features]{font name}
+
+This command is equivalent to:
+
+\cmd{setsansfont}\oprm{font features}\mprm{font name}\\
+\cmd{setmathsf}\oprm{font features}\mprm{font name}
+
+\cmditem{setallmonofonts}[font features]{font name}
+
+This command is equivalent to:
+
+\cmd{setmonofont}\oprm{font features}\mprm{font name}\\
+\cmd{setmathtt}\oprm{font features}\mprm{font name}
+
+\end{ltxsyntax}
+
+\subsection{A further example}
+
+This document is typeset with the following:
+
+\begin{example}
+\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}
+\exchangeforms{phi}
+\setminwhitespace[750]
+\end{example}
+
+The main text font is Sabon \acr{LT} Std with old style figures. The sans serif font is Candara with old style, proportional figures and the monospaced font is Consolas with old style figures, both scaled to match Sabon \acr{LT} Std in x-height.
+
+The mathematics font for digits and Latin symbols is Bembo \acr{MT} and for Greek symbols STIXGeneral, both scaled to match Sabon \acr{LT} Std in x-height.
+
+The |\mathrm|, |\mathit| and |\mathbf| alphabets are set in Sabon \acr{LT} Std.
+
+Finally, the normal and variant forms of Greek lowercase phi are exchanged, see section~\ref{sec:greek} Greek symbols, and the minimum white space on each side of a spaced character is $750\,\mathrm{mmu}$, see section~\ref{sec:glyphbounds} Glyph bounds.
+
+\section{Greek symbols}\label{sec:greek}
+
+For reference, the Greek alphabet and variant letter forms are given in table~\ref{tab:greek}. Despite its name, \cmd{varsigma}~$\varsigma$ is not a variant form of \cmd{sigma}~$\sigma$, it is the final form. Digamma~$\Digamma\digamma$ is an obsolete letter of the alphabet, originally placed between epsilon~$\Epsilon\epsilon$ and zeta~$\Zeta\zeta$.
+
+\begin{table}
+\begin{tabular}{@{}c@{}}\topbottomrule
+\begin{tabular}{@{}clcl@{}}
+\multicolumn{2}{@{}c}{Uppercase} & \multicolumn{2}{c@{}}{Lowercase}\\\midrule
+\tablerowa Aa{lpha}\\\tablerowa Bb{eta}\\\tablerowa Gg{amma}\\\tablerowa Dd{elta}\\
+\tablerowa Ee{psilon}\\\tablerowa Zz{eta}\\\tablerowa Ee{ta}\\\tablerowa Tt{heta}\\
+\tablerowa Ii{ota}\\\tablerowa Kk{appa}\\\tablerowa Ll{ambda}\\\tablerowa Mm{u}\\
+\tablerowa Nn{u}
+\end{tabular}
+\hspace{1em}
+\begin{tabular}{@{}rlrl@{}}
+\multicolumn{2}{@{}c}{Uppercase} & \multicolumn{2}{c@{}}{Lowercase}\\\midrule
+\tablerowa Xx{i}\\\tablerowa Oo{micron}\\\tablerowa Pp{i}\\\tablerowa Rr{ho}\\
+\multirow{2}*{$\Sigma$} & \multirow{2}*{\cmd{Sigma}} & $\varsigma$ & \cmd{varsigma}\\
+&& $\sigma$ & \cmd{sigma}\\\tablerowa Tt{au}\\\tablerowa Uu{psilon}\\\tablerowa Pp{hi}\\
+\tablerowa Cc{hi}\\\tablerowa Pp{si}\\\tablerowa Oo{mega}\\\tablerowa Dd{igamma}
+\end{tabular}\\\topbottomrule
+\begin{tabular}{@{}ccl@{}}
+Normal form & \multicolumn{2}{c@{}}{Variant form}\\\midrule
+\tablerowb{beta}\\\tablerowb{epsilon}\\\tablerowb{theta}\\\tablerowb{kappa}
+\end{tabular}
+\hspace{1em}
+\begin{tabular}{@{}ccl@{}}
+Normal form & \multicolumn{2}{c@{}}{Variant form} \\\midrule
+\tablerowb{pi}\\\tablerowb{rho}\\\tablerowb{phi}\\\tablerowb{Theta}
+\end{tabular}\\\bottomrule
+\end{tabular}
+\caption{The Greek alphabet and variant letter forms with control sequences.\label{tab:greek}}
+\end{table}
+
+\begin{ltxsyntax}
+
+\item
+\begin{marglist}\item
+\begin{advanced}
+Initially, \sty{mathspec} defines control sequences for the Greek characters that are absent in Computer Modern, because they are similar in form to Latin characters, from {\addfontfeature{FakeSlant=\the\fontdimen1\font}\scshape ascii}, thus control sequences like {\spotcolor\cmd{Alpha}} and {\spotcolor\cmd{omicron}} are defined. Any variant forms that are absent become equivalent to the normal forms. The meanings of these control sequences are preserved by other control sequences of the same names prefixed with |eu@cm@| (e.g.\ {\spotcolor\cmd{eu@cm@alpha}}), which may be recalled after the Greek mathematics font is changed.
+\end{advanced}
+\end{marglist}
+
+%{\itshape\footnotesize\csitem{\smash{\begin{tabular}[t]{@{}r@{}}|eu@cm@alpha|\\\cmd{eu@cm@beta}\\\color{black}\rmfamily etc.\end{tabular}}}
+%\acr{\spotcolor ADVANCED}\quad Initially, \sty{mathspec} defines control sequences for the Greek characters that are absent in Computer Modern, because they are similar in form to Latin characters, from {\addfontfeature{FakeSlant=\the\fontdimen1\font}\scshape ascii}, thus control sequences like \cmd{Alpha} and \cmd{omicron} are defined. Any variant forms that are absent become equivalent to the normal forms. The meanings of these control sequences are preserved by other control sequences of the same names prefixed with |eu@cm@| (e.g.\ \cmd{eu@cm@alpha}), which may be recalled after the Greek mathematics font is changed.}
+
+\cmditem{exchangeforms}{list}
+
+\begin{marglist}
+
+\item[\prm{list}] A comma separated value list of any of the names for the Greek symbols which have variant forms: |beta|, |epsilon|, |theta|, |kappa|, |pi|, |rho|, |phi|, |Theta|.
+
+\end{marglist}
+
+Some authors might prefer the normal and variant forms of a symbol to be exchanged. For example, I prefer \cmd{phi} to print the orthotic phi ‘$\phi$’ and \cmd{varphi} the cursive phi ‘$\varphi$’, contrary to many text fonts. To exchange the forms of any symbol, include its name in the list.
+
+\cmditem{normalisevarforms}[list]
+\cmditem{normalizevarforms}[list]
+
+\begin{marglist}
+
+\item[\prm{list}] As above, a comma separated value list of any of the names for the Greek symbols which have variant forms: |beta|, |epsilon|, |theta|, |kappa|, |pi|, |rho|, |phi|, |Theta|.
+
+If \oprm{list} is omitted, then |[beta,epsilon,theta,kappa,pi,rho,phi,Theta]|, that is every such symbol, is assumed.
+
+\end{marglist}
+
+Since not all fonts contain all variant forms, there might be the odd variant letter that remains in Computer Modern while other Greek letters have changed font. For these characters, the command \cmd{normalisevarforms} (or \cmd{normalizevarforms}) will cause the listed symbols that are absent from the font to be equivalent to their corresponding normal forms. If a symbol is listed which is included in the font, then it is ignored.
+
+Note that this command only adjusts the characters that are absent in the font. Of course, this might mean that, for example, |\vartheta| and |\theta| would print the same glyph, which would be dubious if they are to be used in the same document, with different meanings.
+
+\end{ltxsyntax}
+
+\makeatletter
+It should be noted that \cmd{epsilon} prints the lunate epsilon~‘$\eu@cm@epsilon$’ and \cmd{varpepsilon} prints the usual (double loop) epsilon~‘$\eu@cm@varepsilon$’ in Plain \TeX\ and \LaTeX. This is in contrast to Unicode text fonts, which contain the lunate style epsilon separately from the Greek alphabet among variant letter forms and symbols (where Unicode assigns ‘Greek Lunate Epsilon Symbol’). The definition of \cmd{LaTeXe}, which prints ‘\LaTeXe’ uses \cmd{varepsilon} and care should be taken to ensure that \cmd{LaTeXe} still uses the usual epsilon either by using one of the methods that were presented in this section or by redefining \cmd{LaTeXe} (possibly using my \sty{metalogo} package), because {\setLaTeXee{\mbox{$\varepsilon$}}‘\LaTeXe’} is not as good as {\setLaTeXee{\mbox{$\epsilon$}}‘\LaTeXe’}.
+\makeatother
+
+\section{Glyph bounds}\label{sec:glyphbounds}
+
+In using this package to set text fonts for mathematics, there are issues with glyph bounds (similar to italic correction), as illustrated in the equations:
+\begin{example}
+\begin{align}
+ f(x) &= \sum_{n = -\infty}^\infty c_{n}e^{jnx} \\
+c_{n} &= \frac{1}{2π}\int_{-π}^{π}f(x)e^{-jnx}\,\mathrm dx
+\end{align}
+\end{example}
+\begin{align}
+f(x) &= \sum_{n = -\infty}^\infty c_{n}e^{jnx}\label{eq:1}\\
+c_{n} &= \frac 1{2π}\int_{-π}^{π}f(x)e^{-jnx}\,\mathrm dx\label{eq:2}
+\end{align}
+where the function $f$ is to close the the parenthesis $($ and the exponent $jnx$ is too close to its base $e$ that there is in fact a collision. The reason is that the font has metrics that are suitable for use in text, but not for mathematics.
+
+Comparing the alphabets typeset in Computer Modern italic, in table~\ref{tab:cm}, it is shown that many characters have greater space around them in the mathematics version, which does not exist in the text version.
+
+\begin{table}
+\begin{tabular}{@{}rl@{}}\topbottomrule
+Text & \usefont{OT1}{cmr}{m}{it}abcdefghijklmnopqrstuvwxyz\\
+Mathematics & $\mathnormal{abcdefghijklmnopqrstuvwxyz}$\\\bottomrule
+\end{tabular}
+\caption{Computer Modern Italic in text and mathematics.\label{tab:cm}}
+\end{table}
+
+\begin{ltxsyntax}
+
+\item["]\prm{character}
+
+It is necessary to indicate exactly where additional space needs to be inserted. By putting |"| before a character, the character will be typeset with additional space inserted on both sides of it.
+
+\cmditem{"}\prm{string}{\spotcolor|"|}
+
+For multiple adjacent characters, each need not have a |"| in front of it, but it the characters may be surrounded by \cmd{"} before and |"| after. That is, for example |\"abcde"| is equivalent to |"a"b"c"d"e|.
+
+Note that \prm{character} must be one of the symbols that are listed in table~\ref{tab:symbols}. \prm{string} must one or more such characters adjacent to each other. So |\"xyz"| and |\sin"x| is okay, but |\"\sin x"| is not because \cmd{sin} is not a valid character. Also note that with Greek symbols, they can only be used if typed literally, not via control sequences, so |\cos"θ| is okay but |\cos"\theta| is not. Use of control sequences for Greek symbols is still perfectly acceptable because the spacings are built into the defintions of each (for example \cmd{alpha} is defined to expand to |{"α}| automatically).
+
+\begin{table}
+\begin{tabular}{@{}c@{}}\topbottomrule
+$\"0123456789"$\\
+$\"ABCDEFGHIJKLMNOPQRSTUVWXYZ"$\\
+$\"abcdefghijklmnopqrstuvwxyz"$\\
+$\"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩϜ"$\\
+$\"αβγδεζηθικλμνξοπρςστυφχψωϝ"$\\
+$\"ϐϑϕϖϰϱϵϴ"$\\\bottomrule
+\end{tabular}
+\caption{All valid characters for use with \texttt" and \texttt{\textbackslash"}…\texttt".\label{tab:symbols}}
+\end{table}
+Use of |"| and |\"| in mathematics mode does not interfere with their use in text mode for quotation marks and umlauts or diæreses: ‘"’ co\"operates, even with {\addfontfeature{Mapping=tex-text}``|Mapping=tex-text|"}.
+
+\cmditem{setminwhitespace}\oprm{number}
+
+Use this command to change the minimum allowed white space around such a spaced character. The unit of \prm{number} is millimu ($\mathrm{mmu}$), that is $\frac 1{1000}\,\mathrm{mu}$. Recall $18\,\mathrm{mu} = 1\,\mathrm{em}$.
+
+The default \prm{number} is |500| which corresponds to $500\,\mathrm{mmu} = \frac{500}{1000}\,\mathrm{mu} = 0.5\,\mathrm{mu} = \frac 1{36}\,\mathrm{em}$.
+
+Note that this value corresponds to the inserted spaces on both sides for each spaced character. If two adjacent characters are spaced, then the total minimum white space between the two characters is twice this value. The effect is shown in table~\ref{tab:stix}.
+
+\begin{table}
+\begin{tabular}{@{}rl@{}}\topbottomrule
+Text & \fontspec{Bembo MT}\itshape abcdefghijklmnopqrstuvwxyz\\
+Mathematics & $\"abcdefghijklmnopqrstuvwxyz"$\\\bottomrule
+\end{tabular}
+\caption{Bembo \acr{MT} in text and spaced mathematics.\label{tab:stix}}
+\end{table}
+
+\end{ltxsyntax}
+
+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
+\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
+\end{align}
+
+Also note that the spacing is improved by replacing |(x)| with |\left(x\right)| (which you should be doing anyway).
+
+\section{Compatability}
+
+If \sty{amsmath} is required, it must be loaded earlier than \sty{mathspec}.
+
+\pagebreak
+\section{The package}
+
+The package style file is printed in this section.
+
+\begingroup
+ \footnotesize\ttfamily
+ \setbox0\hbox{0}
+ \global\dimen0\wd0
+\endgroup
+
+\lstset{
+ language=[LaTeX]TeX,
+ basicstyle=\footnotesize\ttfamily,
+ keywordstyle={},
+ commentstyle=\spotcolor\itshape,
+ numbers=left,
+ numberstyle=\footnotesize,
+ keepspaces=true,
+ basewidth=\dimen0,
+ columns=fullflexible,}
+
+\lstinputlisting{mathspec.sty}
+
+\noindent Exactly 1000 lines! How about that?
+
+\pagebreak
+
+\section{License}
+
+\setlength\parindent{0pt}
+\parskip 1em plus 1pt minus 1pt
+
+© Andrew Gilbert Moschou 2009
+
+This work may be distributed and/or modified under the
+conditions of the \LaTeX\ Project Public License, either version 1.3\textit c
+of this license or (at your option) any later version.
+The latest version of this license is in:
+\parskip 0pt plus 1pt
+\begin{center}\ttfamily
+http://www.latex-project.org/lppl.txt
+\end{center}
+and version 1.3\textit c or later is part of all recent distributions of \LaTeX.
+
+\parskip 1em plus 1pt minus 1pt
+
+This work has the \acr{LPPL} maintenance status ‘maintained’.
+
+The Current Maintainer of this work is Andrew Gilbert Moschou.
+
+This work consists of the files \sty{mathspec.sty} and \sty{mathspec.tex}.
+
+\end{document}
+
diff --git a/Master/texmf-dist/source/xelatex/mathspec/mathspec.dtx b/Master/texmf-dist/source/xelatex/mathspec/mathspec.dtx
deleted file mode 100644
index 01fcc9e42d3..00000000000
--- a/Master/texmf-dist/source/xelatex/mathspec/mathspec.dtx
+++ /dev/null
@@ -1,1380 +0,0 @@
-% \iffalse meta-comment
-%
-% © Andrew Gilbert Moschou 2008
-%fontspec
-% This work may be distributed and/or modified under the
-% 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.
-%
-% \fi
-%
-% \iffalse
-%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-%<package>\ProvidesPackage{mathspec}[2009/08/29 v0.16 LaTeX Package (Mathematics font selection for XeLaTeX)]
-%<*internal>
-\begingroup
-%</internal>
-%<*batchfile>
-%%
-%% © Andrew Gilbert Moschou 2008
-%%
-%% This work may be distributed and/or modified under the
-%% 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.
-%%
-
-\input docstrip.tex
-\keepsilent
-\usedir{tex/xelatex/mathspec}
-\preamble
-
-This is a generated file.
-
-© Andrew Gilbert Moschou
-
-This file may be distributed and/or modified under the
-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.
-
-\endpreamble
-\askforoverwritefalse
-\generate{\file{mathspec.sty}{\from{mathspec.dtx}{package}}}
-%</batchfile>
-%<batchfile>\endbatchfile
-%<*internal>
-\nopreamble
-\generate{\file{mathspec.ins}{\from{mathspec.dtx}{batchfile}}}
-\endgroup
-%</internal>
-%
-%<*driver>
-\documentclass[a4paper]{ltxdoc}
-\usepackage{amsmath}
-\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
-\makeatletter
-\DeclareMathSymbol{\eu@digamma}{\mathord}{AMSb}{"7A}
-\usepackage[MnSymbol,normalskips]{mathspec}
-\setprimaryfont[Numbers={OldStyle,Proportional}]{Sabon LT Std}
-\setmonofonts[Numbers=OldStyle,Scale=MatchLowercase]{Consolas}
-\setsansfonts[Numbers={OldStyle,Proportional},Scale=MatchLowercase]{Candara}
-\usepackage{eukdate}
-\def\@seccntformat#1{%
- \protect\makebox[0pt][r]{\csname the#1\endcsname\hspace{1\@ptsize pt}}}
-\DeclareRobustCommand{\MakeSC}[1]{{%
- \def\reserved@a##1##2{\let##2##1\reserved@a}%
- \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
- \protected@edef\reserved@a{{\scshape\lowercase{#1}}}%
- \reserved@a
- }}
-\protected@edef\MakeSC#1{\MakeSC{#1}}
-\global\let\MakeSCorLowercase\MakeSC
-\newcommand\orLowercase{\let\l@section\l@sectionLC}
-\renewcommand\section{\@startsection {section}{1}{\z@}%
- {-3.5ex \@plus -1ex \@minus -.2ex}%
- {2.3ex \@plus.2ex}%
- {\normalfont\Large\MakeSCorLowercase}}
-\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\large\itshape}}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\itshape}}
-\newcommand\STIX{\MakeSC{STIX}}
-\usepackage{graphicx}
-\usepackage{booktabs}
-\usepackage[xetex,usenames]{color}
-\def\abovetopsep{1ex}
-\usepackage{metalogo}
-\setlogokern{Te}{-0.084em}
-\setlogokern{eX}{-0.063em}
-\setlogokern{eT}{-0.074em}
-\setlogokern{Xe}{-0.063em}
-\setlogokern{eL}{-0.068em}
-\setlogokern{La}{-0.305em}
-\setlogokern{aT}{-0.07313em}
-\setlogokern{X2}{0.101em}
-\setlogodrop{0.131em}
-\setLaTeXa{%
- \ifdim\fontdimen\@ne\font=\z@\else
- \addfontfeature{FakeSlant=\the\fontdimen\@ne\font}%
- \fi
- \if b\expandafter\@car\f@series\@nil
- \check@mathfonts\fontsize\sf@size\z@
- \math@fontsfalse\selectfont A%
- \else
- \scshape a%
- \fi}
-\setLaTeXee{\mbox{\STIXGeneral\itshape ε}}
-\newcommand\closebracket{\char"5D}
-\renewcommand\backslash{\char"5C}
-\newcommand\permitbreak{\linebreak[0]}
-\definecolor{eured}{rgb}{.8,.1,.2}
-\newcommand\te[1]{\textcolor{eured}{#1}}
-\newcommand\eg{e.g.\ }
-\renewcommand\labelitemi{\char"2022}
-\long\def\@makecaption#1#2{%
- \vskip\abovecaptionskip
- \sbox\@tempboxa{\MakeSC{#1:} #2}%
- \ifdim \wd\@tempboxa >\hsize
- \MakeSC{#1:} #2\par
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}
-\frenchspacing
-\let\@meta\meta
-\renewcommand\meta[1]{{%
- \ifmmode
- \let\@@meta\relax
- \else
- \let\@@meta\rmfamily
- \fi
- \@@meta\@meta{#1}}}
-\newcommand\displaycommand[2]{%
- \begin{center}\ttfamily%
- \fbox{\string#1#2}%
- \end{center}}
-\fontspec[Scale=MatchLowercase]{Bembo MT}
-\let\eu@Bembo\zf@family
-\DeclareSymbolFont{BemboMTmn}{EU1}{\eu@Bembo}{m}{n}
-\DeclareSymbolFont{BemboMTmit}{EU1}{\eu@Bembo}{m}{it}
-\newcommand\BemboMathematics{
- \XeTeXmathcode `f = 7 \symBemboMTmit `f
- \XeTeXmathcode `x = 7 \symBemboMTmit `x
- \XeTeXmathcode `c = 7 \symBemboMTmit `c
- \XeTeXmathcode `e = 7 \symBemboMTmit `e
- \XeTeXmathcode `j = 7 \symBemboMTmit `j
- \XeTeXmathcode `n = 7 \symBemboMTmit `n
- \XeTeXmathcode `d = 7 \symBemboMTmn `d
- \XeTeXmathcode `1 = 0 \symBemboMTmn `1
- \XeTeXmathcode `2 = 0 \symBemboMTmn `2}
-\newcommand\biggerskips{
- \thinmuskip=4mu
- \medmuskip=5mu plus 2mu minus 4mu
- \thickmuskip=6mu plus 5mu}
-\newcommand\grp[3]{\left#1#3\right#2}
-\renewcommand\contentsname{Table of Contents}
-\renewcommand*\l@section[2]{%
- \ifnum \c@tocdepth >\z@
- \addpenalty\@secpenalty
- \addvspace{1.0em \@plus\p@}%
- \setlength\@tempdima{1.5em}%
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode
- \advance\leftskip\@tempdima
- \hskip -\leftskip
- \MakeSC{#1}\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
- \endgroup
- \fi}
-\newcommand*\l@sectionLC[2]{%
- \ifnum \c@tocdepth >\z@
- \addpenalty\@secpenalty
- \addvspace{1.0em \@plus\p@}%
- \setlength\@tempdima{1.5em}%
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode
- \advance\leftskip\@tempdima
- \hskip -\leftskip
- \MakeLowercase{#1}\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
- \endgroup
- \fi}
-\setcounter{tocdepth}{2}
-\renewcommand\tableofcontents{%
- \begin{multicols}{2}[\section*{\contentsname}]%
- \small\@starttoc{toc}%
- \end{multicols}}
-\renewenvironment{theglossary}
- {\small\list{}{}
- \item\relax
- \glossary@prologue\GlossaryParms
- \let\item\@idxitem \ignorespaces
- \def\pfill{\hspace*{\fill}}}
- {\endlist}
-\newfontfamily\STIXGeneral[Scale=MatchLowercase]{STIXGeneral}
-\usepackage{multirow}
-\newcommand\tablerow[3]{
- \STIXGeneral #1 & \ttfamily\string#3 & \STIXGeneral\itshape #2 &
- \ttfamily\MakeLowercase{\string#3}}
-\hyphenation{se-par-ate math-ema-tics math-ema-tic cor-res-pond-ing de-spite bene-fits ela-borate des-cribed rom-an}
-\makeatother
-\setmathsfont[Set=Greek,Scale=MatchLowercase]{STIXGeneral}
-\normalvarforms
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
- \DocInput{mathspec.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \CheckSum{1829}
-%
-% \GetFileInfo{mathspec.sty}
-%
-% \DoNotIndex{
-% \@argdef,\@eu@GreekDigits@true,\@eu@GreekLowercase@true,\@eu@GreekUppercase@true,
-% \@eu@LatinDigits@true,\@eu@LatinLowercase@true,\@eu@LatinUppercase@true,
-% \@eu@Symbols@false,\@eu@Symbols@true,\@firstofone,\@gobble,\@ifdefinable,\@ifnext,
-% \@ifnexta,\@ifpackageloaded,\@ifundefined,\@latex@info,\@rc@ifdefinable,
-% \@star@or@long,\@tempa,\@tempb,\@tempc,\@tempd,\@undefined,\@xargdef}
-% \DoNotIndex{
-% \AtBeginDocument,\csname,\CurrentOption,\DeclareMathAlphabet,\DeclareMathSymbol,
-% \DeclareOption,\DeclareSymbolFont,\def,\define@boolkey,\define@choicekey,\edef,
-% \else,\endcsname,\ensuremath,\expandafter}
-% \DoNotIndex{
-% \fi,\fontfamily,\futurelet,\ifcase,\ifnum,\ifthenelse,\ifx,\isempty,\let,\long,
-% \mathalpha,\makeatother,\mathbin,\mathchar@type,\mathclose,\mathgroup,\mathord,
-% \mathpunct,\meaning,\mskip,\newcommand,\newif,\noexpand,\or,\PackageError,
-% \PackageWarning,\PassOptionsToPackage,\presetkeys,\ProcessOptions,\protect,
-% \providecommand,\relax,\renewcommand,\RequirePackage,\reserved@a,\reserved@b}
-% \DoNotIndex{
-% \selectfont,\setkeys,\SetMathAlphabet,\string,\strip@prefix,\unexpanded,\x@protect,
-% \XKV@rm}
-%
-% \makeatletter
-% \title{The \textsf{mathspec} package\\[1ex]\normalsize version \expandafter\@gobble\fileversion}
-% \author{Andrew Gilbert Moschou\\\texttt{andmos@gmail.com}}
-% \makeatletter\let\@today\today\def\today{\MakeSC{\@today}}\makeatother
-%
-% \maketitle
-%
-% \tableofcontents
-%
-%\section{Preamble}
-%
-%This document describes the |mathspec| package, a package that provides an interface to typeset mathematics in \XeLaTeX\ using arbitrary text fonts. It relies on |fontspec| to work and familiarity with |fontspec| is advised. Thanks to Will Robertson for his useful advice and suggestions!
-%
-%The package is in its developmental stage and later versions are likely to be incompatible with this version.
-%
-%\section{Introduction}
-%
-%Since Jonathan Kew released \XeTeX, an extension to \TeX\ that permits the inclusion of system wide Unicode fonts and modern font technologies in \TeX\ documents, users have been able to easily typeset documents using readily available fonts such as Hoefler Text and Times New Roman (This document is typeset using Sabon \MakeSC{LT} Std). Will Robertson’s \XeLaTeX\ package |fontspec| provides an automatic font selection process for such arbitrary fonts. Still, mathematics typesetting has not benefited from this development to the same extent as text typesetting, which is not surprising given the font requirements that are demanded.
-%
-%Will Robertson has in development a package |unicode-math| that is used to typeset mathematics using some font that has an OpenType mathematics table. Currently, the only two that are available are Cambria Math, a new design, by Microsoft and Asana Math, based on Hermann Zapf’s Palatino, by Apostolos Syropoulos. It is expected that the \STIX\ fonts, based on Times, may also be used.
-%
-%Thus, it is evident that a book designer is confronted with such narrow variety in mathematics typefaces, even considering already established \LaTeX\ packages such as |euler| (and Computer Modern, of course!) that are dedicated to providing mathematics typefaces; and the book designer is challenged to find a suitable pair of typefaces for mathematics and body text.
-%
-%This package provides mathematics alphabets in any of the same typefaces that are available to \XeTeX, using |fontspec| as a back end. Other mathematics symbols such as arrows and operators, whose designs are largely independent of an alphabetic typeface, can be taken from collections like MnSymbol or Computer Modern and are not covered by the scope of this package.
-%
-%\section{Implementation}
-%
-%\displaycommand\usepackage{\oarg{|mathspec| and |fontspec| options}\char"7B mathspec\char"7D}
-%
-%\noindent To use the package, put |\usepackage{mathspec}| in the preamble of the document. It is not necessary to put |\usepackage{requirepackagefontspec}| because |mathspec| will ensure that |fontspec| is loaded anyway. To load |fontspec| with some options, parse them through |mathspec|, for example, |\usepackage|\permitbreak|[quiet]|\permitbreak|{mathspec}| is equivalent to |\usepackage|\permitbreak|[quiet]|\permitbreak|{fontspec}|\permitbreak|\usepackage|\permitbreak|{mathspec}|.
-%
-%Actually, |mathspec| ordinarily loads |fontspec| with the |no-math| option. To cancel this, explicitly use the |math| option: \eg|\usepackage[math]{mathspec}|.
-%
-%\subsection{Letters and Digits}
-%
-%\displaycommand\setmathsfont
-% {[Set=\meta{set},\meta{shapes},\meta{font features}]\marg{font name}}
-%
-%\noindent \DescribeMacro{\setmathsfont}\DescribeMacro{\setmathfont}This single command is used to entirely describe the desired font for some use. Usually, the command would appear up to two times in a document, to specify each the Latin and the Greek fonts. The command can be used only in the preamble, that is before |\begin{document}| because \LaTeX\ will not allow it to be used elsewhere. Then, there can be only one Latin mathematics typeface and one Greek mathematics typeface in the document (The different fonts in section~\ref{sec:ic} of this document was only achieved through trickery).
-%
-%\begin{description}
-%\item[\meta{set}]Compulsory value for key |Set|.
-%
-%|Latin|, |Greek|.
-%
-%\item[\meta{shapes}]Optional comma separated list of keys.
-%
-%A comma separated list of keys and their values, \eg|(Uppercase=Regular,|\permitbreak|Lowercase=Italic,|\permitbreak|Digits=Regular)|. Keys are |Uppercase|, |Lowercase| and |Digits| which can each have value |Regular|, |Italic| or |Plain|; |Regular| and |Italic| respectively indicate the regular and italic fonts of the typeface, |Plain| indicates that no font assignment is performed by |mathspec|, and that the symbols will by typeset in the default font, which is usually Computer Modern. If a key is absent, its default value, as indicated in table~\ref{tab:shapes}, is used.
-%
-%The default values are very good and you would be wise not to change the Latin and the digit shapes. The Greek shapes can be changed to adhere to some particular style, for example all italic, or because the specified Greek font has only one shape regular.
-%\begin{table}[htbp]\centering
-%\caption{The default shapes for the symbol sets}\label{tab:shapes}
-%\begin{tabular}{@{}ccccc@{}}\toprule
-% & \multicolumn{2}{@{}c@{}}{Latin} & \multicolumn{2}{@{}c@{}}{Greek} \\\cmidrule(lr){2-3}\cmidrule(l){4-5}
-%Digits & Uppercase & Lowercase & Uppercase & Lowercase \\\midrule
-%Regular & Italic & Italic & Regular & Italic \\\bottomrule
-%\end{tabular}\end{table}
-%
-%\DescribeMacro{\plaindigits}It is clear that the digits can be typeset by only one font at any one time. By default, if only one set is specified (Latin or Greek), then the digits are typeset using the font that is used for the set or if both sets are specified, then the digits are typset using the Latin font, unless this choice is overridden. The choice can be overridden by explicitely writing |Digits=Regular| or |Digits=Plain| in the optional argument to |\setmathsfont|, or with the command |\plaindigits|, which might be an easier way to cancel the assignment of a new font for the digits.
-%
-%\item[\meta{font features}\textrm{, }\meta{font name}]\meta{font features} optional comma separated list, \meta{font name} compulsory argument.
-%
-%These are the same arguments as those used by |\fontspec| and are interpreted by |fontspec|. See |fontspec|’s documentation for details.
-%\end{description}
-%
-%\subsection{Symbols}
-%
-%Support for setting the symbols font was removed in this version. I am focussing on the other areas of the package and feel that an incomplete feature should not be present at all.
-%
-%You can try MnSymbol, which has greater (and more uniform) coverage, with the package option |MnSymbol|, \eg|\usepackage[MnSymbol]{mathspec}|. Note that MnSymbol is a third party package by Achim Blumensath, which can only be used if additionally installed.
-%
-%\section{Alphabets}
-%
-%\DescribeMacro{\setmathrm}\DescribeMacro{\setmathcal}\DescribeMacro{\setmathsf}\DescribeMacro{\setmathtt}\DescribeMacro{\setmathfrak}\DescribeMacro{\setmathbb}The mathematics alphabets like |\mathrm| and |\mathcal| can be set using the commands:
-%\begin{itemize}
-%\item|\setmathrm|\oarg{font features}\marg{font name} (defines |\mathrm|, |\mathit|, |\mathbf| and the font for operators)
-%\item|\setmathcal|\oarg{font features}\marg{font name} (defines |\mathcal|)
-%\item|\setmathsf|\oarg{font features}\marg{font name} (defines |\mathsf|)
-%\item|\setmathtt|\oarg{font features}\marg{font name} (defines |\mathtt|)
-%\item|\setmathfrak|\oarg{font features}\marg{font name} (defines |\mathfrak|)
-%\item|\setmathbb|\oarg{font features}\marg{font name} (defines |\mathbb|)
-%\end{itemize}
-%All are straight forward, but |\setmathrm| does a little more than the others. |mathspec| redefines |fontspec|’s definitions.
-%\subsection{Shorthands}
-%
-%\displaycommand\setprimaryfont{\oarg{font features}\marg{font name}}
-%
-%\noindent \DescribeMacro{\setprimaryfont}|\setprimaryfont| is equivalent to:
-%\begin{flushleft}\ttfamily
-%\string\setmainfont\oarg{font features}\marg{font name}\\
-%\string\setmathsfont[Set=Latin,\meta{font features}]\marg{font name}\\
-%\string\setmathrm\oarg{font features}\marg{font name}
-%\end{flushleft}and is useful to save typing the same information multiple times.
-%
-%\begin{center}\ttfamily
-%\fbox{\begin{tabular}{@{}c@{}}
-% \string\setsansfonts\oarg{font features}\marg{font name}\\
-% \string\setmonofonts\oarg{font features}\marg{font name}
-% \end{tabular}}
-%\end{center}
-%Similarly, \DescribeMacro{\setsansfonts}\DescribeMacro{\setmonofonts}|\setsansfonts| and |\setmonofonts| (note the plurals) are equivalent to:
-%\begin{flushleft}\ttfamily
-%\string\setsansfont\oarg{font features}\marg{font name}\\
-%\string\setmathsf\oarg{font features}\marg{font name}
-%\end{flushleft}and
-%\begin{flushleft}\ttfamily
-%\string\setmonofont\oarg{font features}\marg{font name}\\
-%\string\setmathtt\oarg{font features}\marg{font name}
-%\end{flushleft}respectively.
-%
-%See |fontspec|’s documentation for details of |\setmainfont|, |\setsansfont| and |\setmonofont|.
-%
-%\subsection{Limitations}
-%
-%Apparently, there is a limit on the number of math groups (symbol fonts and alphabets) that a document may contain. It seems that 16 is the limit, which is enforced by \LaTeXe{} kernel macros. I am under the impression that \XeTeX{} actually permits 256 math groups, but I have not found that redefined \LaTeX{} macros alleviates the problem.
-%
-%Maybe I am going about this the wrong way, but until I truly understand what’s going on and improve this area, beware ‘{\ttfamily! LaTeX Error: Too many math alphabets used in version normal.}’.
-%
-%\section{Greek characters}
-%
-%For reference, the Greek alphabet and variant letter forms is given in table~\ref{tab:greek}. Despite the name, |\varsigma|~$\varsigma$ is not a variant form of |\sigma|~$\sigma\+$, it is the final form. Digamma~{\STIXGeneral Ϝ} is an obsolete letter of the alphabet, originally placed between epsilon~$\epsilon$ and zeta~$\zeta\+$.
-%
-%\begin{table}[htbp]\centering
-%\caption{The Greek alphabet and variant letter forms with control sequences\label{tab:greek}}
-%\begin{tabular}{@{}c@{}}\toprule
-%\begin{tabular}{@{}clcl@{\hspace{2em}}clcl@{}}
-%\multicolumn{2}{@{}c@{}}{Uppercase} & \multicolumn{2}{@{}c@{\hspace{2em}}}{Lowercase} &
-%\multicolumn{2}{@{}c@{}}{Uppercase} & \multicolumn{2}{@{}c@{}}{Lowercase} \\\midrule
-%\tablerow{Α}{α}{\Alpha} &\tablerow{Ξ}{ξ}{\Xi}\\
-%\tablerow{Β}{β}{\Beta} &\tablerow{Ο}{ο}{\Omicron}\\
-%\tablerow{Γ}{γ}{\Gamma} &\tablerow{Π}{π}{\Pi}\\
-%\tablerow{Δ}{δ}{\Delta} &\tablerow{Ρ}{ρ}{\Rho}\\
-%\tablerow{Ε}{ε}{\Epsilon} &\multirow{2}*{\STIXGeneral Σ}&\multirow{2}*{\ttfamily\string\Sigma}& \STIXGeneral\itshape ς & \ttfamily\string\varsigma\\
-%\tablerow{Ζ}{ζ}{\Zeta} &&& \STIXGeneral\itshape σ & \ttfamily\string\sigma\\
-%\tablerow{Η}{η}{\Eta} &\tablerow{Τ}{τ}{\Tau}\\
-%\tablerow{Θ}{θ}{\Theta} &\tablerow{Υ}{υ}{\Upsilon}\\
-%\tablerow{Ι}{ι}{\Iota} &\tablerow{Φ}{ϕ}{\Phi}\\
-%\tablerow{Κ}{κ}{\Kappa} &\tablerow{Χ}{χ}{\Chi}\\
-%\tablerow{Λ}{λ}{\Lambda} &\tablerow{Ψ}{ψ}{\Psi}\\
-%\tablerow{Μ}{μ}{\Mu} &\tablerow{Ω}{ω}{\Omega}\\
-%\tablerow{Ν}{ν}{\Nu} &\STIXGeneral\char"3DC &\ttfamily\string\Digamma &\STIXGeneral\itshape\char"3DD &\ttfamily\string\digamma
-%\end{tabular}\\\toprule
-%\begin{tabular}{@{}ccl@{\hspace{2em}}ccl@{}}
-%Normal form & \multicolumn{2}{@{}c@{\hspace{2em}}}{Variant form} &
-%Normal form & \multicolumn{2}{@{}c@{}}{Variant form} \\\midrule
-%\STIXGeneral\itshape β &\STIXGeneral\itshape ϐ &\ttfamily\string\varbeta&
-%\STIXGeneral\itshape π &\STIXGeneral\itshape ϖ &\ttfamily\string\varpi\\
-%\STIXGeneral\itshape ε &\STIXGeneral\itshape ϵ &\ttfamily\string\varepsilon&
-%\STIXGeneral\itshape ρ &\STIXGeneral\itshape ϱ &\ttfamily\string\varrho\\
-%\STIXGeneral\itshape θ &\STIXGeneral\itshape ϑ &\ttfamily\string\vartheta&
-%\STIXGeneral\itshape ϕ &\STIXGeneral\itshape φ &\ttfamily\string\varphi\\
-%\STIXGeneral\itshape κ &\STIXGeneral\itshape ϰ &\ttfamily\string\varkappa&
-%\STIXGeneral Θ &\STIXGeneral ϴ &\ttfamily\string\varTheta\\
-%\end{tabular}\\\bottomrule
-%\end{tabular}\end{table}
-%
-%Initially, |mathspec| defines control sequences for the Greek characters that are absent in Computer Modern, because they are similar in form to Latin characters, from \MakeSC{ASCII}, thus control sequences like |\Alpha| and |\omicron| are defined. Any variant forms that are absent are equivalent to the normal forms. The meanings of these control sequences are preserved by a control sequence of the same name with the prefix |cm| (e.g. |\cmAlpha|), which may be recalled after the Greek mathematics font is changed.
-%
-%\DescribeMacro{\normalvarforms}Since not all fonts contain all variant forms, there might be the odd variant letter that remains in Computer Modern while other Greek letters have changed font. For these characters, the command |\normalvarforms| will make then equivalent to their corresponding normal forms. Note that this command only adjusts those that are absent in the font. Of course, this might mean that, for example, |\vartheta| and |\theta| would print the same glyph, which would be dubious if they are used in the same document, with different meanings.
-%
-%\DescribeMacro{\varforms}If an author does not agree with the font designer’s choice of normal and variant forms, for example, I prefer |\phi| to print ‘$\varphi\+$’ and |\varphi| to print ‘$\phi\+$’, which is not the default behaviour for many fonts, the forms can be exchanged by putting the list of letters to the command |\varforms|, \eg|\varforms{theta,kappa,phi}| might be used if the Greek mathematics font is Garamond Premier Pro Italic.
-%
-%It should be noted that |\epsilon| prints the lunate epsilon~‘$\cmepsilon$’ and |\varepsilon| prints the usual (double loop) epsilon~‘$\cmvarepsilon$’ in Plain \TeX\ and \LaTeX. This is in contrast to other fonts, which contain the lunate style epsilon separately from the Greek alphabet among variant letter forms and symbols (where Unicode assigns ‘Greek Lunate Epsilon Symbol’). The definition of |\LaTeXe|, which prints ‘\LaTeXe’ uses |\varepsilon| and care should be taken to ensure that |\LaTeXe| uses the usual epsilon either by using one of the methods that were presented in this section or by redefining |\LaTeXe| (possibly using my \texttt{metalogo} package), because \setLaTeXee{\mbox{\STIXGeneral\itshape ϵ}}‘\LaTeXe’ is not as good as \setLaTeXee{\mbox{\STIXGeneral\itshape ε}}‘\LaTeXe’.
-%
-%\section{Additional information}
-%
-%This section describes the shortcomings of this package. I wonder whether the benefits of being able to use an arbitrary font for mathematics outweigh the detriments; in a production environment, it might be best to seek an alternative approach and use some \LaTeX\ set, like MathTime, MinionPro, Math Design or the \MakeSC{TX} or \MakeSC{PX} fonts, that is dedicated to producing good mathematics with one font.
-%
-%\subsection{Glyph bounds}\label{sec:ic}
-%
-%In using this package to provide arbitrary fonts for mathematics, there are issues with glyph bounds (similar to italic correction), as illustrated in the equations:
-%\begin{align}
-%\BemboMathematics f(x) &= \BemboMathematics \sum_{n=-\infty}^{\infty}{c_ne^{jnx}}\label{eq:2}\\
-%\BemboMathematics c_n &= \BemboMathematics \frac{1}{2\pi}\int_{-\pi}^{\pi}{f(x)e^{-jnx}\,\mathrm{d}x}\label{eq:3}
-%\end{align}
-%where the function $f$ is too close the parenthesis $($ and the exponent $jnx$ is so close to its base $e$ that there is actually a collision! The reason is that the font has metrics that are suitable for use in text, but not for mathematics.
-%
-% \subsubsection{Discussion}
-%
-%Comparing the alphabets typeset in Computer Modern Italic, in table~\ref{tab:2}, it is shown that many characters have greater space around them in the mathematics version, which does not exist in the text version. The tracked alphabet shows the alphabet typeset as text, but also with a constant 1\,mu intercharacter space (poor man’s tracking). Since the adjusted alphabet is approximately as long as the mathematics alphabet, on average, this is a fair method to increase the space between alphabetic characters in mathematics.
-%
-%\begin{table}[htbp]\centering
-%\caption{Computer Modern Italic in text and mathematics\label{tab:2}}
-%\begin{tabular}{@{}rl@{}}\toprule
-%Text & \usefont{OT1}{cmr}{m}{it}abcdefghijklmnopqrstuvwxyz\\
-%Mathematics & $\mathnormal{abcdefghijklmnopqrstuvwxyz}$\\
-%Tracked & \usefont{OT1}{cmr}{m}{it} a\+b\+c\+d\+e\+f\+g\+h\+i\+j\+k\+l\+m\+n\+o\+p\+q\+r\+s\+t\+u\+v\+w\+x\+y\+z\\\bottomrule
-%\end{tabular}
-%\end{table}
-%
-%Now, the problem lies with implementing this behaviour. The best way would be to adjust \TeX’s mathematics spacing rules to add this 1\,mu extra space after each |\mathalpha|, but not after the |\mathord|s. I do not know whether it is possible to separate the two types as such, since they are almost equivalent. Otherwise, would it look worse if |\mathord|s also have this extra space?
-%
-%As it turns out, \TeX’s mathematics spacing rules are hardwired into \TeX\ and can not be adjusted by the user. The table that is used to determine the spacing between pairs of adjacent atoms, from \emph{The \TeX book}, is reproduced below:
-%\begin{center}\begin{tabular}{@{}r@{ }lc@{\;\;}c@{\;\;}c@{\;\;}c@{\;\;}c@{\;\;}c@{\;\;}c@{\;\;}c@{}}\toprule
-% && \multicolumn{8}{@{}c@{}}{Right atom} \\ \cmidrule(l){3-10}
-%\multicolumn{2}{@{}c@{}}{Left atom}& Ord. & Op. & Bin. & Rel. & Open & Close & Punct. & Inner\\ \cmidrule(r){1-2}\cmidrule(l){3-10}
-%Ordinary, et al.&(Ord.) & 0 & 1 & \te{2} & \te{3} & 0 & 0 & 0 & \te{1} \\
-%Large operator&(Op.) & 1 & 1 & & \te{3} & 0 & 0 & 0 & \te{1} \\
-%Binary operation&(Bin.)& \te{2} & \te{2} & & & \te{2} & & & \te{2} \\
-%Relation&(Rel.)& \te{3} & \te{3} & & 0 & \te{3} & 0 & 0 & \te{3} \\
-%Opening&(Open)& 0 & 0 & & 0 & 0 & 0 & 0 & 0 \\
-%Closing&(Close)& 0 & 1 & \te{2} & \te{3} & 0 & 0 & 0 & \te{1} \\
-%Punctuation&(Punct.)& \te{1} & \te{1} & & \te{1} & \te{1} & \te{1} & \te{1} & \te{1} \\
-%Delimited subformula&(Inner)& \te{1} & 1 & \te{2} & \te{3} & \te{1} & 0 & \te{1} & \te{1} \\\bottomrule
-%\end{tabular}\end{center}where 0, 1, 2 and 3 represent zero, thin, medium and thick skips respectively and coloured entries indicate that space is to be inserted only in display and text styles and not in script and scriptscript styles. Both Plain \TeX\ and \LaTeX\ define the three skips as:
-%\begin{center}\begin{tabular}{@{}rl@{}}\toprule
-%|\thinmuskip| & |3mu|\\
-%|\medmuskip| & |4mu plus 3mu minus 4mu|\\
-%|\thickmuskip| & |5mu plus 5mu|\\\bottomrule
-%\end{tabular}\end{center}and unless the option |normalskips| to the package is used (\eg|\usepackage|\permitbreak|[normalskips]|\permitbreak|{mathspec}|), |mathspec| increases each skip by 1\,mu:
-%\begin{center}\begin{tabular}{@{}rl@{}}\toprule
-%|\thinmuskip| & |4mu|\\
-%|\medmuskip| & |5mu plus 3mu minus 4mu|\\
-%|\thickmuskip| & |6mu plus 5mu|\\\bottomrule
-%\end{tabular}\end{center}As far as I can tell, nothing can be done about the zero skip.\biggerskips
-%
-%If \XeTeX\ is able to get information about the ‘ink box’ of a character, this elaborate, awkward and ugly hack, which is not even good anyway, might be replaced with something that is more elegant (or at least yields better results); better yet, if \XeTeX\ allows customisation of the mathematics spacing rules. It is impossible at the moment, for now, this described method is the best that is possible.
-%
-% \subsubsection{Solution}
-%
-%\displaycommand\+{\oarg{size}}
-%
-%\noindent \DescribeMacro{\+}The command |\+| is used to produce fine control over the spacing in mathematics. Without its optional argument, it inserts a 1\,mu ($\frac{1}{18}$\,em) skip. |\+|\oarg{size} inserts a \meta{size}\,mu skip. The spacing of equations~(\ref{eq:2}, \ref{eq:3}) are improved by the replacements that are described in table~\ref{tab:3}:
-%\begin{align}
-% \BemboMathematics f(x) &= \BemboMathematics \sum_{n=-\infty}^{\infty}{c_ne^{jnx}} & \BemboMathematics f\grp(){x} &= \BemboMathematics \sum_{n=-\infty}^{\infty}{c_ne^{\+[5]jn\+x}}\label{eq:4}\\
-% \BemboMathematics c_n &= \BemboMathematics \frac{1}{2\pi}\int_{-\pi}^{\pi}{f(x)e^{-jnx}\,\mathrm{d}x} & \BemboMathematics c_n &= \BemboMathematics \frac{1}{2\pi}\int_{-\pi}^{\pi}{\+f\grp(){x}e^{\+-jn\+x}\,\mathrm{d}x}\label{eq:5}
-%\end{align}
-%\begin{table}[htbp]\centering
-%\caption{Example replacements that improve spacing\label{tab:3}}
-%\begin{tabular}{@{}cc@{}}\toprule
-%Original & Replacement \\\midrule
-%|f(x)| & |\+f\left(x\right)|\\
-%|e^{jnx}| & |e^{\+[5]jn\+x}|\\
-%|e^{-jnx}| & |e^{\+-jn\+x}|\\\bottomrule
-%\end{tabular}
-%\end{table}
-%
-%This procedure is indeed awkward for the user, but still necessary to produce decent results. Note that |(x)| is replaced with |\left(x\right)|, which should always be done anyway (or with a more convenient macro, perhaps |\grp(){x}| defined by |\newcommand|\permitbreak|\grp|\permitbreak|[3]|\permitbreak|{\left#1|\permitbreak|#3|\permitbreak|\right#2}|).
-%
-%\subsection{Compatibility}
-%
-%If the package |amsmath| is used, it must be loaded before |mathspec|.
-%
-% \newpage
-% \StopEventually{
-% \addfontfeature{Mapping=tex-text}
-% \global\let\MakeSCorLowercase\MakeSC
-% \PrintIndex}
-%
-% \addtocontents{toc}{\protect\orLowercase}
-% \global\let\MakeSCorLowercase\MakeLowercase
-% \section{\sffamily mathspec.sty}
-%
-% \subsection{Initialising and options processing}
-% \iffalse
-%<*package>
-% \fi
-% \begin{macrocode}
-\let\eu@ifnot@normalskips\@firstofone
-\let\eu@if@MnSymbol\@gobble
-\def\eu@zf@math{no-math}
-\DeclareOption{normalskips}{\let\eu@ifnot@normalskips\@gobble}
-\DeclareOption{no-math}{\relax}
-\DeclareOption{MnSymbol}{\let\eu@if@MnSymbol\@firstofone}
-\DeclareOption{math}{\def\eu@zf@math{math}}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{fontspec}}
-\ProcessOptions\relax
-\RequirePackage[\eu@zf@math]{fontspec}[2008/08/09]
-\eu@if@MnSymbol{\RequirePackage{MnSymbol}}
-\RequirePackage{xkeyval}
-\RequirePackage{xifthen}
-\newif\if@eu@LatinUppercase@
-\newif\if@eu@LatinLowercase@
-\newif\if@eu@LatinDigits@
-\newif\if@eu@GreekUppercase@
-\newif\if@eu@GreekLowercase@
-\newif\if@eu@GreekDigits@
-\newif\if@eu@Symbols@
-\newif\if@eu@Digits@
-\let\eu@if@varforms\@gobble
-\let\eu@ifset@mathrm\@gobble
-\let\eu@ifset@mathcal\@gobble
-\let\eu@ifset@mathsf\@gobble
-\let\eu@ifset@mathtt\@gobble
-\let\eu@ifset@mathfrak\@gobble
-\let\eu@ifset@mathbb\@gobble
-% \end{macrocode}
-% Redefine the skips.
-% \begin{macrocode}
-\eu@ifnot@normalskips{
- \thinmuskip=4mu
- \medmuskip=5mu plus 2mu minus 4mu
- \thickmuskip=6mu plus 5mu}
-% \end{macrocode}
-%\begin{macro}{\eu@isloaded}
-% A command to test whether a package is loaded and puts the result in a Boolean. Used to test for |amsmath| here and |\AtBeginDocument| because |amsmath|, if used, must be loaded before |mathspec|.
-% \begin{macrocode}
-\newcommand\eu@isloaded[2][]{
- \expandafter\ifx\csname if@eu@#2loaded@\endcsname\relax
- \expandafter\newif\csname if@eu@#2loaded@\endcsname
- \fi
- \@ifpackageloaded{#2}
- {\csname @eu@#2loaded@true\endcsname #1}
- {\csname @eu@#2loaded@false\endcsname}}
-\eu@isloaded{amsmath}
-% \end{macrocode}
-%\end{macro}
-%
-% \subsection{Greek characters and digits}
-%
-% Complete the missing Greek characters from \MakeSC{ASCII}. Easier done now than later.
-% \begin{macrocode}
-\DeclareMathSymbol{\Alpha}{\mathalpha}{operators}{"41}
-\DeclareMathSymbol{\Beta}{\mathalpha}{operators}{"42}
-\DeclareMathSymbol{\Epsilon}{\mathalpha}{operators}{"45}
-\DeclareMathSymbol{\Zeta}{\mathalpha}{operators}{"5A}
-\DeclareMathSymbol{\Eta}{\mathalpha}{operators}{"48}
-\DeclareMathSymbol{\Iota}{\mathalpha}{operators}{"49}
-\DeclareMathSymbol{\Kappa}{\mathalpha}{operators}{"4B}
-\DeclareMathSymbol{\Mu}{\mathalpha}{operators}{"4D}
-\DeclareMathSymbol{\Nu}{\mathalpha}{operators}{"4E}
-\DeclareMathSymbol{\Omicron}{\mathalpha}{operators}{"4F}
-\DeclareMathSymbol{\Rho}{\mathalpha}{operators}{"50}
-\DeclareMathSymbol{\Tau}{\mathalpha}{operators}{"54}
-\DeclareMathSymbol{\Chi}{\mathalpha}{operators}{"58}
-\DeclareMathSymbol{\omicron}{\mathord}{letters}{"6F}
-% \end{macrocode}
-% Unavailable variant forms are equivalent to normal forms. Using Latin ‘{\usefont{OT1}{cmr}{m}{n}F}’ for \makeatletter digamma~$\eu@digamma$ \makeatother is better than nothing.
-% \begin{macrocode}
-\let\varbeta\beta
-\@ifundefined{varkappa}
- {\let\varkappa\kappa}
- {\relax}
-\let\varTheta\Theta
-\@ifundefined{digamma}
- {\DeclareMathSymbol{\Digamma}{\mathalpha}{operators}{"46}
- \DeclareMathSymbol{\digamma}{\mathord}{operators}{"46}}
- {\let\Digamma\digamma}
-% \end{macrocode}
-% Preserve the original definitions of the Greek control sequences with |cm| prefix.
-% \begin{macrocode}
-\let\cmAlpha\Alpha
-\let\cmBeta\Beta
-\let\cmGamma\Gamma
-\let\cmDelta\Delta
-\let\cmEpsilon\Epsilon
-\let\cmZeta\Zeta
-\let\cmEta\Eta
-\let\cmTheta\Theta
-\let\cmIota\Iota
-\let\cmKappa\Kappa
-\let\cmLambda\Lambda
-\let\cmMu\Mu
-\let\cmNu\Nu
-\let\cmXi\Xi
-\let\cmOmicron\Omicron
-\let\cmPi\Pi
-\let\cmRho\Rho
-\let\cmSigma\Sigma
-\let\cmTau\Tau
-\let\cmUpsilon\Upsilon
-\let\cmPhi\Phi
-\let\cmChi\Chi
-\let\cmPsi\Psi
-\let\cmOmega\Omega
-\let\cmDigamma\Digamma
-\let\cmalpha\alpha
-\let\cmbeta\beta
-\let\cmgamma\gamma
-\let\cmdelta\delta
-\let\cmepsilon\epsilon
-\let\cmzeta\zeta
-\let\cmeta\eta
-\let\cmtheta\theta
-\let\cmiota\iota
-\let\cmkappa\kappa
-\let\cmlambda\lambda
-\let\cmmu\mu
-\let\cmnu\nu
-\let\cmxi\xi
-\let\cmomicron\omicron
-\let\cmpi\pi
-\let\cmrho\rho
-\let\cmvarsigma\varsigma
-\let\cmsigma\sigma
-\let\cmtau\tau
-\let\cmupsilon\upsilon
-\let\cmphi\phi
-\let\cmchi\chi
-\let\cmpsi\psi
-\let\cmomega\omega
-\let\cmdigamma\digamma
-\let\cmvarbeta\varbeta
-\let\cmvarepsilon\varepsilon
-\let\cmvartheta\vartheta
-\let\cmvarkappa\varkappa
-\let\cmvarpi\varpi
-\let\cmvarrho\varrho
-\let\cmvarphi\varphi
-\let\cmvarTheta\varTheta
-% \end{macrocode}
-%
-% \subsection{Internal commands}
-%
-%\begin{macro}{\ernewcommand}
-% Useful macros and internal commands.
-% \begin{macrocode}
-\RequirePackage{etoolbox}
-\@gobble{\providecommand\expandonce[1]{\unexpanded\expandafter{#1}}}
-\providecommand\expanded[1]{\edef\@tempa{#1}\@tempa}
-\providecommand\ernewcommand[1]{
- \@ifundefined{\expandafter\@gobble\string#1}%
- {\let\er@newcommand\newcommand}%
- {\let\er@newcommand\renewcommand
- \PackageWarning{mathspec}{Redefining command `\string#1'}}%
- \er@newcommand#1}
-\newcommand\eu@setkeys[3][]{
- \ifthenelse{\isempty{#1}}
- {\relax}
- {\presetkeys[eu]{#2}{#1}{}}
- \expanded{\noexpand\setkeys*[eu]{#2}{\expandonce#3}}}
-\newcommand\eu@fontspec[2]{\expanded{\noexpand\zf@fontspec{\expandonce#1}{\expandonce#2}}}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\eu@DeclareRobustCommand}
-% |breqn|’s |\@ifnext| replaces |\@ifnextchar| in the definition of \LaTeX’s |\DeclareRobustCommand|. This is needed for the definition of |\+|.
-% \begin{macrocode}
-\def\@ifnext#1#2#3{%
- \let\@tempd=#1%
- \def\@tempa{#2}%
- \def\@tempb{#3}%
- \futurelet\@tempc\@ifnexta}
-\def\@ifnexta{%
- \ifx\@tempc\@tempd%
- \let\@tempb\@tempa%
- \fi\@tempb}
-\def\eu@DeclareRobustCommand{\@star@or@long\eu@declare@robustcommand}
-\def\eu@declare@robustcommand#1{%
- \ifx#1\@undefined\else\ifx#1\relax\else
- \@latex@info{Redefining \string#1}%
- \fi\fi
- \edef\reserved@a{\string#1}%
- \def\reserved@b{#1}%
- \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
- \edef#1{%
- \ifx\reserved@a\reserved@b
- \noexpand\x@protect
- \noexpand#1%
- \fi
- \noexpand\protect
- \expandafter\noexpand\csname\expandafter\@gobble\string#1\endcsname}%
- \let\@ifdefinable\@rc@ifdefinable
- \expandafter\eu@new@command\csname\expandafter\@gobble\string#1\endcsname}
-\def\eu@new@command#1{\eu@@testopt{\eu@@newcommand#1}0}
-\def\eu@@newcommand#1[#2]{\@ifnext[{\@xargdef#1[#2]}{\@argdef#1[#2]}}
-\long\def\eu@@testopt#1#2{\@ifnext[{#1}{#1[{#2}]}}
-% \end{macrocode}
-%\end{macro}
-%
-% \subsection{End user commands}
-%
-%\begin{macro}{\normalvarforms}
-% If, after the Greek font is assigned, variant forms retain their original definitions, this command will cause them to be equivalent to the normal forms.
-% \begin{macrocode}
-\newcommand\normalvarforms[1][]{\AtBeginDocument{
- \ifx\varbeta\cmvarbeta
- \let\varbeta\beta
- \fi
- \ifx\varepsilon\cmvarepsilon
- \let\varepsilon\epsilon
- \fi
- \ifx\vartheta\cmvartheta
- \let\vartheta\theta
- \fi
- \ifx\varkappa\cmvarkappa
- \let\varkappa\kappa
- \fi
- \ifx\varpi\cmvarpi
- \let\varpi\pi
- \fi
- \ifx\varrho\cmvarrho
- \let\varrho\rho
- \fi
- \ifx\varphi\cmvarphi
- \let\varphi\phi
- \fi
- \ifx\varTheta\cmvarTheta
- \let\varTheta\Theta
- \fi}}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\plaindigits}
-% This command is used to easily disable digits redefinitions.
-% \begin{macrocode}
-\let\eu@ifnot@plaindigits\@firstofone
-\newcommand\plaindigits{\let\eu@ifnot@plaindigits\@gobble}
-% \end{macrocode}
-%\end{macro}
-%
-% The quintessential command. From here, the code branches to four locations.
-%\begin{macro}{\setmathsfont}
-% \begin{macrocode}
-\providecommand\setmathsfont{\eu@setmathsfont}
-\let\setmathfont\setmathsfont
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\+}
-% This command inserts a horizontal skip in mathematics. It must be robust and any white space between the control sequence and a next |[| must not be ignored, so that legitimate (square) brackets in mathematics is not interpreted as an optional argument.
-% \begin{macrocode}
-\eu@DeclareRobustCommand\+[1][1]{\ensuremath{\mskip#1mu}}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\varforms}
-% This command exchanges variant and normal forms for the specified letters.
-% \begin{macrocode}
-\newcommand\varforms[1]{\def\eu@if@varforms##1{##1{#1}}}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\setmathrm}
-%\begin{macro}{\setmathcal}
-%\begin{macro}{\setmathsf}
-%\begin{macro}{\setmathtt}
-%\begin{macro}{\setmathfrak}
-%\begin{macro}{\setmathbb}
-% Mathematics alphabet commands.
-% \begin{macrocode}
-\ernewcommand\setmathrm[2][]{
- \zf@fontspec{#1}{#2}
- \let\eu@mathrm\zf@family
- \let\eu@ifset@mathrm\@firstofone
- \providecommand\eu@mathbf@shape{n}}
-\ernewcommand\setmathcal[2][]{
- \zf@fontspec{#1}{#2}
- \let\eu@mathcal\zf@family
- \let\eu@ifset@mathcal\@firstofone
- \providecommand\eu@mathcal@series{m}
- \providecommand\eu@mathcal@shape{n}}
-\ernewcommand\setmathsf[2][]{
- \zf@fontspec{#1}{#2}
- \let\eu@mathsf\zf@family
- \let\eu@ifset@mathsf\@firstofone}
-\ernewcommand\setmathtt[2][]{
- \zf@fontspec{#1}{#2}
- \let\eu@mathtt\zf@family
- \let\eu@ifset@mathtt\@firstofone}
-\ernewcommand\setmathfrak[2][]{
- \zf@fontspec{#1}{#2}
- \let\eu@mathfrak\zf@family
- \let\eu@ifset@mathfrak\@firstofone
- \providecommand\eu@mathfrak@series{m}}
-\ernewcommand\setmathbb[2][]{
- \zf@fontspec{#1}{#2}
- \let\eu@mathbb\zf@family
- \let\eu@ifset@mathbb\@firstofone
- \providecommand\eu@mathbb@series{m}}
-% \end{macrocode}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\begin{macro}{\setprimaryfont}
-%\begin{macro}{\setsansfonts}
-%\begin{macro}{\setmonofonts}
-% Shorthands
-% \begin{macrocode}
-\newcommand\setprimaryfont[2][]{
- \setmainfont[#1]{#2}
- \setmathsfont[Set=Latin,#1]{#2}
- \setmathrm[#1]{#2}}
-\newcommand\setsansfonts[2][]{
- \setsansfont[#1]{#2}
- \setmathsf[#1]{#2}}
-\newcommand\setmonofonts[2][]{
- \setmonofont[#1]{#2}
- \setmathtt[#1]{#2}}
-% \end{macrocode}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%
-% \subsection{More internal commands}
-%
-% \subsubsection{{\ttfamily\string\setmathsfont} branches}
-% \begin{macrocode}
-\newcommand\eu@setmathsfont[1][Set=Special]{
- \eu@setkeys{Scope}{#1}
- \ifcase\eu@ScopeSet@@value
- \let\eu@ScopeSet@Value\eu@ScopeSet@Special
- \or
- \let\eu@ScopeSet@Value\eu@ScopeSet@Latin
- \or
- \let\eu@ScopeSet@Value\eu@ScopeSet@Greek
- \or
- \let\eu@ScopeSet@Value\eu@ScopeSet@Symbols
- \fi
- \eu@ScopeSet@Value}
-% \end{macrocode}
-% Special set. This command can be used as a hook to some external code.
-% \begin{macrocode}
-\providecommand\eu@ScopeSet@Special[1]{\relax}
-% \end{macrocode}
-% Latin set.
-% \begin{macrocode}
-\newcommand\eu@ScopeSet@Latin[1]{
- \eu@setkeys[Uppercase=Italic,Lowercase=Italic,Digits=Regular]{Latin}{\XKV@rm}
- \eu@fontspec{\XKV@rm}{#1}
- \ifcase\eu@LatinUppercase@@value
- \ernewcommand\eu@LatinUppercase@symfont{Lmn}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinUppercase@true
- \def\operator@font{\mathgroup\symLmn}
- \or
- \ernewcommand\eu@LatinUppercase@symfont{Lmit}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinUppercase@true
- \or\fi
- \ifcase\eu@LatinLowercase@@value
- \ernewcommand\eu@LatinLowercase@symfont{Lmn}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinLowercase@true
- \or
- \ernewcommand\eu@LatinLowercase@symfont{Lmit}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinLowercase@true
- \or\fi
- \ifcase\eu@LatinDigits@@value
- \ernewcommand\eu@LatinDigits@symfont{Lmn}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinDigits@true
- \or
- \ernewcommand\eu@LatinDigits@symfont{Lmit}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinDigits@true
- \or\fi}
-% \end{macrocode}
-% Greek set
-% \begin{macrocode}
-\newcommand\eu@ScopeSet@Greek[1]{
- \eu@setkeys[Uppercase=Regular,Lowercase=Italic,Digits=Plain]{Greek}{\XKV@rm}
- \eu@fontspec{\XKV@rm}{#1}
- \ifcase\eu@GreekUppercase@@value
- \ernewcommand\eu@GreekUppercase@symfont{Gmn}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekUppercase@true
- \or
- \ernewcommand\eu@GreekUppercase@symfont{Gmit}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekUppercase@true
- \or\fi
- \ifcase\eu@GreekLowercase@@value
- \ernewcommand\eu@GreekLowercase@symfont{Gmn}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekLowercase@true
- \or
- \ernewcommand\eu@GreekLowercase@symfont{Gmit}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekLowercase@true
- \or\fi
- \ifcase\eu@GreekDigits@@value
- \ernewcommand\eu@GreekDigits@symfont{Gmn}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekDigits@true
- \or
- \ernewcommand\eu@GreekDigits@symfont{Gmit}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekDigits@true
- \or\fi}
-% \end{macrocode}
-% Symbols set. This command actually does not do a lot.
-% \begin{macrocode}
-\newcommand\eu@ScopeSet@Symbols[1]{
- \@eu@Symbols@true
- \zf@fontspec{}{#1}
- \let\eu@Symbolsmathsfont\zf@family
- \def\eu@Symbls@symfont{Smn}}
-\renewcommand\eu@ScopeSet@Symbols[1]{
- \@eu@Symbols@false}
-% \end{macrocode}
-%
-% \subsubsection{Exchanging variant and normal forms}
-%
-% \begin{macrocode}
-\newcommand\eu@VarForms[1]{
- \fontfamily\eu@Greekmathsfont\selectfont
- \eu@setkeys{VarForms}{#1}
- \ifeu@VarForms@beta
- \eu@DeclareMathSymbol{β}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D0}[\beta]
- \eu@DeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}[\varbeta]
- \fi
- \ifeu@VarForms@epsilon
- \eu@DeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}[\varepsilon]
- \eu@DeclareMathSymbol{ε}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F5}[\epsilon]
- \fi
- \ifeu@VarForms@theta
- \eu@DeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}[\vartheta]
- \eu@DeclareMathSymbol{θ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D1}[\theta]
- \fi
- \ifeu@VarForms@kappa
- \eu@DeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}[\varkappa]
- \eu@DeclareMathSymbol{κ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F0}[\kappa]
- \fi
- \ifeu@VarForms@pi
- \eu@DeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}[\varpi]
- \eu@DeclareMathSymbol{π}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D6}[\pi]
- \fi
- \ifeu@VarForms@rho
- \eu@DeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}[\varrho]
- \eu@DeclareMathSymbol{ρ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F1}[\rho]
- \fi
- \ifeu@VarForms@phi
- \eu@DeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}[\varphi]
- \eu@DeclareMathSymbol{φ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D5}[\phi]
- \fi
- \ifeu@VarForms@Theta
- \eu@DeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekLowercase@symfont}{`Θ}[\varTheta]
- \eu@DeclareMathSymbol{Θ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F4}[\Theta]
- \fi}
-% \end{macrocode}
-%
-% \subsection{{\sffamily xkeyval} things}
-%
-% \begin{macrocode}
-\define@choicekey[eu]{Scope}{Set}
- [\eu@ScopeSet@value\eu@ScopeSet@@value]
- {Special,Latin,Greek,Symbols}[Special]{\relax}
-\define@choicekey[eu]{Latin}{Uppercase}
- [\eu@LatinUppercase@value\eu@LatinUppercase@@value]
- {Regular,Italic,Plain}[Italic]{\relax}
-\define@choicekey[eu]{Latin}{Lowercase}
- [\eu@LatinLowercase@value\eu@LatinLowercase@@value]
- {Regular,Italic,Plain}[Italic]{\relax}
-\define@choicekey[eu]{Latin}{Digits}
- [\eu@LatinDigits@value\eu@LatinDigits@@value]
- {Regular,Italic,Plain}[Regular]{\relax}
-\define@choicekey[eu]{Greek}{Uppercase}
- [\eu@GreekUppercase@value\eu@GreekUppercase@@value]
- {Regular,Italic,Plain}[Regular]{\relax}
-\define@choicekey[eu]{Greek}{Lowercase}
- [\eu@GreekLowercase@value\eu@GreekLowercase@@value]
- {Regular,Italic,Plain}[Italic]{\relax}
-\define@choicekey[eu]{Greek}{Digits}
- [\eu@GreekDigits@value\eu@GreekDigits@@value]
- {Regular,Italic,Plain}[Regular]{\relax}
-\define@boolkey[eu]{VarForms}{beta}[True]{\relax}
-\define@boolkey[eu]{VarForms}{epsilon}[True]{\relax}
-\define@boolkey[eu]{VarForms}{theta}[True]{\relax}
-\define@boolkey[eu]{VarForms}{kappa}[True]{\relax}
-\define@boolkey[eu]{VarForms}{pi}[True]{\relax}
-\define@boolkey[eu]{VarForms}{rho}[True]{\relax}
-\define@boolkey[eu]{VarForms}{phi}[True]{\relax}
-\define@boolkey[eu]{VarForms}{Theta}[True]{\relax}
-% \end{macrocode}
-% \subsection{Extending \LaTeX\ commands}
-%
-%\begin{macro}{\eu@XeTeXDeclareMathSymbol}
-% A crude extension of \LaTeX’s |\DeclareMathSymbol| to allow the greater set of Unicode characters.
-% \begin{macrocode}
-\newcommand\eu@XeTeXDeclareMathSymbol[4]{
- \expandafter\XeTeXmathcode`#1\mathchar@type#2\csname sym#3\endcsname#4}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\eu@DeclareMathSymbol}
-% This command declares a symbol only if it appears in the font and optionally defines an equivalent control sequence.
-% \begin{macrocode}
-\newcommand\eu@DeclareMathSymbol[4]{
- \ifnum\XeTeXcharglyph#4>0
- \eu@XeTeXDeclareMathSymbol#1#2#3#4
- \fi
- \let\eu@character#1
- \def\eu@@character{#4}
- \futurelet\@tempa\eu@@DeclareMathSymbol}
-\def\eu@@DeclareMathSymbol{
- \ifx\@tempa[
- \let\eu@@@DeclareMathSymbol\eu@DeclareMathSymbol@option
- \else
- \let\eu@@@DeclareMathSymbol\relax
- \fi
- \eu@@@DeclareMathSymbol}
-\def\eu@DeclareMathSymbol@option[#1]{%
- \ifnum\XeTeXcharglyph\eu@@character>0
- \let#1\eu@character
- \fi}
-% \end{macrocode}
-%\end{macro}
-% A modification of \LaTeX’s |\DeclareMathSymbol| to perform only if the glyph appears in the font.
-% \begin{macrocode}
-\let\LaTeXe@DeclareMathSymbol\DeclareMathSymbol
-\newcommand\eu@LaTeXe@DeclareMathSymbol[4]{
- \ifnum\XeTeXcharglyph#4>0
- \LaTeXe@DeclareMathSymbol{#1}{#2}{#3}{#4}
- \fi}
-\let\DeclareMathSymbol\eu@LaTeXe@DeclareMathSymbol
-% \end{macrocode}
-
-%
-% \subsection{Declarations}
-%
-% Fonts.
-% \begin{macrocode}
-\newcommand\eu@DeclareFonts{
- \let\eu@if@Latin\@gobble
- \if@eu@LatinUppercase@\let\eu@if@Latin\@firstofone\fi
- \if@eu@LatinLowercase@\let\eu@if@Latin\@firstofone\fi
- \if@eu@LatinDigits@\let\eu@if@Latin\@firstofone\fi
- \let\eu@if@Greek\@gobble
- \if@eu@GreekUppercase@\let\eu@if@Greek\@firstofone\fi
- \if@eu@GreekLowercase@\let\eu@if@Greek\@firstofone\fi
- \if@eu@GreekDigits@\let\eu@if@Greek\@firstofone\fi
- \eu@if@Latin{
- \DeclareSymbolFont{Lmn}{EU1}{\eu@Latinmathsfont}{m}{n}
- \DeclareSymbolFont{Lmit}{EU1}{\eu@Latinmathsfont}{m}{it}
- }
- \eu@if@Greek{
- \DeclareSymbolFont{Gmn}{EU1}{\eu@Greekmathsfont}{m}{n}
- \DeclareSymbolFont{Gmit}{EU1}{\eu@Greekmathsfont}{m}{it}}
- \if@eu@Symbols@
- \DeclareSymbolFont{Smn}{EU1}{\eu@Symbolsmathsfont}{m}{n}
- \fi}
-% \end{macrocode}
-% Digits.
-% \begin{macrocode}
-\newcommand\eu@DeclareDigits{
- \let\eu@if@Digits\@gobble
- \if@eu@GreekDigits@
- \let\eu@if@Digits\@firstofone
- \let\eu@Digits@symfont\eu@GreekDigits@symfont
- \let\eu@Digitsmathsfont\eu@Greekmathsfont
- \else
- \if@eu@LatinDigits@
- \let\eu@if@Digits\@firstofone
- \let\eu@Digits@symfont\eu@LatinDigits@symfont
- \let\eu@Digitsmathsfont\eu@Latinmathsfont
- \fi
- \fi
- \eu@if@Digits{
- \fontfamily\eu@Digitsmathsfont\selectfont
- \DeclareMathSymbol{0}{\mathord}{\eu@Digits@symfont}{`0}
- \DeclareMathSymbol{1}{\mathord}{\eu@Digits@symfont}{`1}
- \DeclareMathSymbol{2}{\mathord}{\eu@Digits@symfont}{`2}
- \DeclareMathSymbol{3}{\mathord}{\eu@Digits@symfont}{`3}
- \DeclareMathSymbol{4}{\mathord}{\eu@Digits@symfont}{`4}
- \DeclareMathSymbol{5}{\mathord}{\eu@Digits@symfont}{`5}
- \DeclareMathSymbol{6}{\mathord}{\eu@Digits@symfont}{`6}
- \DeclareMathSymbol{7}{\mathord}{\eu@Digits@symfont}{`7}
- \DeclareMathSymbol{8}{\mathord}{\eu@Digits@symfont}{`8}
- \DeclareMathSymbol{9}{\mathord}{\eu@Digits@symfont}{`9}}}
-% \end{macrocode}
-% Uppercase Latin.
-% \begin{macrocode}
-\newcommand\eu@DeclareLatinUppercase{
- \if@eu@LatinUppercase@
- \fontfamily\eu@Latinmathsfont\selectfont
- \DeclareMathSymbol{A}{\mathalpha}{\eu@LatinUppercase@symfont}{`A}
- \DeclareMathSymbol{B}{\mathalpha}{\eu@LatinUppercase@symfont}{`B}
- \DeclareMathSymbol{C}{\mathalpha}{\eu@LatinUppercase@symfont}{`C}
- \DeclareMathSymbol{D}{\mathalpha}{\eu@LatinUppercase@symfont}{`D}
- \DeclareMathSymbol{E}{\mathalpha}{\eu@LatinUppercase@symfont}{`E}
- \DeclareMathSymbol{F}{\mathalpha}{\eu@LatinUppercase@symfont}{`F}
- \DeclareMathSymbol{G}{\mathalpha}{\eu@LatinUppercase@symfont}{`G}
- \DeclareMathSymbol{H}{\mathalpha}{\eu@LatinUppercase@symfont}{`H}
- \DeclareMathSymbol{I}{\mathalpha}{\eu@LatinUppercase@symfont}{`I}
- \DeclareMathSymbol{J}{\mathalpha}{\eu@LatinUppercase@symfont}{`J}
- \DeclareMathSymbol{K}{\mathalpha}{\eu@LatinUppercase@symfont}{`K}
- \DeclareMathSymbol{L}{\mathalpha}{\eu@LatinUppercase@symfont}{`L}
- \DeclareMathSymbol{M}{\mathalpha}{\eu@LatinUppercase@symfont}{`M}
- \DeclareMathSymbol{N}{\mathalpha}{\eu@LatinUppercase@symfont}{`N}
- \DeclareMathSymbol{O}{\mathalpha}{\eu@LatinUppercase@symfont}{`O}
- \DeclareMathSymbol{P}{\mathalpha}{\eu@LatinUppercase@symfont}{`P}
- \DeclareMathSymbol{Q}{\mathalpha}{\eu@LatinUppercase@symfont}{`Q}
- \DeclareMathSymbol{R}{\mathalpha}{\eu@LatinUppercase@symfont}{`R}
- \DeclareMathSymbol{S}{\mathalpha}{\eu@LatinUppercase@symfont}{`S}
- \DeclareMathSymbol{T}{\mathalpha}{\eu@LatinUppercase@symfont}{`T}
- \DeclareMathSymbol{U}{\mathalpha}{\eu@LatinUppercase@symfont}{`U}
- \DeclareMathSymbol{V}{\mathalpha}{\eu@LatinUppercase@symfont}{`V}
- \DeclareMathSymbol{W}{\mathalpha}{\eu@LatinUppercase@symfont}{`W}
- \DeclareMathSymbol{X}{\mathalpha}{\eu@LatinUppercase@symfont}{`X}
- \DeclareMathSymbol{Y}{\mathalpha}{\eu@LatinUppercase@symfont}{`Y}
- \DeclareMathSymbol{Z}{\mathalpha}{\eu@LatinUppercase@symfont}{`Z}
- \fi}
-% \end{macrocode}
-% Lowercase Latin.
-% \begin{macrocode}
-\newcommand\eu@DeclareLatinLowercase{
- \if@eu@LatinLowercase@
- \fontfamily\eu@Latinmathsfont\selectfont
- \DeclareMathSymbol{a}{\mathalpha}{\eu@LatinLowercase@symfont}{`a}
- \DeclareMathSymbol{b}{\mathalpha}{\eu@LatinLowercase@symfont}{`b}
- \DeclareMathSymbol{c}{\mathalpha}{\eu@LatinLowercase@symfont}{`c}
- \DeclareMathSymbol{d}{\mathalpha}{\eu@LatinLowercase@symfont}{`d}
- \DeclareMathSymbol{e}{\mathalpha}{\eu@LatinLowercase@symfont}{`e}
- \DeclareMathSymbol{f}{\mathalpha}{\eu@LatinLowercase@symfont}{`f}
- \DeclareMathSymbol{g}{\mathalpha}{\eu@LatinLowercase@symfont}{`g}
- \DeclareMathSymbol{h}{\mathalpha}{\eu@LatinLowercase@symfont}{`h}
- \DeclareMathSymbol{i}{\mathalpha}{\eu@LatinLowercase@symfont}{`i}
- \DeclareMathSymbol{j}{\mathalpha}{\eu@LatinLowercase@symfont}{`j}
- \DeclareMathSymbol{k}{\mathalpha}{\eu@LatinLowercase@symfont}{`k}
- \DeclareMathSymbol{l}{\mathalpha}{\eu@LatinLowercase@symfont}{`l}
- \DeclareMathSymbol{m}{\mathalpha}{\eu@LatinLowercase@symfont}{`m}
- \DeclareMathSymbol{n}{\mathalpha}{\eu@LatinLowercase@symfont}{`n}
- \DeclareMathSymbol{o}{\mathalpha}{\eu@LatinLowercase@symfont}{`o}
- \DeclareMathSymbol{p}{\mathalpha}{\eu@LatinLowercase@symfont}{`p}
- \DeclareMathSymbol{q}{\mathalpha}{\eu@LatinLowercase@symfont}{`q}
- \DeclareMathSymbol{r}{\mathalpha}{\eu@LatinLowercase@symfont}{`r}
- \DeclareMathSymbol{s}{\mathalpha}{\eu@LatinLowercase@symfont}{`s}
- \DeclareMathSymbol{t}{\mathalpha}{\eu@LatinLowercase@symfont}{`t}
- \DeclareMathSymbol{u}{\mathalpha}{\eu@LatinLowercase@symfont}{`u}
- \DeclareMathSymbol{v}{\mathalpha}{\eu@LatinLowercase@symfont}{`v}
- \DeclareMathSymbol{w}{\mathalpha}{\eu@LatinLowercase@symfont}{`w}
- \DeclareMathSymbol{x}{\mathalpha}{\eu@LatinLowercase@symfont}{`x}
- \DeclareMathSymbol{y}{\mathalpha}{\eu@LatinLowercase@symfont}{`y}
- \DeclareMathSymbol{z}{\mathalpha}{\eu@LatinLowercase@symfont}{`z}
- \fi}
-% \end{macrocode}
-% Uppercase Greek.
-% \begin{macrocode}
-\newcommand\eu@DeclareGreekUppercase{
- \if@eu@GreekUppercase@
- \fontfamily\eu@Greekmathsfont\selectfont
- \eu@DeclareMathSymbol{Α}{\mathalpha}{\eu@GreekUppercase@symfont}{`Α}[\Alpha]
- \eu@DeclareMathSymbol{Β}{\mathalpha}{\eu@GreekUppercase@symfont}{`Β}[\Beta]
- \eu@DeclareMathSymbol{Γ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Γ}[\Gamma]
- \eu@DeclareMathSymbol{Δ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Δ}[\Delta]
- \eu@DeclareMathSymbol{Ε}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ε}[\Epsilon]
- \eu@DeclareMathSymbol{Ζ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ζ}[\Zeta]
- \eu@DeclareMathSymbol{Η}{\mathalpha}{\eu@GreekUppercase@symfont}{`Η}[\Eta]
- \eu@DeclareMathSymbol{Θ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Θ}[\Theta]
- \eu@DeclareMathSymbol{Ι}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ι}[\Iota]
- \eu@DeclareMathSymbol{Κ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Κ}[\Kappa]
- \eu@DeclareMathSymbol{Λ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Λ}[\Lambda]
- \eu@DeclareMathSymbol{Μ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Μ}[\Mu]
- \eu@DeclareMathSymbol{Ν}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ν}[\Nu]
- \eu@DeclareMathSymbol{Ξ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ξ}[\Xi]
- \eu@DeclareMathSymbol{Ο}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ο}[\Omicron]
- \eu@DeclareMathSymbol{Π}{\mathalpha}{\eu@GreekUppercase@symfont}{`Π}[\Pi]
- \eu@DeclareMathSymbol{Ρ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ρ}[\Rho]
- \eu@DeclareMathSymbol{Σ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Σ}[\Sigma]
- \eu@DeclareMathSymbol{Τ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Τ}[\Tau]
- \eu@DeclareMathSymbol{Υ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Υ}[\Upsilon]
- \eu@DeclareMathSymbol{Φ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Φ}[\Phi]
- \eu@DeclareMathSymbol{Χ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Χ}[\Chi]
- \eu@DeclareMathSymbol{Ψ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ψ}[\Psi]
- \eu@DeclareMathSymbol{Ω}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ω}[\Omega]
- \eu@DeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekUppercase@symfont}{"3F4}[\varTheta]
- \eu@DeclareMathSymbol{Ϝ}{\mathalpha}{\eu@GreekUppercase@symfont}{"3DC}[\Digamma]
- \fi}
-% \end{macrocode}
-% Lowercase Greek.
-% \begin{macrocode}
-\newcommand\eu@DeclareGreekLowercase{
- \if@eu@GreekLowercase@
- \fontfamily\eu@Greekmathsfont\selectfont
- \eu@DeclareMathSymbol{α}{\mathalpha}{\eu@GreekLowercase@symfont}{`α}[\alpha]
- \eu@DeclareMathSymbol{β}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}[\beta]
- \eu@DeclareMathSymbol{γ}{\mathalpha}{\eu@GreekLowercase@symfont}{`γ}[\gamma]
- \eu@DeclareMathSymbol{δ}{\mathalpha}{\eu@GreekLowercase@symfont}{`δ}[\delta]
- \eu@DeclareMathSymbol{ε}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}[\epsilon]
- \eu@DeclareMathSymbol{ζ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ζ}[\zeta]
- \eu@DeclareMathSymbol{η}{\mathalpha}{\eu@GreekLowercase@symfont}{`η}[\eta]
- \eu@DeclareMathSymbol{θ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}[\theta]
- \eu@DeclareMathSymbol{ι}{\mathalpha}{\eu@GreekLowercase@symfont}{`ι}[\iota]
- \eu@DeclareMathSymbol{κ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}[\kappa]
- \eu@DeclareMathSymbol{λ}{\mathalpha}{\eu@GreekLowercase@symfont}{`λ}[\lambda]
- \eu@DeclareMathSymbol{μ}{\mathalpha}{\eu@GreekLowercase@symfont}{`μ}[\mu]
- \eu@DeclareMathSymbol{ν}{\mathalpha}{\eu@GreekLowercase@symfont}{`ν}[\nu]
- \eu@DeclareMathSymbol{ξ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ξ}[\xi]
- \eu@DeclareMathSymbol{ο}{\mathalpha}{\eu@GreekLowercase@symfont}{`ο}[\omicron]
- \eu@DeclareMathSymbol{π}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}[\pi]
- \eu@DeclareMathSymbol{ρ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}[\rho]
- \eu@DeclareMathSymbol{σ}{\mathalpha}{\eu@GreekLowercase@symfont}{`σ}[\sigma]
- \eu@DeclareMathSymbol{τ}{\mathalpha}{\eu@GreekLowercase@symfont}{`τ}[\tau]
- \eu@DeclareMathSymbol{υ}{\mathalpha}{\eu@GreekLowercase@symfont}{`υ}[\upsilon]
- \eu@DeclareMathSymbol{φ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}[\phi]
- \eu@DeclareMathSymbol{χ}{\mathalpha}{\eu@GreekLowercase@symfont}{`χ}[\chi]
- \eu@DeclareMathSymbol{ψ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ψ}[\psi]
- \eu@DeclareMathSymbol{ω}{\mathalpha}{\eu@GreekLowercase@symfont}{`ω}[\omega]
- \eu@DeclareMathSymbol{ς}{\mathalpha}{\eu@GreekLowercase@symfont}{`ς}[\varsigma]
- \eu@DeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D0}[\varbeta]
- \eu@DeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F5}[\varepsilon]
- \eu@DeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D1}[\vartheta]
- \eu@DeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F0}[\varkappa]
- \eu@DeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D6}[\varpi]
- \eu@DeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F1}[\varrho]
- \eu@DeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D5}[\varphi]
- \eu@DeclareMathSymbol{ϝ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3DD}[\digamma]
- \fi}
-% \end{macrocode}
-% Symbols.
-% \begin{macrocode}
-\newcommand\eu@DeclareSymbols{
- \if@eu@Symbols@
- \fontfamily\eu@Symbolsmathsfont\selectfont
- \eu@DeclareMathSymbol{!}{\mathclose}{\eu@Symbols@symfont}{`!}[\exclam]
- \eu@DeclareMathSymbol{+}{\mathbin}{\eu@Symbols@symfont}{`+}[\plus]
- \eu@DeclareMathSymbol{,}{\mathpunct}{\eu@Symbols@symfont}{`,}
- \eu@DeclareMathSymbol{.}{\mathord}{\eu@Symbols@symfont}{`.}
- \XeTeXmathchardef\ldotp=6\symSmn`.
- \eu@DeclareMathSymbol{:}{\mathrel}{\eu@Symbols@symfont}{`:}
- \XeTeXmathchardef\colon=6\symSmn`:
- \eu@DeclareMathSymbol{;}{\mathpunct}{\eu@Symbols@symfont}{`;}[\semicolon]
- \eu@DeclareMathSymbol{<}{\mathrel}{\eu@Symbols@symfont}{`<}[\less]
- \DeclareMathSymbol{=}{\mathrel}{\eu@Symbols@symfont}{`=}
- \let\eq==
- \eu@DeclareMathSymbol{>}{\mathrel}{\eu@Symbols@symfont}{`>}[\greater]
- \eu@DeclareMathSymbol{?}{\mathclose}{\eu@Symbols@symfont}{`?}
- \eu@DeclareMathSymbol{¬}{\mathord}{\eu@Symbols@symfont}{`¬}[\neg]
- \let\lnot\neg
- \eu@DeclareMathSymbol{°}{\mathord}{\eu@Symbols@symfont}{`°}[\degree]
- \eu@DeclareMathSymbol{±}{\mathbin}{\eu@Symbols@symfont}{`±}[\pm]
- \eu@DeclareMathSymbol{µ}{\mathord}{\eu@Symbols@symfont}{`µ}[\micro]
- \eu@DeclareMathSymbol{×}{\mathbin}{\eu@Symbols@symfont}{`×}[\times]
- \eu@DeclareMathSymbol{÷}{\mathbin}{\eu@Symbols@symfont}{`÷}[\div]
- \eu@DeclareMathSymbol{∀}{\mathord}{\eu@Symbols@symfont}{`∀}[\forall]
- \eu@DeclareMathSymbol{∂}{\mathord}{\eu@Symbols@symfont}{`∂}[\partial]
- \eu@DeclareMathSymbol{∃}{\mathord}{\eu@Symbols@symfont}{`∃}[\exists]
- \eu@DeclareMathSymbol{∅}{\mathord}{\eu@Symbols@symfont}{`∅}[\varnothing]
- \eu@DeclareMathSymbol{∆}{\mathord}{\eu@Symbols@symfont}{`∆}[\increment]
- \eu@DeclareMathSymbol{∇}{\mathord}{\eu@Symbols@symfont}{`∇}[\nabla]
- \eu@DeclareMathSymbol{∈}{\mathrel}{\eu@Symbols@symfont}{`∈}[\in]
- \eu@DeclareMathSymbol{∉}{\mathrel}{\eu@Symbols@symfont}{`∉}[\notin]
- \eu@DeclareMathSymbol{∋}{\mathrel}{\eu@Symbols@symfont}{`∋}[\ni]
- \let\owns\ni
- \eu@DeclareMathSymbol{-}{\mathbin}{\eu@Symbols@symfont}{`−}
- \eu@DeclareMathSymbol{−}{\mathbin}{\eu@Symbols@symfont}{`−}[\minus]
- \eu@DeclareMathSymbol{∕}{\mathbin}{\eu@Symbols@symfont}{`∕}[\slash]
- \eu@DeclareMathSymbol{*}{\mathbin}{\eu@Symbols@symfont}{`∗}
- \eu@DeclareMathSymbol{∗}{\mathbin}{\eu@Symbols@symfont}{`∗}[\ast]
- \eu@DeclareMathSymbol{∙}{\mathbin}{\eu@Symbols@symfont}{`∙}[\vysmblkcircle]
- \let\bullet\vysmblkcircle
- \eu@DeclareMathSymbol{∝}{\mathrel}{\eu@Symbols@symfont}{`∝}[\propto]
- \eu@DeclareMathSymbol{∞}{\mathord}{\eu@Symbols@symfont}{`∞}[\infty]
- \eu@DeclareMathSymbol{∟}{\mathord}{\eu@Symbols@symfont}{`∟}[\rightangle]
- \eu@DeclareMathSymbol{∠}{\mathord}{\eu@Symbols@symfont}{`∠}[\angle]
- \eu@DeclareMathSymbol{∧}{\mathbin}{\eu@Symbols@symfont}{`∧}[\wedge]
- \let\land\wedge
- \eu@DeclareMathSymbol{∨}{\mathbin}{\eu@Symbols@symfont}{`∨}[\vee]
- \let\lor\vee
- \eu@DeclareMathSymbol{∩}{\mathbin}{\eu@Symbols@symfont}{`∩}[\cap]
- \eu@DeclareMathSymbol{∪}{\mathbin}{\eu@Symbols@symfont}{`∪}[\cup]
- \eu@DeclareMathSymbol{∴}{\mathord}{\eu@Symbols@symfont}{`∴}[\therefore]
- \eu@DeclareMathSymbol{∼}{\mathrel}{\eu@Symbols@symfont}{`∼}[\sim]
- \eu@DeclareMathSymbol{≅}{\mathrel}{\eu@Symbols@symfont}{`≅}[\cong]
- \eu@DeclareMathSymbol{≈}{\mathrel}{\eu@Symbols@symfont}{`≈}[\approx]
- \eu@DeclareMathSymbol{≠}{\mathrel}{\eu@Symbols@symfont}{`≠}[\neq]
- \let\ne\neq
- \eu@DeclareMathSymbol{≡}{\mathrel}{\eu@Symbols@symfont}{`≡}[\equiv]
- \eu@DeclareMathSymbol{≤}{\mathrel}{\eu@Symbols@symfont}{`≤}[\leq]
- \let\le\leq
- \eu@DeclareMathSymbol{≥}{\mathrel}{\eu@Symbols@symfont}{`≥}[\geq]
- \let\ge\geq
- \eu@DeclareMathSymbol{⊂}{\mathrel}{\eu@Symbols@symfont}{`⊂}[\subset]
- \eu@DeclareMathSymbol{⊃}{\mathrel}{\eu@Symbols@symfont}{`⊃}[\supset]
- \eu@DeclareMathSymbol{⊄}{\mathrel}{\eu@Symbols@symfont}{`⊄}[\nsubset]
- \let\notsubset\nsubset
- \eu@DeclareMathSymbol{⊆}{\mathrel}{\eu@Symbols@symfont}{`⊆}[\subseteq]
- \eu@DeclareMathSymbol{⊇}{\mathrel}{\eu@Symbols@symfont}{`⊇}[\supseteq]
- \eu@DeclareMathSymbol{⊕}{\mathbin}{\eu@Symbols@symfont}{`⊕}[\oplus]
- \eu@DeclareMathSymbol{⊗}{\mathbin}{\eu@Symbols@symfont}{`⊗}[\otimes]
- \eu@DeclareMathSymbol{⊥}{\mathord}{\eu@Symbols@symfont}{`⊥}[\bot]
- \let\perp\bot
- \eu@DeclareMathSymbol{⋅}{\mathbin}{\eu@Symbols@symfont}{`⋅}[\cdot]
- \XeTeXmathchardef\cdotp=6\symSmn`⋅
- \fi}
-% \end{macrocode}
-% The main work.
-% \begin{macrocode}
-\AtBeginDocument{
- \if@eu@amsmathloaded@\else
- \eu@isloaded[\PackageError{mathspec}{Package amsmath must be loaded before mathspec}{}]{amsmath}
- \fi
- \eu@DeclareFonts
- \eu@ifnot@plaindigits{\eu@DeclareDigits}
- \eu@DeclareLatinUppercase
- \eu@DeclareLatinLowercase
- \eu@DeclareGreekUppercase
- \eu@DeclareGreekLowercase
- \eu@DeclareSymbols
- \eu@if@varforms{\eu@VarForms}
- \eu@ifset@mathrm{
- \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}{\eu@mathbf@shape}
- \SetMathAlphabet{\mathit}{bold}{EU1}{\eu@mathrm}{bx}{it}
- \@ifundefined{symLmn}{\relax}{\def\operator@font{\mathgroup\symLmn}}}
- \eu@ifset@mathcal{
- \DeclareMathAlphabet{\mathcal}{EU1}{\eu@mathcal}{\eu@mathcal@series}{\eu@mathcal@shape}}
- \eu@ifset@mathsf{
- \DeclareMathAlphabet{\mathsf}{EU1}{\eu@mathsf}{m}{n}
- \SetMathAlphabet{\mathsf}{bold}{EU1}{\eu@mathsf}{bx}{n}}
- \eu@ifset@mathtt{
- \DeclareMathAlphabet{\mathtt}{EU1}{\eu@mathtt}{m}{n}}
- \eu@ifset@mathfrak{
- \DeclareMathAlphabet{\mathfrak}{EU1}{\eu@mathfrak}{\eu@mathfrak@series}{n}}
- \eu@ifset@mathbb{
- \DeclareMathAlphabet{\mathbb}{EU1}{\eu@mathbb}{\eu@mathbb@series}{n}}
- \fontfamily\rmdefault\selectfont
- \let\DeclareMathSymbol\LaTeXe@DeclareMathSymbol}
-% \end{macrocode}
-% \iffalse
-%<*package>
-% \fi
-% \Finale
-% \typeout{*********************************************************}
-% \typeout{*}
-% \typeout{* To finish the installation you have to move the}
-% \typeout{* following file into a directory searched by TeX:}
-% \typeout{*}
-% \typeout{* \space\space mathspec.sty}
-% \typeout{*}
-% \typeout{* To produce the documentation run the file mathspec.dtx}
-% \typeout{* through XeLaTeX.}
-% \typeout{*}
-% \typeout{* Happy XeTeXing!}
-% \typeout{*********************************************************}
-\endinput
diff --git a/Master/texmf-dist/source/xelatex/mathspec/mathspec.ins b/Master/texmf-dist/source/xelatex/mathspec/mathspec.ins
deleted file mode 100644
index bd93d7f0ea8..00000000000
--- a/Master/texmf-dist/source/xelatex/mathspec/mathspec.ins
+++ /dev/null
@@ -1,40 +0,0 @@
-%%
-%% © Andrew Gilbert Moschou 2008
-%%
-%% This work may be distributed and/or modified under the
-%% 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.
-%%
-
-\input docstrip.tex
-\keepsilent
-\usedir{tex/xelatex/mathspec}
-\preamble
-
-This is a generated file.
-
-© Andrew Gilbert Moschou
-
-This file may be distributed and/or modified under the
-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.
-
-\endpreamble
-\askforoverwritefalse
-\generate{\file{mathspec.sty}{\from{mathspec.dtx}{package}}}
-\endbatchfile
-\endinput
-%%
-%% End of file `mathspec.ins'.
diff --git a/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty b/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
index 543f0142aa8..6670cbf3249 100644
--- a/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
+++ b/Master/texmf-dist/tex/xelatex/mathspec/mathspec.sty
@@ -1,67 +1,87 @@
-%%
-%% This is file `mathspec.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% mathspec.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% © Andrew Gilbert Moschou
-%%
-%% This file may be distributed and/or modified under the
-%% 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.
-%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{mathspec}[2009/08/29 v0.16 LaTeX Package (Mathematics font selection for XeLaTeX)]
-\let\eu@ifnot@normalskips\@firstofone
-\let\eu@if@MnSymbol\@gobble
+\ProvidesPackage{mathspec}
+ [2009/09/30 v0.2 LaTeX Package (Mathematics font selection for XeLaTeX)]
+
+%% Require etoolbox for convenience and amstext for well sized text in maths
+%% mode. ifxetex is obvious.
+\RequirePackage{etoolbox}
+\RequirePackage{amstext}
+\RequirePackage{ifxetex}
+
+%% Require a recent XeTeX version.
+\RequireXeTeX
+\ifcsundef{XeTeXglyphbounds}
+ {\PackageError{mathspec}
+ {mathspec requires a more recent version of XeTeX}
+ {Your current vesion of XeTeX is \the\XeTeXversion\XeTeXrevision.\MessageBreak
+ Update your version of XeTeX to at least 0.9995.}}
+ {\relax}
+
+%% Booleans are created automatically on demand.
+\newcommand\eu@booltrue[1]{\providebool{#1}\booltrue{#1}}
+\newcommand\eu@gbooltrue[1]{\providebool{#1}\global\booltrue{#1}}
+\newcommand\eu@boolfalse[1]{\providebool{#1}\boolfalse{#1}}
+\newcommand\eu@ifbool[1]{\providebool{#1}\ifbool{#1}}
+
+%% Some extras:
+%% \eu@ifbooltrue{<bool>}{<true>}
+%% \eu@ifboolfalse{<bool>}{<false>}
+%% \eu@ifsomebooltrue{<bool_1>,...,<bool_n>}{<true>}
+%% (if <bool_i> is true for some i)
+%% \eu@ifnumis{x}{x_1,...,x_n}{<true>}{<false>} (if x = x_i for some i)
+%% \eu@ifnumin{x}{a,b}{<true>}{<false>} (if a ≤ x ≤ b)
+\newcommand\eu@ifbooltrue[2]{\eu@ifbool{#1}{#2}{\relax}}
+\newcommand\eu@ifboolfalse[2]{\eu@ifbool{#1}{\relax}{#2}}
+\newcommand\eu@ifsomebooltrue[1]{%
+ \eu@boolfalse{temp}%
+ \def\do##1{\eu@ifbooltrue{##1}{\eu@booltrue{temp}}}%
+ \docsvlist{#1}%
+ \eu@ifbooltrue{temp}}
+\newcommand\eu@ifnumis[2]{%
+ \providebool{temp}%
+ \boolfalse{temp}%
+ \def\do##1{\ifnumcomp{#1}{=}{##1}{\booltrue{temp}}{\relax}}%
+ \docsvlist{#2}%
+ \ifbool{temp}}
+\newcommand\eu@ifnumin[2]{\@eu@ifnumin{#1}#2\@nil}
+\def\@eu@ifnumin #1#2,#3\@nil{%
+ \providebool{temp}%
+ \booltrue{temp}%
+ \ifnumcomp{#1}{<}{#2}{\boolfalse{temp}}{\relax}%
+ \ifnumcomp{#3}{<}{#1}{\boolfalse{temp}}{\relax}%
+ \ifbool{temp}}
+
+%% Options.
+\DeclareOption{normalskips}
+ {\PackageWarning{mathspec}
+ {Package option `normalskips' is deprecated}}
\def\eu@zf@math{no-math}
-\DeclareOption{normalskips}{\let\eu@ifnot@normalskips\@gobble}
-\DeclareOption{no-math}{\relax}
-\DeclareOption{MnSymbol}{\let\eu@if@MnSymbol\@firstofone}
\DeclareOption{math}{\def\eu@zf@math{math}}
+\DeclareOption{no-math}{\relax}
+\DeclareOption{MnSymbol}{\eu@booltrue{MnSymbol}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{fontspec}}
\ProcessOptions\relax
+
+%% Requires packages:
+%% fontspec, xkeyval, mathstyle, etoolbox and maybe MnSymbol
\RequirePackage[\eu@zf@math]{fontspec}[2008/08/09]
-\eu@if@MnSymbol{\RequirePackage{MnSymbol}}
\RequirePackage{xkeyval}
-\RequirePackage{xifthen}
-\newif\if@eu@LatinUppercase@
-\newif\if@eu@LatinLowercase@
-\newif\if@eu@LatinDigits@
-\newif\if@eu@GreekUppercase@
-\newif\if@eu@GreekLowercase@
-\newif\if@eu@GreekDigits@
-\newif\if@eu@Symbols@
-\newif\if@eu@Digits@
-\let\eu@if@varforms\@gobble
-\let\eu@ifset@mathrm\@gobble
-\let\eu@ifset@mathcal\@gobble
-\let\eu@ifset@mathsf\@gobble
-\let\eu@ifset@mathtt\@gobble
-\let\eu@ifset@mathfrak\@gobble
-\let\eu@ifset@mathbb\@gobble
-\eu@ifnot@normalskips{
- \thinmuskip=4mu
- \medmuskip=5mu plus 2mu minus 4mu
- \thickmuskip=6mu plus 5mu}
-\newcommand\eu@isloaded[2][]{
- \expandafter\ifx\csname if@eu@#2loaded@\endcsname\relax
- \expandafter\newif\csname if@eu@#2loaded@\endcsname
- \fi
- \@ifpackageloaded{#2}
- {\csname @eu@#2loaded@true\endcsname #1}
- {\csname @eu@#2loaded@false\endcsname}}
-\eu@isloaded{amsmath}
+\eu@ifbooltrue{MnSymbol}{\RequirePackage{MnSymbol}}
+
+\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}
+
+%% 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.
\DeclareMathSymbol{\Alpha}{\mathalpha}{operators}{"41}
\DeclareMathSymbol{\Beta}{\mathalpha}{operators}{"42}
\DeclareMathSymbol{\Epsilon}{\mathalpha}{operators}{"45}
@@ -77,88 +97,81 @@
\DeclareMathSymbol{\Chi}{\mathalpha}{operators}{"58}
\DeclareMathSymbol{\omicron}{\mathord}{letters}{"6F}
\let\varbeta\beta
-\@ifundefined{varkappa}
+\ifdef{\varkappa}
+ {\relax}
{\let\varkappa\kappa}
+\ifdef{\varTheta}
+ {\let\eu@cm@varTheta\varTheta}
{\relax}
\let\varTheta\Theta
-\@ifundefined{digamma}
- {\DeclareMathSymbol{\Digamma}{\mathalpha}{operators}{"46}
- \DeclareMathSymbol{\digamma}{\mathord}{operators}{"46}}
+\ifdef{\digamma}
{\let\Digamma\digamma}
-\let\cmAlpha\Alpha
-\let\cmBeta\Beta
-\let\cmGamma\Gamma
-\let\cmDelta\Delta
-\let\cmEpsilon\Epsilon
-\let\cmZeta\Zeta
-\let\cmEta\Eta
-\let\cmTheta\Theta
-\let\cmIota\Iota
-\let\cmKappa\Kappa
-\let\cmLambda\Lambda
-\let\cmMu\Mu
-\let\cmNu\Nu
-\let\cmXi\Xi
-\let\cmOmicron\Omicron
-\let\cmPi\Pi
-\let\cmRho\Rho
-\let\cmSigma\Sigma
-\let\cmTau\Tau
-\let\cmUpsilon\Upsilon
-\let\cmPhi\Phi
-\let\cmChi\Chi
-\let\cmPsi\Psi
-\let\cmOmega\Omega
-\let\cmDigamma\Digamma
-\let\cmalpha\alpha
-\let\cmbeta\beta
-\let\cmgamma\gamma
-\let\cmdelta\delta
-\let\cmepsilon\epsilon
-\let\cmzeta\zeta
-\let\cmeta\eta
-\let\cmtheta\theta
-\let\cmiota\iota
-\let\cmkappa\kappa
-\let\cmlambda\lambda
-\let\cmmu\mu
-\let\cmnu\nu
-\let\cmxi\xi
-\let\cmomicron\omicron
-\let\cmpi\pi
-\let\cmrho\rho
-\let\cmvarsigma\varsigma
-\let\cmsigma\sigma
-\let\cmtau\tau
-\let\cmupsilon\upsilon
-\let\cmphi\phi
-\let\cmchi\chi
-\let\cmpsi\psi
-\let\cmomega\omega
-\let\cmdigamma\digamma
-\let\cmvarbeta\varbeta
-\let\cmvarepsilon\varepsilon
-\let\cmvartheta\vartheta
-\let\cmvarkappa\varkappa
-\let\cmvarpi\varpi
-\let\cmvarrho\varrho
-\let\cmvarphi\varphi
-\let\cmvarTheta\varTheta
-\RequirePackage{etoolbox}
-\@gobble{\providecommand\expandonce[1]{\unexpanded\expandafter{#1}}}
+ {\DeclareMathSymbol{\Digamma}{\mathalpha}{operators}{"46}
+ \DeclareMathSymbol{\digamma}{\mathord}{letters}{"46}}
+
+%% Preserve old definitions of all Greek letters. \eu@cm@alpha etc.
+\def\do#1{\csletcs{eu@cm@#1}{#1}}
+\docsvlist{
+ Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,
+ Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,Digamma,alpha,
+ beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,
+ omicron,pi,rho,varsigma,sigma,tau,upsilon,phi,chi,psi,omega,digamma,
+ varTheta,varbeta,varepsilon,vartheta,varkappa,varpi,varrho,varphi}
+%% varTheta is done separately because amsmath defines it differently.
+
+%% Can define/redefine any command using the syntax of
+%% \newcommand/\renewcommand without error. Some helpers.
+\newcommand\ernewcommand[1]{\ifdef{#1}{\renewcommand{#1}}{\newcommand{#1}}}
\providecommand\expanded[1]{\edef\@tempa{#1}\@tempa}
-\providecommand\ernewcommand[1]{
- \@ifundefined{\expandafter\@gobble\string#1}%
- {\let\er@newcommand\newcommand}%
- {\let\er@newcommand\renewcommand
- \PackageWarning{mathspec}{Redefining command `\string#1'}}%
- \er@newcommand#1}
\newcommand\eu@setkeys[3][]{
- \ifthenelse{\isempty{#1}}
- {\relax}
- {\presetkeys[eu]{#2}{#1}{}}
- \expanded{\noexpand\setkeys*[eu]{#2}{\expandonce#3}}}
-\newcommand\eu@fontspec[2]{\expanded{\noexpand\zf@fontspec{\expandonce#1}{\expandonce#2}}}
+ \ifblank{#1}{\relax}{\presetkeys[eu]{#2}{#1}{}}
+ \expanded{\noexpand\setkeys*[eu]{#2}{\expandonce#3\@empty}}}
+\newcommand\eu@fontspec[2]{
+ \expanded{\noexpand\zf@fontspec{\expandonce#1\@empty}{\expandonce#2\@empty}}}
+
+%% Deprecated commands.
+%% \+: Use \"..." or " instead.
+%% \plaindigits: Digits are no longer selected automatically from either
+%% the Latin or the Greek mathematics font. Instead, they
+%% must explicitely be stated. If you want plain digits, just
+%% don't say you want digits.
+%5 \normalvarforms: Now called \normalisevarforms
+%% \varforms: Now called \exchangeforms
+%% Eventually, documents that use these will compile with error.
+\newcommand\+{
+ \PackageWarning{mathspec}
+ {\protect\+\space is deprecated, recommend to use\MessageBreak\protect\"..."
+ or "}
+ \eu@plus}
+\newcommand\setsansfonts{
+ \PackageWarning{mathspec}
+ {\protect\setsansfonts\space is deprecated, recommend to use \protect
+ \setallsansfonts.}
+ \setallsansfonts}
+\@onlypreamble\setsansfonts
+\newcommand\setmonofonts{
+ \PackageWarning{mathspec}
+ {\protect\setmonofonts\space is deprecated, recommend to use \protect
+ \setallmonofonts.}
+ \setallsansfonts}
+\@onlypreamble\setmonofonts
+\newcommand\plaindigits{
+ \PackageWarning{mathspec}{\protect\plaindigits\space is deprecated}}
+\@onlypreamble\plaindigits
+\newcommand\normalvarforms{
+ \PackageWarning{mathspec}
+ {\protect\normalvarforms\space is deprecated, recommend to use
+ \protect\normalisevarforms\space or \protect\normalizevarforms}
+ \normalisevarforms}
+\@onlypreamble\normalvarforms
+\newcommand\varforms{
+ \PackageWarning{mathspec}
+ {\protect\varforms\space is deprecated, recommend to use
+ \protect\exchangeforms}
+ \exchangeforms}
+\@onlypreamble\varforms
+
+%% I don't want this clogging up my sty file. It will be gone eventually.
\def\@ifnext#1#2#3{%
\let\@tempd=#1%
\def\@tempa{#2}%
@@ -188,525 +201,801 @@
\def\eu@new@command#1{\eu@@testopt{\eu@@newcommand#1}0}
\def\eu@@newcommand#1[#2]{\@ifnext[{\@xargdef#1[#2]}{\@argdef#1[#2]}}
\long\def\eu@@testopt#1#2{\@ifnext[{#1}{#1[{#2}]}}
-\newcommand\normalvarforms[1][]{\AtBeginDocument{
- \ifx\varbeta\cmvarbeta
- \let\varbeta\beta
- \fi
- \ifx\varepsilon\cmvarepsilon
- \let\varepsilon\epsilon
- \fi
- \ifx\vartheta\cmvartheta
- \let\vartheta\theta
+\eu@DeclareRobustCommand\eu@plus[1][]{}
+
+%% The main user command (comes in two spellings)
+%% \setmathsfont(<sets>)[<shapes, font features>]{<font name>}
+%% \setmathfont(<sets>)[<shapes, font features>]{<font name>}
+%%
+%% <set> is a CSV list of any of: Special, Latin, Greek, Digits, Symbols. If
+%% (<set>) is omitted, then (Special) is assumed. Special is provided to
+%% hook to some external code (e.g. potentially unicode-math). That is,
+%% for mathspec purposes, (<sets>) is mandatory. Omit it so that it
+%% behaves like a different command. See below.
+%% <shapes> is the keyval list of font shapes for the subset of <set>.
+%% Valid keys are: Uppercase, Lowercase, Arabic.
+%% Valid values are: Regular, Italic, Plain.
+%% <font features>, <font name> follow directly from fontspec.
+\providecommand\setmathsfont{\eu@setmathsfont}
+\let\setmathfont\setmathsfont
+\newcommand\eu@setmathsfont{
+ \@ifnextchar(
+ {\@eu@setmathsfont}
+ {\@eu@setmathsfont(Special)}}
+\def\@eu@setmathsfont(#1){
+ \edef\eu@setmathsfont@Set{#1}
+ \@@eu@setmathsfont}
+\newcommand\@@eu@setmathsfont[2][]{
+ \@for\i@for:=\eu@setmathsfont@Set\do
+ {\csname eu@ScopeSet@\i@for\endcsname[#1]{#2}}}
+
+%% The FIRST branch \setmathsfont(Special)
+%% Predefine this command before mathspec is loaded (or redefine it) to get
+%%
+%% \setmathsfont[<font features>]{<font name>}
+%%
+%% to do something else.
+%%
+%% Essentially, \setmathsfont(<sets>)[<font features>]{<font name>} is a mathspec
+%% command, but \setmathsfont[<font features>]{<font name>} is an external
+%% command.
+\providecommand\eu@ScopeSet@Special[2][]{\relax}
+
+%% The SECOND branch \setmathsfont(Digits)
+\newcommand\eu@ScopeSet@Digits[2][]{
+ \eu@setkeys[Arabic=Regular]{Digits}{#1}
+ \eu@fontspec{\XKV@rm}{#2}
+ \ifcase\eu@DigitsArabic@@value %% If Digits Regular
+ \ernewcommand\eu@DigitsArabic@symfont{Digits:m:n}
+ \let\eu@Digitsmathsfont\zf@family
+ \eu@booltrue{Digits}
+ \or %% If Digits Italic
+ \ernewcommand\eu@DigitsArabic@symfont{Digits:m:it}
+ \let\eu@Digitsmathsfont\zf@family
+ \eu@booltrue{Digits}
+ \or %% If Digits Plain
+ \eu@boolfalse{Digits}
\fi
- \ifx\varkappa\cmvarkappa
- \let\varkappa\kappa
+ \eu@ifsomebooltrue{Digits}
+ {\DeclareSymbolFont{Digits:m:n}{EU1}{\eu@Digitsmathsfont}{m}{n}}
+ \eu@ifbooltrue{Digits}
+ {\fontfamily\eu@Digitsmathsfont\selectfont
+ \DeclareMathSymbol{0}{\mathord}{\eu@DigitsArabic@symfont}{`0}
+ \DeclareMathSymbol{1}{\mathord}{\eu@DigitsArabic@symfont}{`1}
+ \DeclareMathSymbol{2}{\mathord}{\eu@DigitsArabic@symfont}{`2}
+ \DeclareMathSymbol{3}{\mathord}{\eu@DigitsArabic@symfont}{`3}
+ \DeclareMathSymbol{4}{\mathord}{\eu@DigitsArabic@symfont}{`4}
+ \DeclareMathSymbol{5}{\mathord}{\eu@DigitsArabic@symfont}{`5}
+ \DeclareMathSymbol{6}{\mathord}{\eu@DigitsArabic@symfont}{`6}
+ \DeclareMathSymbol{7}{\mathord}{\eu@DigitsArabic@symfont}{`7}
+ \DeclareMathSymbol{8}{\mathord}{\eu@DigitsArabic@symfont}{`8}
+ \DeclareMathSymbol{9}{\mathord}{\eu@DigitsArabic@symfont}{`9}}}
+
+%% The THIRD branch \setmathsfont(Latin)
+\newcommand\eu@ScopeSet@Latin[2][]{
+ \eu@setkeys[Uppercase=Italic,Lowercase=Italic]{Latin}{#1}
+ \eu@fontspec{\XKV@rm}{#2}
+ \ifcase\eu@LatinUppercase@@value %% If Latin Uppercase Regular
+ \ernewcommand\eu@LatinUppercase@symfont{Latin:m:n}
+ \let\eu@Latinmathsfont\zf@family
+ \eu@booltrue{LatinUppercase}
+ \or %% If Latin Uppercase Italic
+ \ernewcommand\eu@LatinUppercase@symfont{Latin:m:it}
+ \let\eu@Latinmathsfont\zf@family
+ \eu@booltrue{LatinUppercase}
+ \or %% If Latin Uppercase Plain
+ \eu@boolfalse{LatinUppercase}
\fi
- \ifx\varpi\cmvarpi
- \let\varpi\pi
+ \ifcase\eu@LatinLowercase@@value %% If Latin Lowercase Regular
+ \ernewcommand\eu@LatinLowercase@symfont{Latin:m:n}
+ \let\eu@Latinmathsfont\zf@family
+ \eu@booltrue{LatinLowercase}
+ \or %% If Latin Lowercase Italic
+ \ernewcommand\eu@LatinLowercase@symfont{Latin:m:it}
+ \let\eu@Latinmathsfont\zf@family
+ \eu@booltrue{LatinLowercase}
+ \or %% If Latin Lowercase Plain
+ \eu@boolfalse{LatinLowercase}
\fi
- \ifx\varrho\cmvarrho
- \let\varrho\rho
+ \eu@ifsomebooltrue{LatinUppercase,LatinLowercase}
+ {\DeclareSymbolFont{Latin:m:n}{EU1}{\eu@Latinmathsfont}{m}{n}
+ \DeclareSymbolFont{Latin:m:it}{EU1}{\eu@Latinmathsfont}{m}{it}}
+ \eu@ifbooltrue{LatinUppercase}
+ {\fontfamily\eu@Latinmathsfont\selectfont
+ \DeclareMathSymbol{A}{\mathalpha}{\eu@LatinUppercase@symfont}{`A}
+ \DeclareMathSymbol{B}{\mathalpha}{\eu@LatinUppercase@symfont}{`B}
+ \DeclareMathSymbol{C}{\mathalpha}{\eu@LatinUppercase@symfont}{`C}
+ \DeclareMathSymbol{D}{\mathalpha}{\eu@LatinUppercase@symfont}{`D}
+ \DeclareMathSymbol{E}{\mathalpha}{\eu@LatinUppercase@symfont}{`E}
+ \DeclareMathSymbol{F}{\mathalpha}{\eu@LatinUppercase@symfont}{`F}
+ \DeclareMathSymbol{G}{\mathalpha}{\eu@LatinUppercase@symfont}{`G}
+ \DeclareMathSymbol{H}{\mathalpha}{\eu@LatinUppercase@symfont}{`H}
+ \DeclareMathSymbol{I}{\mathalpha}{\eu@LatinUppercase@symfont}{`I}
+ \DeclareMathSymbol{J}{\mathalpha}{\eu@LatinUppercase@symfont}{`J}
+ \DeclareMathSymbol{K}{\mathalpha}{\eu@LatinUppercase@symfont}{`K}
+ \DeclareMathSymbol{L}{\mathalpha}{\eu@LatinUppercase@symfont}{`L}
+ \DeclareMathSymbol{M}{\mathalpha}{\eu@LatinUppercase@symfont}{`M}
+ \DeclareMathSymbol{N}{\mathalpha}{\eu@LatinUppercase@symfont}{`N}
+ \DeclareMathSymbol{O}{\mathalpha}{\eu@LatinUppercase@symfont}{`O}
+ \DeclareMathSymbol{P}{\mathalpha}{\eu@LatinUppercase@symfont}{`P}
+ \DeclareMathSymbol{Q}{\mathalpha}{\eu@LatinUppercase@symfont}{`Q}
+ \DeclareMathSymbol{R}{\mathalpha}{\eu@LatinUppercase@symfont}{`R}
+ \DeclareMathSymbol{S}{\mathalpha}{\eu@LatinUppercase@symfont}{`S}
+ \DeclareMathSymbol{T}{\mathalpha}{\eu@LatinUppercase@symfont}{`T}
+ \DeclareMathSymbol{U}{\mathalpha}{\eu@LatinUppercase@symfont}{`U}
+ \DeclareMathSymbol{V}{\mathalpha}{\eu@LatinUppercase@symfont}{`V}
+ \DeclareMathSymbol{W}{\mathalpha}{\eu@LatinUppercase@symfont}{`W}
+ \DeclareMathSymbol{X}{\mathalpha}{\eu@LatinUppercase@symfont}{`X}
+ \DeclareMathSymbol{Y}{\mathalpha}{\eu@LatinUppercase@symfont}{`Y}
+ \DeclareMathSymbol{Z}{\mathalpha}{\eu@LatinUppercase@symfont}{`Z}}
+ \eu@ifbooltrue{LatinLowercase}
+ {\fontfamily\eu@Latinmathsfont\selectfont
+ \DeclareMathSymbol{a}{\mathalpha}{\eu@LatinLowercase@symfont}{`a}
+ \DeclareMathSymbol{b}{\mathalpha}{\eu@LatinLowercase@symfont}{`b}
+ \DeclareMathSymbol{c}{\mathalpha}{\eu@LatinLowercase@symfont}{`c}
+ \DeclareMathSymbol{d}{\mathalpha}{\eu@LatinLowercase@symfont}{`d}
+ \DeclareMathSymbol{e}{\mathalpha}{\eu@LatinLowercase@symfont}{`e}
+ \DeclareMathSymbol{f}{\mathalpha}{\eu@LatinLowercase@symfont}{`f}
+ \DeclareMathSymbol{g}{\mathalpha}{\eu@LatinLowercase@symfont}{`g}
+ \DeclareMathSymbol{h}{\mathalpha}{\eu@LatinLowercase@symfont}{`h}
+ \DeclareMathSymbol{i}{\mathalpha}{\eu@LatinLowercase@symfont}{`i}
+ \DeclareMathSymbol{j}{\mathalpha}{\eu@LatinLowercase@symfont}{`j}
+ \DeclareMathSymbol{k}{\mathalpha}{\eu@LatinLowercase@symfont}{`k}
+ \DeclareMathSymbol{l}{\mathalpha}{\eu@LatinLowercase@symfont}{`l}
+ \DeclareMathSymbol{m}{\mathalpha}{\eu@LatinLowercase@symfont}{`m}
+ \DeclareMathSymbol{n}{\mathalpha}{\eu@LatinLowercase@symfont}{`n}
+ \DeclareMathSymbol{o}{\mathalpha}{\eu@LatinLowercase@symfont}{`o}
+ \DeclareMathSymbol{p}{\mathalpha}{\eu@LatinLowercase@symfont}{`p}
+ \DeclareMathSymbol{q}{\mathalpha}{\eu@LatinLowercase@symfont}{`q}
+ \DeclareMathSymbol{r}{\mathalpha}{\eu@LatinLowercase@symfont}{`r}
+ \DeclareMathSymbol{s}{\mathalpha}{\eu@LatinLowercase@symfont}{`s}
+ \DeclareMathSymbol{t}{\mathalpha}{\eu@LatinLowercase@symfont}{`t}
+ \DeclareMathSymbol{u}{\mathalpha}{\eu@LatinLowercase@symfont}{`u}
+ \DeclareMathSymbol{v}{\mathalpha}{\eu@LatinLowercase@symfont}{`v}
+ \DeclareMathSymbol{w}{\mathalpha}{\eu@LatinLowercase@symfont}{`w}
+ \DeclareMathSymbol{x}{\mathalpha}{\eu@LatinLowercase@symfont}{`x}
+ \DeclareMathSymbol{y}{\mathalpha}{\eu@LatinLowercase@symfont}{`y}
+ \DeclareMathSymbol{z}{\mathalpha}{\eu@LatinLowercase@symfont}{`z}}}
+
+%% The FOURTH branch \setmathsfont(Greek)
+\newcommand\eu@ScopeSet@Greek[2][]{
+ \eu@setkeys[Uppercase=Regular,Lowercase=Italic]{Greek}{#1}
+ \eu@fontspec{\XKV@rm}{#2}
+ \ifcase\eu@GreekUppercase@@value %% If Greek Uppercase Regular
+ \ernewcommand\eu@GreekUppercase@symfont{Greek:m:n}
+ \let\eu@Greekmathsfont\zf@family
+ \eu@booltrue{GreekUppercase}
+ \or %% If Greek Uppercase Italic
+ \ernewcommand\eu@GreekUppercase@symfont{Greek:m:it}
+ \let\eu@Greekmathsfont\zf@family
+ \eu@booltrue{GreekUppercase}
+ \or %% If Greek Uppercase Plain
+ \eu@boolfalse{GreekUppercase}
\fi
- \ifx\varphi\cmvarphi
- \let\varphi\phi
+ \ifcase\eu@GreekLowercase@@value %% If Greek Lowercase Regular
+ \ernewcommand\eu@GreekLowercase@symfont{Greek:m:n}
+ \let\eu@Greekmathsfont\zf@family
+ \eu@booltrue{GreekLowercase}
+ \or %% If Greek Lowercase Italic
+ \ernewcommand\eu@GreekLowercase@symfont{Greek:m:it}
+ \let\eu@Greekmathsfont\zf@family
+ \eu@booltrue{GreekLowercase}
+ \or %% If Greek Lowercase Plain
+ \eu@boolfalse{GreekLowercase}
\fi
- \ifx\varTheta\cmvarTheta
- \let\varTheta\Theta
- \fi}}
-\let\eu@ifnot@plaindigits\@firstofone
-\newcommand\plaindigits{\let\eu@ifnot@plaindigits\@gobble}
-\providecommand\setmathsfont{\eu@setmathsfont}
-\let\setmathfont\setmathsfont
-\eu@DeclareRobustCommand\+[1][1]{\ensuremath{\mskip#1mu}}
-\newcommand\varforms[1]{\def\eu@if@varforms##1{##1{#1}}}
+ \eu@ifsomebooltrue{GreekUppercase,GreekLowercase}
+ {\DeclareSymbolFont{Greek:m:n}{EU1}{\eu@Greekmathsfont}{m}{n}
+ \DeclareSymbolFont{Greek:m:it}{EU1}{\eu@Greekmathsfont}{m}{it}}
+ \eu@ifbooltrue{GreekUppercase}
+ {\fontfamily\eu@Greekmathsfont\selectfont
+ \XeTeXDeclareMathSymbol{Α}{\mathalpha}{\eu@GreekUppercase@symfont}{`Α}[\Alpha]
+ \XeTeXDeclareMathSymbol{Β}{\mathalpha}{\eu@GreekUppercase@symfont}{`Β}[\Beta]
+ \XeTeXDeclareMathSymbol{Γ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Γ}[\Gamma]
+ \XeTeXDeclareMathSymbol{Δ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Δ}[\Delta]
+ \XeTeXDeclareMathSymbol{Ε}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ε}[\Epsilon]
+ \XeTeXDeclareMathSymbol{Ζ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ζ}[\Zeta]
+ \XeTeXDeclareMathSymbol{Η}{\mathalpha}{\eu@GreekUppercase@symfont}{`Η}[\Eta]
+ \XeTeXDeclareMathSymbol{Θ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Θ}[\Theta]
+ \XeTeXDeclareMathSymbol{Ι}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ι}[\Iota]
+ \XeTeXDeclareMathSymbol{Κ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Κ}[\Kappa]
+ \XeTeXDeclareMathSymbol{Λ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Λ}[\Lambda]
+ \XeTeXDeclareMathSymbol{Μ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Μ}[\Mu]
+ \XeTeXDeclareMathSymbol{Ν}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ν}[\Nu]
+ \XeTeXDeclareMathSymbol{Ξ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ξ}[\Xi]
+ \XeTeXDeclareMathSymbol{Ο}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ο}[\Omicron]
+ \XeTeXDeclareMathSymbol{Π}{\mathalpha}{\eu@GreekUppercase@symfont}{`Π}[\Pi]
+ \XeTeXDeclareMathSymbol{Ρ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ρ}[\Rho]
+ \XeTeXDeclareMathSymbol{Σ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Σ}[\Sigma]
+ \XeTeXDeclareMathSymbol{Τ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Τ}[\Tau]
+ \XeTeXDeclareMathSymbol{Υ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Υ}[\Upsilon]
+ \XeTeXDeclareMathSymbol{Φ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Φ}[\Phi]
+ \XeTeXDeclareMathSymbol{Χ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Χ}[\Chi]
+ \XeTeXDeclareMathSymbol{Ψ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ψ}[\Psi]
+ \XeTeXDeclareMathSymbol{Ω}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ω}[\Omega]
+ \XeTeXDeclareMathSymbol{Ϝ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ϝ}[\Digamma]
+ \XeTeXDeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekUppercase@symfont}{`ϴ}[\varTheta]
+ \eu@fixgreekcs{Α}{Alpha}
+ \eu@fixgreekcs{Β}{Beta}
+ \eu@fixgreekcs{Γ}{Gamma}
+ \eu@fixgreekcs{Δ}{Delta}
+ \eu@fixgreekcs{Ε}{Epsilon}
+ \eu@fixgreekcs{Ζ}{Zeta}
+ \eu@fixgreekcs{Η}{Eta}
+ \eu@fixgreekcs{Θ}{Theta}
+ \eu@fixgreekcs{Ι}{Iota}
+ \eu@fixgreekcs{Κ}{Kappa}
+ \eu@fixgreekcs{Λ}{Lambda}
+ \eu@fixgreekcs{Μ}{Mu}
+ \eu@fixgreekcs{Ν}{Nu}
+ \eu@fixgreekcs{Ξ}{Xi}
+ \eu@fixgreekcs{Ο}{Omicron}
+ \eu@fixgreekcs{Π}{Pi}
+ \eu@fixgreekcs{Ρ}{Rho}
+ \eu@fixgreekcs{Σ}{Sigma}
+ \eu@fixgreekcs{Τ}{Tau}
+ \eu@fixgreekcs{Υ}{Upsilon}
+ \eu@fixgreekcs{Φ}{Phi}
+ \eu@fixgreekcs{Χ}{Chi}
+ \eu@fixgreekcs{Ψ}{Psi}
+ \eu@fixgreekcs{Ω}{Omega}
+ \eu@fixgreekcs{Ϝ}{Digamma}
+ \eu@fixgreekcs{ϴ}{varTheta}}
+ \eu@ifbooltrue{GreekLowercase}
+ {\fontfamily\eu@Greekmathsfont\selectfont
+ \XeTeXDeclareMathSymbol{α}{\mathalpha}{\eu@GreekLowercase@symfont}{`α}[\alpha]
+ \XeTeXDeclareMathSymbol{β}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}[\beta]
+ \XeTeXDeclareMathSymbol{γ}{\mathalpha}{\eu@GreekLowercase@symfont}{`γ}[\gamma]
+ \XeTeXDeclareMathSymbol{δ}{\mathalpha}{\eu@GreekLowercase@symfont}{`δ}[\delta]
+ \XeTeXDeclareMathSymbol{ε}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}[\epsilon]
+ \XeTeXDeclareMathSymbol{ζ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ζ}[\zeta]
+ \XeTeXDeclareMathSymbol{η}{\mathalpha}{\eu@GreekLowercase@symfont}{`η}[\eta]
+ \XeTeXDeclareMathSymbol{θ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}[\theta]
+ \XeTeXDeclareMathSymbol{ι}{\mathalpha}{\eu@GreekLowercase@symfont}{`ι}[\iota]
+ \XeTeXDeclareMathSymbol{κ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}[\kappa]
+ \XeTeXDeclareMathSymbol{λ}{\mathalpha}{\eu@GreekLowercase@symfont}{`λ}[\lambda]
+ \XeTeXDeclareMathSymbol{μ}{\mathalpha}{\eu@GreekLowercase@symfont}{`μ}[\mu]
+ \XeTeXDeclareMathSymbol{ν}{\mathalpha}{\eu@GreekLowercase@symfont}{`ν}[\nu]
+ \XeTeXDeclareMathSymbol{ξ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ξ}[\xi]
+ \XeTeXDeclareMathSymbol{ο}{\mathalpha}{\eu@GreekLowercase@symfont}{`ο}[\omicron]
+ \XeTeXDeclareMathSymbol{π}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}[\pi]
+ \XeTeXDeclareMathSymbol{ρ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}[\rho]
+ \XeTeXDeclareMathSymbol{ς}{\mathalpha}{\eu@GreekLowercase@symfont}{`ς}[\varsigma]
+ \XeTeXDeclareMathSymbol{σ}{\mathalpha}{\eu@GreekLowercase@symfont}{`σ}[\sigma]
+ \XeTeXDeclareMathSymbol{τ}{\mathalpha}{\eu@GreekLowercase@symfont}{`τ}[\tau]
+ \XeTeXDeclareMathSymbol{υ}{\mathalpha}{\eu@GreekLowercase@symfont}{`υ}[\upsilon]
+ \XeTeXDeclareMathSymbol{φ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}[\phi]
+ \XeTeXDeclareMathSymbol{χ}{\mathalpha}{\eu@GreekLowercase@symfont}{`χ}[\chi]
+ \XeTeXDeclareMathSymbol{ψ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ψ}[\psi]
+ \XeTeXDeclareMathSymbol{ω}{\mathalpha}{\eu@GreekLowercase@symfont}{`ω}[\omega]
+ \XeTeXDeclareMathSymbol{ϝ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϝ}[\digamma]
+ \XeTeXDeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϐ}[\varbeta]
+ \XeTeXDeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϵ}[\varepsilon]
+ \XeTeXDeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϑ}[\vartheta]
+ \XeTeXDeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϰ}[\varkappa]
+ \XeTeXDeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϖ}[\varpi]
+ \XeTeXDeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϱ}[\varrho]
+ \XeTeXDeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϕ}[\varphi]
+ \eu@fixgreekcs{α}{alpha}
+ \eu@fixgreekcs{β}{beta}
+ \eu@fixgreekcs{γ}{gamma}
+ \eu@fixgreekcs{δ}{delta}
+ \eu@fixgreekcs{ε}{epsilon}
+ \eu@fixgreekcs{ζ}{zeta}
+ \eu@fixgreekcs{η}{eta}
+ \eu@fixgreekcs{θ}{theta}
+ \eu@fixgreekcs{ι}{iota}
+ \eu@fixgreekcs{κ}{kappa}
+ \eu@fixgreekcs{λ}{lambda}
+ \eu@fixgreekcs{μ}{mu}
+ \eu@fixgreekcs{ν}{nu}
+ \eu@fixgreekcs{ξ}{xi}
+ \eu@fixgreekcs{ο}{omicron}
+ \eu@fixgreekcs{π}{pi}
+ \eu@fixgreekcs{ρ}{rho}
+ \eu@fixgreekcs{ς}{varsigma}
+ \eu@fixgreekcs{σ}{sigma}
+ \eu@fixgreekcs{τ}{tau}
+ \eu@fixgreekcs{υ}{upsilon}
+ \eu@fixgreekcs{φ}{phi}
+ \eu@fixgreekcs{χ}{chi}
+ \eu@fixgreekcs{ψ}{psi}
+ \eu@fixgreekcs{ω}{omega}
+ \eu@fixgreekcs{ϝ}{digamma}
+ \eu@fixgreekcs{ϐ}{varbeta}
+ \eu@fixgreekcs{ϵ}{varepsilon}
+ \eu@fixgreekcs{ϑ}{vartheta}
+ \eu@fixgreekcs{ϰ}{varkappa}
+ \eu@fixgreekcs{ϖ}{varpi}
+ \eu@fixgreekcs{ϱ}{varrho}
+ \eu@fixgreekcs{ϕ}{varphi}}}
+\newcommand\eu@fixgreekcs[2]{
+ \ifcsequal{#2}{eu@cm@#2}
+ {\relax}
+ {\expandafter\def\csname #2\endcsname{{"#1}}}}
+
+%% The FIFTH branch \setmathsfont(Symbols)
+%% The symbols are not for now.
+%% \newcommand\eu@ScopeSet@Symbols[2][]{
+%% \eu@fontspec{#1}{#2}
+%% \def\eu@Symbols@symfont{Symbols:m:n}
+%% \let\eu@Symbolsmathsfont\zf@family
+%% \eu@booltrue{Symbols}}
+%%
+%% The FIFTH branch (REDEFINED) \setmathsfont(Symbols)
+\newcommand\eu@ScopeSet@Symbols[2][]{\eu@boolfalse{Symbols}}
+
+%% Just so we know, by "all variant forms" I mean:
+%% varbeta varpi cursive beta "omega" style pi
+%% varepsilon varrho lunate epsilon rho with tail hooked under
+%% vartheta varphi cursive theta cursive phi (or orthotic phi)
+%% varkappa varTheta cursive kappa Theta with horizontal bar connected
+%%
+%% Note that varsigma is not included in this list (varsigma is not a variant
+%% form, it is a final form).
+
+%% Some authors might prefer the normal and variant forms to be exchanged. For
+%% example, I prefer \phi to print the orthotic phi and \varphi the cursive phi,
+%% contrary to many text fonts.
+%%
+%% \exchangeforms{<list>}
+%% <list> is a CSV list of any of:
+%% beta, epsilon, theta, kappa, pi, rho, phi, Theta
+\newcommand\exchangeforms[1]{
+ \AtBeginDocument{
+ \@for\i@for:=#1\do{\eu@booltrue{exchange\i@for forms}}
+ \eu@ifbooltrue{GreekLowercase}
+ {\eu@ifbooltrue{exchangebetaforms}
+ {\XeTeXDeclareMathSymbol{β}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϐ}[\beta]
+ \XeTeXDeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}[\varbeta]}
+ \eu@ifbooltrue{exchangeepsilonforms}
+ {\XeTeXDeclareMathSymbol{ε}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϵ}[\epsilon]
+ \XeTeXDeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}[\varepsilon]}
+ \eu@ifbooltrue{exchangethetaforms}
+ {\XeTeXDeclareMathSymbol{θ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϑ}[\theta]
+ \XeTeXDeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}[\vartheta]}
+ \eu@ifbooltrue{exchangekappaforms}
+ {\XeTeXDeclareMathSymbol{κ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϰ}[\kappa]
+ \XeTeXDeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}[\varkappa]}
+ \eu@ifbooltrue{exchangepiforms}
+ {\XeTeXDeclareMathSymbol{π}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϖ}[\pi]
+ \XeTeXDeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}[\varpi]}
+ \eu@ifbooltrue{exchangerhoforms}
+ {\XeTeXDeclareMathSymbol{ρ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϱ}[\rho]
+ \XeTeXDeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}[\varrho]}
+ \eu@ifbooltrue{exchangephiforms}
+ {\XeTeXDeclareMathSymbol{φ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ϕ}[\phi]
+ \XeTeXDeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}[\varphi]}}
+ \eu@ifbooltrue{GreekUppercase}
+ {\eu@ifbooltrue{exhangeThetaforms}
+ {\XeTeXDeclareMathSymbol{Θ}{\mathalpha}{\eu@GreekUppercase@symfont}{`ϴ}[\Theta]
+ \XeTeXDeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Θ}[\varTheta]}}}}
+\@onlypreamble\exchangeforms
+
+%% Some text fonts do not contain all variant forms. For those that don't,
+%% after defining the Greek mathematics font, the ‘absent’ variant forms will
+%% still be typeset in Computer Modern (usually).
+%%
+%% \normalisevarforms[<list>]
+%% \normalizevarforms[<list>]
+%% <list> is a CSV list of any of:
+%% beta, epsilon, theta, kappa, pi, rho, phi, Theta
+%%
+%% This command makes the listed variant forms of Greek symbols equivalent to
+%% their normal forms, but only if they do not already exist in the font. For
+%% example, if \varbeta and \eu@cm@varbeta are equivalent, then
+%% \XeTeXDeclareMathSymbol failed to assign \varbeta to ϐ because ϐ does not
+%% exist in the font.
+\newcommand\normalisevarforms[1][beta,epsilon,theta,kappa,pi,rho,phi,Theta]{
+ \AtBeginDocument{
+ \@for\i@for:=#1\do{\eu@booltrue{normalisevar\i@for}}
+ \eu@ifbooltrue{GreekLowercase}
+ {\eu@ifbooltrue{normalisevarbeta}
+ {\ifx\varbeta\eu@cm@varbeta
+ \XeTeXDeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}
+ \let\varbeta\beta
+ \fi}
+ \eu@ifbooltrue{normalisevarepsilon}
+ {\ifx\varepsilon\eu@cm@varepsilon
+ \XeTeXDeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}
+ \let\varepsilon\epsilon
+ \fi}
+ \eu@ifbooltrue{normalisevartheta}
+ {\ifx\vartheta\eu@cm@vartheta
+ \XeTeXDeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}
+ \let\vartheta\theta
+ \fi}
+ \eu@ifbooltrue{normalisevarkappa}
+ {\ifx\varkappa\eu@cm@varkappa
+ \XeTeXDeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}
+ \let\varkappa\kappa
+ \fi}
+ \eu@ifbooltrue{normalisevarpi}
+ {\ifx\varpi\eu@cm@varpi
+ \XeTeXDeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}
+ \let\varpi\pi
+ \fi}
+ \eu@ifbooltrue{normalisevarrho}
+ {\ifx\varrho\eu@cm@varrho
+ \XeTeXDeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}
+ \let\varrho\rho
+ \fi}
+ \eu@ifbooltrue{normalisevarphi}
+ {\ifx\varphi\eu@cm@varphi
+ \XeTeXDeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}
+ \let\varphi\phi
+ \fi}}
+ \eu@ifbooltrue{GreekUppercase}{
+ \eu@ifbooltrue{normalisevarTheta}
+ {\ifx\varTheta\eu@cm@varTheta
+ \XeTeXDeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Θ}
+ \let\varTheta\Theta
+ \fi}}}}
+\@onlypreamble\normalisevarforms
+\let\normalizevarforms\normalisevarforms
+\@onlypreamble\normalizevarforms
+
+%% xkeyval things
+\define@choicekey[eu]
+ {Digits}{Arabic}[\eu@DigitsArabic@value\eu@DigitsArabic@@value]
+ {Regular,Italic,Plain}[Regular]{\relax}
+\define@choicekey[eu]
+ {Latin}{Uppercase}[\eu@LatinUppercase@value\eu@LatinUppercase@@value]
+ {Regular,Italic,Plain}[Italic]{\relax}
+\define@choicekey[eu]
+ {Latin}{Lowercase}[\eu@LatinLowercase@value\eu@LatinLowercase@@value]
+ {Regular,Italic,Plain}[Italic]{\relax}
+\define@choicekey[eu]
+ {Greek}{Uppercase}[\eu@GreekUppercase@value\eu@GreekUppercase@@value]
+ {Regular,Italic,Plain}[Regular]{\relax}
+\define@choicekey[eu]
+ {Greek}{Lowercase}[\eu@GreekLowercase@value\eu@GreekLowercase@@value]
+ {Regular,Italic,Plain}[Italic]{\relax}
+
+%% Also say Digits has Uppercase and Lowercase keys, and Latin and Greek both
+%% have Arabic key. So that if a superfluous key is accidently sent through the
+%% wrong command (possible with \setallmainfonts), then it doesn't blow up.
+\define@key[eu]{Digits}{Uppercase}{\relax}
+\define@key[eu]{Digits}{Lowercase}{\relax}
+\define@key[eu]{Latin}{Arabic}{\relax}
+\define@key[eu]{Greek}{Arabic}{\relax}
+
+%% I hope Will doesn't mind if I patch fontspec. Why? Because these keys are
+%% accidently sent through fontspec (e.g. \setallmainfonts does \setmainfont,
+%% which is a fontspec command). So I allow fontspec to understand them, but do
+%% nothing.
+\define@key[zf]{options}{Arabic}{\relax}
+\define@key[zf]{options}{Uppercase}{\relax}
+\define@key[zf]{options}{Lowercase}{\relax}
+
+%% Fonts have metrics suitable for text, not for mathematics. Need to kern each
+%% letter individually. Previous version took a trial and error approach with
+%% \+[<size>] where <size> was determined by trial and error. Now, there is a
+%% XeTeX primitive \XeTeXglyphbounds which is used to automatically calculate
+%% the required mkern.
+%%
+%% Some register definitions. \three@digits takes a number and, if it is less
+%% than 100, inserts leading zeroes so that it has three digits.
+\muskipdef\muskip@\z@
+\muskipdef\muskip@i\@ne
+\dimendef\dimen@iv 4\relax
+\newcounter{eu@}
+\newcounter{eu@i}
+\providecommand\three@digits[1]{\ifnum#1<100 0\ifnum#1<10 0\fi\fi\number#1}
+
+%% \setminwhitespace{<number>}
+%% Sets the minimum gap between adjacent characters in mathematics.
+%% <number> is in units of mmu (1/1000 mu). So 1 em = 18000 mmu.
+%% \eu@minwhitespace is the minimum white space. It's default value is 500
+%% which corresponds to 0.5 mu or 1/36 em.
+\newcommand\setminwhitespace[1][500]{\def\eu@minwhitespace{#1}}
+\setminwhitespace
+
+%% \eu@mkern operates over some adjacent character tokens
+%% \@eu@mkern operates over individual character tokens
+%%
+%% Unless I've missed something, it is really, really hard to get information
+%% about the font that a mathematics symbol is typeset in, so I devised a series
+%% of tests in text mode (\text!) (otherwise the received information will be
+%% rubbish, related to the text font outside the mathematics). It would be
+%% neater if I do it inside a box that's not printed, instead of an empty
+%% \text. The \@eu@mkern algorithm to calculate the mkern might be neater if I
+%% use e-TeX's \numexpr and \glueexpr. Maybe \gluetomu might be useful? What I
+%% have here already ought to be sufficient but perhaps inefficient. I think
+%% optical sizes follow through automatically because \text inherits the
+%% surrounding size, is that right?
+\newcommand\eu@mkern[1]{%
+ \@tfor\i@tfor:=#1\do{\expandafter\@eu@mkern\i@tfor}}
+\def\eu@get@familyseriesshape#1:#2:#3\@nil{%
+ \expandafter\fontfamily\csname eu@#1mathsfont\endcsname\selectfont
+ \ifstrequal{#2}{m}{\mdseries}{\relax}%
+ \ifstrequal{#2}{bx}{\bfseries}{\relax}%
+ \ifstrequal{#3}{n}{\upshape}{\relax}%
+ \ifstrequal{#3}{it}{\itshape}{\relax}}
+\def\eu@get@familyseriesshape#1:#2:#3\@nil{%
+ \def\eu@family{#1}%
+ \def\eu@series{#2}%
+ \def\eu@shape{#3}}
+\newcounter{mkern}
+\newcommand\@eu@mkern[1]{%
+ \setcounter{mkern}{-1}%
+ \eu@boolfalse{domkern}%
+ \eu@ifnumin{`#1}{`0,`9}{\setcounter{mkern}{0}}{\relax}%
+ \eu@ifnumin{`#1}{`A,`Z}{\setcounter{mkern}{1}}{\relax}%
+ \eu@ifnumin{`#1}{`a,`z}{\setcounter{mkern}{2}}{\relax}%
+ \eu@ifnumin{`#1}{`Α,`Ω}{\setcounter{mkern}{3}}{\relax}%
+ \eu@ifnumin{`#1}{`α,`ω}{\setcounter{mkern}{4}}{\relax}%
+ \eu@ifnumis{`#1}{`Ϝ,`ϴ}{\setcounter{mkern}{3}}{\relax}%
+ \eu@ifnumis{`#1}{`ϐ,`ϑ,`ϕ,`ϖ,`ϝ,`ϰ,`ϱ,`ϵ}{\setcounter{mkern}{4}}{\relax}%
+ \text{%
+ \ifnum\the\c@mkern>\m@ne
+ \eu@gbooltrue{domkern}%
+ \fi
+ \ifcase\the\c@mkern\relax % If Digits (0)
+ \ifdef{\eu@DigitsArabic@symfont}%
+ {\expandafter\eu@get@familyseriesshape\eu@DigitsArabic@symfont\@nil}%
+ {\global\boolfalse{domkern}}%
+ \or % If Latin Uppercase (1)
+ \ifdef{\eu@LatinUppercase@symfont}%
+ {\expandafter\eu@get@familyseriesshape\eu@LatinUppercase@symfont\@nil}%
+ {\global\boolfalse{domkern}}%
+ \or % If Latin Lowercase (2)
+ \ifdef{\eu@LatinLowercase@symfont}%
+ {\expandafter\eu@get@familyseriesshape\eu@LatinLowercase@symfont\@nil}%
+ {\global\boolfalse{domkern}}%
+ \or % If Greek Uppercase (3)
+ \ifdef{\eu@GreekUppercase@symfont}%
+ {\expandafter\eu@get@familyseriesshape\eu@GreekUppercase@symfont\@nil}%
+ {\global\boolfalse{domkern}}%
+ \or % If Greek Lowercase (4)
+ \ifdef{\eu@GreekLowercase@symfont}%
+ {\expandafter\eu@get@familyseriesshape\eu@GreekLowercase@symfont\@nil}%
+ {\global\boolfalse{domkern}}%
+ \fi
+ \ifdef{\eu@family}%
+ {\expandafter\fontfamily\csname eu@\eu@family mathsfont\endcsname\selectfont}%
+ {\relax}%
+ \ifdef{\eu@series}%
+ {\expandafter\ifstrequal\expandafter{\eu@series}{m}%
+ {\mdseries}%
+ {\relax}%
+ \expandafter\ifstrequal\expandafter{\eu@series}{bx}%
+ {\bfseries}%
+ {\relax}}%
+ {\relax}%
+ \ifdef{\eu@shape}%
+ {\expandafter\ifstrequal\expandafter{\eu@shape}{n}%
+ {\upshape}%
+ {\relax}%
+ \expandafter\ifstrequal\expandafter{\eu@shape}{it}%
+ {\itshape}%
+ {\relax}}%
+ {\relax}%
+ \global\dimen@\XeTeXglyphbounds\@ne\the\XeTeXcharglyph`#1\relax
+ \global\dimen@iv\XeTeXglyphbounds\thr@@\the\XeTeXcharglyph`#1}
+ \dimen@ii 1em
+ \c@eu@\dimen@
+ \c@eu@i\dimen@ii
+ \multiply\c@eu@ 3000\relax
+ \divide\c@eu@i 6\relax
+ \divide\c@eu@\c@eu@i
+ \c@eu@i\c@eu@
+ \ifnum\number\c@eu@ <\eu@minwhitespace
+ \c@eu@\eu@minwhitespace
+ \fi
+ \advance\c@eu@ -\c@eu@i
+ \c@eu@i\c@eu@
+ \divide\c@eu@i\@m
+ \edef\eu@mkern@left{\number\c@eu@i}
+ \multiply\c@eu@i\@m
+ \advance\c@eu@ -\c@eu@i
+ \edef\eu@mkern@left{\eu@mkern@left.\three@digits{\number\c@eu@}mu}
+ \dimen@\dimen@iv
+ \dimen@ii 1em
+ \c@eu@\dimen@
+ \c@eu@i\dimen@ii
+ \multiply\c@eu@ 3000\relax
+ \divide\c@eu@i 6\relax
+ \divide\c@eu@\c@eu@i
+ \c@eu@i\c@eu@
+ \ifnum\number\c@eu@ <\eu@minwhitespace
+ \c@eu@\eu@minwhitespace
+ \fi
+ \advance\c@eu@ -\c@eu@i
+ \c@eu@i\c@eu@
+ \divide\c@eu@i\@m
+ \edef\eu@mkern@right{\number\c@eu@i}
+ \multiply\c@eu@i\@m
+ \advance\c@eu@ -\c@eu@i
+ \edef\eu@mkern@right{\eu@mkern@right.\three@digits{\number\c@eu@}mu}
+ \eu@ifbool{domkern}
+ {\mkern\eu@mkern@left#1\mkern\eu@mkern@right}
+ {#1}}
+
+%% Redefine \" and " in maths mode only. Umlaut and quote definitions remain
+%% in effect in text mode.
+%%
+%% " put the " before a character, e.g $"f$, and the character is
+%% printed with kerns on either side.
+%% \"..." Surround a series of adjacent characters, e.g. $\"abcde"$ is
+%% equivalent to $"a"b"c"d"e$.
+%% Note that the tokens that " and \" operate on MUST be characters because
+%% they are sent through the XeTeX primitive \XeTeXcharglyph as in:
+%%
+%% \XeTeXglyphbounds n \the\XeTeXcharglyph`#1
+%%
+%% where n = 1,2,3,4 and #1 is the character (If #1 is not a character, then
+%% \XeTeXcharglyph`#1 doesn't make sense). Higher level tests are needed to
+%% avoid this problem.
+\let\eu@original@quote="
+\let\eu@original@csquote=\"
+\mathcode`\"="8000
+\newcommand\eu@active@quote{%
+ \ifmmode
+ \expandafter\eu@new@quote
+ \else
+ \expandafter\eu@original@quote
+ \fi}
+\newcommand\eu@active@csquote{%
+ \ifmmode
+ \expandafter\eu@new@csquote
+ \else
+ \expandafter\eu@original@csquote
+ \fi}
+\begingroup
+ \catcode`\"=\active
+ \global\let"=\eu@active@quote
+\endgroup
+\let\"=\eu@active@csquote
+\newcommand\eu@new@quote[1]{\eu@mkern{#1}}
+\def\eu@new@csquote#1"{\eu@mkern{#1}}
+
+%% Redefine LaTeX 2e kernel macros to do Unicode characters too. Add optional
+%% fifth argument. This is a list of control sequences which will be let equal
+%% to the symbol if the symbol exists in the font. If the symbol does not exist
+%% in the font, then the fifth argument is ignored.
+%%
+%% e.g. \XeTeXDeclareMathSymbol{≠}{\mathrel}{font}{"2260}[\neq\ne]
+\def\XeTeXDeclareMathSymbol#1#2#3#4{%
+ \expandafter\in@\csname sym#3\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \if\relax\noexpand#1% is command?
+ \edef\reserved@a{\noexpand\in@{\string\mathchar}{\meaning#1}}%
+ \reserved@a
+ \ifin@
+ \expandafter\XeTeXset@mathsymbol
+ \csname sym#3\endcsname#1#2{#4}%
+ \@font@info{Redeclaring math symbol \string#1}%
+ \else
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\endcsname
+ \relax
+ \expandafter\XeTeXset@mathsymbol
+ \csname sym#3\endcsname#1#2{#4}%
+ \else
+ \@latex@error{Command `\string#1' already defined}\@eha
+ \fi
+ \fi
+ \else
+ \expandafter\XeTeXset@mathchar
+ \csname sym#3\endcsname#1#2{#4}%
+ \fi
+ \endgroup
+ \def\XeTeXDeclareMathSymbol@symbol{#1}%
+ \def\XeTeXDeclareMathSymbol@slot{#4}%
+ \expandafter\XeTeXDeclareMathSymbol@option
+ \else
+ \@latex@error{Symbol font `#3' is not defined}\@eha
+ \expandafter\@gobbleoarg
+ \fi}
+\@onlypreamble\XeTeXDeclareMathSymbol
+\def\XeTeXset@mathchar#1#2#3#4{%
+ \global\XeTeXmathcode`#2="\mathchar@type#3#1#4\relax}
+\@onlypreamble\XeTeXset@mathchar
+\def\XeTeXset@mathsymbol#1#2#3#4{%
+ \global\XeTeXmathchardef#2"\mathchar@type#3#1#4\relax}
+\@onlypreamble\XeTeXset@mathsymbol
+\newcommand\@gobbleoarg[1][]{}
+\newcommand\XeTeXDeclareMathSymbol@option[1][]{%
+ \ifnum\the\XeTeXcharglyph\XeTeXDeclareMathSymbol@slot>\z@
+ \@tfor\i@tfor #1:=\do%
+ {\expandafter\edef\i@tfor{\expandonce\XeTeXDeclareMathSymbol@symbol}}%
+ \fi}
+
+%% Some shorthands, so the same information isn't typed out more than once
+%%
+%% \setallmainfonts(<sets>)[<shapes, font features>]{<font name>}
+%% \setprimaryfont[<shapes, font features>]{<font name>}
+%% \setallsansfonts[<shapes, font features>]{<font name>}
+%% \setallmonofonts[<shapes, font features>]{<font name>}
+\newcommand\setallmainfonts{
+ \@ifnextchar(
+ {\eu@setallmainfonts}
+ {\eu@setallmainfonts(Digits,Latin,Greek)}}
+\def\eu@setallmainfonts(#1){
+ \edef\eu@setmathsfont@Set{#1}
+ \@eu@setallmainfonts}
+\newcommand\@eu@setallmainfonts[2][]{
+ \setmainfont[#1]{#2}
+ \setmathsfont(\eu@setmathsfont@Set)[#1]{#2}
+ \setmathrm[#1]{#2}}
+\newcommand\setprimaryfont{\setallmainfonts(Digits,Latin)}
+\newcommand\setallsansfonts[2][]{
+ \setsansfont[#1]{#2}
+ \setmathsf[#1]{#2}}
+\newcommand\setallmonofonts[2][]{
+ \setmonofont[#1]{#2}
+ \setmathtt[#1]{#2}}
+
+%% Set the particular mathematics alphabets
\ernewcommand\setmathrm[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathrm\zf@family
- \let\eu@ifset@mathrm\@firstofone
- \providecommand\eu@mathbf@shape{n}}
+ \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}
+ \def\operator@font{\expandafter\mathgroup\csname symOperators:m:n\endcsname}}
\ernewcommand\setmathcal[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathcal\zf@family
- \let\eu@ifset@mathcal\@firstofone
- \providecommand\eu@mathcal@series{m}
- \providecommand\eu@mathcal@shape{n}}
+ \DeclareMathAlphabet{\mathcal}{EU1}{\eu@mathcal}{m}{n}}
\ernewcommand\setmathsf[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathsf\zf@family
- \let\eu@ifset@mathsf\@firstofone}
+ \DeclareMathAlphabet{\mathsf}{EU1}{\eu@mathsf}{m}{n}
+ \SetMathAlphabet{\mathsf}{bold}{EU1}{\eu@mathsf}{bx}{n}}
\ernewcommand\setmathtt[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathtt\zf@family
- \let\eu@ifset@mathtt\@firstofone}
+ \DeclareMathAlphabet{\mathtt}{EU1}{\eu@mathtt}{m}{n}}
\ernewcommand\setmathfrak[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathfrak\zf@family
- \let\eu@ifset@mathfrak\@firstofone
- \providecommand\eu@mathfrak@series{m}}
+ \DeclareMathAlphabet{\mathfrak}{EU1}{\eu@mathfrak}{m}{n}}
\ernewcommand\setmathbb[2][]{
\zf@fontspec{#1}{#2}
\let\eu@mathbb\zf@family
- \let\eu@ifset@mathbb\@firstofone
- \providecommand\eu@mathbb@series{m}}
-\newcommand\setprimaryfont[2][]{
- \setmainfont[#1]{#2}
- \setmathsfont[Set=Latin,#1]{#2}
- \setmathrm[#1]{#2}}
-\newcommand\setsansfonts[2][]{
- \setsansfont[#1]{#2}
- \setmathsf[#1]{#2}}
-\newcommand\setmonofonts[2][]{
- \setmonofont[#1]{#2}
- \setmathtt[#1]{#2}}
-\newcommand\eu@setmathsfont[1][Set=Special]{
- \eu@setkeys{Scope}{#1}
- \ifcase\eu@ScopeSet@@value
- \let\eu@ScopeSet@Value\eu@ScopeSet@Special
- \or
- \let\eu@ScopeSet@Value\eu@ScopeSet@Latin
- \or
- \let\eu@ScopeSet@Value\eu@ScopeSet@Greek
- \or
- \let\eu@ScopeSet@Value\eu@ScopeSet@Symbols
- \fi
- \eu@ScopeSet@Value}
-\providecommand\eu@ScopeSet@Special[1]{\relax}
-\newcommand\eu@ScopeSet@Latin[1]{
- \eu@setkeys[Uppercase=Italic,Lowercase=Italic,Digits=Regular]{Latin}{\XKV@rm}
- \eu@fontspec{\XKV@rm}{#1}
- \ifcase\eu@LatinUppercase@@value
- \ernewcommand\eu@LatinUppercase@symfont{Lmn}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinUppercase@true
- \def\operator@font{\mathgroup\symLmn}
- \or
- \ernewcommand\eu@LatinUppercase@symfont{Lmit}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinUppercase@true
- \or\fi
- \ifcase\eu@LatinLowercase@@value
- \ernewcommand\eu@LatinLowercase@symfont{Lmn}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinLowercase@true
- \or
- \ernewcommand\eu@LatinLowercase@symfont{Lmit}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinLowercase@true
- \or\fi
- \ifcase\eu@LatinDigits@@value
- \ernewcommand\eu@LatinDigits@symfont{Lmn}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinDigits@true
- \or
- \ernewcommand\eu@LatinDigits@symfont{Lmit}
- \let\eu@Latinmathsfont\zf@family
- \@eu@LatinDigits@true
- \or\fi}
-\newcommand\eu@ScopeSet@Greek[1]{
- \eu@setkeys[Uppercase=Regular,Lowercase=Italic,Digits=Plain]{Greek}{\XKV@rm}
- \eu@fontspec{\XKV@rm}{#1}
- \ifcase\eu@GreekUppercase@@value
- \ernewcommand\eu@GreekUppercase@symfont{Gmn}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekUppercase@true
- \or
- \ernewcommand\eu@GreekUppercase@symfont{Gmit}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekUppercase@true
- \or\fi
- \ifcase\eu@GreekLowercase@@value
- \ernewcommand\eu@GreekLowercase@symfont{Gmn}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekLowercase@true
- \or
- \ernewcommand\eu@GreekLowercase@symfont{Gmit}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekLowercase@true
- \or\fi
- \ifcase\eu@GreekDigits@@value
- \ernewcommand\eu@GreekDigits@symfont{Gmn}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekDigits@true
- \or
- \ernewcommand\eu@GreekDigits@symfont{Gmit}
- \let\eu@Greekmathsfont\zf@family
- \@eu@GreekDigits@true
- \or\fi}
-\newcommand\eu@ScopeSet@Symbols[1]{
- \@eu@Symbols@true
- \zf@fontspec{}{#1}
- \let\eu@Symbolsmathsfont\zf@family
- \def\eu@Symbls@symfont{Smn}}
-\renewcommand\eu@ScopeSet@Symbols[1]{
- \@eu@Symbols@false}
-\newcommand\eu@VarForms[1]{
- \fontfamily\eu@Greekmathsfont\selectfont
- \eu@setkeys{VarForms}{#1}
- \ifeu@VarForms@beta
- \eu@DeclareMathSymbol{β}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D0}[\beta]
- \eu@DeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}[\varbeta]
- \fi
- \ifeu@VarForms@epsilon
- \eu@DeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}[\varepsilon]
- \eu@DeclareMathSymbol{ε}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F5}[\epsilon]
- \fi
- \ifeu@VarForms@theta
- \eu@DeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}[\vartheta]
- \eu@DeclareMathSymbol{θ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D1}[\theta]
- \fi
- \ifeu@VarForms@kappa
- \eu@DeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}[\varkappa]
- \eu@DeclareMathSymbol{κ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F0}[\kappa]
- \fi
- \ifeu@VarForms@pi
- \eu@DeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}[\varpi]
- \eu@DeclareMathSymbol{π}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D6}[\pi]
- \fi
- \ifeu@VarForms@rho
- \eu@DeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}[\varrho]
- \eu@DeclareMathSymbol{ρ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F1}[\rho]
- \fi
- \ifeu@VarForms@phi
- \eu@DeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}[\varphi]
- \eu@DeclareMathSymbol{φ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D5}[\phi]
- \fi
- \ifeu@VarForms@Theta
- \eu@DeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekLowercase@symfont}{`Θ}[\varTheta]
- \eu@DeclareMathSymbol{Θ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F4}[\Theta]
- \fi}
-\define@choicekey[eu]{Scope}{Set}
- [\eu@ScopeSet@value\eu@ScopeSet@@value]
- {Special,Latin,Greek,Symbols}[Special]{\relax}
-\define@choicekey[eu]{Latin}{Uppercase}
- [\eu@LatinUppercase@value\eu@LatinUppercase@@value]
- {Regular,Italic,Plain}[Italic]{\relax}
-\define@choicekey[eu]{Latin}{Lowercase}
- [\eu@LatinLowercase@value\eu@LatinLowercase@@value]
- {Regular,Italic,Plain}[Italic]{\relax}
-\define@choicekey[eu]{Latin}{Digits}
- [\eu@LatinDigits@value\eu@LatinDigits@@value]
- {Regular,Italic,Plain}[Regular]{\relax}
-\define@choicekey[eu]{Greek}{Uppercase}
- [\eu@GreekUppercase@value\eu@GreekUppercase@@value]
- {Regular,Italic,Plain}[Regular]{\relax}
-\define@choicekey[eu]{Greek}{Lowercase}
- [\eu@GreekLowercase@value\eu@GreekLowercase@@value]
- {Regular,Italic,Plain}[Italic]{\relax}
-\define@choicekey[eu]{Greek}{Digits}
- [\eu@GreekDigits@value\eu@GreekDigits@@value]
- {Regular,Italic,Plain}[Regular]{\relax}
-\define@boolkey[eu]{VarForms}{beta}[True]{\relax}
-\define@boolkey[eu]{VarForms}{epsilon}[True]{\relax}
-\define@boolkey[eu]{VarForms}{theta}[True]{\relax}
-\define@boolkey[eu]{VarForms}{kappa}[True]{\relax}
-\define@boolkey[eu]{VarForms}{pi}[True]{\relax}
-\define@boolkey[eu]{VarForms}{rho}[True]{\relax}
-\define@boolkey[eu]{VarForms}{phi}[True]{\relax}
-\define@boolkey[eu]{VarForms}{Theta}[True]{\relax}
-\newcommand\eu@XeTeXDeclareMathSymbol[4]{
- \expandafter\XeTeXmathcode`#1\mathchar@type#2\csname sym#3\endcsname#4}
-\newcommand\eu@DeclareMathSymbol[4]{
- \ifnum\XeTeXcharglyph#4>0
- \eu@XeTeXDeclareMathSymbol#1#2#3#4
- \fi
- \let\eu@character#1
- \def\eu@@character{#4}
- \futurelet\@tempa\eu@@DeclareMathSymbol}
-\def\eu@@DeclareMathSymbol{
- \ifx\@tempa[
- \let\eu@@@DeclareMathSymbol\eu@DeclareMathSymbol@option
- \else
- \let\eu@@@DeclareMathSymbol\relax
- \fi
- \eu@@@DeclareMathSymbol}
-\def\eu@DeclareMathSymbol@option[#1]{%
- \ifnum\XeTeXcharglyph\eu@@character>0
- \let#1\eu@character
- \fi}
-\let\LaTeXe@DeclareMathSymbol\DeclareMathSymbol
-\newcommand\eu@LaTeXe@DeclareMathSymbol[4]{
- \ifnum\XeTeXcharglyph#4>0
- \LaTeXe@DeclareMathSymbol{#1}{#2}{#3}{#4}
- \fi}
-\let\DeclareMathSymbol\eu@LaTeXe@DeclareMathSymbol
-
-\newcommand\eu@DeclareFonts{
- \let\eu@if@Latin\@gobble
- \if@eu@LatinUppercase@\let\eu@if@Latin\@firstofone\fi
- \if@eu@LatinLowercase@\let\eu@if@Latin\@firstofone\fi
- \if@eu@LatinDigits@\let\eu@if@Latin\@firstofone\fi
- \let\eu@if@Greek\@gobble
- \if@eu@GreekUppercase@\let\eu@if@Greek\@firstofone\fi
- \if@eu@GreekLowercase@\let\eu@if@Greek\@firstofone\fi
- \if@eu@GreekDigits@\let\eu@if@Greek\@firstofone\fi
- \eu@if@Latin{
- \DeclareSymbolFont{Lmn}{EU1}{\eu@Latinmathsfont}{m}{n}
- \DeclareSymbolFont{Lmit}{EU1}{\eu@Latinmathsfont}{m}{it}
- }
- \eu@if@Greek{
- \DeclareSymbolFont{Gmn}{EU1}{\eu@Greekmathsfont}{m}{n}
- \DeclareSymbolFont{Gmit}{EU1}{\eu@Greekmathsfont}{m}{it}}
- \if@eu@Symbols@
- \DeclareSymbolFont{Smn}{EU1}{\eu@Symbolsmathsfont}{m}{n}
- \fi}
-\newcommand\eu@DeclareDigits{
- \let\eu@if@Digits\@gobble
- \if@eu@GreekDigits@
- \let\eu@if@Digits\@firstofone
- \let\eu@Digits@symfont\eu@GreekDigits@symfont
- \let\eu@Digitsmathsfont\eu@Greekmathsfont
- \else
- \if@eu@LatinDigits@
- \let\eu@if@Digits\@firstofone
- \let\eu@Digits@symfont\eu@LatinDigits@symfont
- \let\eu@Digitsmathsfont\eu@Latinmathsfont
- \fi
- \fi
- \eu@if@Digits{
- \fontfamily\eu@Digitsmathsfont\selectfont
- \DeclareMathSymbol{0}{\mathord}{\eu@Digits@symfont}{`0}
- \DeclareMathSymbol{1}{\mathord}{\eu@Digits@symfont}{`1}
- \DeclareMathSymbol{2}{\mathord}{\eu@Digits@symfont}{`2}
- \DeclareMathSymbol{3}{\mathord}{\eu@Digits@symfont}{`3}
- \DeclareMathSymbol{4}{\mathord}{\eu@Digits@symfont}{`4}
- \DeclareMathSymbol{5}{\mathord}{\eu@Digits@symfont}{`5}
- \DeclareMathSymbol{6}{\mathord}{\eu@Digits@symfont}{`6}
- \DeclareMathSymbol{7}{\mathord}{\eu@Digits@symfont}{`7}
- \DeclareMathSymbol{8}{\mathord}{\eu@Digits@symfont}{`8}
- \DeclareMathSymbol{9}{\mathord}{\eu@Digits@symfont}{`9}}}
-\newcommand\eu@DeclareLatinUppercase{
- \if@eu@LatinUppercase@
- \fontfamily\eu@Latinmathsfont\selectfont
- \DeclareMathSymbol{A}{\mathalpha}{\eu@LatinUppercase@symfont}{`A}
- \DeclareMathSymbol{B}{\mathalpha}{\eu@LatinUppercase@symfont}{`B}
- \DeclareMathSymbol{C}{\mathalpha}{\eu@LatinUppercase@symfont}{`C}
- \DeclareMathSymbol{D}{\mathalpha}{\eu@LatinUppercase@symfont}{`D}
- \DeclareMathSymbol{E}{\mathalpha}{\eu@LatinUppercase@symfont}{`E}
- \DeclareMathSymbol{F}{\mathalpha}{\eu@LatinUppercase@symfont}{`F}
- \DeclareMathSymbol{G}{\mathalpha}{\eu@LatinUppercase@symfont}{`G}
- \DeclareMathSymbol{H}{\mathalpha}{\eu@LatinUppercase@symfont}{`H}
- \DeclareMathSymbol{I}{\mathalpha}{\eu@LatinUppercase@symfont}{`I}
- \DeclareMathSymbol{J}{\mathalpha}{\eu@LatinUppercase@symfont}{`J}
- \DeclareMathSymbol{K}{\mathalpha}{\eu@LatinUppercase@symfont}{`K}
- \DeclareMathSymbol{L}{\mathalpha}{\eu@LatinUppercase@symfont}{`L}
- \DeclareMathSymbol{M}{\mathalpha}{\eu@LatinUppercase@symfont}{`M}
- \DeclareMathSymbol{N}{\mathalpha}{\eu@LatinUppercase@symfont}{`N}
- \DeclareMathSymbol{O}{\mathalpha}{\eu@LatinUppercase@symfont}{`O}
- \DeclareMathSymbol{P}{\mathalpha}{\eu@LatinUppercase@symfont}{`P}
- \DeclareMathSymbol{Q}{\mathalpha}{\eu@LatinUppercase@symfont}{`Q}
- \DeclareMathSymbol{R}{\mathalpha}{\eu@LatinUppercase@symfont}{`R}
- \DeclareMathSymbol{S}{\mathalpha}{\eu@LatinUppercase@symfont}{`S}
- \DeclareMathSymbol{T}{\mathalpha}{\eu@LatinUppercase@symfont}{`T}
- \DeclareMathSymbol{U}{\mathalpha}{\eu@LatinUppercase@symfont}{`U}
- \DeclareMathSymbol{V}{\mathalpha}{\eu@LatinUppercase@symfont}{`V}
- \DeclareMathSymbol{W}{\mathalpha}{\eu@LatinUppercase@symfont}{`W}
- \DeclareMathSymbol{X}{\mathalpha}{\eu@LatinUppercase@symfont}{`X}
- \DeclareMathSymbol{Y}{\mathalpha}{\eu@LatinUppercase@symfont}{`Y}
- \DeclareMathSymbol{Z}{\mathalpha}{\eu@LatinUppercase@symfont}{`Z}
- \fi}
-\newcommand\eu@DeclareLatinLowercase{
- \if@eu@LatinLowercase@
- \fontfamily\eu@Latinmathsfont\selectfont
- \DeclareMathSymbol{a}{\mathalpha}{\eu@LatinLowercase@symfont}{`a}
- \DeclareMathSymbol{b}{\mathalpha}{\eu@LatinLowercase@symfont}{`b}
- \DeclareMathSymbol{c}{\mathalpha}{\eu@LatinLowercase@symfont}{`c}
- \DeclareMathSymbol{d}{\mathalpha}{\eu@LatinLowercase@symfont}{`d}
- \DeclareMathSymbol{e}{\mathalpha}{\eu@LatinLowercase@symfont}{`e}
- \DeclareMathSymbol{f}{\mathalpha}{\eu@LatinLowercase@symfont}{`f}
- \DeclareMathSymbol{g}{\mathalpha}{\eu@LatinLowercase@symfont}{`g}
- \DeclareMathSymbol{h}{\mathalpha}{\eu@LatinLowercase@symfont}{`h}
- \DeclareMathSymbol{i}{\mathalpha}{\eu@LatinLowercase@symfont}{`i}
- \DeclareMathSymbol{j}{\mathalpha}{\eu@LatinLowercase@symfont}{`j}
- \DeclareMathSymbol{k}{\mathalpha}{\eu@LatinLowercase@symfont}{`k}
- \DeclareMathSymbol{l}{\mathalpha}{\eu@LatinLowercase@symfont}{`l}
- \DeclareMathSymbol{m}{\mathalpha}{\eu@LatinLowercase@symfont}{`m}
- \DeclareMathSymbol{n}{\mathalpha}{\eu@LatinLowercase@symfont}{`n}
- \DeclareMathSymbol{o}{\mathalpha}{\eu@LatinLowercase@symfont}{`o}
- \DeclareMathSymbol{p}{\mathalpha}{\eu@LatinLowercase@symfont}{`p}
- \DeclareMathSymbol{q}{\mathalpha}{\eu@LatinLowercase@symfont}{`q}
- \DeclareMathSymbol{r}{\mathalpha}{\eu@LatinLowercase@symfont}{`r}
- \DeclareMathSymbol{s}{\mathalpha}{\eu@LatinLowercase@symfont}{`s}
- \DeclareMathSymbol{t}{\mathalpha}{\eu@LatinLowercase@symfont}{`t}
- \DeclareMathSymbol{u}{\mathalpha}{\eu@LatinLowercase@symfont}{`u}
- \DeclareMathSymbol{v}{\mathalpha}{\eu@LatinLowercase@symfont}{`v}
- \DeclareMathSymbol{w}{\mathalpha}{\eu@LatinLowercase@symfont}{`w}
- \DeclareMathSymbol{x}{\mathalpha}{\eu@LatinLowercase@symfont}{`x}
- \DeclareMathSymbol{y}{\mathalpha}{\eu@LatinLowercase@symfont}{`y}
- \DeclareMathSymbol{z}{\mathalpha}{\eu@LatinLowercase@symfont}{`z}
- \fi}
-\newcommand\eu@DeclareGreekUppercase{
- \if@eu@GreekUppercase@
- \fontfamily\eu@Greekmathsfont\selectfont
- \eu@DeclareMathSymbol{Α}{\mathalpha}{\eu@GreekUppercase@symfont}{`Α}[\Alpha]
- \eu@DeclareMathSymbol{Β}{\mathalpha}{\eu@GreekUppercase@symfont}{`Β}[\Beta]
- \eu@DeclareMathSymbol{Γ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Γ}[\Gamma]
- \eu@DeclareMathSymbol{Δ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Δ}[\Delta]
- \eu@DeclareMathSymbol{Ε}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ε}[\Epsilon]
- \eu@DeclareMathSymbol{Ζ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ζ}[\Zeta]
- \eu@DeclareMathSymbol{Η}{\mathalpha}{\eu@GreekUppercase@symfont}{`Η}[\Eta]
- \eu@DeclareMathSymbol{Θ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Θ}[\Theta]
- \eu@DeclareMathSymbol{Ι}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ι}[\Iota]
- \eu@DeclareMathSymbol{Κ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Κ}[\Kappa]
- \eu@DeclareMathSymbol{Λ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Λ}[\Lambda]
- \eu@DeclareMathSymbol{Μ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Μ}[\Mu]
- \eu@DeclareMathSymbol{Ν}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ν}[\Nu]
- \eu@DeclareMathSymbol{Ξ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ξ}[\Xi]
- \eu@DeclareMathSymbol{Ο}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ο}[\Omicron]
- \eu@DeclareMathSymbol{Π}{\mathalpha}{\eu@GreekUppercase@symfont}{`Π}[\Pi]
- \eu@DeclareMathSymbol{Ρ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ρ}[\Rho]
- \eu@DeclareMathSymbol{Σ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Σ}[\Sigma]
- \eu@DeclareMathSymbol{Τ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Τ}[\Tau]
- \eu@DeclareMathSymbol{Υ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Υ}[\Upsilon]
- \eu@DeclareMathSymbol{Φ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Φ}[\Phi]
- \eu@DeclareMathSymbol{Χ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Χ}[\Chi]
- \eu@DeclareMathSymbol{Ψ}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ψ}[\Psi]
- \eu@DeclareMathSymbol{Ω}{\mathalpha}{\eu@GreekUppercase@symfont}{`Ω}[\Omega]
- \eu@DeclareMathSymbol{ϴ}{\mathalpha}{\eu@GreekUppercase@symfont}{"3F4}[\varTheta]
- \eu@DeclareMathSymbol{Ϝ}{\mathalpha}{\eu@GreekUppercase@symfont}{"3DC}[\Digamma]
- \fi}
-\newcommand\eu@DeclareGreekLowercase{
- \if@eu@GreekLowercase@
- \fontfamily\eu@Greekmathsfont\selectfont
- \eu@DeclareMathSymbol{α}{\mathalpha}{\eu@GreekLowercase@symfont}{`α}[\alpha]
- \eu@DeclareMathSymbol{β}{\mathalpha}{\eu@GreekLowercase@symfont}{`β}[\beta]
- \eu@DeclareMathSymbol{γ}{\mathalpha}{\eu@GreekLowercase@symfont}{`γ}[\gamma]
- \eu@DeclareMathSymbol{δ}{\mathalpha}{\eu@GreekLowercase@symfont}{`δ}[\delta]
- \eu@DeclareMathSymbol{ε}{\mathalpha}{\eu@GreekLowercase@symfont}{`ε}[\epsilon]
- \eu@DeclareMathSymbol{ζ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ζ}[\zeta]
- \eu@DeclareMathSymbol{η}{\mathalpha}{\eu@GreekLowercase@symfont}{`η}[\eta]
- \eu@DeclareMathSymbol{θ}{\mathalpha}{\eu@GreekLowercase@symfont}{`θ}[\theta]
- \eu@DeclareMathSymbol{ι}{\mathalpha}{\eu@GreekLowercase@symfont}{`ι}[\iota]
- \eu@DeclareMathSymbol{κ}{\mathalpha}{\eu@GreekLowercase@symfont}{`κ}[\kappa]
- \eu@DeclareMathSymbol{λ}{\mathalpha}{\eu@GreekLowercase@symfont}{`λ}[\lambda]
- \eu@DeclareMathSymbol{μ}{\mathalpha}{\eu@GreekLowercase@symfont}{`μ}[\mu]
- \eu@DeclareMathSymbol{ν}{\mathalpha}{\eu@GreekLowercase@symfont}{`ν}[\nu]
- \eu@DeclareMathSymbol{ξ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ξ}[\xi]
- \eu@DeclareMathSymbol{ο}{\mathalpha}{\eu@GreekLowercase@symfont}{`ο}[\omicron]
- \eu@DeclareMathSymbol{π}{\mathalpha}{\eu@GreekLowercase@symfont}{`π}[\pi]
- \eu@DeclareMathSymbol{ρ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ρ}[\rho]
- \eu@DeclareMathSymbol{σ}{\mathalpha}{\eu@GreekLowercase@symfont}{`σ}[\sigma]
- \eu@DeclareMathSymbol{τ}{\mathalpha}{\eu@GreekLowercase@symfont}{`τ}[\tau]
- \eu@DeclareMathSymbol{υ}{\mathalpha}{\eu@GreekLowercase@symfont}{`υ}[\upsilon]
- \eu@DeclareMathSymbol{φ}{\mathalpha}{\eu@GreekLowercase@symfont}{`φ}[\phi]
- \eu@DeclareMathSymbol{χ}{\mathalpha}{\eu@GreekLowercase@symfont}{`χ}[\chi]
- \eu@DeclareMathSymbol{ψ}{\mathalpha}{\eu@GreekLowercase@symfont}{`ψ}[\psi]
- \eu@DeclareMathSymbol{ω}{\mathalpha}{\eu@GreekLowercase@symfont}{`ω}[\omega]
- \eu@DeclareMathSymbol{ς}{\mathalpha}{\eu@GreekLowercase@symfont}{`ς}[\varsigma]
- \eu@DeclareMathSymbol{ϐ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D0}[\varbeta]
- \eu@DeclareMathSymbol{ϵ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F5}[\varepsilon]
- \eu@DeclareMathSymbol{ϑ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D1}[\vartheta]
- \eu@DeclareMathSymbol{ϰ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F0}[\varkappa]
- \eu@DeclareMathSymbol{ϖ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D6}[\varpi]
- \eu@DeclareMathSymbol{ϱ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3F1}[\varrho]
- \eu@DeclareMathSymbol{ϕ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3D5}[\varphi]
- \eu@DeclareMathSymbol{ϝ}{\mathalpha}{\eu@GreekLowercase@symfont}{"3DD}[\digamma]
- \fi}
-\newcommand\eu@DeclareSymbols{
- \if@eu@Symbols@
- \fontfamily\eu@Symbolsmathsfont\selectfont
- \eu@DeclareMathSymbol{!}{\mathclose}{\eu@Symbols@symfont}{`!}[\exclam]
- \eu@DeclareMathSymbol{+}{\mathbin}{\eu@Symbols@symfont}{`+}[\plus]
- \eu@DeclareMathSymbol{,}{\mathpunct}{\eu@Symbols@symfont}{`,}
- \eu@DeclareMathSymbol{.}{\mathord}{\eu@Symbols@symfont}{`.}
- \XeTeXmathchardef\ldotp=6\symSmn`.
- \eu@DeclareMathSymbol{:}{\mathrel}{\eu@Symbols@symfont}{`:}
- \XeTeXmathchardef\colon=6\symSmn`:
- \eu@DeclareMathSymbol{;}{\mathpunct}{\eu@Symbols@symfont}{`;}[\semicolon]
- \eu@DeclareMathSymbol{<}{\mathrel}{\eu@Symbols@symfont}{`<}[\less]
- \DeclareMathSymbol{=}{\mathrel}{\eu@Symbols@symfont}{`=}
- \let\eq==
- \eu@DeclareMathSymbol{>}{\mathrel}{\eu@Symbols@symfont}{`>}[\greater]
- \eu@DeclareMathSymbol{?}{\mathclose}{\eu@Symbols@symfont}{`?}
- \eu@DeclareMathSymbol{¬}{\mathord}{\eu@Symbols@symfont}{`¬}[\neg]
- \let\lnot\neg
- \eu@DeclareMathSymbol{°}{\mathord}{\eu@Symbols@symfont}{`°}[\degree]
- \eu@DeclareMathSymbol{±}{\mathbin}{\eu@Symbols@symfont}{`±}[\pm]
- \eu@DeclareMathSymbol{µ}{\mathord}{\eu@Symbols@symfont}{`µ}[\micro]
- \eu@DeclareMathSymbol{×}{\mathbin}{\eu@Symbols@symfont}{`×}[\times]
- \eu@DeclareMathSymbol{÷}{\mathbin}{\eu@Symbols@symfont}{`÷}[\div]
- \eu@DeclareMathSymbol{∀}{\mathord}{\eu@Symbols@symfont}{`∀}[\forall]
- \eu@DeclareMathSymbol{∂}{\mathord}{\eu@Symbols@symfont}{`∂}[\partial]
- \eu@DeclareMathSymbol{∃}{\mathord}{\eu@Symbols@symfont}{`∃}[\exists]
- \eu@DeclareMathSymbol{∅}{\mathord}{\eu@Symbols@symfont}{`∅}[\varnothing]
- \eu@DeclareMathSymbol{∆}{\mathord}{\eu@Symbols@symfont}{`∆}[\increment]
- \eu@DeclareMathSymbol{∇}{\mathord}{\eu@Symbols@symfont}{`∇}[\nabla]
- \eu@DeclareMathSymbol{∈}{\mathrel}{\eu@Symbols@symfont}{`∈}[\in]
- \eu@DeclareMathSymbol{∉}{\mathrel}{\eu@Symbols@symfont}{`∉}[\notin]
- \eu@DeclareMathSymbol{∋}{\mathrel}{\eu@Symbols@symfont}{`∋}[\ni]
- \let\owns\ni
- \eu@DeclareMathSymbol{-}{\mathbin}{\eu@Symbols@symfont}{`−}
- \eu@DeclareMathSymbol{−}{\mathbin}{\eu@Symbols@symfont}{`−}[\minus]
- \eu@DeclareMathSymbol{∕}{\mathbin}{\eu@Symbols@symfont}{`∕}[\slash]
- \eu@DeclareMathSymbol{*}{\mathbin}{\eu@Symbols@symfont}{`∗}
- \eu@DeclareMathSymbol{∗}{\mathbin}{\eu@Symbols@symfont}{`∗}[\ast]
- \eu@DeclareMathSymbol{∙}{\mathbin}{\eu@Symbols@symfont}{`∙}[\vysmblkcircle]
- \let\bullet\vysmblkcircle
- \eu@DeclareMathSymbol{∝}{\mathrel}{\eu@Symbols@symfont}{`∝}[\propto]
- \eu@DeclareMathSymbol{∞}{\mathord}{\eu@Symbols@symfont}{`∞}[\infty]
- \eu@DeclareMathSymbol{∟}{\mathord}{\eu@Symbols@symfont}{`∟}[\rightangle]
- \eu@DeclareMathSymbol{∠}{\mathord}{\eu@Symbols@symfont}{`∠}[\angle]
- \eu@DeclareMathSymbol{∧}{\mathbin}{\eu@Symbols@symfont}{`∧}[\wedge]
- \let\land\wedge
- \eu@DeclareMathSymbol{∨}{\mathbin}{\eu@Symbols@symfont}{`∨}[\vee]
- \let\lor\vee
- \eu@DeclareMathSymbol{∩}{\mathbin}{\eu@Symbols@symfont}{`∩}[\cap]
- \eu@DeclareMathSymbol{∪}{\mathbin}{\eu@Symbols@symfont}{`∪}[\cup]
- \eu@DeclareMathSymbol{∴}{\mathord}{\eu@Symbols@symfont}{`∴}[\therefore]
- \eu@DeclareMathSymbol{∼}{\mathrel}{\eu@Symbols@symfont}{`∼}[\sim]
- \eu@DeclareMathSymbol{≅}{\mathrel}{\eu@Symbols@symfont}{`≅}[\cong]
- \eu@DeclareMathSymbol{≈}{\mathrel}{\eu@Symbols@symfont}{`≈}[\approx]
- \eu@DeclareMathSymbol{≠}{\mathrel}{\eu@Symbols@symfont}{`≠}[\neq]
- \let\ne\neq
- \eu@DeclareMathSymbol{≡}{\mathrel}{\eu@Symbols@symfont}{`≡}[\equiv]
- \eu@DeclareMathSymbol{≤}{\mathrel}{\eu@Symbols@symfont}{`≤}[\leq]
- \let\le\leq
- \eu@DeclareMathSymbol{≥}{\mathrel}{\eu@Symbols@symfont}{`≥}[\geq]
- \let\ge\geq
- \eu@DeclareMathSymbol{⊂}{\mathrel}{\eu@Symbols@symfont}{`⊂}[\subset]
- \eu@DeclareMathSymbol{⊃}{\mathrel}{\eu@Symbols@symfont}{`⊃}[\supset]
- \eu@DeclareMathSymbol{⊄}{\mathrel}{\eu@Symbols@symfont}{`⊄}[\nsubset]
- \let\notsubset\nsubset
- \eu@DeclareMathSymbol{⊆}{\mathrel}{\eu@Symbols@symfont}{`⊆}[\subseteq]
- \eu@DeclareMathSymbol{⊇}{\mathrel}{\eu@Symbols@symfont}{`⊇}[\supseteq]
- \eu@DeclareMathSymbol{⊕}{\mathbin}{\eu@Symbols@symfont}{`⊕}[\oplus]
- \eu@DeclareMathSymbol{⊗}{\mathbin}{\eu@Symbols@symfont}{`⊗}[\otimes]
- \eu@DeclareMathSymbol{⊥}{\mathord}{\eu@Symbols@symfont}{`⊥}[\bot]
- \let\perp\bot
- \eu@DeclareMathSymbol{⋅}{\mathbin}{\eu@Symbols@symfont}{`⋅}[\cdot]
- \XeTeXmathchardef\cdotp=6\symSmn`⋅
- \fi}
-\AtBeginDocument{
- \if@eu@amsmathloaded@\else
- \eu@isloaded[\PackageError{mathspec}{Package amsmath must be loaded before mathspec}{}]{amsmath}
- \fi
- \eu@DeclareFonts
- \eu@ifnot@plaindigits{\eu@DeclareDigits}
- \eu@DeclareLatinUppercase
- \eu@DeclareLatinLowercase
- \eu@DeclareGreekUppercase
- \eu@DeclareGreekLowercase
- \eu@DeclareSymbols
- \eu@if@varforms{\eu@VarForms}
- \eu@ifset@mathrm{
- \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}{\eu@mathbf@shape}
- \SetMathAlphabet{\mathit}{bold}{EU1}{\eu@mathrm}{bx}{it}
- \@ifundefined{symLmn}{\relax}{\def\operator@font{\mathgroup\symLmn}}}
- \eu@ifset@mathcal{
- \DeclareMathAlphabet{\mathcal}{EU1}{\eu@mathcal}{\eu@mathcal@series}{\eu@mathcal@shape}}
- \eu@ifset@mathsf{
- \DeclareMathAlphabet{\mathsf}{EU1}{\eu@mathsf}{m}{n}
- \SetMathAlphabet{\mathsf}{bold}{EU1}{\eu@mathsf}{bx}{n}}
- \eu@ifset@mathtt{
- \DeclareMathAlphabet{\mathtt}{EU1}{\eu@mathtt}{m}{n}}
- \eu@ifset@mathfrak{
- \DeclareMathAlphabet{\mathfrak}{EU1}{\eu@mathfrak}{\eu@mathfrak@series}{n}}
- \eu@ifset@mathbb{
- \DeclareMathAlphabet{\mathbb}{EU1}{\eu@mathbb}{\eu@mathbb@series}{n}}
- \fontfamily\rmdefault\selectfont
- \let\DeclareMathSymbol\LaTeXe@DeclareMathSymbol}
+ \DeclareMathAlphabet{\mathbb}{EU1}{\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
+%% (It attempted to define \varTheta when mathspec already defined it). Or
+%% should I delay the definition of \varTheta until \AtBeginDocument?
+\let\original@RequirePackage\RequirePackage
+\renewcommand\RequirePackage[2][]{
+ \ifstrequal{#2}{amsmath}
+ {\PackageError{mathspec}
+ {`amsmath' must be loaded earlier than `mathspec'}
+ {Edit the document so that `amsmath' is required earlier than `mathspec'.}}
+ {\relax}
+ \original@RequirePackage[#1]{#2}}
+\@onlypreamble\RequirePackage
+\let\usepackage\RequirePackage
+\@onlypreamble\usepackage
+
+%% Any font changes that mathspec has done are reset by LaTeX 2ε at
+%% \begin{document} using \process@table.
+
\endinput
+
+%% © Andrew Gilbert Moschou 2009
%%
-%% End of file `mathspec.sty'.
+%% This work may be distributed and/or modified under the
+%% 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.
+