From 73f8591735e08fcbd2c9745c7878d0afae79820f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 21 Dec 2012 00:14:26 +0000 Subject: mathastext (20dec12) git-svn-id: svn://tug.org/texlive/trunk@28589 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/mathastext/mathastext.dtx | 5379 +++++++++++--------- .../source/latex/mathastext/mathastext.ins | 115 +- 2 files changed, 3087 insertions(+), 2407 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx index cc3e92703c5..abff1936704 100644 --- a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx +++ b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx @@ -1,12 +1,24 @@ -% \iffalse -*- coding: iso-latin-1; -*- -%<*dtx> -\def\mstdocrevdate{2012/10/25} -\ProvidesFile{mathastext.dtx}[2012/10/25 v1.15g ] -% -% \fi -% \iffalse meta-comment -% Copyright (C) 2011, 2012 by Jean-Francois Burnol +% -*- coding: iso-latin-1; -*- +%<*ins> +\def\pkgname{mathastext} +\def\pkgdate{2012/12/20} +\def\pkgversion{v1.2} +\def\pkgdescription{Use the text font in math mode (jfB)} +% +%% +%% Package `mathastext' by Jean-Francois Burnol +%% Copyright (C) 2011, 2012 by Jean-Francois Burnol +%% +%<*none> +\def\lasttimestamp{Time-stamp: <20-12-2012 11:17:37 CET jfb>} +\def\docdate{2012/12/20} +\def\striptimestamp#1 <#2 #3 #4 #5>{#2 at #3 #4} +\edef\dtxtimestamp{\expandafter\striptimestamp\lasttimestamp} +\ProvidesFile{\pkgname.dtx} + [`\pkgname' source and documentation (\dtxtimestamp)] % +% The copyright statement applies to `mathastext.dtx' and to its derived files. +% % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, % either version 1.3 of this license or (at your @@ -17,33 +29,333 @@ % LaTeX version 2003/12/01 or later. % % Please report errors to jfbu (at) free.fr -% Many examples available at: +% For examples of use of mathastext: % http://jf.burnol.free.fr/mathastext.html % http://jf.burnol.free.fr/showcase.html % -% \fi -% \iffalse -%<*driver> -\documentclass[a4paper]{ltxdoc} +% Installation: +% ============ +% +% `latex mathastext.dtx' or `pdflatex mathastext.dtx' +% Run twice to get the table of contents and the bookmarks right. +% +% `mathastext.sty', `mathastext.ins' and `mathastexttest.tex' are generated on +% the first latex run. +% +% Put `mathastext.sty' at a suitable location within the TeX installation: +% mathastext.sty -> ..path..to../tex/latex/mathastext/ +% +% `mathastext.ins' is for TeX distributions expecting it. +% +% `mathastexttest.tex' is an example of use of the package. +% +\begingroup +\input docstrip.tex +\askforoverwritefalse +\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J% +\string\ProvidesPackage{\pkgname}^^J% +\space[\pkgdate\space\pkgversion\space\pkgdescription]} +\generate{\nopreamble +\file{\pkgname.ins}{\from{\pkgname.dtx}{ins}} +\file{test\pkgname mathversions.tex}{\from{\pkgname.dtx}{mathversions}} +\file{test\pkgname macos.tex}{\from{\pkgname.dtx}{macos}} +\file{test\pkgname linux.tex}{\from{\pkgname.dtx}{linux}} +\file{test\pkgname alphabets.tex}{\from{\pkgname.dtx}{alphabets}} +\usepreamble\pkgpreamble +\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}} +\endgroup +\iffalse +% +%<*ins> +%------------------------------------------------------------------------------- +%% This file `mathastext.ins' is provided for compatibility with TeX +%% distributions expecting to find it for installation of `mathastext.sty'. +%% +%% As usual `latex mathastext.ins' produces `mathastext.sty' from the source +%% `mathastext.dtx' +%% +%% (an already existing `mathastext.sty' in the same repertory will be +%% overwritten) +%% +%% Put `mathastext.sty' in a suitable location within the TeX installation: +%% mathastext.sty -> ................/tex/latex/mathastext/ +%% +%% Some test files are also generated, processing them through latex, pdflatex, +%% lualatex or xetex checks if some of the package commands work as advertised. +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. +%% +\input docstrip.tex +\askforoverwritefalse +\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J% +\string\ProvidesPackage{\pkgname}^^J% +\space[\pkgdate\space\pkgversion\space\pkgdescription]} +\generate{\usepreamble\pkgpreamble +\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}} +\endbatchfile +%------------------------------------------------------------------------------- +% +%<*mathversions> +%------------------------------------------------------------------------------- +%% This file `testmathastextversions.tex' is for testing the enhanced +%% concept of math versions provided by the package `mathastext'. +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. +%% +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage{newcent} +\usepackage[subdued]{mathastext} +\Mathastext[newcent] +\renewcommand\familydefault\ttdefault +\Mathastext[courier] +\renewcommand\familydefault\sfdefault +\Mathastext[avantgarde] +\renewcommand\familydefault\rmdefault +\begin{document} +text in NewCentury and $math\ as\ in\ default$,% +\MTversion{courier} text in Courier and $math\ in\ Courier$,% +\MTversion{avantgarde} text in AvantGarde and $math\ in\ AvantGarde$,% +\MTversion[newcent]{courier} text in NewCentury and $math\ in\ +Courier$,\MTversion{bold} text in bold NewCentury and $math\ as\ in\ +bold\ default$,\MTversion[courier]{avantgarde} text in Courier and +$math\ in\ AvantGarde$. +\end{document} +%------------------------------------------------------------------------------- +% +%<*macos> +%------------------------------------------------------------------------------- +%% This file `testmathastextmacos.tex' is for testing the use of the package +%% `mathastext' with the unicode engines XeTeX or LuaLaTeX. +%% +%% Mac OS X specific fonts are used (10.8.2). +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. +%% +\documentclass{article} +\usepackage[hscale=0.8]{geometry} +\usepackage{multicol} +\usepackage[no-math]{fontspec} +\usepackage{lmodern} +\usepackage[subdued,italic]{mathastext} +\setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler] +\setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter] +\setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum] +\setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot] +\setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic] +\begin{document} +\mathastextversion{normal} +This test uses \verb|mathastext| with its \emph{italic} and \emph{subdued} +options. The base document fonts are the Latin Modern ones. The other fonts used +were chosen from those of a Mac OS machine. +\newcommand\TEST[1]{\MTversion{#1}% +\begin{multicols}{2} +\hbox to\columnwidth{\hbox to\columnwidth{\hfil + $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} + \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } + \centerline{ $0123456789$ } + \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } +\columnbreak + \centerline{ abcdefghijklmnopqrstuvwxyz } + \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } + \centerline{ 0123456789 } + \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } +\end{multicols}} +\begin{multicols}{2} + \centerline{\textbf{math mode}} +\columnbreak + \centerline{ \textbf{text} } +\end{multicols} +\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum} +\TEST{Hoefler}\TEST{Typewriter}\TEST{bold} +\end{document} +%------------------------------------------------------------------------------- +% +%<*linux> +%------------------------------------------------------------------------------- +%% This file `testmathastextlinux.tex' is for testing the use of the package +%% `mathastext' with the unicode engines XeTeX or LuaLaTeX. +%% +%% Fonts available on a Linux machine are used. +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. +%% +\documentclass{article} +\usepackage[hscale=0.8]{geometry} +\usepackage{multicol} +\usepackage[no-math]{fontspec} +\usepackage{lmodern} +\usepackage[subdued,italic]{mathastext} +\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana] +\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial] +\setmainfont[Color=00FF00]{DejaVu Serif} \Mathastext[DejaVu] +\MTDeclareVersion{times}{T1}{ptm}{m}{n} +\MTlettershape{n} +\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale] +\begin{document} +\mathastextversion{normal} +This test uses \verb|mathastext| with its \emph{italic} and \emph{subdued} +options. The base document fonts are the Latin Modern ones. The other fonts used +were chosen from those of a Linux machine. +\newcommand\TEST[1]{\MTversion{#1}% +\begin{multicols}{2} +\hbox to\columnwidth{\hbox to\columnwidth{\hfil + $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} + \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } + \centerline{ $0123456789$ } + \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } +\columnbreak + \centerline{ abcdefghijklmnopqrstuvwxyz } + \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } + \centerline{ 0123456789} + \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } +\end{multicols}} +\begin{multicols}{2} + \centerline{\textbf{math mode}} +\columnbreak + \centerline{ \textbf{text} } +\end{multicols} +\TEST{DejaVu}\TEST{Verdana}\TEST{times}\TEST{Andale} +\TEST{Arial}\TEST{bold}\TEST{normal} +\end{document} +%------------------------------------------------------------------------------- +% +%<*none> +\fi +\catcode`\~0\catcode`\\12 +~iffalse +% +%<*alphabets> +%------------------------------------------------------------------------------- +%% This file `testmathastextalphabets.tex' is for testing the extended +%% scope of the math alphabet commands with package `mathastext'. +%% +%% Packages amsmath, mathtools, babel are loaded for extra-checking of +%% compatibilities. +%% +%% Compile either with latex, pdflatex, lualatex (pdf output) or xelatex. +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. +%% +\documentclass{article} +\usepackage{amsmath} +\usepackage{mathtools} +\usepackage{iftex} +\ifXeTeX +\usepackage[no-math]{fontspec} +\setmainfont[ExternalLocation, + Mapping=tex-text, + BoldFont=texgyretermes-bold, + ItalicFont=texgyretermes-italic, + BoldItalicFont=texgyretermes-bolditalic]{texgyretermes-regular} +\setmonofont[ExternalLocation, + Mapping=tex-text]{texgyrecursor-regular} +\setsansfont[ExternalLocation, + Mapping=tex-text]{texgyreheros-regular} +\else +\ifLuaTeX % for pdf output +\usepackage[no-math]{fontspec} +\setmainfont[Ligatures=TeX]{TeX Gyre Termes} +\setmonofont[Ligatures=TeX]{TeX Gyre Cursor} +\setsansfont[Ligatures=TeX]{TeX Gyre Heros} +\else +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{tgtermes} +\usepackage{tgcursor} +\usepackage{tgheros} +\fi\fi +\usepackage[french]{babel} +\usepackage[italic]{mathastext} +\explicitbracesobeymathalphabets +\delimitershortfall-1pt +\begin{document} +\[\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = +\sec(d)]\right]\right)\biggr)\Biggr\rbrace\] +\[\mathnormalbold{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = + \sec(d)]\right]\right)\biggr)\Biggr\rbrace}\] +\[\mathrm{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = + \sec(d)]\right]\right)\biggr)\Biggr\rbrace}\] +\[\mathbf{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = +\sec(d)]\right]\right)\biggr)\Biggr\rbrace}\] +\[\mathit{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = + \sec(d)]\right]\right)\biggr)\Biggr\rbrace}\] +\[\mathtt{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = + \sec(d)]\right]\right)\biggr)\Biggr\rbrace}\] +\[\mathsf{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = + \sec(d)]\right]\right)\biggr)\Biggr\rbrace}\] +\begin{tabular}{ccccccc} +$a!b$&$\mathnormalbold{a!b}$&$\mathrm{a!b}$&$\mathbf{a!b}$&$\mathit{a!b}$&$\mathtt{a!b}$&$\mathsf{a!b}$\\ +$a?b$&$\mathnormalbold{a?b}$&$\mathrm{a?b}$&$\mathbf{a?b}$&$\mathit{a?b}$&$\mathtt{a?b}$&$\mathsf{a?b}$\\ +$a,b$&$\mathnormalbold{a,b}$&$\mathrm{a,b}$&$\mathbf{a,b}$&$\mathit{a,b}$&$\mathtt{a,b}$&$\mathsf{a,b}$\\ +$a;b$&$\mathnormalbold{a;b}$&$\mathrm{a;b}$&$\mathbf{a;b}$&$\mathit{a;b}$&$\mathtt{a;b}$&$\mathsf{a;b}$\\ +$a:b$&$\mathnormalbold{a:b}$&$\mathrm{a:b}$&$\mathbf{a:b}$&$\mathit{a:b}$&$\mathtt{a:b}$&$\mathsf{a:b}$\\ +$a\colon b$&$\mathnormalbold{a\colon b}$&$\mathrm{a\colon b}$&$\mathbf{a\colon b}$&$\mathit{a\colon b}$&$\mathtt{a\colon b}$&$\mathsf{a\colon b}$\\ +$a.b$&$\mathnormalbold{a.b}$&$\mathrm{a.b}$&$\mathbf{a.b}$&$\mathit{a.b}$&$\mathtt{a.b}$&$\mathsf{a.b}$\\ +$a-b$&$\mathnormalbold{a-b}$&$\mathrm{a-b}$&$\mathbf{a-b}$&$\mathit{a-b}$&$\mathtt{a-b}$&$\mathsf{a-b}$\\ +$a+b$&$\mathnormalbold{a+b}$&$\mathrm{a+b}$&$\mathbf{a+b}$&$\mathit{a+b}$&$\mathtt{a+b}$&$\mathsf{a+b}$\\ +$a=b$&$\mathnormalbold{a=b}$&$\mathrm{a=b}$&$\mathbf{a=b}$&$\mathit{a=b}$&$\mathtt{a=b}$&$\mathsf{a=b}$\\ +$ab$&$\mathnormalbold{a>b}$&$\mathrm{a>b}$&$\mathbf{a>b}$&$\mathit{a>b}$&$\mathtt{a>b}$&$\mathsf{a>b}$\\ +$$&$\mathnormalbold{}$&$\mathrm{}$&$\mathbf{}$&$\mathit{}$&$\mathtt{}$&$\mathsf{}$\\ +$\mathopen{<} x,y\mathclose{>}$&$\mathnormalbold{\mathopen{<} x,y\mathclose{>}}$&$\mathrm{\mathopen{<}x,y\mathclose{>}}$&$\mathbf{\mathopen{<} x,y\mathclose{>}}$&$\mathit{\mathopen{<} x,y\mathclose{>}}$&$\mathtt{\mathopen{<} x,y\mathclose{>}}$&$\mathsf{\mathopen{<} x,y\mathclose{>}}$\\ +$\left< x,y\right>$&$\mathnormalbold{\left< x,y\right>}$&$\mathrm{\left< x,y\right>}$&$\mathbf{\left< x,y\right>}$&$\mathit{\left< x,y\right>}$&$\mathtt{\left< x,y\right>}$&$\mathsf{\left< x,y\right>}$\\ +$a/b$&$\mathnormalbold{a/b}$&$\mathrm{a/b}$&$\mathbf{a/b}$&$\mathit{a/b}$&$\mathtt{a/b}$&$\mathsf{a/b}$\\ +$a\backslash b$&$\mathnormalbold{a\backslash b}$&$\mathrm{a\backslash b}$&$\mathbf{a\backslash b}$&$\mathit{a\backslash b}$&$\mathtt{a\backslash b}$&$\mathsf{a\backslash b}$\\ +$a\setminus b$&$\mathnormalbold{a\setminus b}$&$\mathrm{a\setminus b}$&$\mathbf{a\setminus b}$&$\mathit{a\setminus b}$&$\mathtt{a\setminus b}$&$\mathsf{a\setminus b}$\\ +$a|b$&$\mathnormalbold{a|b}$&$\mathrm{a|b}$&$\mathbf{a|b}$&$\mathit{a|b}$&$\mathtt{a|b}$&$\mathsf{a|b}$\\ +$a\mid b$&$\mathnormalbold{a\mid b}$&$\mathrm{a\mid b}$&$\mathbf{a\mid b}$&$\mathit{a\mid b}$&$\mathtt{a\mid b}$&$\mathsf{a\mid b}$\\ +$(a,b)$&$\mathnormalbold{(a,b)}$&$\mathrm{(a,b)}$&$\mathbf{(a,b)}$&$\mathit{(a,b)}$&$\mathtt{(a,b)}$&$\mathsf{(a,b)}$\\ +$[a,b]$&$\mathnormalbold{[a,b]}$&$\mathrm{[a,b]}$&$\mathbf{[a,b]}$&$\mathit{[a,b]}$&$\mathtt{[a,b]}$&$\mathsf{[a,b]}$\\ +$\{a,b\}$&$\mathnormalbold{\{a,b\}}$&$\mathrm{\{a,b\}}$&$\mathbf{\{a,b\}}$&$\mathit{\{a,b\}}$&$\mathtt{\{a,b\}}$&$\mathsf{\{a,b\}}$ +\end{tabular} +\end{document} +%------------------------------------------------------------------------------- +% +%<*none> +~fi +~catcode`~\0 +\catcode`\~\active +\documentclass[a4paper,fontsize=11pt,abstract]{scrdoc} %\OnlyDescription -\CheckSum{3901} -\usepackage{color}\usepackage{xspace} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{lmodern} + +\makeatletter\let\check@percent\relax\makeatother + +\usepackage{color} \definecolor{DarkMagenta}{RGB}{139,0,139} -\definecolor{ChoisiJeNeSaisPlusComment}{RGB}{225,95,0} +\definecolor{joli}{RGB}{225,95,0} +\usepackage{xspace} \usepackage{metalogo} +\usepackage{framed} + \usepackage{amsmath}\allowdisplaybreaks + \usepackage[hscale=0.66]{geometry} -\usepackage[%dvipdfmx,% pdftex creates a 3 to 4 times bigger file! + +\usepackage[%dvipdfmx,% in contrast, pdftex creates a 3 to 4 times bigger file! pdfencoding=pdfdoc,% bookmarks=true,% -bookmarksopen=true,%dvipdfmx-outline-open,% +bookmarksopen=true,dvipdfmx-outline-open,% ]{hyperref} -% -\hypersetup{,% -colorlinks=true,% -linkcolor={red},% -citecolor={red},% -urlcolor={ChoisiJeNeSaisPlusComment}, + +\hypersetup{linktoc=all,% +hidelinks,% +breaklinks=true,% +% linkcolor={red},% +% citecolor={red},% +urlcolor={joli}, pdfauthor={Jean-Fran\c cois Burnol},% pdftitle={The mathastext package},% pdfsubject={LaTeX, math fonts},% @@ -51,1318 +363,1527 @@ pdfkeywords={LaTeX, Fonts},% pdfstartview=FitH,% pdfpagemode=UseOutlines,% } -%% + +\DeclareRobustCommand\cs[1]{{\ttfamily\hyphenchar\font45\char`\\#1}} +\DeclareRobustCommand\csb[1]{{% +\color{blue}\ttfamily\hyphenchar\font45\char`\\#1}} + +\newcommand\cshyp[1]{\texorpdfstring{\cs{#1}}{\textbackslash #1}} +\newcommand\csbhyp[1]{\texorpdfstring{\csb{#1}}{\textbackslash #1}} +\newcommand\blueit[1]{\texorpdfstring{{\color{blue}\ttfamily #1}}{#1}} +\newcommand\lowast{\raisebox{-.25\height}{*}} +\newcommand\starit[1]{\cs{#1\lowast}} +\newcommand\staritb[1]{\csb{#1\lowast}} + +\newif\iftoggled +\catcode`\§=13 +\def§{\iftoggled\endgroup\toggledfalse\xspace\else + \toggledtrue\begingroup\color{blue}\ttfamily\expandafter\string\fi} + +\newcommand\mst{% +\texorpdfstring{{\color{joli}\ttfamily\bfseries mathastext}} +{mathastext}\xspace} + \let\oldexists\exists\let\oldforall\forall -\usepackage[T1]{fontenc} -\usepackage{lmodern} -\usepackage[italic,subdued,defaultmathsizes,% -symbolmisc,symbolre,LGRgreek]{mathastext} -\MTupgreek\MTgreekfont{cmtt} + +\usepackage[italic,subdued,defaultmathsizes,symbolmisc,symbolre, +LGRgreek]{mathastext} + +\Mathastext[italic] +\MTlettershape{\updefault} +\Mathastext[upright] + +\MTupgreek +\MTgreekfont{cmtt} \MTDeclareVersion[n]{lmvtt}{T1}{lmvtt}{m}{n} -% + +\MTlettershape{\itdefault} \usepackage{newcent} \Mathastext[newcent] -% + \MTitgreek\MTupGreek\MTgreekfont{txr} \usepackage{times} \Mathastext[times] -% + \usepackage[scaled]{helvet} \renewcommand\familydefault\sfdefault \MTgreekfont{cmss} \Mathastext[helvet] + +\usepackage{etoc} + \begin{document} \MTversion{normal} \renewcommand\familydefault\sfdefault -\DocInput{mathastext.dtx} + +\frenchspacing + +\begin{center} + {\normalfont\Large The \mst package}\\ +\textsc{Jean-François Burnol}\par + \footnotesize \ttfamily + jfbu (at) free (dot) fr\\ + Package version: \pkgversion\ (\pkgdate)\\ + Documentation generated from the source file\\ + with timestamp ``\dtxtimestamp'' +\end{center} + + + \begin{abstract} + The \mst package changes the fonts which are used in math mode for letters, + digits and a few other punctuation and symbol signs to replace them with the + font as used for the document text. Thus, the package makes it possible to + use a quite arbitrary font without worrying too much that it does not have + specially designed accompanying math fonts. Also, \mst provides a simple + mechanism in order to use more than one math-as-text font in the same + document. + \end{abstract} + +\etoctoclines +\tableofcontents + +\section{What \mst does} + +\subsection{Examples} + +\mst's basic aim is to have the same font for text and mathematics. With +hundreds of free text fonts packaged for \LaTeX{} and only a handful of +math ones, chances are your favorite text font does not mix so well with +the available math ones; \mst may then help. + +Here is an example with +Latin Modern typewriter proportional: + +{\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth + \MTversion{lmvtt} +Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential +system $(VI_{\nu,n})$: + \begin{align*} + a\frac{d}{da} X &= \nu + X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ +a\frac{d}{da} Y &= -(\nu+1) Y + + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} + \end{align*} +then the quantity $q = a \frac{aX+Y}{X+aY}$ +satisfies as function of $b= a^2$ the $P_{VI}$ differential equation: +\begin{equation*} +\begin{split} + \frac{d^2 q}{db^2} = \frac12\left\{\frac1q+\frac1{q-1} + +\frac1{q-b}\right\}\left(\frac{dq}{db}\right)^2 - \left\{\frac1b+\frac1{b-1} + +\frac1{q-b}\right\}\frac{dq}{db}\\+\frac{q(q-1)(q-b)}{b^2(b-1)^2}\left\{\alpha+\frac{\beta + b}{q^2} + \frac{\gamma (b-1)}{(q-1)^2}+\frac{\delta + b(b-1)}{(q-b)^2}\right\} +\end{split} +\end{equation*} +with +parameters +$(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, +\frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par +} +Notice that the Latin (and Greek letters) are in upright shape. But perhaps we +insist on obeying the standardized habits: + + +{\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth +\MTversion{times} +Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential +system $(VI_{\nu,n})$: + \begin{align*} + a\frac{d}{da} X &= \nu + X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ +a\frac{d}{da} Y &= -(\nu+1) Y + + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} + \end{align*} +then the quantity $q = a \frac{aX+Y}{X+aY}$ +satisfies as function of $b= a^2$ the $P_{VI}$ differential equation: +\begin{equation*} +\begin{split} + \frac{d^2 q}{db^2} = \frac12\left\{\frac1q+\frac1{q-1} + +\frac1{q-b}\right\}\left(\frac{dq}{db}\right)^2 - \left\{\frac1b+\frac1{b-1} + +\frac1{q-b}\right\}\frac{dq}{db}\\+\frac{q(q-1)(q-b)}{b^2(b-1)^2}\left\{\alpha+\frac{\beta + b}{q^2} + \frac{\gamma (b-1)}{(q-1)^2}+\frac{\delta + b(b-1)}{(q-b)^2}\right\} +\end{split} +\end{equation*} +with +parameters +$(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, +\frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par +} + + This was typeset using the Times font (available in any \TeX{} + distribution). Let us now be a bit more original and have our mathematics + with italic letters from the sans serif font Helvetica, while the letters in + text use New Century Schoolbook. + + +{\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth +\MTversion[newcent]{helvet} +Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential +system $(VI_{\nu,n})$: + \begin{align*} + a\frac{d}{da} X &= \nu + X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ +a\frac{d}{da} Y &= -(\nu+1) Y + + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} + \end{align*} +then the quantity $q = a \frac{aX+Y}{X+aY}$ +satisfies as function of $b= a^2$ the $P_{VI}$ differential equation: +\begin{equation*} +\begin{split} + \frac{d^2 q}{db^2} = \frac12\left\{\frac1q+\frac1{q-1} + +\frac1{q-b}\right\}\left(\frac{dq}{db}\right)^2 - \left\{\frac1b+\frac1{b-1} + +\frac1{q-b}\right\}\frac{dq}{db}\\+\frac{q(q-1)(q-b)}{b^2(b-1)^2}\left\{\alpha+\frac{\beta + b}{q^2} + \frac{\gamma (b-1)}{(q-1)^2}+\frac{\delta + b(b-1)}{(q-b)^2}\right\} +\end{split} +\end{equation*} +with +parameters +$(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, +\frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par +} + +And after all that, we may wish to return to the default math typesetting (let's +shorten the extract here in case the reader makes an indigestion \dots): + +{\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth +Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential +system $(VI_{\nu,n})$: + \begin{align*} + a\frac{d}{da} X &= \nu + X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ +a\frac{d}{da} Y &= -(\nu+1) Y + + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} + \end{align*} +then the quantity $q = a \frac{aX+Y}{X+aY}$ +satisfies as function of $b= a^2$ the $P_{VI}$ differential equation with +parameters +$(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, +\frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par +} + + \vskip\baselineskip Notice that the Greek letters also changed + according to the \emph{math version}: \mst has indeed some (limited) + capabilities to this effect, with its §LGRgreek§ option. This + document uses the |LGR| encoded fonts |cmtt|, |cmss|, and |txr|, + which are part of standard \TeX{} + distributions.\footnote{The first two are available (with no need to + load explicitely any package in the document) via the combination + |cbfonts| (|cbgreek-complete|) \& |babel|, and the |LGR| encoded |txr| font + (again no package loading is necessary) is part of the files of the + |txfonstb| package.} + +% \href{http://mirrors.ctan.org/help/Catalogue/entries/cbgreek-complete.html}{cbfonts}, +% \href{http://mirrors.ctan.org/help/Catalogue/entries/txfontsb.html}{txfontsb}. + +\subsection{Overview} + +\subsubsection{Basic use} + +The initial ideology of \mst was to produce mathematical texts with +a very uniform look, not separating math from text as strongly as +is usually done. + +As soon as one tries out other fonts for text than the Computer Modern +ones one realizes how extremely ``thin'' are the default \TeX{} fonts +for mathematics: they definitely do not fit well visually with the +majority of text fonts. With \mst one can get one's (simple\dots{} or +not) mathematics typeset in a manner more compatible with the text, +without having to look for an especially designed font. + +Here is a minimal example of what may go into +the preamble: +\begin{verbatim} +\usepackage[T1]{fontenc} +\usepackage{times} +\usepackage[italic]{mathastext} +\end{verbatim} + +All letters, digits, and punctuation signs inside math mode will then be +typeset in Times.\footnote{let's do as if we did not know the excellent + |txfonts| package which employs Times for text and has a very complete + math support, including many additional mathematical glyphs in + comparison to the CM fonts.} The exact list of characters concerned by +\mst is a subset of the basic |ASCII| set: + + \begin{framed}\centering + \begingroup\color{joli}\bfseries + {abcdefghijklmnopqrstuvwxyz}\\ + {ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ + {0123456789}\\ + \DeleteShortVerb{\|}% + {!\,?\,*\,,\,.\,:\,;\,+\,\textendash\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\} {\color{black}\mdseries and + }\char92}\endgroup\MakeShortVerb{\|} + \end{framed} + +As one can see, this is a very limited list! some possibilities are offered by +\mst for Greek letters and will be described later. + +The |ascii| characters {}'{} and {}-{} are not in the list: +\begin{itemize} +\item the derivative sign ${}'$ is left to its default as the text font + glyph {}'{} is not, as a rule, a satisfying alternative.\footnote{|v1.2| adds + a customizable tiny space before ${}'$ to separate it from the previous + letter, this is really needed when using upright letters in math mode with + the CM derivative glyph.{\MTversion{upright}\sffamily\MTprimeskip{.5mu}% + Compare $f'$ with \MTprimeskip{0mu}$f'$.} } +\item for the minus sign \mst uses the endash character + \textendash, if available, and not the hyphen character -. +\end{itemize} + +Nothing is changed to the ``large'' math symbols, except for +$\defaultprod$ and $\defaultsum$ in inline math which, like here: +$\prod\sum$, will be taken from the Symbol Font if option §symbolmisc§ +was used. + +\subsubsection{option \blueit{italic}} + + The §italic§ option tells the letters to be in italic shape (they will be + upright in operator names), as is the standardized habit. + + The built-in placement routines of \TeX{} in math mode expect the math + italic to have some (tiny) white space around them, so that they don't + ``stick'' to other symbols, such as a $\defaultprod$: compare + {\itshape if\hbox{$\mathsurround0pt\defaultprod$}} with a pure math + mode $if\defaultprod$. Compare also (as is done in any book on + \LaTeX{}) the text italic with the math italic (here for Latin + Modern):\footnote{Text fonts are equipped with ligature rules. The + French Cursive font for example has complex ligature rules and they + make cohabitation with \mst somewhat difficult in + that case.}\\ + \centerline{\itshape abcdefghijklmnopqrstuvwxyz} + \centerline{$abcdefghijklmnopqrstuvwxyz$} + + Using the §italic§ option will thus never be a fully satisfying + substitute to having a true math italic font, but it may be partially + satisfying. + + +\subsubsection{sans in math} + +The following set-up often gives esthetically pleasing results: it is to +use the sans-serif member of the font family for math, and the serif for +text. +\begin{verbatim} +\renewcommand\familydefault\sfdefault +\usepackage{mathastext} +\renewcommand\familydefault\rmdefault +\begin{document} +\end{verbatim} + +\subsubsection{always load \mst last} + + As said already none of the ``large'' math symbols is modified in + any way by \mst. Only loading some math font packages such as + |fourier|, |kpfonts|, |mathabx|, |mathdesign|, |txfonts|, etc\dots{} + will change them. Think of loading these packages before \mst, else + they might undo what \mst did. The more common symbols can be taken + from the Symbol font (option §symbolmisc§, or §symbolmax§ to get + also the Greek letters from Symbol). + +\subsubsection{option \blueit{LGRgreek}} + + There is the issue of Greek letters. Sometimes the text font has + Greek glyphs, in |LGR| encoding (this will be mentioned in the + documentation of the font package). Then option §LGRgreek§ tells + \mst to pick up these Greek letters. And it is possible to specify + whether the Greek letters should be upright, or + ``italic''.\footnote{a more detailed discussion comes next. Note + that the default CM and its replacement Latin Modern for european + languages are (transparently to the user) extended with |LGR| + encoded fonts from the |cbfonts| (|cbgreek-complete|) + package.} Of course it is always possible to leave the + responsability to set up Greek letters in math mode to packages + loaded previously to \mst. + + % \href{http://mirrors.ctan.org/help/Catalogue/entries/cbgreek-complete.html}{cbfonts} + +\subsubsection{avoid \texorpdfstring{\texttt{OT1}}{OT1} encoding} + + We specified in our minimal working example a |T1| encoding (|LY1| would + have been ok, too) because the default |OT1| does not have the + {\color{joli}\DeleteShortVerb{\|} + $\mathord{<}\,\mathord{>}\,\mathord{|}$\,\{\,\}} and + {\color{joli}$\backslash$\MakeShortVerb{\|}} glyphs. If + \mst detects |OT1| as the default encoding it will leave these characters to + their defaults from the math fonts.\footnote{the §subdued§ option, described next, + acts a bit otherwise, it forces, contrarily to its usual low-key character, + the replacement of |OT1| by |T1| for the fonts ultimately used with letters + and digits in math mode.} +\begin{framed} + If \mst detects the obsolete |OT1| encoding it does not do anything with + \DeleteShortVerb{\|}<, >, |, \{, and \} which (except for monospace fonts) + are not available in that encoding.\MakeShortVerb{\|} + To fully benefit from \mst it is + recommended to use some other encoding having these glyphs such as |T1| or + |LY1|. +\end{framed} + +\subsection{Main options} + + \subsubsection{The \blueit{italic} option} + +In the initial version |1.0|, the Latin letters in +mathematical mode assumed the exact same shape as in +text mode, and this meant, generally speaking, that +they would turn up upright. Doing this gives a very +uniform look to the document, so that one has to make +an effort and read it with attention, and this was +one of the design goals of \mst. + +Nevertheless, soon after I posted the initial version +of the package to CTAN, I was overwhelmed by +numerous\footnote{this means ``more then one.''} +questions\footnote{I thank in particular +Tariq~\textsc{Perwez} and Kevin~\textsc{Klement} for +their kind remarks (chronological order).} on how to +have the letters be in italic shape. + +The default is still, as in version |1.0|, for everything to be in +upright shape, but it suffices to pass to the package the option +§italic§ to have the Latin letters in math mode in italic +shape.\footnote{more precisely stated, the value of \cs{itdefault} +is used.} There is also an option §frenchmath§ to make the +uppercase letters nevertheless upright, because this is the way of +traditional French mathematical typography.\footnote{more precisely +stated, the value of \cs{shapedefault} is used.} + +\subsubsection{The \blueit{defaultmathsizes} option} + +The default sizes give for subscripts of subscripts barely legible glyphs +(author's opinion!). So \mst makes more reasonable choices. It also +redefines \cs{Huge} and defines a \cs{HUGE} size, copied from +the |moresize| package. To cancel all of this use option +§defaultmathsizes§. + +\subsubsection{The \blueit{subdued} option} + +This option was introduced in |v1.15|. It provides a manner to +switch on the \mst-\emph{ification} only for limited portions of +the document, with the help of the mechanism of math versions. Without the +§subdued§ option, the \emph{mathastextification} applies by default +to the whole of the document (and one may also define additional +math versions in the preamble); with the §subdued§ option the +\emph{mathastextification} is done only in \emph{math versions} distinct from +the standard and bold ones. + +The previous description is in fact a bit optimistic: \mst was not +written initially in order to allow its action to be completely +cancelled, and achieving this would require a complete rewrite of +large portions of the code. In order to really have the displayed math +(almost) as if \mst had not been loaded, one must at a minimum also +use the option §defaultmathsizes§. This does not quite suffice, +because, for example, the colon, the dot, and the minus sign belong +in the default \LaTeX{} math mode set-up to three distinct fonts +whereas \mst will pick (even subdued) the three of them in the same +font, and although it will make a reasonable choice of this font, +this is not a return to the previously prevailing situation. And +then arbitrary packages could have done arbitrary things... so to +be on the safe side one needs the §basic§ option which limits the +mathastextification to letters and digits (and should also be +accompanied by §defaultimath§ which prevents redefinition of the +\cs{imath} macro, and §nohbar§ which prevents redefinition of the +\cs{hbar} macro\dots). And even then, in some circumstances, this +will still not suffice; for example the \emph{euler} package puts +the digits in the same font as the Latin letters in math mode, but +the subdued \mst will pick them up in the same font as used in +operator names, and in the case of the \emph{euler} package, this +is the main document font. So, even subdued, \mst still kicks. But, +as I think is illustrated by the examples given at the start of +this document, the §subdued§ option has its utility, and works +reasonably well. + +Furthermore, the §subdued§ action does \emph{not} extinguish +package options §eulergreek§, §symbolgreek§ or §symbol§. But +§LGRgreek§ is receptive to it. + + +\subsection{Math versions} + +\LaTeX{} has the concept of \emph{math versions}, but most font packages +do not define any such version beyond the default normal and bold (that +they possibly customize to use such or such math font). The package +|unicode-math| for unicode engines fruitfully uses this concept. \mst +uses math versions in order to allow the math mode fonts (for letters, +digits, punctuation and a few other ascii symbols) used in the different +parts of the document to be kept in sync with the text fonts. However +the other math symbols (sums, products, integrals, logical signs, +etc\dots) will be the same throughout the document as it is not in \mst +power to modify them. There are some possibilities to use different sets +of fonts for the Greek letters, though. + +The present document illustrated the use of various fonts, here is its +preamble (slightly stripped-down): +\begin{center} + \begin{minipage}{.8\linewidth} +\begin{verbatim} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage[subdued,italic,defaultmathsizes]{mathastext} +\MTDeclareVersion[n]{lmvtt}{T1}{lmvtt}{m}{n} +\usepackage{newcent} +\Mathastext[newcent] +\usepackage{times} +\Mathastext[times] +\usepackage[scaled]{helvet} +\renewcommand\familydefault\sfdefault +\Mathastext[helvet] +\begin{document}\MTversion{normal} +\end{verbatim} + \end{minipage} +\end{center} +Let us examine this code: it uses once the command §\MTDeclareVersion§ +and three times the command §\Mathastext§, thus defining four +|math versions|\footnote{|math versions| are discussed in the document +|fntguide.pdf| from your \TeX{} distribution.}: |lmvtt|, |newcent|, +|times|, and |helvet|. The names can be taken arbitrarily (they only +need to be suitable arguments to the \LaTeX{} \cs{DeclareMathVersion} +command which is invoked internally, so no spaces in the names). Two +additional math versions preexist: the |normal| and |bold|, which, +because there was the §subdued§ option, were left untouched by \mst. + +Once these |math versions| are defined, +§\Mathastextversion\{name\_of\_version\}§, or equivalently +§\MTversion\{name\_of\_version\}§ in the body of the document +enacts the font switches. As is usual with \LaTeX{} one can limit the +scope to the inside of a group, or also switch back to the main set-up +through issuing \cs{Mathastextversion\{normal\}}. + +When \cs{Mathastext} is used in the preamble, it records the current font +defaults and (except for the |normal| and |bold| versions under the §subdued§ +regime) sets up the math font to be used in that version to be the text font +as found in \cs{familydefault}. But it is still possible for a \mst-declared +math version to have distinct fonts for text and math: +\begin{enumerate} +\item in the body of the \TeX{} source, an optional argument (the name + of a \mst-declared math version) to \cs{MTversion} is allowed, and + for example we used in the source of this document + \cs{MTversion[newcent]\{helvet\}} meaning ``New Century Schoolbook + for the text and Helvetica for the math.'' +\item there are preamble-only commands \cs{MTencoding}, \cs{MTfamily}, + \cs{MTseries}, \cs{MTshape}, \cs{MTlettershape} which tell \mst what + to do (for math \emph{only}) in each math version declared + \emph{afterwards}, independently of the text fonts. +\end{enumerate} + +In the body of the document the \LaTeX{} command +\cs{mathversion}\marg{version\_name} will change only the fonts used in +math mode. It is recommended to use instead the package command +\csb{mathastextversion} (or its synonyms \cs{Mathastextversion}, +\cs{MTversion}, \cs{MTVersion}), with its +mandatory argument \marg{version\_name}. It +\begin{itemize} +\item changes the font used in math mode for letters, digits, operator + names, punctuations and other ascii symbols, +\item changes the font for the document text (if another version name is + additionally passed as optional argument, it uses the corresponding + font for text), +\item resets the |\(family,rm,sf,tt)default|s to their values as + registered at the time +of definition of the version, +\item resets the user-defined extra spaces + after the symbols $\exists$, $\forall$ and before ${}'$ to the values + decided in the preamble on a \emph{per version} basis, +\item does some additional things when the §subdued§ option was specified, +\item does some additional set up for Greek letters, when the + §LGRgreek§ option was used. +\end{itemize} +These version changing commands have their scopes limited to \LaTeX{} +environments or groups. + + +It is sometimes not compatible with \mst to load a font package after +it: the font package may contain instructions to modify the math set-up. +This may be a bit hidden to the user: for example the |epigrafica| +package loads |pxfonts|. Hence it will interfere with \mst if it is +loaded after it.\footnote{may typically give a `too many math alphabets' + error message.} But one can use instead +|\renewcommand{\rmdefault}{epigrafica}|,\footnote{sometimes one needs to + look in the |.sty| file of the font package to figure out the font + name (it is rarely as |epigrafica|, the same as the package name), + and, if one does not know the arcanes of finding |.fd| files in one's + \TeX{} distribution, one should look at the log file of a test + document to see if for example |T1| is available for that font; for + |epigrafica| it is not, only |OT1| and |LGR| are possible.} followed +with \cs{Mathastext}, or also |\MTfamily{epigrafica}\Mathastext| which +will only change the font in math. + +To use |epigrafica| for Greek in math mode one can use the +package option §LGRgreek§ and the command +|\MTgreekfont{epigrafica}\Mathastext|. Or +\cs{usepackage}|{epigrafica}| followed with +|\usepackage[LGRgreek]{mathastext}|. + +\subsection{Greek letters} + +The Computer Modern fonts are very light and thin in comparison +to many text fonts, and as a result rarely mix +well with them (particularly if the Latin letters in +math mode are upright). The following options are +provided by \mst: +\begin{description} +\item[no option:] nothing is done by the + package, Greek letters are the default Computer + Modern ones or have been set-up by other packages; + for example by the |fourier| package with option + `upright', which gives upright Greek letters. +\item[§LGRgreek§:] this is for fonts which additionally to Latin + letters also provide Greek letters in |LGR| encoding. Here is + a list from a 2012 standard \TeX{} installation: the Computer + Modern, Latin Modern, and the CM-LGC fonts; the Greek Font + Society fonts (such as GFS Didot), the epigrafica and kerkis + packages, the txfontsb package which extends the txfonts + package with LGR-encoded Greek letters; the Droid fonts, the + DejaVu fonts, the Comfortaa font, and the Open Sans font. The + |LGR| encoded |CM/LM| fonts (in serif, sans-serif and typewriter + family) give the nice Greek letters in upright shape from the + |cbfonts| package. To get these letters in your \mst math + mode, you can do the following: +\begin{verbatim} +% instructions to load the document fonts: +\usepackage{nice_font} +% and then the following: +\renewcommand{\familydefault}{cmr} % or cmss or cmtt for sans resp. mono +\usepackage[LGRgreek]{mathastext} +\renewcommand{\familydefault}{\rmdefault} +\Mathastext % this re-initializes mathastext with the nice_font, +% without changing the LGR font cmr/cmss/cmtt used for Greek letters +% in math mode. +\begin{document} +\end{verbatim} + If you use the §italic§ option note that the italic Greek + letters from the |cbfonts| are not the same glyphs as + the default Greek letters from the |OML| encoded font |cmmi|. +\item[§eulergreek§:] the Greek letters will be taken from the Euler font (the + document does not have to load the eulervm package, \mst directly uses + some file included in this package, as it provides a mechanism to scale + by an arbitrary factor the Euler font.) The letters are upright. +\item[§symbolgreek§:] the Greek letters will be taken + from the (Adobe Postscript) Symbol font. A command is provided + so that the user can scale the Symbol font to let it + better fit with the text font. The letters are upright. +\item[§selfGreek§:] this option concerns only the eleven Greek + capitals from the |OT1|-encoding. It does nothing for the + lowercase Greek letters. The encoding used in the document does + not have to be |OT1|. +\end{description} + +There is also §LGRgreeks§ which tells \mst to pick up in each math +version the letters from the |LGR| encoded font used in that version, +and §selfGreeks§ to tell \mst to do as for §selfGreek§ but +separately in all math versions. + +The §subdued§ option interacts with the options for Greek letters in the +following way: +\begin{enumerate} +\item in its presence, the §LGRgreek§ and §LGRgreeks§ options cease + to have any effect in the normal and bold math versions, +\item §selfGreek(s)§, §eulergreek§ and §symbolgreek§ act normally, + they are not affected by the presence or absence of §subdued§. +\end{enumerate} + + +\subsubsection{Shape of Greek letters} + +Classic \TeX{} uses in math mode italic lowercase and +upright uppercase Greek letters. French typography uses +upright shape for both lowercase and uppercase. And the +ISO standard is to use italic shape for both lowercase +and uppercase. + +The Euler and Symbol fonts not being available in other than their +default upright shape, this question of shapes for Greek letters +raises issues only in the case of the options §LGRgreek§ and +§selfGreek§. + +The options §frenchmath§, §itgreek§, §upgreek§, §itGreek§ and §upGreek§ +modify the Greek letter shapes according to the following rules, listed +from the lowest to the highest priority: +\begin{description} +\item[no option:] the lowercase Greek letters are in the same shape as + Latin letters, and the uppercase in the same shape as applied to digits + and operator names, +\item[§frenchmath§:] both lowercase and uppercase are in the same shape as + the digits and operator names (most of the time this means ``upright + shape'', but it can be otherwise), +\item[§itgreek,upgreek§:] both lowercase and uppercase are in the + \cs{itdefault}, respectively the \cs{updefault} shape (at the time of + loading the package or at the time of a subsequent call to + \cs{Mathastext} or \cs{MathastextWillUse}), +\item[§itGreek,upGreek§:] same as above, but only for the uppercase + letters. +\end{description} + +So, the default gives the classic \TeX{} behavior when option §italic§ +was passed. Each call to \cs{Mathastext} (or \cs{MathastextWillUse}) +macros (described in a later section) reinitializes the computation of +the shapes. + +As mentioned already the package allows to define various ``math +versions''. In the case of §eulergreek§ or §symbolgreek§ they apply +to all these versions. In the case of the options §LGRgreeks§ or +§selfGreeks§ (notice the additional ``s''), each math version is +assumed to have its text font available in |LGR| (or |OT1| +encoding) and also the shapes will be local to the math version. + +Finally version |1.15c| of \mst introduces new preamble-only +commands to change the shapes, and even the font, used for Greek +letters, in case of package options §LGRgreek§/§selfGreek§. They +are §\MTitgreek§, §\MTupgreek§, §\MTitGreek§, §\MTupGreek§: these +are used like the options and change only the shapes for the math +versions which will be declared \emph{next} in the preamble; and +§\MTgreekfont\{name\_of\_font\}§ will tell the \emph{next} math +versions to use that font family. To use this command you need to +know the (little) name of a suitable font family available in |LGR| +encoding: for example |lmr|, |txr| (needs |txfontsb| +package on your system), |DejaVuSerif-TLF| (needs |dejavu| package +on your system), etc\dots + +\subsection{Extended scope of the math alphabets commands} + +\begingroup +\MTversion{italic} + +Since its initial version, some characters usually unaffected by the +math alphabet commands \cs{mathbf}, \cs{mathtt}, \cs{mathsf}\dots had +been declared by \mst to be of `variable family type', meaning that they +would obey these commands: for example the hash sign $\#$ (input as +|$\#$|), which gives $\mathbf{\#}$ under \cs{mathbf} (\mst, especially +in its beginnings, wanted as many characters as possible to be picked up +from the text font family and to behave similarly to letters and digits). + +So it was especially frustrating that mathematical characters such as $+$, or +$<$, or $]$ could not be declared of `variable family' as this would, for +reasons of the inner workings of \TeX{}, not be compatible with the +automatically decided spaces put by \TeX{} around them, depending on the +context. + +A revolutionary ;-) novelty is introduced with version |1.2| of the package: +\begin{enumerate} +\item the pre-declared or user-declared (using the |amsmath| + \cs{DeclareMathOperator} or equivalent) operator names obey the math + alphabet commands, +\item all non alphabetical characters treated by \mst (among them $!$, + $?$, $<$, $>$, $=$, $+$, $-$, $($, $)$, $[$, $]$, $\backslash$, + $\vert$, etc\dots) will also obey the math alphabet commands (when + they are not used as delimiters). The spaces added by \TeX{} before + and after are not modified. +\end{enumerate} +Let us compare for example the new behavior of \cs{mathtt} and \cs{mathbf} +\operatornamesobeymathalphabets\nonlettersobeymathalphabets +\[ \mathtt{(\sin(n!)<\cos(m-p)?)}\qquad \mathbf{[\sin(x+y)=\cos(z-t)]}\] in +comparison with the traditional default behavior which affects only the letters +(and possibly digits, depending on the packages loaded by the document): +\operatornamesdonotobeymathalphabets\nonlettersdonotobeymathalphabets +\[ \mathtt{(\sin(n!)<\cos(m-p)?)}\qquad \mathbf{[\sin(x+y)=\cos(z-t)]}\] + +The mechanism is of course disabled by default for the normal and bold math +versions when in \emph{subdued} mode. It is activated by default for all other +math versions, or for all math versions when option |subdued| was not passed to +the +package. The commands:\\ +\mbox{}\hspace{2cm}\csb{operatornamesobeymathalphabets}\\ +\mbox{}\hspace{2cm}\csb{operatornamesdonotobeymathalphabets}\\ +\mbox{}\hspace{2cm}\csb{nonlettersobeymathalphabets}\\ +\mbox{}\hspace{2cm}\csb{nonlettersdonotobeymathalphabets}\\ +allow to turn on and off this new behavior.\footnote{these commands are to be + used outside of math mode. Their scope is limited to the current \LaTeX{} + environment or group. They use the \cs{everymath} and \cs{everydisplay} + mechanism so if the document needs to modify these token lists it has to do it + in a responsible manner, extending not annihilating their previous contents.} +\footnote{when in subdued mode, the math alphabets are the default ones, not the + ones modified by \mst to use the document text fonts. As a result, matters of + font encodings may then give unexpected results, for example for $-$. On the + present document page we switched to a math version to escape from the + |subdued| mode and avoid the problem with \cs{mathbf\{-\}} giving in the + normal (subdued) math version + {\MTversion{normal}\nonlettersobeymathalphabets$\mathbf-$, when + `non-letters' are declared to obey math alphabets.}} + +The brace control sequences |\{| and |\}| have their own (supplementary) +switch. The reason is that after \csb{explicitbracesobeymathalphabets}, +they regrettably can not be used anymore as delimiters: |\big\{| or +|\big\}| cease to function and must be replaced by |\big\lbrace| and +|\big\rbrace|. But +\operatornamesobeymathalphabets\nonlettersobeymathalphabets +\explicitbracesobeymathalphabets we can now enjoy $\mathtt{\{a, a>b\}}, +\mathbf{\{a, a>b\}}, \mathsf{\{a, a>b\}}$, or even $\mathnormalbold{\{a, + a>b\}}$.\footnote{this last example uses the \cs{mathnormalbold} + additional alphabet defined by \mst.} + +There is no such restriction with $($, $)$ or the brackets $[$, $]$. When used +as delimiters though, they will become again unreactive to the math alphabets: +the same applies to $<$ and $>$ or to any of the other characters such as the +slashes $/$, $\backslash$, when they are used as delimiters. This is a rather +obvious restriction except possibly for the smallest size delimiters (the +so-called `small variants'), as all other sizes will be anyway absent from the +text fonts. Even the small variants may not be really available in the text +fonts: for example the standard $<$ used as a delimiter is in \LaTeX{} a +\cs{langle}: $\langle$. In standard \LaTeX{} documents |$\left< x\right>$| gives +$\langle x\rangle$. + + +Actually, \mst does try to pick up most of the `small variants' in the text +font: |$\left$| gives $\left$ (but |$\left$| gives $\left$.) If you don't like that use the +option §nosmalldelims§ (it is indeed perhaps a bit strange to have $\left< + x\right>$ next to $\left< X\right>$, again before blaming me, consider using +§nosmalldelims§.) At any rate, whether `small' or not, delimiters are not under +the extended law of math alphabets, this is a general rule of the way \mst +manages these things. + +Examples: |\mathbf{}| gives $\mathbf{}$. +|\mathbf{\left}| gives $\mathbf{\left}$. +|\mathbf{\mathopen{<}a,b \mathclose{>}}| gives $\mathbf{\mathopen{<} a,b + \mathclose{>}}$. +The \LaTeX{} standard behavior for +|\mathbf{\mathopen{<}a,b\mathclose{>}}| is +\endgroup +\operatornamesdonotobeymathalphabets\nonlettersdonotobeymathalphabets +\explicitbracesdonotobeymathalphabets +$\mathbf{\mathopen{<} a,b \mathclose{>}}$. + + +\subsection{Additional whitespaces} + +\begingroup\MTversion{upright} + +\csb{MTforallskip}, \csb{MTexistsskip}, and \csb{MTprimeskip} are three commands +with each a mandatory argument like for example +|3mu plus 1mu minus 1mu| or just |2.5mu|. They are especially useful +when using an upright font in math mode.\footnote{The |mu| is a tiny unit length + (`math unit') used in math mode.} +\begin{itemize} +\item compare $\forall B$ with\MTforallskip{2mu} $\forall B$ after +|\MTforallskip{2mu}|, +\item compare $\exists N$ with\MTexistsskip{2mu} $\exists N$ after +|\MTexistsskip{2mu}|, +\item and finally $f'$ with\MTprimeskip{2mu} $f'$ after +|\MTprimeskip{2mu}|. +\end{itemize} + +These three commands may be used throughout the document, or +also in the preamble, in that case the declared math versions +will record the then current values of the skips. \mst applies +the following default skips: |0.6667mu| for the skip after +$\forall$, |1mu| for the skip after $\exists$, and |0.5mu| for +the skip before the prime. + +The §italic§ option resets the defaults from these values to zero. If the +document decides to declare a math version with an upright font it is +recommended then to use the commands above to explicitely set some skips, either +in the preamble before declaring the math version, or in the body when needed. + +Also, when the §subdued§ option has been used, the normal and bold math versions +have by default zero length skips. Nevertheless one can still use at anytime in +the body of the document the +commands described to change these skips. +\endgroup + + +\subsection{Unicode engines} + +\mst has been made minimally unicode-aware and can be used with \XeTeX{} or +\LuaLaTeX{}, but the user is strongly advised to look first at the |mathspec| +package, which is a far more powerful package designed for +unicode (only for \XeTeX{}), and to |unicode-math| (to use +OpenType math fonts). + +Of course \mst is extremely far from being able to define a math +font, as it applies basically only to a subset of the 32-127 ascii range, +and in particular it does not know how to use a given Unicode font +simultaneously for Latin and Greek letters. Again the user is strongly +advised to look at |mathspec| and |unicode-math|. + +When using \mst with either \XeTeX{} or \LuaLaTeX{} it is recommended to use +the |fontspec| package. Else, some of the encoding dependent things done by +\mst like using the en-dash character to get a minus sign in math mode will +not be put in place. Furthermore, it is \emph{necessary} to load |fontspec| +with its |no-math| option, and this \emph{must} happen before loading \mst. + +\begin{framed} + Use |fontspec| with its + \emph{no-math} option, and load it \emph{prior} to \mst. +\end{framed} + +\begin{framed} + The |amsmath| package, if used, \emph{must} be loaded \emph{prior} to \mst. +\end{framed} + +A little piece of the functionality of \mst is less fully +realized under the \LuaLaTeX{} engine than it is with +\XeTeX{}. This is a temporary situation as the needed feature +of \LuaLaTeX{} has been implemented in its latest development +release. I will update \mst when these binaries will have +reached the distribution stage + +To specify math versions using unicode fonts, use the +|fontspec| \cs{setmainfont} command (with arbitrary optional +features). This command can be issued before loading \mst, +or after and then will be followed by a \cs{Mathastext} +command with the name of the version in square brackets. + +It is possible to mix unicode fonts and classical \TeX{} +fonts. But this is definitely \emph{not} recommended as \mst +decides once and for all what is the font slot of things such +as the text endash (used for the minus sign) and this is +encoding dependent. So it is best to have either only unicode +fonts, or only old-fashioned \TeX{} fonts in a fixed encoding +(T1, or LY1 for example). + +The package was not extensively tested with unicode engines, but I +include here two examples which compiled successfully with \XeTeX{} and +\LuaLaTeX{}, the first one on a Linux machine, the second one on a Mac +OS X machine.\footnote{running |latex| on the source of this document + |mathastext.dtx| (in a temporary repertory) extracts the test files.} +\begin{verbatim} +\documentclass{article} +\usepackage[hscale=0.8]{geometry} +\usepackage{multicol} +\usepackage[no-math]{fontspec} +\usepackage{lmodern} +\usepackage[subdued,italic]{mathastext} +\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana] +\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial] +\setmainfont[Color=00FF00]{DejaVu Serif} \Mathastext[DejaVu] +\MTDeclareVersion{times}{T1}{ptm}{m}{n} +\MTlettershape{n} +\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale] +\begin{document} +\newcommand\TEST[1]{\MTversion{#1}% +\begin{multicols}{2} +\hbox to\columnwidth{\hbox to\columnwidth{\hfil + $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} + \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } + \centerline{ $0123456789$ } + \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } +\columnbreak + \centerline{ abcdefghijklmnopqrstuvwxyz } + \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } + \centerline{ 0123456789} + \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } +\end{multicols}} +\begin{multicols}{2} + \centerline{\textbf{math mode}} +\columnbreak + \centerline{ \textbf{text} } +\end{multicols} +\TEST{DejaVu}\TEST{Verdana}\TEST{times}\TEST{Andale} +\TEST{Arial}\TEST{bold}\TEST{normal} \end{document} -% -% \fi -% -% \GetFileInfo{mathastext.dtx} -% -% \newif\iftoggled -% \makeatletter -% \catcode`\§=13 -% ^^A \def§{\@ifnextchar|{\color{blue}}{|\color{black}\xspace}} -% \def§{\iftoggled\endgroup\toggledfalse\xspace\else -% \toggledtrue\begingroup\color{blue}\ttfamily\expandafter\string\fi} -% \makeatother -% -% \newcommand\mst{{\color{ChoisiJeNeSaisPlusComment}\ttfamily\bfseries mathastext}\xspace} -% \frenchspacing -% \begin{center} -% {\Large The \mst package}\\ -% Jean-Fran\c cois \textsc{Burnol}\\ -% \small \ttfamily -% \centerline{jfbu (at) free (dot) fr} -% \centerline{Package \fileversion\ from \filedate.} -% \centerline{This documentation: \mstdocrevdate.} -% \end{center} -% -% -% \begin{abstract} -% The \mst package automatically (or only locally) changes the fonts -% used in math mode for the letters and digits (and a few other -% punctuation and symbol signs) and replaces them with the font used -% for the text. Thus, the package makes it possible to use a quite -% arbitrary font without worrying too much that it does not have -% specially designed accompanying math fonts. Also, \mst provides a -% simple mechanism in order to use more than one math-as-text font in -% the same document. -% \end{abstract} -% -% \section{What \texorpdfstring\mst{mathastext} does} -% -% \subsection{Examples} -% -% \mst's basic aim is to have the same font for text and -% mathematics. Here is an example with -% Latin Modern typewriter proportional: -% -% {\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth -% \MTversion{lmvtt}% -% Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential -% system $(VI_{\nu,n})$: -% \begin{align*} -% a\frac{d}{da} X &= \nu -% X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ -% a\frac{d}{da} Y &= -(\nu+1) Y -% + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} -% \end{align*} -% then the quantity $q = a \frac{aX+Y}{X+aY}$ -% satisfies as function of $b= a^2$ the $P_{VI}$ differential equation: -% \begin{equation*} -% \begin{split} -% \frac{d^2 q}{db^2} = \frac12\left\{\frac1q+\frac1{q-1} -% +\frac1{q-b}\right\}\left(\frac{dq}{db}\right)^2 - \left\{\frac1b+\frac1{b-1} -% +\frac1{q-b}\right\}\frac{dq}{db}\\+\frac{q(q-1)(q-b)}{b^2(b-1)^2}\left\{\alpha+\frac{\beta -% b}{q^2} + \frac{\gamma (b-1)}{(q-1)^2}+\frac{\delta -% b(b-1)}{(q-b)^2}\right\} -% \end{split} -% \end{equation*} -% with -% parameters -% $(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, -% \frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par -% } -% Notice that the Latin (and Greek letters) are in upright shape. But perhaps we -% insist on obeying the standardized habits: -% -% -% {\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth -% \MTversion{times}% -% Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential -% system $(VI_{\nu,n})$: -% \begin{align*} -% a\frac{d}{da} X &= \nu -% X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ -% a\frac{d}{da} Y &= -(\nu+1) Y -% + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} -% \end{align*} -% then the quantity $q = a \frac{aX+Y}{X+aY}$ -% satisfies as function of $b= a^2$ the $P_{VI}$ differential equation: -% \begin{equation*} -% \begin{split} -% \frac{d^2 q}{db^2} = \frac12\left\{\frac1q+\frac1{q-1} -% +\frac1{q-b}\right\}\left(\frac{dq}{db}\right)^2 - \left\{\frac1b+\frac1{b-1} -% +\frac1{q-b}\right\}\frac{dq}{db}\\+\frac{q(q-1)(q-b)}{b^2(b-1)^2}\left\{\alpha+\frac{\beta -% b}{q^2} + \frac{\gamma (b-1)}{(q-1)^2}+\frac{\delta -% b(b-1)}{(q-b)^2}\right\} -% \end{split} -% \end{equation*} -% with -% parameters -% $(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, -% \frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par -% } -% -% This was typeset using the Times font (available in any \TeX{} -% distribution). Let us now be a bit more original and have our mathematics -% with italic letters from the sans serif font Helvetica, while the letters in -% text use New Century Schoolbook. -% -% -% {\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth -% \MTversion[newcent]{helvet}% -% Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential -% system $(VI_{\nu,n})$: -% \begin{align*} -% a\frac{d}{da} X &= \nu -% X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ -% a\frac{d}{da} Y &= -(\nu+1) Y -% + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} -% \end{align*} -% then the quantity $q = a \frac{aX+Y}{X+aY}$ -% satisfies as function of $b= a^2$ the $P_{VI}$ differential equation: -% \begin{equation*} -% \begin{split} -% \frac{d^2 q}{db^2} = \frac12\left\{\frac1q+\frac1{q-1} -% +\frac1{q-b}\right\}\left(\frac{dq}{db}\right)^2 - \left\{\frac1b+\frac1{b-1} -% +\frac1{q-b}\right\}\frac{dq}{db}\\+\frac{q(q-1)(q-b)}{b^2(b-1)^2}\left\{\alpha+\frac{\beta -% b}{q^2} + \frac{\gamma (b-1)}{(q-1)^2}+\frac{\delta -% b(b-1)}{(q-b)^2}\right\} -% \end{split} -% \end{equation*} -% with -% parameters -% $(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, -% \frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par -% } -% -% And after all that, we may wish to return to the default math typesetting: -% -% {\advance\leftskip.1\linewidth\advance\rightskip.1\linewidth -% Let $(X,Y)$ be two functions of a variable $a$. If they obey the differential -% system $(VI_{\nu,n})$: -% \begin{align*} -% a\frac{d}{da} X &= \nu -% X - (1 - X^2)\frac{2n a}{1 - a^2}\frac{aX+Y}{1+a XY} \\ -% a\frac{d}{da} Y &= -(\nu+1) Y -% + (1 - Y^2)\frac{2n a}{1 - a^2}\frac{X+aY}{1+a XY} -% \end{align*} -% then the quantity $q = a \frac{aX+Y}{X+aY}$ -% satisfies as function of $b= a^2$ the $P_{VI}$ differential equation with -% parameters -% $(\alpha,\beta,\gamma,\delta) = (\frac{(\nu+n)^2}2, -% \frac{-(\nu+n+1)^2}2, \frac{n^2}2, \frac{1 - n^2}2)$.\par -% } -% -% \vskip\baselineskip Notice that the Greek letters also changed -% according to the \emph{math version}: \mst has indeed some (limited) -% capabilities to this effect, with its §LGRgreek§ option. This -% document uses the |LGR| encoded fonts |cmtt|, |cmss|, and |txr|, -% which are part of standard \TeX{} -% distributions.\footnote{The first two are available (with no need to -% load explicitely any package in the document) via the combination -% |cbfonts| (|cbgreek-complete|) \& |babel|, and the |LGR| encoded |txr| font -% (again no package loading is necessary) is part of the files of the -% |txfonstb| package.} -% -% ^^A \href{http://mirrors.ctan.org/help/Catalogue/entries/cbgreek-complete.html}{cbfonts}, -% ^^A \href{http://mirrors.ctan.org/help/Catalogue/entries/txfontsb.html}{txfontsb}. -% -% \subsection{Basic use} -% -% The initial ideology of \mst was to produce mathematical texts with -% a very uniform look, not separating math from text as strongly as -% is usually done. As soon as one tries out other fonts for text than -% the Computer Modern ones one realizes how extremely ``thin'' are -% the default \TeX{} fonts for mathematics: they definitely do not -% fit well visually with the majority of text fonts. With \mst one -% can get one's (simple\dots{} or not) mathematics typeset in a -% manner more compatible with the text, without having to look for an -% especially designed font. Here is a minimal example of what to put -% in -% the preamble:\\[\baselineskip] -% \begin{minipage}{.5\linewidth} -% \begin{verbatim} -% \usepackage[T1]{fontenc} -% \usepackage{times} -% \usepackage[italic]{mathastext} -% \end{verbatim} -% \end{minipage}\\ -% Throughout the entire document, all letters, digits, and punctuation signs -% inside math mode will then be typeset in Times.\footnote{let's do as if we -% did not know the excellent |txfonts| package which employs Times for text -% and has a -% very complete math support, including many additional mathematical glyphs -% in comparison to the CM fonts.} The exact list of -% characters concerned by \mst belongs to the basic |ASCII| set:\\ -% {\color{ChoisiJeNeSaisPlusComment}\bfseries -% \centerline{abcdefghijklmnopqrstuvwxyz}\\ -% \centerline{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ -% \centerline{0123456789}\\ -% \DeleteShortVerb{\|}% -% \centerline{!\,?\,*\,,\,.\,:\,;\,+\,\textendash\,=\,(\,)\,[\,]\,/\,\#\,% -% \$\,\%\,\&\,$\mathord{<}\,\mathord{>}\,\mathord{|}$\,\{\,\} -% {\color{black}\mdseries and }$\backslash$}\MakeShortVerb{\|}} -% -% Missing from the list are the {}'{} and the {}-{}. Indeed the prime ${}'$ -% indicating derivatives is left to its default by \mst as the text font glyph -% {}'{} is not, as a rule, a satisfying alternative. Also the minus sign is -% picked up from the endash character \textendash, if available, and not the -% hyphen character -. And nothing is changed to the ``large'' math symbols, -% except for $\defaultprod$ and $\defaultsum$ in inline math which, like here: -% $\prod\sum$, will be taken from the Symbol Font if option §symbolmisc§ was -% used. -% -% The §italic§ option tells the letters to be in italic shape (they will be -% upright in operator names), as is the standardized habit. However, one -% should be aware that the built-in placement routines of \TeX{} in math mode -% expect the math italic to have some (tiny) white space around them, so that -% they don't ``stick'' to other symbols, such as a $\defaultprod$: -% compare -% {\itshape if\hbox{$\mathsurround0pt\defaultprod$}} with a pure math -% mode $if\defaultprod$. Compare also (as is done in any -% book on \LaTeX{}) the text italic with the math italic (here for Latin -% Modern):\footnote{Text fonts are equipped with ligature rules. The French -% Cursive font for example has complex ligature rules and they make -% cohabitation with \mst somewhat difficult in -% that case.}\\ -% \centerline{\itshape abcdefghijklmnopqrstuvwxyz} -% \centerline{$abcdefghijklmnopqrstuvwxyz$} -% -% Furthermore the math parentheses are not the -% same as the text parentheses, compare {\itshape (ab)} (text italic) with -% ^^A\begingroup \mathcode`\(=16424\relax \mathcode`\)=20521 -% $(ab)$ (math): the math -% parentheses are upright! Fear not, \mst picks up the parentheses from the -% upright shape (it can be coerced to do otherwise). Nevertheless sometimes -% the text parentheses are just not that usable, so there is a package option -% §noparenthesis§. There are many more options (complete details given -% further on in this document), let me mention §basic§ (do only letters and -% digits) and §nodigits§ (perhaps the old style figures from text do not fit -% so well in math). -% -% -% I briefly alluded to the complex spacings in math mode, and it seems -% indeed to be a complicated affair to construct a math font for -% \TeX{}. When there are hundreds of free text fonts packaged for -% \LaTeX{} and a handful of math ones, chances are your favorite text -% font does not mix so well with the available math ones, so try out -% \mst. The following set-up often gives esthetically pleasing -% results: it is to use the sans-serif member of the font family for -% math, and the serif for text. This can be -% done the following way: \\[\baselineskip] -% \begin{minipage}{.5\linewidth} -% \begin{verbatim} -% \renewcommand\familydefault\sfdefault -% \usepackage{mathastext} -% \renewcommand\familydefault\rmdefault -% \begin{document} -% \end{verbatim} -% \end{minipage}\\ -% -% As said already none of the ``large'' math symbols is modified in -% any way by \mst. Only loading some math font packages such as -% |fourier|, |kpfonts|, |mathabx|, |mathdesign|, |txfonts|, etc\dots{} -% will change them. Think of loading these packages before \mst, else -% they might undo what \mst did. The more common symbols can be taken -% from the Symbol font (option §symbolmisc§, or §symbolmax§ to get -% also the Greek letters from Symbol). -% -% There is the issue of Greek letters. Sometimes the text font has -% Greek glyphs, in |LGR| encoding (this will be mentioned in the -% documentation of the font package). Then option §LGRgreek§ tells -% \mst to pick up these Greek letters. And it is possible to specify -% whether the Greek letters should be upright, or -% ``italic''.\footnote{a more detailed discussion comes next. Note -% that the default CM and its replacement Latin Modern for european -% languages are (transparently to the user) extended with |LGR| -% encoded fonts from the |cbfonts| (|cbgreek-complete|) ^^A -% \href{http://mirrors.ctan.org/help/Catalogue/entries/cbgreek-complete.html}{cbfonts} -% package.} Of course it is always possible to leave the -% responsability to set up Greek letters in math mode to packages -% loaded previously to \mst. -% -% -% We specified in our minimal working example a |T1| encoding (|LY1| would -% have been ok, too) because the default |OT1| does not have the -% {\color{ChoisiJeNeSaisPlusComment}\DeleteShortVerb{\|} -% $\mathord{<}\,\mathord{>}\,\mathord{|}$\,\{\,\}} and -% {\color{ChoisiJeNeSaisPlusComment}$\backslash$\MakeShortVerb{\|}} glyphs. If -% \mst detects |OT1| as the default encoding it will leave these characters to -% their defaults from the math fonts.\footnote{the §subdued§ option, described next, -% acts a bit otherwise, it forces, contrarily to its usual low-key character, -% the replacement of |OT1| by |T1| for the fonts ultimately used with letters -% and digits in math mode.} -% -% The present document illustrated the use of various fonts, so its preamble -% set-up is accordingly a bit more complicated:\footnote{I have removed the Greek and Symbol font related stuff. See the |.dtx| source for the real thing.} -% \begin{center} -% \begin{minipage}{.5\linewidth} -% \begin{verbatim} -% \usepackage{lmodern} -% \usepackage[T1]{fontenc} -% \usepackage[subdued,italic,defaultmathsizes]{mathastext} -% \MTDeclareVersion[n]{lmvtt}{T1}{lmvtt}{m}{n} -% \usepackage{newcent} -% \Mathastext[newcent] -% \usepackage{times} -% \Mathastext[times] -% \usepackage[scaled]{helvet} -% \renewcommand\familydefault\sfdefault -% \Mathastext[helvet] -% \begin{document}\MTversion{normal} -% \end{verbatim} -% \end{minipage} -% \end{center} -% Let us examine this code: it uses once the command §\MTDeclareVersion§ and -% three times the command §\Mathastext§, thus defining four -% |math versions|\footnote{|math versions| are discussed in the document -% |fntguide.pdf| -% from your \TeX{} distribution.}: |lmvtt|, |newcent|, |times|, and |helvet|. -% The names can be taken arbitrarily (they only need to be suitable arguments to -% the \LaTeX{} \cs{DeclareMathVersion} command which is invoked internally, so -% no spaces in the names). Two additional math versions preexist: the |normal| and -% |bold|, which, because there was the §subdued§ option, were left untouched by -% \mst. -% -% Once these |math versions| are defined, -% §\MTversion\{name\_of\_version\}§ in the \emph{body} of the document -% enacts the font switches. As is usual with \LaTeX{} one can limit the -% scope to the inside of a group, or also switch back to the main set-up -% through issuing §\MTversion\{normal\}§. -% -% -% When \cs{Mathastext} is used in the preamble, it records the current font -% defaults and (except for the |normal| and |bold| versions under the §subdued§ -% regime) sets up the math font to be used in that version to be the text font -% as found in \cs{familydefault}. But it is still possible for a \mst-declared -% math version to have distinct fonts for text and math: -% \begin{enumerate} -% \item in the body of the \TeX{} source, an optional argument (the name -% of a \mst-declared math version) to \cs{MTversion} is allowed, and -% for example we used in the source of this document -% \cs{MTversion[newcent]\{helvet\}} meaning ``New Century Schoolbook -% for the text and Helvetica for the math.'' -% \item there are preamble-only commands \cs{MTencoding}, \cs{MTfamily}, -% \cs{MTseries}, \cs{MTshape}, \cs{MTlettershape} which tell \mst what -% to do (for math \emph{only}) in each math version declared -% \emph{afterwards}, independently of the text fonts. -% \end{enumerate} -% -% The \LaTeX{} command -% \cs{mathversion}\marg{version\_name} will change only the fonts -% used in math mode. It is recommended to use the package -% command \cs{MTversion}\marg{version\_name} which does additional -% things for math mode (especially in relation to the |subdued| -% situation), and also sets up the text fonts, in the manner -% described above. -% -% It is sometimes not compatible with \mst to load a font package after -% it, as we did here: the font package may contain instructions to -% modify the math set-up. This may be a bit hidden to the user: for -% example the |epigrafica| package loads |pxfonts|. Hence it will -% interfere with \mst if it is loaded after it.\footnote{may typically -% give a `too many math alphabets' error message.} But one can use -% instead |\renewcommand{\rmdefault}{epigrafica}|,\footnote{sometimes -% one needs to look in the |.sty| file of the font package to figure out -% the font name (it is rarely as |epigrafica|, the same as the -% package name), and, if one does not know the arcanes of finding |.fd| -% files in one's \TeX{} distribution, one should look at the log file of -% a test document to see if for example |T1| is available for that font; -% for |epigrafica| it is not, only |OT1| and |LGR| are possible.} -% followed with \cs{Mathastext}, or also -% |\MTfamily{epigrafica}\Mathastext| which will only change the font in -% math. To use |epigrafica| for Greek, one can do for example -% |\MTgreekfont{epigrafica}\Mathastext| with package option §LGRgreek§. -% Or alternatively |\usepackage{epigrafica}| followed with -% |\usepackage[LGRgreek]{mathastext}|. -% -% \subsection{The \texorpdfstring{\texttt{\color{blue}defaultmathsizes}}{defaultmathsizes} option} -% -% The default sizes give barely legible glyphs (for this author!) for -% subscripts of subscripts. So \mst makes more reasonable choices. It -% also redefines \cs{Huge} and defines a \cs{HUGE} size, copied from -% the |moresize| package. To cancel all of this use option -% §defaultmathsizes§. -% -% \subsection{The \texorpdfstring{\texttt{\color{blue}italic}}{italic} option} -% -% In the initial version |1.0|, the Latin letters in -% mathematical mode assumed the exact same shape as in -% text mode, and this meant, generally speaking, that -% they would turn up upright. Doing this gives a very -% uniform look to the document, so that one has to make -% an effort and read it with attention, and this was -% one of the design goals of \mst. -% -% Nevertheless, soon after I posted the initial version -% of the package to CTAN, I was overwhelmed by -% numerous\footnote{this means ``more then one.''} -% questions\footnote{I thank in particular -% Tariq~\textsc{Perwez} and Kevin~\textsc{Klement} for -% their kind remarks (chronological order).} on how to -% have the letters be in italic shape. -% -% The default is still, as in version |1.0|, for everything to be in -% upright shape, but it suffices to pass to the package the option -% §italic§ to have the Latin letters in math mode in italic -% shape.\footnote{more precisely stated, the value of \cs{itdefault} -% is used.} There is also an option §frenchmath§ to make the -% uppercase letters nevertheless upright, because this is the way of -% traditional French mathematical typography.\footnote{more precisely -% stated, the value of \cs{shapedefault} is used.} -% -% \subsection{The \texorpdfstring{\texttt{\color{blue}subdued}}{subdued} option} -% -% This option was introduced in |v1.15|. It provides a manner to -% switch on the \mst-\emph{ification} only for limited portions of -% the document, with the mechanism of math versions. Without the -% §subdued§ option, the \emph{mathastextification} applies by default -% to the whole of the document (and one may also define additional -% math versions in the preamble); with the §subdued§ option the -% \emph{mathastextification} has to be activated by an explicit use -% of a \cs{MTversion} (also written \cs{Mathastextversion}) command -% in the document body, and the document preamble \emph{must} contain at -% least one \cs{Mathastext} command (with the version name in square -% brackets) to define a math version (other than the |normal| and -% |bold|, which are subdued), to be later used in the body. -% -% The previous description is in fact a bit optimistic: \mst was not -% written initially in order to allow its action to be completely -% cancelled, and achieving this would require a complete rewrite of -% large portions of the code. In order to have the displayed math -% (almost) as if \mst had not been loaded, one must at a minimum also -% use the option §defaultmathsizes§. This does not quite suffice, -% because, for example, the colon, the dot, and the minus sign belong -% in the default \LaTeX{} math mode set-up to three distinct fonts -% whereas \mst will pick (even subdued) the three of them in the same -% font, and although it will make a reasonable choice of this font, -% this is not a return to the previously prevailing situation. And -% then arbitrary packages could have done arbitrary things... so to -% be on the safe side one needs the §basic§ option which limits the -% mathastextification to letters and digits (and should also be -% accompanied by §defaultimath§ which prevents redefinition of the -% \cs{imath} macro, and §nohbar§ which prevents redefinition of the -% \cs{hbar} macro\dots). And even then, in some circumstances, this -% will still not suffice; for example the \emph{euler} package puts -% the digits in the same font as the Latin letters in math mode, but -% the subdued \mst will pick them up in the same font as used in -% operator names, and in the case of the \emph{euler} package, this -% is the main document font. So, even subdued, \mst still kicks. But, -% as I think is illustrated by the examples given at the start of -% this document, the §subdued§ option has its utility, and works -% reasonably well. -% -% Furthermore, the §subdued§ action does \emph{not} extinguish -% package options §eulergreek§, §symbolgreek§ or §symbol§. But -% §LGRgreek§ is receptive to it. -% -% -% \subsection{Basic example with math versions} -% -% -% \begin{verbatim} -% \documentclass{article} -% \usepackage[T1]{fontenc} -% \usepackage{newcent} -% \usepackage[subdued]{mathastext} -% \Mathastext[newcent] -% \renewcommand\familydefault\ttdefault -% \Mathastext[courier] -% \renewcommand\familydefault\sfdefault -% \Mathastext[avantgarde] -% \renewcommand\familydefault\rmdefault -% \begin{document} text in NewCentury and $math\ as\ in\ default$,% -% \MTversion{courier} text in Courier and $math\ in\ Courier$,% -% \MTversion{avantgarde} text in AvantGarde and $math\ in\ AvantGarde$,% -% \MTversion[newcent]{courier} text in NewCentury and $math\ in\ -% Courier$,\MTversion{bold} texte in bold NewCentury and $math\ as\ in\ -% bold\ default$,\MTversion[courier]{avantgarde} text in Courier and -% $math\ in\ AvantGarde$. -% \end{document} -% \end{verbatim} -% -% The |newcent| package from the |psnfss| standard bundle of \LaTeX{} -% font packages sets up New Century Schoolbook (NCS) for the serif -% font, Avant Garde for the sans font, and Courier for the typewriter -% font. The command |\usepackage[subdued]{mathastext}| does not change -% the |normal| -% math version, but when later invoked through |\MTversion{normal}| it will -% remember and reset the text font to be New Century Schoolbook. On the -% other hand |\MTversion{newcent}| is more radical as it sets up -% the math to also use Schoolbook. Each call to the -% \cs{Mathastext} command in the preamble registers the current font -% family, as given by the current \cs{familydefault} value. At first -% \cs{familydefault} is given as \cs{rmdefault}, so changing -% \cs{rmdefault} is another, indirect, manner to change which font will -% be associated by \mst to the given version name. Remember -% though that if \cs{familydefault} points to some other value, -% changing \cs{rmdefault} will not be effective for the \cs{Mathastext} -% command. Just before |\begin{document}| we issue a last -% \cs{renewcommand} on \cs{familydefault} if we want the initial font -% to be used in the text to be roman one, here NCS. -% -% The package provides other techniques to tell \cs{Mathastext} which -% fonts to use in a math version: see the explanations of the -% commands \cs{MTencoding}, \cs{MTfamily}, \cs{MTseries}, -% \cs{MTshape}, \cs{MTlettershape} in the section describing all -% package defined commands. -% -% In the body of a document \cs{MTversion} (with a mandatory version -% name) does three things:\footnote{well, it also sets up the LGR -% Greek letters, in case of option §LGRgreek§, and it turns on -% the (math versions dependent) user-defined extra glue after -% $\oldexists$ and $\oldforall$.} it changes the font for letters, -% digits, operator names in \emph{math}; it changes the font -% for \emph{text}; and it resets the -% |\(family,rm,sf,tt)default|s to their values as registered at the -% time of definition of the version. You may wish to limit its scope -% to the inside of some group, if it is to be used for the short -% portion of the document. -% -% \subsection{Greek letters} -% -% The Computer Modern fonts are very light and thin in comparison -% to many text fonts, and as a result rarely mix -% well with them (particularly if the Latin letters in -% math mode are upright). The following options are -% provided by \mst: -% \begin{description} -% \item[no option:] nothing is done by the -% package, Greek letters are the default Computer -% Modern ones or have been set-up by other packages; -% for example by the |fourier| package with option -% `upright', which gives upright Greek letters. -% \item[§LGRgreek§:] this is for fonts which additionally to Latin -% letters also provide Greek letters in |LGR| encoding. Here is -% a list from a 2012 standard \TeX{} installation: the Computer -% Modern, Latin Modern, and the CM-LGC fonts; the Greek Font -% Society fonts (such as GFS Didot), the epigrafica and kerkis -% packages, the txfontsb package which extends the txfonts -% package with LGR-encoded Greek letters; the Droid fonts, the -% DejaVu fonts, the Comfortaa font, and the Open Sans font. The -% |LGR| encoded |CM/LM| fonts (in serif, sans-serif and typewriter -% family) give the nice Greek letters in upright shape from the -% |cbfonts| package. To get these letters in your \mst math -% mode, you can do the following: -% \begin{verbatim} -% % instructions to load the document fonts: -% \usepackage{nice_font} -% % and then the following: -% \renewcommand{\familydefault}{cmr} % or cmss or cmtt for sans resp. mono -% \usepackage[LGRgreek]{mathastext} -% \renewcommand{\familydefault}{\rmdefault} -% \Mathastext % this re-initializes mathastext with the nice_font, -% % without changing the LGR font cmr/cmss/cmtt used for Greek letters -% % in math mode. -% \begin{document} -% \end{verbatim} -% If you use the §italic§ option note that the italic Greek -% letters from the |cbfonts| are not the same glyphs as -% the default Greek letters from the |OML| encoded font |cmmi|. -% \item[§eulergreek§:] the Greek letters will be taken from the Euler font (the -% document does not have to load the eulervm package, \mst directly uses -% some file included in this package, as it provides a mechanism to scale -% by an arbitrary factor the Euler font.) The letters are upright. -% \item[§symbolgreek§:] the Greek letters will be taken -% from the (Adobe Postscript) Symbol font. A command is provided -% so that the user can scale the Symbol font to let it -% better fit with the text font. The letters are upright. -% \item[§selfGreek§:] this option concerns only the eleven Greek -% capitals from the |OT1|-encoding. It does nothing for the -% lowercase Greek letters. The encoding used in the document does -% not have to be |OT1|. -% \end{description} -% -% There is also §LGRgreeks§ which tells \mst to pick up in each math -% version the letters from the |LGR| encoded font used in that version, -% and §selfGreeks§ to tell \mst to do as for §selfGreek§ but -% separately in all math versions. -% -% The §subdued§ option interacts with the options for Greek letters in the -% following way: -% \begin{enumerate} -% \item in its presence, the §LGRgreek§ and §LGRgreeks§ options cease -% to have any effect in the normal and bold math versions, -% \item §selfGreek(s)§, §eulergreek§ and §symbolgreek§ act normally, -% they are not affected by the presence or absence of §subdued§. -% \end{enumerate} -% -% -% \subsection{Shape of Greek letters} -% -% Classic \TeX{} uses in math mode italic lowercase and -% upright uppercase Greek letters. French typography uses -% upright shape for both lowercase and uppercase. And the -% ISO standard is to use italic shape for both lowercase -% and uppercase. -% -% The Euler and Symbol fonts not being available in other than their -% default upright shape, this question of shapes for Greek letters -% raises issues only in the case of the options §LGRgreek§ and -% §selfGreek§. -% -% The options §frenchmath§, §itgreek§, §upgreek§, §itGreek§ and §upGreek§ -% modify the Greek letter shapes according to the following rules, listed -% from the lowest to the highest priority: -% \begin{description} -% \item[no option:] the lowercase Greek letters are in the same shape as -% Latin letters, and the uppercase in the same shape as applied to digits -% and operator names, -% \item[§frenchmath§:] both lowercase and uppercase are in the same shape as -% the digits and operator names (most of the time this means ``upright -% shape'', but it can be otherwise), -% \item[§itgreek,upgreek§:] both lowercase and uppercase are in the -% \cs{itdefault}, respectively the \cs{updefault} shape (at the time of -% loading the package or at the time of a subsequent call to -% \cs{Mathastext} or \cs{MathastextWillUse}), -% \item[§itGreek,upGreek§:] same as above, but only for the uppercase -% letters. -% \end{description} -% -% So, the default gives the classic \TeX{} behavior when option §italic§ -% was passed. Each call to \cs{Mathastext} (or \cs{MathastextWillUse}) -% macros (described in a later section) reinitializes the computation of -% the shapes. -% -% As mentioned already the package allows to define various ``math -% versions''. In the case of §eulergreek§ or §symbolgreek§ they apply -% to all these versions. In the case of the options §LGRgreeks§ or -% §selfGreeks§ (notice the additional ``s''), each math version is -% assumed to have its text font available in |LGR| (or |OT1| -% encoding) and also the shapes will be local to the math version. -% -% Finally version |1.15c| of \mst introduces new preamble-only -% commands to change the shapes, and even the font, used for Greek -% letters, in case of package options §LGRgreek§/§selfGreek§. They -% are §\MTitgreek§, §\MTupgreek§, §\MTitGreek§, §\MTupGreek§: these -% are used like the options and change only the shapes for the math -% versions which will be declared \emph{next} in the preamble; and -% §\MTgreekfont\{name\_of\_font\}§ will tell the \emph{next} math -% versions to use that font family. To use this command you need to -% know the (little) name of a suitable font family available in |LGR| -% encoding: for example |lmr|, |txr| (needs |txfontsb| -% package on your system), |DejaVuSerif-TLF| (needs |dejavu| package -% on your system), etc\dots -% -% -% \subsection{Unicode engines} -% -% \mst has been made minimally unicode-aware and can be used with \XeTeX{} or -% \LuaLaTeX{}, but the user is strongly advised to look first at the |mathspec| -% package, which is a far more powerful package designed for -% unicode (only for \XeTeX{}), and to |unicode-math| (to use -% OpenType math fonts). -% -% Of course \mst is extremely far from being able to define a math -% font, as it applies basically only to a subset of the 32-127 ascii range, -% and in particular it does not know how to use a given Unicode font -% simultaneously for Latin and Greek letters. Again the user is strongly -% advised to look at |mathspec| and |unicode-math|. -% -% When using \mst with either \XeTeX{} or \LuaLaTeX{} it is recommended to use -% the |fontspec| package. Else, some of the encoding dependent things done by -% \mst like using the en-dash character to get a minus sign in math mode will -% not be put in place. Furthermore, it is \emph{necessary} to load |fontspec| -% with its |no-math| option, and this \emph{must} happen before loading \mst. -% -% The |amsmath| package, if used, \emph{must} be loaded before \mst. -% -% Some of the functionality of \mst is less fully realized under -% the \LuaLaTeX{} engine than it is with \XeTeX{}. This is temporary -% as I have been told that the needed feature of \LuaLaTeX{} will be -% implemented in its next release. -% -% To specify math versions using unicode fonts, use the -% |fontspec| \cs{setmainfont} command (with arbitrary optional -% features). This command can be issued before loading \mst, -% or after and then will be followed by a \cs{Mathastext} -% command with the name of the version in square brackets. It -% is possible to mix unicode fonts and classical \TeX{} fonts, -% but due to the handling of the minus sign in math mode (in -% particular), it is best to have either only unicode fonts, -% or only old-fashioned \TeX{} fonts in a fixed encoding (T1, -% or LY1 for example). -% -% \textbf{Important:} |fontspec| must be loaded with its \emph{no-math} -% option, and \emph{prior} to \mst. -% -% The package was not extensively tested with unicode engines, but I include -% here two examples which compiled successfully with \XeTeX{} and -% \LuaLaTeX{}, the first one on a Linux machine, the second one on a Mac OS X -% machine. -% \begin{verbatim} -% \documentclass{article} -% \usepackage[hscale=0.8]{geometry} -% \usepackage{multicol} -% \usepackage[no-math]{fontspec} -% \usepackage{lmodern} -% \usepackage[subdued,italic]{mathastext} -% \setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale] -% \setmainfont[Color=0000FF]{Arial} \Mathastext[Arial] -% \setmainfont[Color=00FF00]{DejaVu Serif} \Mathastext[DejaVu] -% \MathastextDeclareVersion{times}{T1}{ptm}{m}{n} -% \MTlettershape{n}\MTshape{it} -% \setmainfont[Color=999999]{Verdana} \Mathastext[Verdana] -% \begin{document} -% \newcommand\TEST[1]{\MTversion{#1}% -% \begin{multicols}{2} -% \hbox to\columnwidth{\hbox to\columnwidth{\hfil -% $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} -% \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } -% \centerline{ $0123456789$ } -% \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% -% \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } -% \columnbreak -% \centerline{ abcdefghijklmnopqrstuvwxyz } -% \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } -% \centerline{ 0123456789} -% \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% -% \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } -% \end{multicols}} -% \begin{multicols}2 -% \centerline{\textbf{math mode}} -% \columnbreak -% \centerline{ text } -% \end{multicols} -% \TEST{DejaVu}\TEST{Verdana}\TEST{times}\TEST{Andale} -% \TEST{Arial}\TEST{bold}\TEST{normal} -% \end{document} -% \end{verbatim} -% And now the same thing with fonts available on Mac OS X: -% \begin{verbatim} -% \documentclass{article} -% \usepackage[hscale=0.8]{geometry} -% \usepackage{multicol} -% \usepackage[no-math]{fontspec} -% \usepackage{lmodern} -% \usepackage[subdued,italic]{mathastext} -% \setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler] -% \setmainfont[Color=00FF00]{Osaka} \Mathastext[Osaka] -% \setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum] -% \setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot] -% \setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic] -% \begin{document} -% \newcommand\TEST[1]{\MTversion{#1}% -% \begin{multicols}{2} -% \hbox to\columnwidth{\hbox to\columnwidth{\hfil -% $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} -% \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } -% \centerline{ $0123456789$ } -% \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% -% \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } -% \columnbreak -% \centerline{ abcdefghijklmnopqrstuvwxyz } -% \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } -% \centerline{ 0123456789 } -% \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% -% \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } -% \end{multicols}} -% \begin{multicols}2 -% \centerline{\textbf{math mode}} -% \columnbreak -% \centerline{ text } -% \end{multicols} -% \TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum} -% \TEST{Hoefler}\TEST{Osaka}\TEST{bold} -% \end{document} -% \end{verbatim} -% -% -% \section{Package options and commands} -% -% \subsection{Summary of main options} -% \begin{description} -% \item[{§italic, frenchmath§}:] italic letters in -% math, upright uppercase if §frenchmath§. -% \item[{§subdued§}:] acts in a subdued way. The \LaTeX{} normal and bold -% math versions are left (quasi) unchanged. With version |1.15e| of -% the package this statement applies also to the math alphabets -% \cs{mathbf}, \cs{mathit}, \cs{mathsf}, and \cs{mathtt} (and not -% only to \cs{mathnormal} and \cs{mathrm} as in previous versions.) -% \item[{§LGRgreek, eulergreek, symbolgreek§}:] the -% Greek letters will be taken, respectively from the -% text font itself (in |LGR| encoding), or from the Euler -% font, or from the Postscript Symbol font. -% \item[{§symbolmax§}:] all characters listed supra, -% other than letters and digits, are taken from the -% Symbol font. This option also makes a number of -% further glyphs available, including some basic -% mathematical arrows, as well as the sum and product -% signs. For documents with very simple needs in -% mathematical symbols, \mst with option -% §symbolmax§ may give in the end a PDF file quite -% smaller than the one one would get without the -% package. -% \item[{§defaultmathsizes§}:] the default of \mst is to declare bigger sizes -% in subscripts (it also copies code from the §moresize§ package to redefine -% \cs{Huge} and define \cs{HUGE}). Use this option to prevent it from -% doing so. -% \item[{§defaultalphabets§}:] by default, \mst redeclares the math -% alphabets \cs{mathrm}, \cs{mathit}, etc\dots{} (but not -% \cs{mathcal}) to refer to the current document text fonts (at the -% time of loading the package and in each \mst math version). Use -% this option to prevent it from doing so (each alphabet also has -% its own disabling option). -% \end{description} -% -% \subsection{Miscellaneous} -% -% \begin{description} -% \item[the en-dash as minus sign:] Very often the - -% character from the text font does not give a good -% minus sign. So by default, the package uses the -% en-dash sign \textendash{}. Use §noendash§ to -% deactivate it. Starting with version |1.12| of the -% package this `en-dash as minus' should work in all -% encodings, including Unicode (if |fontspec| has been -% loaded). -% -% \item[amsmath:] the behavior of the \cs{DeclareMathOperator} -% command of |amsmath| is slightly modified by \mst. This -% command allows crazy things like\\ -% \centerline{\cs{DeclareMathOperator}\cs{crazy}\{m.ch-in'tr/u:c\}} -% and then the .,-,',/ and : will be typeset in the -% roman font. But the font number was hardcoded in the macro -% and furthermore the code of |amsmath| would cause an error -% with Unicode engine as soon as some Unicode code is assigned -% to the minus character.\footnote{To the experts: the $\sin$, -% $\cos$, \dots{} operator names are \emph{not} defined by |amsmath| with -% the help of the \cs{DeclareMathOperator} macro, hence are -% not the cause of an error in \XeTeX{}/\LuaLaTeX{}. What \mst -% does is to let to relax the \cs{newmcodes@} macro, so it is -% possible to save it before loading \mst and re-establish -% later, if really really this is what you want.} -% This specific issue will perhaps be -% fixed by some hypothetic future release of |amsmath|, or by other -% packages providing patches, but I decided for a preemptive -% strike. As a result the declaration above will not cause an -% error when \cs{crazy} is used with a Unicode engine, but there -% are now some spacings around the punctuation characters. To -% avoid this use (also with \LaTeX{}):\\ -% \centerline{\cs{DeclareMathOperator}\cs{crazy}\{m\{.\}ch\{-\}in\{'\}tr\{/\}u\{:\}c\}} -% Note though that the ' will appear as a prime $'$. -% -% \item[hbar:] The definition of \cs{hbar} inherited from -% default \LaTeX{} will in our context make use of the -% §h§ of the current math font (so for us, it is also -% the text font, perhaps in italic shape), but the bar -% accross the §h§ will come from the original default -% math font for letters (usually |cmmi|), and -% furthermore its placement on the §h§ can be -% odd-looking. So we redefine \cs{hbar} to use only the -% text font (and this will be aware of the §italic§ -% option). Our construction does not always give an -% optimal result (and its scope is limited to the |OT1|, -% |LY1| and |T1| encodings), so an option §nohbar§ -% deactivates it. There is no \cs{hslash} provided by -% the package, though. The version |1.12| of the -% package when dealing with a Unicode font tries to get -% the \cs{hbar} directly as a glyph from the font. -% -% -% \item[dotless i and j:] By default the package redefines -% \cs{i} and \cs{j} to give the dotless i and j (if it -% exists at all), \emph{also in math mode,} in the text -% font. Will overwrite the default commands \cs{imath} -% and \cs{jmath}. In version |1.12| of the package this -% should work in all encodings, including Unicode (it -% is then assumed that |fontspec| has been loaded, and -% of course that the glyphs are indeed in the font). -% -% -% \item[\XeTeX{} and \LuaLaTeX{}:] for the en-dash -% and the dotless i and j, the package expects to detect -% either the EU1 encoding for XeTeX{} or the EU2 encoding -% for \LuaLaTeX{} (this will be true if |fontspec| was -% loaded), or one of |OT1|, |LY1| or |T1|, else it -% will renounce and not attempt to access the en-dash or the -% dotless i and j glyphs. With \LaTeX{} and Pdf\LaTeX{}, -% there is no such limitation and all 8bit-encodings -% (containing these glyphs) should be ok. -% -% \item[fontspec:] one more note to users of -% \XeTeX{}/\LuaLaTeX{} with |fontspec|: it has to be -% loaded {with the option} §no-math§, -% {and before} \mst. -% -% \item[vec accent:] The default \cs{vec} accent is not -% appropriate for upright letters, so \mst -% provides a \cs{fouriervec} which takes its glyph in a -% Fourier font, and an Ersatz \cs{pmvec} -% which is reasonably good looking on upright letters -% and works with the \cs{rightarrow} glyph. Contrarily -% to version |1.0|, the default \cs{vec} is not -% overwritten with \cs{fouriervec}. And contrarily to -% version |1.1|, one now needs to pass the option -% §fouriervec§ to have the math accent \cs{fouriervec} -% defined by the package. -% -% -% \item[math alphabets:] -% \begin{itemize} -% \item We define a new math alphabet command -% \cs{mathnormalbold} which gives direct access to -% the bold version of the \cs{mathnormal} alphabet -% (rather than using either the \cs{bm} command from -% the |bm| package or the \cs{boldsymbol} command -% from the |amsbsy| package). As it does not -% exist in the default \LaTeX{} math font set-up, this -% alphabet is \emph{not} subjected to the {subdued option} action. -% \item The other math alphabet changing commands -% defined by the package are \cs{MathEulerBold}, -% \cs{MathEuler} and \cs{MathPSymbol}. -% \item \cs{mathnormal}, \cs{mathrm}, \cs{mathbf}, -% \cs{mathit}, \cs{mathsf} and \cs{mathtt} are modified -% to make reference to the document text fonts (this -% can be disabled by suitable package options). -% \end{itemize} -% Note though that it is not possible -% to use too many of such commands in the same -% document, due to some limitations of -% \LaTeX{}. -% ^^A Declaring them does not seem to be a -% ^^A problem, and I will welcome any information by -% ^^A knowledgeable people. -% -% \item[math accents:] an option §mathaccents§ is -% provided to pick up the accents in math mode from the -% text font, but the package knows only |T1|, |LY1| or -% |OT1|-compatible encodings. -% -% \end{description} -% -% Regarding the encoding-dependent glyphs: the en-dash, -% the dotless i and j, the math accents, the hbar, are -% encoding dependent and the relevant decisions are made -% by \mst at the time it is loaded. So you can -% use math versions with different encodings but, -% regarding these characters only those with the same -% encoding as the normal math version will display them -% correctly. -% -% \subsection{Commands} -% -% \subsubsection{Preamble-only commands} -% Nothing is necessary besides loading \mst, possibly -% with some customizing options. The following commands provide -% enhancements to the basic use of the package. -% \begin{itemize} -% \item §\Mathastext§: reinitializes \mst according to the current -% defaults of encoding, family, series and shape.\footnote{updates -% also the font and shapes for the Greek letters (§LGRgreek§ -% option), and the skips to be inserted after the symbols -% $\oldforall$ and $\oldexists$, see \emph{infra.}} -% \begin{itemize} -% \item It can also be preceded optionally by one or -% more of\footnote{these commands exist also with -% long names: \texttt{\char92Mathastextencoding}, -% etc\dots{} The same applies to the other commands -% mentioned in this section.} -% §\MTencoding§\marg{enc}, -% §\MTfamily§\marg{fam}, -% §\MTseries§\marg{ser}, -% §\MTshape§\marg{sh}, and, new with version -% |1.1|, §\MTlettershape§\marg{sh}. For -% example valid values are, respectively, \meta{T1}, -% \meta{phv}, \meta{m}, \meta{n}, and \meta{it}: this -% is the Helvetica font in T1-encoding, regular -% (medium) series, upright shape, and the letters -% will be in italic shape. Once used their effect applies to all -% succeeding calls to \cs{Mathastext}, and can only be undone by using -% them again. -% \item \textbf{math versions:} starting with version |1.12| \cs{Mathastext} accepts an -% optional argument, which will serve as a name to -% designate the corresponding math version (without -% optional argument \cs{Mathastext} redefines the default -% normal and bold versions.) This argument, being -% optional, must be enclosed within square brackets.\footnote{The allowed -% version names are as for the \LaTeX{} \cs{DeclareMathVersion} macro. Do -% not use ``normal'' or ``bold''; this is already taken care of by a call -% to \cs{Mathastext} without optional argument.} -% \end{itemize} -% -% \item -% §\MTWillUse§\oarg{ltsh}\marg{enc}\marg{fam}\marg{ser}\marg{sh}: -% tells \mst to use the font with the -% specified encoding, family, series, and shape for -% the letters and digits (and all other afflicted -% characters) in math mode. The optional argument -% \meta{ltsh} specifies a shape for the letters, for -% example \cs{itdefault}, or directly \meta{it} or -% \meta{sc}. -% -% \item -% §\MTDeclareVersion§\oarg{ltsh}\marg{name}\marg{enc}\marg{fam}\marg{ser}\marg{sh}: -% declares that the document will have access to the font -% with the specified characteristics, under the math version name -% \meta{name}. For -% example:\\ -% \hbox -% to\hsize{\hss§\MTDeclareVersion[sc]\{palatino\}\{T1\}\{ppl\}\{b\}\{sl\}§\hss} -% declares under the name |palatino| a version where -% mathematics will be typeset using the Palatino font in -% T1-encoding, bold, slanted, and the letters will in fact be -% in caps and small caps (and bold).\footnote{I do not -% especially recommend to use this in real life!} When the -% optional argument is absent, and \mst was loaded -% with the §italic§ option, then the default letter shape -% will be |it|,\footnote{more precisely, the shape is the -% latest value passed in one of the previously used package -% commands to specify the shape of letters, or the \cs{itdefault} -% of the time of loading the package.} else letters will -% have the same shape as used for digits and operator-names. -% \item §\MTboldvariant§\marg{var}: when used before §\Mathastext§, -% specifies which bold -% (|b|, |sb|, |bx|, \dots) to be used by \cs{mathbf} (and -% \cs{boldmath}). Default is the \cs{bfdefault} at the time of -% loading \mst. When used before the declaration -% of a version, decides the way \cs{mathbf} will act in this version. -% \item §\MTEulerScale§\marg{factor}: scales the Euler font by -% \meta{factor}. -% \item §\MTSymbolScale§\marg{factor}: scales the Symbol font by -% \meta{factor}. -% \item §\MTitgreek§, §\MTupgreek§, §\MTitGreek§, §\MTupGreek§: -% optional commands, active only in -% the case of the §LGRgreek§ option, to decide the shape of the -% Greek letters in the versions which will be declared next. -% \item §\MTgreekfont§\marg{fontfamily}: optional command with a mandatory -% argument which specifies the font for Greek letters in all \mst math -% versions declared afterwards via \cs{Mathastext} or \cs{MTDeclareVersion}. Only effective with §LGRgreek§ option. -% \item §\MTexistsskip§\marg{math glue}: specifies the amount of skip or -% more generally glue to put after each $\oldexists$ math symbol. -% Indeed, upright letters (or digits for that matter) often appear to -% be positioned a bit too close to the quantifier: -% $\oldexists\mathrm{B}$. The package default is to add a |1mu| skip -% (this default is set to zero in the case of §italic§): -% $\oldexists\mskip 1mu\mathrm{B}$. One can change the default with -% the following syntax: |\MTexistsskip{2mu plus 1mu minus 1mu}|, which -% must be followed with a \cs{Mathastext} command (or -% \cs{MTDeclareVersion}), with or without version name, and will -% remain effective in all subsequently declared math versions. In the -% case of the option §subdued§, the skips are set to zero for the -% normal and bold math versions and the command has no effect for -% them. In the case of the option §italic§, the command has to be -% used, as the default skip is zero. -% -% \item §\MTforallskip§\marg{math glue}: the default is to add a -% |.6667mu| math skip after each $\oldforall$ (except with the option -% §italic§ for which the default is set to zero). Compare -% $\oldforall\mskip.6667mu\mathrm{F}$ (has the skip) with -% $\oldforall\mathrm{F}$ (has no skip). Use this command to set up -% the skip or glue to be used in the \emph{next to be declared} math -% versions. In the case of the option §subdued§, the -% command has no effect for the normal and bold math -% versions. In the case of the option §italic§, the command must be -% used because the default skip is zero. -% \end{itemize} -% -% \subsubsection{Commands to be used in the body} -% -% \begin{itemize} -% \item -% §\MTVersion§\oarg{nametext}\marg{namemath}:\footnote{\cs{MTVersion} -% is also available as \cs{MTversion}.} in the absence -% of the optional argument changes simultaneously the -% text and the math fonts to be the fonts corresponding -% to the version \meta{namemath}. If there is an -% optional argument then the text fonts will use -% \meta{nametext} and the math mode will use -% \meta{namemath}. To change only the math fonts, use -% the \LaTeX{} command \cs{mathversion}. -% \end{itemize} -% All further commands are for math mode only. -% \begin{itemize} -% \item §\hbar§: this is constructed -% (in a way compatible with the §italic§ option) from -% the §h§ letter and the \={ } accent from the -% \mst font. Note that \cs{mathrm}|{\hbar}| and -% \cs{mathbf}|{\hbar}| should work and that \cs{hbar} -% does scale in subscripts and exponents. Only for |T1| -% and |OT1| (or |LY1|) encodings. -% \item §\fouriervec§: this is a |\vec| accent taken from the Fourier font; -% the |fourier| package need not be loaded. Active only -% if option §fouriervec§. -% \item §\pmvec§: this provides a poor man \cs{vec} accent command, for -% upright letters. It uses the right arrow. Does not change -% size in subscripts and exponents. -% \item §\Mathnormal§, §\Mathrm§, §\Mathbf§, §\Mathit§, §\Mathsf§, -% §\Mathtt§: modifications of the original \cs{mathnormal}, -% \cs{mathrm}, \cs{mathbf}, \cs{mathit}, \cs{mathsf}, \cs{mathtt} to -% use the mathastextified font. By -% default, the originals are identified with the new commands. The -% underlying internal \LaTeX{} structures related to the original -% commands are not overwritten, and these commands can thus be stored -% with a \cs{let} before |\usepackage{mathastext}|, to be used in case of -% necessity (this is what option |subdued| does.) -% \item §\mathnormalbold§: a bold version of \cs{mathnormal}. Differs -% from §\mathbf§ when the §italic§ option has been used, or when use -% has been made of §\MTlettershape§ to specify a shape for letters -% distinct from the one for digits and operator names, or similarly -% when the math version has been declared via §\MTDeclareVersion§ with -% its optional parameter for shape of letters. -% \item §\inodot§, §\jnodot§: the corresponding glyphs in -% the chosen font for math mode. By default, will -% overwrite |\imath| and |\jmath|. With version |1.12| -% by default §\i§ and §\j§ work also in math mode and -% give then §\inodot§, resp. §\jnodot§. This should work for -% all 8bit-encodings having these glyphs, and -% also in Unicode. -% \item §\MathEuler§, §\MathEulerBold§: math alphabets to access -% all the glyphs of the Euler font, if option §eulergreek§ (or -% §eulerdigits§) was passed to the package. -% \item §\MathPSymbol§: math alphabet to access the Symbol font. -% \item when one of the options §symbolgreek§, -% §eulergreek§, or §selfGreek§ is passed to the package -% the capital Greek letters which look like their Latin -% counterparts acquire names: \cs{Digamma}, -% \cs{Alpha}, \cs{Beta}, \cs{Epsilon}, \cs{Zeta}, -% \cs{Eta}, \cs{Iota}, \cs{Kappa}, \cs{Mu}, \cs{Nu}, -% \cs{Omicron}, \cs{Rho}, \cs{Tau}, \cs{Chi} (no -% \cs{Digamma} for Symbol). Also an \cs{omicron} -% control sequence is provided. -% \item |LGR| Greek and `var'-letters: only the -% \cs{varsigma} is available in this encoding, so using -% for example \cs{varphi} will load the previous default math -% font. It might thus be suitable when recompiling -% already written \LaTeX{} sources to add to the preamble -% \cs{let}\cs{varphi}$=$\cs{phi}, -% \cs{let}\cs{varepsilon}$=$\cs{epsilon}, etc\dots, -% in case only the `variant' form of the letter was used -% in the documents. -% \item Miscelleneous mathematical symbols from the postscript Symbol font -% are made available (or replaced) when option §symbolmisc§ is -% passed. They are \cs{prod}~$\prod$ \cs{sum}~$\sum$ -% \cs{implies}~$\implies$ \cs{impliedby}~$\impliedby$ \cs{iff}~$\iff$ -% \cs{shortiff}~$\shortiff$ \cs{to}~$\to$ \cs{longto}~$\longto$ -% \cs{mapsto}~$\mapsto$ \cs{longmapsto}~$\longmapsto$ -% \cs{aleph}~$\aleph$ \cs{inftypsy}~$\inftypsy$ \cs{emptyset}~$\emptyset$ -% \cs{surd}~$\surd$ \cs{nabla}~$\nabla$ \cs{angle}~$\angle$ -% \cs{forall}~$\forall$ \cs{exists}~$\exists$ \cs{neg}~$\neg$ -% \cs{clubsuit}~$\clubsuit$ \cs{diamondsuit}~$\diamondsuit$ -% \cs{heartsuit}~$\heartsuit$ \cs{spadesuit}~$\spadesuit$ -% \cs{smallint}~$\smallint$ \cs{wedge}~$\wedge$ \cs{vee}~$\vee$ -% \cs{cap}~$\cap$ \cs{cup}~$\cup$ \cs{bullet}~$\bullet$ \cs{div}~$\div$ -% \cs{otimes}~$\otimes$ \cs{oplus}~$\oplus$ \cs{pm}~$\pm$ \cs{ast}~$\ast$ -% \cs{times}~$\times$ \cs{proptopsy}~$\proptopsy$ \cs{mid}~$\mid$ -% \cs{leq}~$\leq$ \cs{geq}~$\geq$ \cs{approx}~$\approx$ -% \cs{supset}~$\supset$ \cs{subset}~$\subset$ \cs{supseteq}~$\supseteq$ -% \cs{subseteq}~$\subseteq$ \cs{in}~$\in$ \cs{sim}~$\sim$ -% \cs{cong}~$\cong$ \cs{perp}~$\perp$ \cs{equiv}~$\equiv$ -% \cs{notin}~$\notin$ \cs{langle}~$\langle$ \cs{rangle}~$\rangle$. And a -% \cs{DotTriangle}~$\DotTriangle$ is made available by option §symbolre§ -% (which overwrites \cs{Re} and \cs{Im}: $\Re,\Im$). The \cs{inftypsy} -% and \cs{proptopsy} have these names to leave up to the user the choice -% to replace (or no) the original (larger) \cs{infty} -% $\infty$ and \cs{propto} $\propto$. -% -% Regarding the \cs{prod} and \cs{sum} commands: they will use the Symbol -% glyphs $\prod\sum$ in inline math, and in display -% math -% the Computer Modern ones (or whatever is set up by other -% packages) : \[\prod\sum\] The package provides \cs{prodpsy} and -% \cs{sumpsy}: if one really wants in all situations the Symbol glyphs, -% one can do \cs{let}\cs{prod}\cs{prodpsy} and -% \cs{let}\cs{sum}\cs{sumpsy}. Also \cs{defaultprod} and \cs{defaultsum} -% will refer to the \cs{prod} and \cs{sum} before redefinition by the -% package: this is to allow constructs such as -% |$\displaystyle\defaultprod$| or -% |\[\textstyle\defaultprod\]|, because they would not work -% with the \cs{prod} and \cs{sum} as re-defined by the package. -% \end{itemize} -% -% \subsection{Complete list of options} -% -% \begin{itemize} -% \item §basic§: only mathastextify letters and digits. -% \item §subdued§: do not change the default fonts or alphabets in -% math mode, turn on the \mst-ification only after an explicit -% \cs{MTversion} command. -% \item §italic§: the letters default to italic shape in -% math mode. -% \item §frenchmath§: italic lowercase Latin letters, but uppercase -% Latin letters in the same font as for digits and operator names. -% In general this means that they will be upright. In case of the -% §LGRgreek§ option, §frenchmath§ influences also the shape of the -% Greek letters. -% \item §endash§, §emdash§: use the text font en-dash (\textendash) or even -% the em-dash (\textemdash, but this seems crazy) for the minus sign -% rather than {}-{}. §endash§ option is default for the package. -% \item §noendash§: the minus sign will be the - from the -% text font, not the en-dash \textendash. -% \item §nohbar§: prevents \mst from defining its own -% \cs{hbar}. -% \item §nolessnomore§: besides -% !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,\$\,\%\,\& -% \mst treats also \DeleteShortVerb{\|} -% $\mathord{<}\,\mathord{>}\,\mathord{|}$\, \{\,\} and -% $\backslash$.\MakeShortVerb{\|} Use this option to not -% do it. The option §nolessnomore§ is activated by default -% in case of |OT1|-encoding. -% \item further excluding options: §noexclam§\ !\,?\ -% §noasterisk§\ *\ §nopunctuation§\ ,\,.\,:\,;\ §noplus§, -% §nominus§, §noplusnominus§\ +\,\textendash{} §noequal§\ =\ -% §noparenthesis§\, (\,)\,[\,]\,/ \ §nospecials§\ -% \#\,\$\,\%\,\& and §nodigits§. -% \item §alldelims§: true by default, means that the -% characters excluded by §nolessnomore§ are -% treated. Use this option in case of a mono-width -% |OT1|-encoded font. -% \item §symbolgreek§, §symboldigits§: to let Greek letters (digits) use the -% Symbol font. -% \item §symbolre§: replaces \cs{Re} and \cs{Im} by the -% Symbol glyphs $\Re, \Im$ and defines a -% \cs{DotTriangle} command ($\DotTriangle$). -% \item §symbolmisc§: takes quite a few glyphs, including logical arrows, -% product and sum signs from Symbol. They are listed \emph{supra}. A -% \cs{renewcommand}|{\int}{\smallint}| will maximize even more -% the use of the Symbol font. -% \item §symboldelimiters§: the characters apart from -% letters and digits will be taken from the Symbol font. -% \item §symbol§: combines §symbolgreek§, §symbolre§, and §symbolmisc§. -% \item §symbolmax§: combines §symbol§ and §symboldelimiters§. -% \item §eulergreek§, §eulerdigits§: to let Greek letters (digits) use the -% Euler font. -% \item §LGRgreek§: this is for a font which is also available in -% LGR-encoding. It is possible to change the font per math version, via -% the use of the §\MTgreekfont§ command in the preamble. -% \item §LGRgreeks§: each declared math version will be supposed to be with a -% font which is also available in LGR-encoding. -% \item §selfGreek§: this is for a font which is also available in -% |OT1|-encoding and contains the glyphs for the default eleven capital Greek -% letters. -% \item §selfGreeks§: each declared math version will be supposed to be with -% a font with the eleven capital Greek letters in its |OT1|-encoded -% version. -% \item §upgreek§, §itgreek§, §upGreek§, §itGreek§: -% options to tell to use \cs{itdefault} or \cs{updefault} for the lowercase -% and uppercase (or only the uppercase) Greek letters. Only operant -% in the case of the §LGRgreek(s)§ and §selfGreek(s)§ options. -% \item §mathaccents§: use the text font also for the math -% accents. As in vanilla \LaTeX{}, they are taken from the font -% for the digits and \cs{log}-like names. Obey the alphabet -% changing commands. Will work only for |T1|, |LY1|, or |OT1|-compatible encodings. -% \item §defaultbf§, §defaultit§, §defaultsf§, §defaulttt§: do not -% modify, respectively, the \cs{mathbf}, \cs{mathit}, \cs{mathsf}, -% and \cs{mathtt} commands to use the mathastextified -% font. This also prevents \mst to create internally -% \cs{Mathxx} alphabets (it never overwrites the original -% \cs{mathxx} things but let \cs{mathxx} point to \cs{Mathxx} -% instead), so one can use these options if one encounters a `too -% many math alphabets' \LaTeX{} error. -% \item §defaulnormal§, §defaultrm§: do not identify the default -% \cs{mathnormal} (resp. \cs{mathrm}) with the newly created -% \cs{Mathnormal} (resp. \cs{Mathrm}) commands which use the -% mathastextified fonts in each math version. -% \item §defaultalphabets§: all the §defaultxx§ options together, and -% additionally tells \mst not to create the \cs{mathnormalbold} alphabet either. -% \item §defaultimath§: do not overwrite \cs{imath} and -% \cs{jmath}, do not extend \cs{i} and \cs{j} to math mode use. -% \item §defaultmathsizes§: do not change the \LaTeX{} defaults for the sizes -% of exponents and subscripts. -% \item §fouriervec§: provides a \cs{fouriervec} command. The user can then -% add in the preamble \cs{let}\cs{vec}$=$\cs{fouriervec}. There is also -% always available a ``poor man'' vec accent \cs{pmvec} for upright letters. -% \end{itemize} -% -% Thanks to Kevin~\textsc{Klement}, Tariq~\textsc{Perwez} -% and Ricard~\textsc{Torres} for sending bug reports and feature requests when -% the first version of the package was issued. +\end{verbatim} +And now the same thing with fonts available on Mac OS X: +\begin{verbatim} +\documentclass{article} +\usepackage[hscale=0.8]{geometry} +\usepackage{multicol} +\usepackage[no-math]{fontspec} +\usepackage{lmodern} +\usepackage[subdued,italic]{mathastext} +\setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler] +\setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter] +\setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum] +\setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot] +\setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic] +\begin{document} + --- copy here the code from the previous example --- +\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum} +\TEST{Hoefler}\TEST{Typewriter}\TEST{bold} +\end{document} +\end{verbatim} + + +\section{Package options and commands} + +\subsection{Summary of main options} + \begin{description} +\item[{§italic, frenchmath§}:] italic letters in +math, upright uppercase if §frenchmath§. + \item[{§subdued§}:] acts in a subdued way. The \LaTeX{} normal and bold + math versions are left (quasi) unchanged. With version |1.15e| of + the package this statement applies also to the math alphabets + \cs{mathbf}, \cs{mathit}, \cs{mathsf}, and \cs{mathtt} (and not + only to \cs{mathnormal} and \cs{mathrm} as in previous versions.) +\item[{§LGRgreek, eulergreek, symbolgreek§}:] the + Greek letters will be taken, respectively from the + text font itself (in |LGR| encoding), or from the Euler + font, or from the Postscript Symbol font. +\item[{§symbolmax§}:] all characters + other than letters and digits, are taken from the + Symbol font. This option also makes a number of + further glyphs available, such as some basic + mathematical arrows, and the sum and product + signs. For documents with very simple needs in + mathematical symbols, \mst with option + §symbolmax§ may give in the end a PDF file quite + smaller than the one one would get without the + package. +\item[{§defaultmathsizes§}:] \mst sets up bigger sizes +for subscripts (it also copies code from the §moresize§ package to redefine + \cs{Huge} and define \cs{HUGE}). Use this option to prevent it from + doing so. +\item[{§defaultalphabets§}:] by default, \mst redeclares the math + alphabets \cs{mathrm}, \cs{mathit}, \cs{mathtt} etc\dots{} (but not + \cs{mathcal} of course) to refer to the current document text fonts (at the + time of loading the package and in each \mst math version). Use + this option to prevent it from doing so (each alphabet also has + its own disabling option). +\end{description} + +\subsection{Miscellaneous} + +\begin{description} +\item[the en-dash as minus sign:] Very often the - + character from the text font does not give a good + minus sign. So by default, the package uses the + en-dash sign \textendash{}. Use §noendash§ to + deactivate it. Starting with version |1.12| of the + package this `en-dash as minus' should work in all + encodings, including Unicode (if |fontspec| has been + loaded). + +\item[amsmath:] the behavior of the \cs{DeclareMathOperator} +command of |amsmath| is slightly modified by \mst. This +command initially allows crazy things like +\cs{DeclareMathOperator}\cs{crazy}\{m.ch-in'tr/u:c\} +and then the ., -, ', / and : will be typeset in the +roman font. But the font number was hardcoded in the macro +and furthermore the code of |amsmath| would cause an error +with Unicode engine as soon as some Unicode code is assigned +to the minus character.\footnote{To the experts: the $\sin$, +$\cos$, \dots{} operator names are \emph{not} defined by |amsmath| with +the help of the \cs{DeclareMathOperator} macro, hence are +not the cause of an error in \XeTeX{}/\LuaLaTeX{}. What \mst +does is to let to relax the \cs{newmcodes@} macro, so it is +possible to save it before loading \mst and re-establish +later, if really really this is what you want.} +This specific issue will perhaps be +fixed by some hypothetic future release of |amsmath|, or by other +packages providing patches, but I decided for a preemptive +strike. As a result the declaration above will not cause an +error when \cs{crazy} is used with a Unicode engine, but there + are now some spacings around the punctuation characters. To +avoid this use (also with \LaTeX{}):\\ +\centerline{\cs{DeclareMathOperator}\cs{crazy}\{m\{.\}ch\{-\}in\{'\}tr\{/\}u\{:\}c\}} +Note though that the quote ' will be typeset as a derivative sign $'$. + +\item[hbar:] The definition of \cs{hbar} inherited from + default \LaTeX{} will in our context make use of the + §h§ of the current math font (so for us, it is also + the text font, perhaps in italic shape), but the bar + accross the §h§ will come from the original default + math font for letters (usually |cmmi|), and + furthermore its placement on the §h§ can be + odd-looking. So we redefine \cs{hbar} to use only the + text font (and this will be aware of the §italic§ + option). Our construction does not always give an + optimal result (and its scope is limited to the |OT1|, + |LY1| and |T1| encodings), so an option §nohbar§ + deactivates it. There is no \cs{hslash} provided by + the package, though. The version |1.12| of the + package when dealing with a Unicode font tries to get + the \cs{hbar} directly as a glyph from the font. + + +\item[dotless i and j:] By default the package redefines + \cs{i} and \cs{j} to give the dotless i and j (if it + exists at all), \emph{also in math mode,} in the text + font. Will overwrite the default commands \cs{imath} + and \cs{jmath}. In version |1.12| of the package this + should work in all encodings, including Unicode (it + is then assumed that |fontspec| has been loaded, and + of course that the glyphs are indeed in the font). + + + \item[\XeTeX{} and \LuaLaTeX{}:] for the en-dash +and the dotless i and j, the package expects to detect +either the EU1 encoding for XeTeX{} or the EU2 encoding +for \LuaLaTeX{} (this will be true if |fontspec| was +loaded), or one of |OT1|, |LY1| or |T1|, else it +will renounce and not attempt to access the en-dash or the +dotless i and j glyphs. With \LaTeX{} and Pdf\LaTeX{}, +there is no such limitation and all 8bit-encodings +(containing these glyphs) should be ok. + + \item[fontspec:] one more note to users of +\XeTeX{}/\LuaLaTeX{} with |fontspec|: it has to be +loaded {with the option} §no-math§, +{and before} \mst. + +\item[vec accent:] The default \cs{vec} accent is not + appropriate for upright letters, so \mst + provides a \cs{fouriervec} which takes its glyph in a + Fourier font, and an Ersatz \cs{pmvec} + which is reasonably good looking on upright letters + and works with the \cs{rightarrow} glyph. Contrarily + to version |1.0|, the default \cs{vec} is not + overwritten with \cs{fouriervec}. And contrarily to + version |1.1|, one now needs to pass the option + §fouriervec§ to have the math accent \cs{fouriervec} + defined by the package. + + +\item[math alphabets:] + \begin{itemize} + \item We define a new math alphabet command + \cs{mathnormalbold} which gives direct access to + the bold version of the \cs{mathnormal} alphabet + (rather than using either the \cs{bm} command from + the |bm| package or the \cs{boldsymbol} command + from the |amsbsy| package). As it does not + exist in the default \LaTeX{} math font set-up, this + alphabet is \emph{not} subjected to the {subdued option} action. + \item The other math alphabet changing commands + defined by the package are \cs{MathEulerBold}, + \cs{MathEuler} and \cs{MathPSymbol}. + \item \cs{mathnormal}, \cs{mathrm}, \cs{mathbf}, + \cs{mathit}, \cs{mathsf} and \cs{mathtt} are modified + to make reference to the document text fonts (this + can be disabled by suitable package options). +\item version |1.2| of \mst has extended the scope of the math + alphabets to apply to non-alphabetical characters and to + operator names. This respects the automatic white spaces + added by \TeX{} around math symbols. + \end{itemize} + +\item[math accents:] an option §mathaccents§ is + provided to pick up the accents in math mode from the + text font, but the package knows only |T1|, |LY1| or + |OT1|-compatible encodings. + +\end{description} + +Regarding the encoding-dependent glyphs: the en-dash, the +dotless i and j, the math accents, the hbar, are encoding +dependent and the relevant decisions are made once by \mst at +the time it is loaded and are applied to all declared math +versions. So you can use math versions with different +encodings but, regarding these characters only those with the +same encoding as the normal math version will display them +correctly. + +\begin{framed} + It is thus recommended that all declared mathastext math + versions use the same font encoding. +\end{framed} + + \subsection{Commands} + +\subsubsection{Preamble-only commands} +Nothing is necessary besides loading \mst, possibly +with some customizing options. The following commands provide +enhancements to the basic use of the package. +\begin{itemize} +\item §\Mathastext§ (or §\mathastext§): reinitializes \mst according to the + current defaults of encoding, family, series and shape.\footnote{updates + also the font and shapes for the Greek letters (§LGRgreek§ option), and + the skips to be inserted after the symbols $\oldforall$ and $\oldexists$, + see \emph{infra.}} + \begin{itemize} + \item It can also be preceded optionally by one or + more of\footnote{these commands exist also with + long names: \texttt{\char92Mathastextencoding}, + etc\dots{} The same applies to the other commands + mentioned in this section.} + §\MTencoding§\marg{enc}, + §\MTfamily§\marg{fam}, + §\MTseries§\marg{ser}, + §\MTshape§\marg{sh}, and, new with version + |1.1|, §\MTlettershape§\marg{sh}. For + example valid values are, respectively, \meta{T1}, + \meta{phv}, \meta{m}, \meta{n}, and \meta{it}: this + is the Helvetica font in T1-encoding, regular + (medium) series, upright shape, and the letters + will be in italic shape. Once used their effect applies to all + succeeding calls to \cs{Mathastext}, and can only be undone by using + them again. + \item \textbf{math versions:} starting with version |1.12| \cs{Mathastext} accepts an + optional argument, which will serve as a name to + designate the corresponding math version (without + optional argument \cs{Mathastext} redefines the default + normal and bold versions.) This argument, being + optional, must be enclosed within square brackets.\footnote{The allowed + version names are as for the \LaTeX{} \cs{DeclareMathVersion} macro. Do + not use ``normal'' or ``bold''; this is already taken care of by a call + to \cs{Mathastext} without optional argument.} + \end{itemize} + + \item + §\MTWillUse§\oarg{ltsh}\marg{enc}\marg{fam}\marg{ser}\marg{sh}: + tells \mst to use the font with the + specified encoding, family, series, and shape for + the letters and digits (and all other afflicted + characters) in math mode. The optional argument + \meta{ltsh} specifies a shape for the letters, for + example \cs{itdefault}, or directly \meta{it} or + \meta{sc}. + +\item + §\MTDeclareVersion§\oarg{ltsh}\marg{name}\marg{enc}\marg{fam}\marg{ser}\marg{sh}: + declares that the document will have access to the font + with the specified characteristics, under the math version name + \meta{name}. For + example:\\ + \hbox + to\hsize{\hss§\MTDeclareVersion[sc]\{palatino\}\{T1\}\{ppl\}\{b\}\{sl\}§\hss} + declares under the name |palatino| a version where + mathematics will be typeset using the Palatino font in + T1-encoding, bold, slanted, and the letters will in fact be + in caps and small caps (and bold).\footnote{I do not + especially recommend to use this in real life!} When the + optional argument is absent, and \mst was loaded + with the §italic§ option, then the default letter shape + will be |it|,\footnote{more precisely, the shape is the + latest value passed in one of the previously used package + commands to specify the shape of letters, or the \cs{itdefault} + of the time of loading the package.} else letters will + have the same shape as used for digits and operator-names. +\item §\MTboldvariant§\marg{var}: when used before §\Mathastext§, +specifies which bold + (|b|, |sb|, |bx|, \dots) to be used by \cs{mathbf} (and + \cs{boldmath}). Default is the \cs{bfdefault} at the time of + loading \mst. When used before the declaration + of a version, decides the way \cs{mathbf} will act in this version. +\item §\MTEulerScale§\marg{factor}: scales the Euler font by + \meta{factor}. +\item §\MTSymbolScale§\marg{factor}: scales the Symbol font by + \meta{factor}. +\item §\MTitgreek§, §\MTupgreek§, §\MTitGreek§, §\MTupGreek§: +optional commands, active only in +the case of the §LGRgreek§ option, to decide the shape of the +Greek letters in the versions which will be declared next. + \item §\MTgreekfont§\marg{fontfamily}: optional command with a mandatory + argument which specifies the font for Greek letters in all \mst math + versions declared afterwards via \cs{Mathastext} or \cs{MTDeclareVersion}. Only effective with §LGRgreek§ option. +\end{itemize} + +\subsubsection{Commands usable everywhere} + +\begin{itemize} +\item §\MTexistsskip§\marg{math glue}: specifies the amount of + skip or more generally glue to put after each $\oldexists$ + math symbol. Indeed, upright letters (or digits for that + matter) often appear to be positioned a bit too close to the + quantifier: $\oldexists\mathrm{B}$. The package default is + to add a |1mu| skip (this default is set to zero in the case + of §italic§): $\oldexists\mskip 1mu\mathrm{B}$. One can + change the default with the following syntax: + |\MTexistsskip{2mu plus 1mu minus 1mu}|, which if used in + the preamble and followed with a \cs{Mathastext} command (or + \cs{MTDeclareVersion}), will be recorded in the definition + of this math version (and subsequent ones). One may also use + the command at any time in the document. In the case of the + option §subdued§, the skips are set to zero for the normal + and bold math versions. In the case of the option §italic§, + the default skip is set to zero. + +\item §\MTforallskip§\marg{math glue}: the default is to add a + |.6667mu| math skip after each $\oldforall$ (except with the + option §italic§ for which the default is set to zero). + Compare $\oldforall\mskip.6667mu\mathrm{F}$ (has the skip) + with $\oldforall\mathrm{F}$ (has no skip). Use this command + in the preamble to set up the skip or glue to be used in the + \emph{next to be declared} math versions. In the case of the + option §subdued§, the skips are set to be zero by default in + the normal and bold math versions. In the case of the option + §italic§, the default skip is zero for all math versions. + One may use the command also at any time in the document. + +\item §\MTprimeskip§\marg{math glue}: the default is to add a |0.5mu| skip + before the derivative glyph, except for the §italic§ option, and except in + the normal and bold math versions with option §subdued§. The same + observations apply. + +\item §\operatornamesobeymathalphabets§, + §\operatornamesdonotobeymathalphabets§, + §\nonlettersobeymathalphabets§, + §\nonlettersdonotobeymathalphabets§, + §\explicitbracesobeymathalphabets§, + §\explicitbracesdonotobeymathalphabets§: these commands + without argument may be used at any time in the document, + and what they do is in their names. The `explicit braces + thing' applies only when the `non letters thing' is active. + When a \cs{MTversion}\marg{version\_name} (or equivalently + \cs{mathastext}\marg{version\_name}) command is encountered + the default behavior is (re)-activated: it is to obey math + alphabets, except for the normal and bold math versions + under the |subdued| option. The status for the braces is + left to its previous state. +\end{itemize} + +\subsubsection{Body-only commands} + +\begin{itemize} +\item §\MTVersion§\oarg{nametext}\marg{namemath}:\footnote{\cs{MTVersion} + is also available as \cs{MTversion}, \cs{Mathastextversion} and \cs{mathastextversion}.} in the absence + of the optional argument changes simultaneously the + text and the math fonts to be the fonts corresponding + to the version \meta{namemath}. If there is an + optional argument then the text fonts will use + \meta{nametext} and the math mode will use + \meta{namemath}. To change only the math fonts, use + the \LaTeX{} command \cs{mathversion}. However this is not + recommended as \mst does a bit of additional configuration + when invoked with \cs{MTversion}. +\end{itemize} +All further commands are for math mode only. +\begin{itemize} +\item §\hbar§: this is constructed + (in a way compatible with the §italic§ option) from + the §h§ letter and the \={ } accent from the + \mst font. Note that \cs{mathrm}|{\hbar}| and + \cs{mathbf}|{\hbar}| should work and that \cs{hbar} + does scale in subscripts and exponents. Only for |T1| + and |OT1| (or |LY1|) encodings. +\item §\fouriervec§: this is a |\vec| accent taken from the Fourier font; +the |fourier| package need not be loaded. Active only +if option §fouriervec§. +\item §\pmvec§: this provides a poor man \cs{vec} accent command, for +upright letters. It uses the right arrow. Does not change +size in subscripts and exponents. + \item §\mathnormal§, §\mathrm§, §\mathbf§, §\mathit§, §\mathsf§, +§\mathtt§: modifications of the original \cs{mathnormal}, +\cs{mathrm}, \cs{mathbf}, \cs{mathit}, \cs{mathsf}, \cs{mathtt} to +use the mathastextified font. The +underlying internal \LaTeX{} structures related to the original +commands are not overwritten, so the original commands can be saved under +other names before |\usepackage{mathastext}|, to be used in case of +necessity (this is what option |subdued| does.) + \item §\mathnormalbold§: a bold version of \cs{mathnormal}. Differs +from §\mathbf§ when the §italic§ option has been used, or when use +has been made of §\MTlettershape§ to specify a shape for letters +distinct from the one for digits and operator names, or similarly +when the math version has been declared via §\MTDeclareVersion§ with +its optional parameter for shape of letters. +\item §\inodot§, §\jnodot§: the corresponding glyphs in + the chosen font for math mode. By default, will + overwrite |\imath| and |\jmath|. With version |1.12| + by default §\i§ and §\j§ work also in math mode and + give then §\inodot§, resp. §\jnodot§. This should work for + all 8bit-encodings having these glyphs, and + also in Unicode. +\item §\MathEuler§, §\MathEulerBold§: math alphabets to access +all the glyphs of the Euler font, if option §eulergreek§ (or +§eulerdigits§) was passed to the package. +\item §\MathPSymbol§: math alphabet to access the Symbol font. +\item when one of the options §symbolgreek§, + §eulergreek§, or §selfGreek§ is passed to the package + the capital Greek letters which look like their Latin + counterparts acquire names: \cs{Digamma}, + \cs{Alpha}, \cs{Beta}, \cs{Epsilon}, \cs{Zeta}, + \cs{Eta}, \cs{Iota}, \cs{Kappa}, \cs{Mu}, \cs{Nu}, + \cs{Omicron}, \cs{Rho}, \cs{Tau}, \cs{Chi} (no + \cs{Digamma} for Symbol). Also an \cs{omicron} + control sequence is provided. +\item |LGR| Greek and `var'-letters: only the + \cs{varsigma} is available in this encoding, so using + for example \cs{varphi} will load the previous default math + font. It might thus be suitable when recompiling + already written \LaTeX{} sources to add to the preamble + \cs{let}\cs{varphi}$=$\cs{phi}, + \cs{let}\cs{varepsilon}$=$\cs{epsilon}, etc\dots, + in case only the `variant' form of the letter was used + in the documents. +\item Miscelleneous mathematical symbols from the postscript Symbol font + are made available (or replaced) when option §symbolmisc§ is + passed. They are \cs{prod}~$\prod$ \cs{sum}~$\sum$ + \cs{implies}~$\implies$ \cs{impliedby}~$\impliedby$ \cs{iff}~$\iff$ + \cs{shortiff}~$\shortiff$ \cs{to}~$\to$ \cs{longto}~$\longto$ + \cs{mapsto}~$\mapsto$ \cs{longmapsto}~$\longmapsto$ + \cs{aleph}~$\aleph$ \cs{inftypsy}~$\inftypsy$ \cs{emptyset}~$\emptyset$ + \cs{surd}~$\surd$ \cs{nabla}~$\nabla$ \cs{angle}~$\angle$ + \cs{forall}~$\forall$ \cs{exists}~$\exists$ \cs{neg}~$\neg$ + \cs{clubsuit}~$\clubsuit$ \cs{diamondsuit}~$\diamondsuit$ + \cs{heartsuit}~$\heartsuit$ \cs{spadesuit}~$\spadesuit$ + \cs{smallint}~$\smallint$ \cs{wedge}~$\wedge$ \cs{vee}~$\vee$ + \cs{cap}~$\cap$ \cs{cup}~$\cup$ \cs{bullet}~$\bullet$ \cs{div}~$\div$ + \cs{otimes}~$\otimes$ \cs{oplus}~$\oplus$ \cs{pm}~$\pm$ \cs{ast}~$\ast$ + \cs{times}~$\times$ \cs{proptopsy}~$\proptopsy$ \cs{mid}~$\mid$ + \cs{leq}~$\leq$ \cs{geq}~$\geq$ \cs{approx}~$\approx$ + \cs{supset}~$\supset$ \cs{subset}~$\subset$ \cs{supseteq}~$\supseteq$ + \cs{subseteq}~$\subseteq$ \cs{in}~$\in$ \cs{sim}~$\sim$ + \cs{cong}~$\cong$ \cs{perp}~$\perp$ \cs{equiv}~$\equiv$ + \cs{notin}~$\notin$ \cs{langle}~$\langle$ \cs{rangle}~$\rangle$. And a + \cs{DotTriangle}~$\DotTriangle$ is made available by option §symbolre§ + (which overwrites \cs{Re} and \cs{Im}: $\Re,\Im$). The \cs{inftypsy} + and \cs{proptopsy} have these names to leave up to the user the choice + to replace (or no) the original (larger) \cs{infty} + $\infty$ and \cs{propto} $\propto$. + + Regarding the \cs{prod} and \cs{sum} commands: they will use the Symbol + glyphs $\prod\sum$ in inline math, and in display + math + the Computer Modern ones (or whatever is set up by other + packages) : \[\prod\sum\] The package provides \cs{prodpsy} and + \cs{sumpsy}: if one really wants in all situations the Symbol glyphs, + one can do \cs{let}\cs{prod}\cs{prodpsy} and + \cs{let}\cs{sum}\cs{sumpsy}. Also \cs{defaultprod} and \cs{defaultsum} + will refer to the \cs{prod} and \cs{sum} before redefinition by the + package: this is to allow constructs such as + |$\displaystyle\defaultprod$| or + |\[\textstyle\defaultprod\]|, because they would not work + with the \cs{prod} and \cs{sum} as re-defined by the package. +\end{itemize} + + \subsection{Complete list of options} + + \begin{itemize} + \item §basic§: only mathastextify letters and digits. + \item §subdued§: do not change the default fonts or the math + alphabets in math mode for the normal and bold math + versions, turn on the \mst-ification only after a explicit + \cs{MTversion} (or \cs{mathastextversion}) command + activating an additional math version as declared in the + preamble. + \item §italic§: the letters default to italic shape in + math mode. +\item §frenchmath§: italic lowercase Latin letters, but uppercase + Latin letters in the same font as for digits and operator names. + In general this means that they will be upright. In case of the + §LGRgreek§ option, §frenchmath§ influences also the shape of the + Greek letters. + \item §endash§, §emdash§: use the text font en-dash (\textendash) or even + the em-dash (\textemdash, but this seems crazy) for the minus sign + rather than {}-{}. §endash§ option is default for the package. +\item §noendash§: the minus sign will be the - from the +text font, not the en-dash \textendash. +\item §nohbar§: prevents \mst from defining its own + \cs{hbar}. +\item §nolessnomore§: besides + !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,\$\,\%\,\& + \mst treats also \DeleteShortVerb{\|} + $\mathord{<}\,\mathord{>}\,\mathord{|}$\, \{\,\} and + $\backslash$.\MakeShortVerb{\|} Use this option to not + do it. The option §nolessnomore§ is activated by default + in case of |OT1|-encoding. + \item further excluding options: §noexclam§ !\,?\ +§noasterisk§ *\ §nopunctuation§ ,\,.\,:\,;\ §noplus§, +§nominus§, §noplusnominus§\ +\,\textendash{} §noequal§ =\ +§noparenthesis§ (\,)\,[\,]\,/\ §nospecials§ +\#\,\$\,\%\,\&\ and §nodigits§. + \item §alldelims§: true by default, means that the +characters excluded by §nolessnomore§ are +treated. Use this option in case of a mono-width +|OT1|-encoded font. +\item §nosmalldelims§: this prevents \mst from trying to pick + up in the text font the `small variants' of some math + delimiters; it only affects what happens when a character + such as a left parenthesis $($ or $[$ is used as a + delimiter, and \TeX{} has chosen the smallest sized variant. + This has no impact on what happens when they are not used as + delimiters: then if not disabled by corresponding options + these characters are always picked up from the text font. + \item §symbolgreek§, §symboldigits§: to let Greek letters (digits) use the +Symbol font. + \item §symbolre§: replaces \cs{Re} and \cs{Im} by the + Symbol glyphs $\Re, \Im$ and defines a +\cs{DotTriangle} command ($\DotTriangle$). + \item §symbolmisc§: takes quite a few glyphs, including logical arrows, +product and sum signs from Symbol. They are listed \emph{supra}. A + \cs{renewcommand}|{\int}{\smallint}| will maximize even more +the use of the Symbol font. + \item §symboldelimiters§: the characters apart from + letters and digits will be taken from the Symbol font. + \item §symbol§: combines §symbolgreek§, §symbolre§, and §symbolmisc§. + \item §symbolmax§: combines §symbol§ and §symboldelimiters§. + \item §eulergreek§, §eulerdigits§: to let Greek letters (digits) use the +Euler font. + \item §LGRgreek§: this is for a font which is also available in + LGR-encoding. It is possible to change the font per math version, via + the use of the §\MTgreekfont§ command in the preamble. + \item §LGRgreeks§: each declared math version will be supposed to be with a + font which is also available in LGR-encoding. + \item §selfGreek§: this is for a font which is also available in + |OT1|-encoding and contains the glyphs for the default eleven capital Greek +letters. + \item §selfGreeks§: each declared math version will be supposed to be with + a font with the eleven capital Greek letters in its |OT1|-encoded + version. + \item §upgreek§, §itgreek§, §upGreek§, §itGreek§: + options to tell to use \cs{itdefault} or \cs{updefault} for the lowercase + and uppercase (or only the uppercase) Greek letters. Only operant + in the case of the §LGRgreek(s)§ and §selfGreek(s)§ options. + \item §mathaccents§: use the text font also for the math +accents. As in vanilla \LaTeX{}, they are taken from the font +for the digits and \cs{log}-like names. Obey the alphabet +changing commands. Will work only for |T1|, |LY1|, or |OT1|-compatible encodings. + \item §defaultbf§, §defaultit§, §defaultsf§, §defaulttt§: do not +set up, respectively, the \cs{mathbf}, \cs{mathit}, \cs{mathsf}, +and \cs{mathtt} commands to use the mathastext-ified +font. This also prevents \mst to create internally +\cs{Mathxx} alphabets (it never overwrites the original +\cs{mathxx} things but let \cs{mathxx} point to \cs{Mathxx} +instead), so one can use these options if one encounters a `too +many math alphabets' \LaTeX{} error. +\item §defaulnormal§, §defaultrm§: do not identify the default +\cs{mathnormal} (resp. \cs{mathrm}) with the newly created +\cs{Mathnormal} (resp. \cs{Mathrm}) commands which use the +mathastextified fonts in each math version. +\item §defaultalphabets§: all the §defaultxx§ options together, and +additionally tells \mst not to create the \cs{mathnormalbold} alphabet either. + \item §defaultimath§: do not overwrite \cs{imath} and + \cs{jmath}, do not extend \cs{i} and \cs{j} to math mode use. + \item §defaultmathsizes§: do not change the \LaTeX{} defaults for the sizes + of exponents and subscripts. + \item §fouriervec§: provides a \cs{fouriervec} command. The user can then + add in the preamble \cs{let}\cs{vec}$=$\cs{fouriervec}. There is also + always available a ``poor man'' vec accent \cs{pmvec} for upright letters. + \end{itemize} + +Thanks to Kevin~\textsc{Klement}, Tariq~\textsc{Perwez} +and Ricard~\textsc{Torres} for sending bug reports and feature requests when +the first version of the package was issued. + + \begin{center} +Numerous examples will be found there:\\ + \url{http://jf.burnol.free.fr/mathastext.html}\\ + \url{http://jf.burnol.free.fr/showcase.html} + \end{center} + +\catcode`\§=12 + +%\clearpage +\section{Implementation} + +\makeatletter +\StopEventually{\check@checksum\end{document}} +\makeatother + +\makeatletter +\begingroup +\topsep\MacrocodeTopsep +\trivlist\parskip\z@\item[] +\macro@font +\leftskip\@totalleftmargin \advance\leftskip\MacroIndent +\rightskip\z@ \parindent\z@ \parfillskip\@flushglue +\global\@newlistfalse \global\@minipagefalse +\ifcodeline@index + \everypar{\global\advance\c@CodelineNo\@ne + \llap{\theCodelineNo\ \hskip\@totalleftmargin}}% +\fi +\string\ProvidesPackage\string{\pkgname\string}\par +\noindent\space [\pkgdate\space\pkgversion\space\pkgdescription]\par +\nointerlineskip +\global\@inlabelfalse +\endtrivlist +\endgroup +\makeatother +% The catcode hackery next is to avoid to have <*package> to be listed +% in the commented source code... +% (c) 2012/11/19 jf burnol ;-) +\MakePercentIgnore % -% \begin{center} -% Numerous examples will be found there:\\ -% \url{http://jf.burnol.free.fr/mathastext.html}\\ -% \url{http://jf.burnol.free.fr/showcase.html} -% \end{center} -% \catcode`\§=12 -% \StopEventually{} -% -% \clearpage -% \section{Implementation} +% \catcode`\<=0 \catcode`\>=11 \catcode`\*=11 \catcode`\/=11 +% \let\relax +% \def<*package>{\catcode`\<=12 \catcode`\>=12 \catcode`\*=12 \catcode`\/=12} % -% At my initial point I had at my disposal only the commands of a normal -% user, and little by little I started using more macros of the \LaTeX{} -% internals. So now the code has bits and pieces of various styles, -% although for |1.15f| I have tried to cut down the number of too -% amateurish looking branches. +% +%<*package> % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mathastext} - [2012/10/25 v1.15g Use the text font in math mode (jfB)] % \end{macrocode} % Testing for XeTeX and LuaLaTeX. I should load some package for this % code picked up somewhere. @@ -1381,28 +1902,33 @@ symbolmisc,symbolre,LGRgreek]{mathastext} \else \LuaTeXtrue \fi -%% -\def\mt@oti{OT1}\def\mt@ti{T1}\def\mt@lyi{LY1} -\def\mt@eui{EU1}\def\mt@euii{EU2} -\newif\ifmt@goahead -\newif\ifmt@abort -\newif\ifmt@optionalparam -% \end{macrocode} -% \begin{macro}{\m@t@enc} -% \begin{macro}{\m@t@fam} -% \begin{macro}{\m@t@ser} -% \begin{macro}{\m@t@opsh} -% \begin{macro}{\m@t@bold} -% \begin{macro}{\m@t@ltsh} -% Macros to Store the font settings, each math version will have its +% \end{macrocode} +% |v1.2|: all inner macros of \mst now starts with |\mst@| for a cleaner +% name-space. Let's cross fingers and hope that the automatic +% search/replace in the emacs buffer did not create in this code +% doubly-defined macros. +% \begin{macrocode} +\def\mst@oti{OT1}\def\mst@ti{T1}\def\mst@lyi{LY1} +\def\mst@eui{EU1}\def\mst@euii{EU2} +\newif\ifmst@goahead +\newif\ifmst@abort +\newif\ifmst@optionalparam +% \end{macrocode} +% \begin{macro}{\mst@enc} +% \begin{macro}{\mst@fam} +% \begin{macro}{\mst@ser} +% \begin{macro}{\mst@opsh} +% \begin{macro}{\mst@bold} +% \begin{macro}{\mst@ltsh} +% Macros to store the font settings, each math version will have its % own records. % \begin{macrocode} - \def\m@t@enc{\encodingdefault} - \def\m@t@fam{\familydefault} - \def\m@t@ser{\seriesdefault} - \def\m@t@opsh{\shapedefault} %% will be default shape for operator names - \def\m@t@bold{\bfdefault} - \def\m@t@ltsh{\shapedefault} %% will be default shape for letters + \def\mst@enc{\encodingdefault} + \def\mst@fam{\familydefault} + \def\mst@ser{\seriesdefault} + \def\mst@opsh{\shapedefault} %% will be default shape for operator names + \def\mst@bold{\bfdefault} + \def\mst@ltsh{\shapedefault} %% will be default shape for letters % \end{macrocode} % \end{macro} % \end{macro} @@ -1410,172 +1936,244 @@ symbolmisc,symbolre,LGRgreek]{mathastext} % \end{macro} % \end{macro} % \end{macro} -% \begin{macro}{\m@t@greekfont} -% v1.15c: for use by the LGRgreek and selfGreek options. Defined as +% \begin{macro}{\mst@greekfont} +% |v1.15c|: for use by the LGRgreek and selfGreek options. Defined as % an \cs{edef} in order to be able to set-up once and for all the % Greek at the time of \cs{usepackage}. Modifiable in the preamble % via \cs{MTgreekfont}\marg{font\_name}\cs{Mathastext}. % \begin{macrocode} - \edef\m@t@greekfont{\familydefault} %% v 1.15c -% \end{macrocode} -% \end{macro} -% \begin{macro}{\exists} -% \begin{macro}{\forall} -% v1.15e [2012/10/21] adds an interface for math skip/glue afer -% \cs{exists} and \cs{forall}, this is useful when using upright -% letters in math mode. User control (via \cs{MTexistsskip} and -% \cs{MTforallskip} in the preamble, which must be followed by a -% \cs{Mathastext} call, with or without version name) is defined -% later in the code. Redefinitions of \cs{exists} and \cs{forall} are -% also done at the end of the code (allows taking account of a -% possible |symbol| option.) The actual skips used are set up by -% \cs{MTversion} in the body of the document, or by \cs{Mathastext} -% in the preamble. The subdued and italic options cancel this -% mechanism for the normal and bold versions. -% \begin{macrocode} -\newmuskip\m@t@existsmuskip %% v 1.15e -\newmuskip\m@t@forallmuskip -\def\m@t@existsskip{1mu} -\def\m@t@forallskip{.6667mu} + \edef\mst@greekfont{\familydefault} %% v 1.15c % \end{macrocode} % \end{macro} -% \end{macro} % \begin{macro}{Package options} % 2011/03/09: v1.13 introduces the option LGRgreek and systematic use % of \cs{if...} conditionals, for better readability (by myself) of % the code. % \begin{macrocode} -\newif\ifmt@italic - \DeclareOption{italic}{\mt@italictrue - \def\m@t@ltsh{\itdefault} - \def\m@t@existsskip{0mu} - \def\m@t@forallskip{0mu}} -\newif\ifmt@frenchmath - \DeclareOption{frenchmath}{\mt@frenchmathtrue\mt@italictrue - \def\m@t@ltsh{\itdefault}} +\newif\ifmst@italic +\newif\ifmst@frenchmath + \DeclareOption{italic}{\mst@italictrue + \def\mst@ltsh{\itdefault}} + \DeclareOption{frenchmath}{\mst@frenchmathtrue\mst@italictrue + \def\mst@ltsh{\itdefault}} %% -\newif\ifmt@endash\mt@endashtrue - \DeclareOption{endash}{\mt@endashtrue} - \DeclareOption{noendash}{\mt@endashfalse} -\newif\ifmt@emdash - \DeclareOption{emdash}{\mt@emdashtrue\mt@endashfalse} +\newif\ifmst@endash\mst@endashtrue + \DeclareOption{endash}{\mst@endashtrue} + \DeclareOption{noendash}{\mst@endashfalse} +\newif\ifmst@emdash + \DeclareOption{emdash}{\mst@emdashtrue\mst@endashfalse} %% -\newif\ifmt@alldelims - \DeclareOption{alldelims}{\mt@alldelimstrue} -\edef\mt@tmp{\encodingdefault}\ifx\mt@oti\mt@tmp\else\mt@alldelimstrue\fi - \DeclareOption{nolessnomore}{\mt@alldelimsfalse} +\newif\ifmst@alldelims +\edef\mst@tmp{\encodingdefault}\ifx\mst@oti\mst@tmp\else\mst@alldelimstrue\fi + \DeclareOption{alldelims}{\mst@alldelimstrue} + \DeclareOption{nolessnomore}{\mst@alldelimsfalse} +%% new with 1.2 +\newif\ifmst@nosmalldelims + \DeclareOption{nosmalldelims}{\mst@nosmalldelimstrue} %% -\newif\ifmt@noplus - \DeclareOption{noplus}{\mt@noplustrue} -\newif\ifmt@nominus - \DeclareOption{nominus}{\mt@nominustrue} +\newif\ifmst@noplus + \DeclareOption{noplus}{\mst@noplustrue} +\newif\ifmst@nominus + \DeclareOption{nominus}{\mst@nominustrue} \DeclareOption{noplusnominus}{\ExecuteOptions{noplus,nominus}} %% -\newif\ifmt@noparen - \DeclareOption{noparenthesis}{\mt@noparentrue} -\newif\ifmt@nopunct - \DeclareOption{nopunctuation}{\mt@nopuncttrue} -\newif\ifmt@noequal - \DeclareOption{noequal}{\mt@noequaltrue} -\newif\ifmt@noexclam - \DeclareOption{noexclam}{\mt@noexclamtrue} -\newif\ifmt@noast - \DeclareOption{noasterisk}{\mt@noasttrue} -\newif\ifmt@nospecials - \DeclareOption{nospecials}{\mt@nospecialstrue} +\newif\ifmst@noparen + \DeclareOption{noparenthesis}{\mst@noparentrue} +\newif\ifmst@nopunct + \DeclareOption{nopunctuation}{\mst@nopuncttrue} +\newif\ifmst@noequal + \DeclareOption{noequal}{\mst@noequaltrue} +\newif\ifmst@noexclam + \DeclareOption{noexclam}{\mst@noexclamtrue} +\newif\ifmst@noast + \DeclareOption{noasterisk}{\mst@noasttrue} +\newif\ifmst@nospecials + \DeclareOption{nospecials}{\mst@nospecialstrue} \DeclareOption{basic}{\ExecuteOptions{noparenthesis,nopunctuation,% noplusnominus,noequal,noexclam,noasterisk,nospecials,nolessnomore}} %% -\newif\ifmt@nohbar - \DeclareOption{nohbar}{\mt@nohbartrue} -\newif\ifmt@nodigits - \DeclareOption{nodigits}{\mt@nodigitstrue} -\newif\ifmt@defaultimath - \DeclareOption{defaultimath}{\mt@defaultimathtrue} -\newif\ifmt@mathaccents - \DeclareOption{mathaccents}{\mt@mathaccentstrue} +\newif\ifmst@nohbar + \DeclareOption{nohbar}{\mst@nohbartrue} +\newif\ifmst@nodigits + \DeclareOption{nodigits}{\mst@nodigitstrue} +\newif\ifmst@defaultimath + \DeclareOption{defaultimath}{\mst@defaultimathtrue} +\newif\ifmst@mathaccents + \DeclareOption{mathaccents}{\mst@mathaccentstrue} %% -\newif\ifmt@needsymbol -\newif\ifmt@symboldelimiters - \DeclareOption{symboldelimiters}{\mt@needsymboltrue\mt@symboldelimiterstrue} -\newif\ifmt@symboldigits - \DeclareOption{symboldigits}{\mt@needsymboltrue\mt@symboldigitstrue} -\newif\ifmt@symbolgreek - \DeclareOption{symbolgreek}{\mt@needsymboltrue\mt@symbolgreektrue} -\newif\ifmt@symbolre - \DeclareOption{symbolre}{\mt@needsymboltrue\mt@symbolretrue} -\newif\ifmt@symbolmisc - \DeclareOption{symbolmisc}{\mt@needsymboltrue\mt@symbolmisctrue} +\newif\ifmst@needsymbol +\newif\ifmst@symboldelimiters + \DeclareOption{symboldelimiters}{\mst@needsymboltrue\mst@symboldelimiterstrue} +\newif\ifmst@symboldigits + \DeclareOption{symboldigits}{\mst@needsymboltrue\mst@symboldigitstrue} +\newif\ifmst@symbolgreek + \DeclareOption{symbolgreek}{\mst@needsymboltrue\mst@symbolgreektrue} +\newif\ifmst@symbolre + \DeclareOption{symbolre}{\mst@needsymboltrue\mst@symbolretrue} +\newif\ifmst@symbolmisc + \DeclareOption{symbolmisc}{\mst@needsymboltrue\mst@symbolmisctrue} \DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}} \DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}} %% -\newif\ifmt@needeuler -\newif\ifmt@eulerdigits - \DeclareOption{eulerdigits}{\mt@needeulertrue\mt@eulerdigitstrue} -\newif\ifmt@eulergreek - \DeclareOption{eulergreek}{\mt@needeulertrue\mt@eulergreektrue} +\newif\ifmst@needeuler +\newif\ifmst@eulerdigits + \DeclareOption{eulerdigits}{\mst@needeulertrue\mst@eulerdigitstrue} +\newif\ifmst@eulergreek + \DeclareOption{eulergreek}{\mst@needeulertrue\mst@eulergreektrue} %% -\newif\ifmt@selfGreek - \DeclareOption{selfGreek}{\mt@selfGreektrue} -\newif\ifmt@selfGreeks - \DeclareOption{selfGreeks}{\mt@selfGreekstrue\mt@selfGreektrue} -\newif\ifmt@LGRgreek - \DeclareOption{LGRgreek}{\mt@LGRgreektrue} -\newif\ifmt@LGRgreeks - \DeclareOption{LGRgreeks}{\mt@LGRgreekstrue\mt@LGRgreektrue} +\newif\ifmst@selfGreek + \DeclareOption{selfGreek}{\mst@selfGreektrue} +\newif\ifmst@selfGreeks + \DeclareOption{selfGreeks}{\mst@selfGreekstrue\mst@selfGreektrue} +\newif\ifmst@LGRgreek + \DeclareOption{LGRgreek}{\mst@LGRgreektrue} +\newif\ifmst@LGRgreeks + \DeclareOption{LGRgreeks}{\mst@LGRgreekstrue\mst@LGRgreektrue} %% -\def\mt@greek@select{0} -\newif\ifmt@itgreek -\newif\ifmt@upgreek - \DeclareOption{itgreek}{\mt@itgreektrue} - \DeclareOption{upgreek}{\mt@upgreektrue} - \DeclareOption{itGreek}{\def\mt@greek@select{1}} - \DeclareOption{upGreek}{\def\mt@greek@select{2}} +\def\mst@greek@select{0} +\newif\ifmst@itgreek +\newif\ifmst@upgreek + \DeclareOption{itgreek}{\mst@itgreektrue} + \DeclareOption{upgreek}{\mst@upgreektrue} + \DeclareOption{itGreek}{\def\mst@greek@select{1}} + \DeclareOption{upGreek}{\def\mst@greek@select{2}} %% % \end{macrocode} -% Starting with |1.15f| the meaning of the `defaultxx' options has -% changed. They now prevent |mathastext| from defining additional -% alphabets rather than prevent it from identifying the `mathxx' with -% the new `Mathxx'. The `Mathnormal' and `Mathrm' alphabet commands are -% always created as they are SymbolFontAlphabets, so costless for \LaTeX{} -% mecanisms (once the associated symbol fonts are declared). -% \begin{macrocode} -\newif\ifmt@defaultnormal - \DeclareOption{defaultnormal}{\mt@defaultnormaltrue} -\newif\ifmt@defaultrm - \DeclareOption{defaultrm}{\mt@defaultrmtrue} -\newif\ifmt@defaultbf - \DeclareOption{defaultbf}{\mt@defaultbftrue} -\newif\ifmt@defaultit - \DeclareOption{defaultit}{\mt@defaultittrue} -\newif\ifmt@defaultsf - \DeclareOption{defaultsf}{\mt@defaultsftrue} -\newif\ifmt@defaulttt - \DeclareOption{defaulttt}{\mt@defaulttttrue} -\newif\ifmt@nonormalbold +% Starting with |1.15f| the meaning of the `defaultxx' options has changed. They +% now prevent |mathastext| from defining additional alphabets rather than +% prevent it from identifying the `mathxx' with the new `Mathxx'. The +% `Mathnormal' and `Mathrm' alphabet commands are always created as they are +% SymbolFontAlphabets, so costless in terms of math groups (once the associated +% symbol fonts are declared). +% \begin{macrocode} +\newif\ifmst@defaultnormal + \DeclareOption{defaultnormal}{\mst@defaultnormaltrue} +\newif\ifmst@defaultrm + \DeclareOption{defaultrm}{\mst@defaultrmtrue} +\newif\ifmst@defaultbf + \DeclareOption{defaultbf}{\mst@defaultbftrue} +\newif\ifmst@defaultit + \DeclareOption{defaultit}{\mst@defaultittrue} +\newif\ifmst@defaultsf + \DeclareOption{defaultsf}{\mst@defaultsftrue} +\newif\ifmst@defaulttt + \DeclareOption{defaulttt}{\mst@defaulttttrue} +\newif\ifmst@nonormalbold \DeclareOption{defaultalphabets}{\ExecuteOptions{defaultnormal,defaultrm,% -defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} +defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue} % \end{macrocode} % |mathastext| considers the default script and especially scriptscript sizes to % be far too small, and it will modify them. An option maintains the default. % \begin{macrocode} -\newif\ifmt@defaultsizes - \DeclareOption{defaultmathsizes}{\mt@defaultsizestrue} -\newif\ifmt@twelve - \DeclareOption{12pt}{\mt@twelvetrue} -\newif\ifmt@fouriervec - \DeclareOption{fouriervec}{\mt@fouriervectrue} +\newif\ifmst@defaultsizes + \DeclareOption{defaultmathsizes}{\mst@defaultsizestrue} +\newif\ifmst@twelve + \DeclareOption{12pt}{\mst@twelvetrue} +\newif\ifmst@fouriervec + \DeclareOption{fouriervec}{\mst@fouriervectrue} % \end{macrocode} % v1.15: the subdued option. % \begin{macrocode} -\newif\ifmt@subdued - \DeclareOption{subdued}{\mt@subduedtrue} +\newif\ifmst@subdued + \DeclareOption{subdued}{\mst@subduedtrue} \DeclareOption*{\PackageWarning{mathastext}{Unknown option `\CurrentOption'}} % \end{macrocode} % \end{macro} % \begin{macrocode} \ProcessOptions\relax % \end{macrocode} +% \begin{macro}{\exists} \begin{macro}{\mst@exists@skip} +% \begin{macro}{\forall} \begin{macro}{\mst@forall@skip} +% \begin{macro}{'} \begin{macro}{\mst@prime@skip} +% \begin{macro}{\active@math@prime} +% |v1.15e| [2012/10/21]: math skip/glue \emph{after} \cs{exists} and +% \cs{forall}, this is useful when using upright +% letters in math mode. Each math version has its own user defined skips +% (redefinitions of $\exists$ and $\forall$ at the end of the code). \\ +% |v1.2| [2012/12/17]: math skip/glue \emph{before} the \cs{prime} glyph. +% This is useful with the default CM glyph and upright letters (in contrast +% the prime from |txfonts| works fine with upright letters). For this we +% replace \cs{active@math@prime} with a skip-enhanced version. +% +% The subdued and italic options set to zero the defined default skips in the +% normal and bold math versions. With |v1.2| the skips can now be modified on +% the fly in the document, and are not only set in the preamble once and for +% all for each math version. +% \begin{macrocode} +\newmuskip\mst@exists@muskip %% v 1.15e +\newmuskip\mst@forall@muskip +\def\mst@exists@skip{1mu} +\def\mst@forall@skip{.6667mu} +\newmuskip\mst@prime@muskip %% v 1.2 +\def\mst@prime@skip{.5mu} +\def\mst@active@math@prime{^\bgroup\mskip\mst@prime@muskip\prim@s} +{\catcode`\'=\active \global\let'\mst@active@math@prime} +\ifmst@italic + \ifmst@frenchmath\else + \def\mst@exists@skip{0mu}\def\mst@forall@skip{0mu}\def\mst@prime@skip{0mu} +\fi\fi +% \end{macrocode} +% \end{macro}\end{macro}\end{macro} +% \end{macro}\end{macro}\end{macro} +% \end{macro} +% \begin{macro}{\MTexistsskip} +% \begin{macro}{\MTforallskip} +% \begin{macro}{\MTprimeskip} +% v1.15e: These macros allow to put some amount of mu skip or glue after +% \cs{exists} or \cs{forall}, on a math version basis [the normal and bold +% math versions inherit the same skips; these skips are set to zero in case of +% the subdued, or the italic option]. The user must follow these macros with a +% \cs{Mathastext} command (optionally with the intended math version name). +% +% v1.2: \cs{MTprimeskip} added and the silly \cs{@onlypreamble} are removed +% and the macros are modified to have immediate effect in the document, +% independently of their use in the preamble to store values for the math +% versions. +% \begin{macrocode} +\newcommand*\MTexistsskip[1]{\edef\mst@exists@skip{#1}% + \expandafter\mst@exists@muskip\mst@exists@skip\relax} +\newcommand*\MTforallskip[1]{\edef\mst@forall@skip{#1}% + \expandafter\mst@forall@muskip\mst@forall@skip\relax} +\newcommand*\MTprimeskip[1]{\edef\mst@prime@skip{#1}% + \expandafter\mst@prime@muskip\mst@prime@skip\relax} +\let\Mathastextexistsskip\MTexistsskip +\let\Mathastextforallskip\MTforallskip +\let\Mathastextprimeskip\MTprimeskip +\let\mathastextexistsskip\MTexistsskip +\let\mathastextforallskip\MTforallskip +\let\mathastextprimeskip\MTprimeskip +% \end{macrocode} +% \end{macro}\end{macro} +% \end{macro} +% \begin{macro}{\mst@activatelist} +% \begin{macro}{\nonletters-}\begin{macro}{obeymathalphabets} +% \begin{macro}{\nonlettersdonot-}\begin{macro}{obeymathalphabets} +% |v1.2| does some rather daring activation of +% \DeleteShortVerb{\|}\verb$!,?,+,-,=,<,>,(,),[,],|$ \MakeShortVerb{\|} +% in math mode to achieve something I wanted to do since a long time: +% overcome the frutration resulting from the mutually excluding relation +% between the variable-family concept and the automatic spacing concept. +% After loading \mst, these characters now obey the math alphabets commands +% but still have the automatic spacing. The use as delimiters for those +% concerned is also ok. The mechanism is off by default for |\{| and |\}| +% as this is not compatible with their use as delimiters (|\lbrace| and +% |\rbrace| should then be used instead) but can be activated. +% \begin{macrocode} +\newtoks\mst@activatelist +\newcommand\nonlettersdonotobeymathalphabets{\let\mst@the\@gobble} +\newcommand\nonlettersobeymathalphabets{\let\mst@the\the} +\nonlettersobeymathalphabets +\ifmst@subdued\nonlettersdonotobeymathalphabets\fi +\AtBeginDocument{ +\everymath\expandafter{\the\everymath \mst@the\mst@activatelist} +\everydisplay\expandafter{\the\everydisplay \mst@the\mst@activatelist}} +\def\mst@activate#1#2#3{ +\begingroup +\lccode`~=`#1\relax\lowercase{\endgroup\mathcode`#1="8000\def~{#2#3}}} +\def\mst@addtoactivate#1#2#3{ +\mst@activatelist\expandafter{\the\mst@activatelist\mst@activate#1#2#3}} +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % \begin{macro}{\newmcodes@} % 1.15d: this amsmath macro causes an error in Unicode engines as soon % someone assigns a Unicode mathcode to the minus sign, and then makes a @@ -1595,8 +2193,8 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % complete what I had started then, in the mean time I had forgotten % almost all I knew about \LaTeX{} macro programming. % -% This is only the first half of the subdued code, the second half to -% activate it is near the end of the package. +% This is only the first half of the subdued code, the second part (to +% activate it) is near the end of the package. % % The point was to extract the data about how are `letters' and % `operators' in the normal and bold versions, through obtaining the @@ -1653,48 +2251,48 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % v1.15f: and also I take this opportunity to do the subdued math % alphabets things in a much much easier way, see below. % \begin{macrocode} -\ifmt@subdued -\def\mt@reserved#1\getanddefine@fonts\symletters#2#3\@nil{% -\def\mt@normalmv@letter{#2}} -\expandafter\mt@reserved\mv@normal\@nil -\def\mt@reserved#1\getanddefine@fonts\symletters#2#3\@nil{% -\def\mt@boldmv@letter{#2}} -\expandafter\mt@reserved\mv@bold\@nil -\def\mt@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{% -\def\mt@normalmv@operator{#2}} -\expandafter\mt@reserved\mv@normal\@nil -\def\mt@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{% -\def\mt@boldmv@operator{#2}} -\expandafter\mt@reserved\mv@bold\@nil +\ifmst@subdued +\def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{% +\def\mst@normalmv@letter{#2}} +\expandafter\mst@reserved\mv@normal\@nil +\def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{% +\def\mst@boldmv@letter{#2}} +\expandafter\mst@reserved\mv@bold\@nil +\def\mst@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{% +\def\mst@normalmv@operator{#2}} +\expandafter\mst@reserved\mv@normal\@nil +\def\mst@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{% +\def\mst@boldmv@operator{#2}} +\expandafter\mst@reserved\mv@bold\@nil %% -\edef\mt@tmp{\encodingdefault} -\def\mt@reserved#1/#2/#3/#4/{\gdef\mt@debut{#1}\gdef\mt@reste{#2/#3/#4}} +\edef\mst@tmp{\encodingdefault} +\def\mst@reserved#1/#2/#3/#4/{\gdef\mst@debut{#1}\gdef\mst@reste{#2/#3/#4}} \begingroup\escapechar\m@ne -\xdef\mt@funnyoti{\expandafter\string\csname OT1\endcsname} +\xdef\mst@funnyoti{\expandafter\string\csname OT1\endcsname} \expandafter\expandafter\expandafter -\mt@reserved\expandafter\string\mt@normalmv@operator/ +\mst@reserved\expandafter\string\mst@normalmv@operator/ \endgroup -\ifx\mt@debut\mt@funnyoti\ifx\mt@tmp\mt@oti\def\mt@tmp{T1}\fi\fi -\edef\mt@normalmv@operator{\expandafter\noexpand\csname \mt@tmp/\mt@reste\endcsname} +\ifx\mst@debut\mst@funnyoti\ifx\mst@tmp\mst@oti\def\mst@tmp{T1}\fi\fi +\edef\mst@normalmv@operator{\expandafter\noexpand\csname \mst@tmp/\mst@reste\endcsname} \begingroup\escapechar\m@ne \expandafter\expandafter\expandafter -\mt@reserved\expandafter\string\mt@boldmv@operator/ +\mst@reserved\expandafter\string\mst@boldmv@operator/ \endgroup -\ifx\mt@debut\mt@funnyoti\ifx\mt@tmp\mt@oti\def\mt@tmp{T1}\fi\fi -\edef\mt@boldmv@operator{\expandafter\noexpand\csname \mt@tmp/\mt@reste\endcsname} -\fi % fin de ce \ifmt@subdued +\ifx\mst@debut\mst@funnyoti\ifx\mst@tmp\mst@oti\def\mst@tmp{T1}\fi\fi +\edef\mst@boldmv@operator{\expandafter\noexpand\csname \mst@tmp/\mst@reste\endcsname} +\fi % fin de ce \ifmst@subdued % \end{macrocode} % In the short-lived 1.15e I was doing the following for alphabets:\\ -% |\def\mt@reservedc#1#2#3#4{\def\mt@normalmv@mathbf{#4#3}}|\\ -% |\def\mt@reserveda#1{%|\\ -% |\def\mt@reservedb##1\install@mathalphabet#1##2##3\@nil{\mt@reservedc##2}%|\\ -% |\expandafter\mt@reservedb\mv@normal\@nil}|\\ -% |\expandafter\mt@reserveda\csname mathbf\space\endcsname|\\ +% |\def\mst@reservedc#1#2#3#4{\def\mst@normalmv@mathbf{#4#3}}|\\ +% |\def\mst@reserveda#1{%|\\ +% |\def\mst@reservedb##1\install@mathalphabet#1##2##3\@nil{\mst@reservedc##2}%|\\ +% |\expandafter\mst@reservedb\mv@normal\@nil}|\\ +% |\expandafter\mst@reserveda\csname mathbf\space\endcsname|\\ % and later in the code:\\ % |\expandafter\expandafter\expandafter\SetMathAlphabet@|\\ % |\expandafter\expandafter\expandafter\mv@normal|\\ -% |\expandafter\mt@normalmv@mathbf\csname Mathbf\space \endcsname\Mathbf|\\ -% It does work! but |\let\mt@original@bf\mathbf| is so +% |\expandafter\mst@normalmv@mathbf\csname Mathbf\space \endcsname\Mathbf|\\ +% It does work! but |\let\mst@original@bf\mathbf| is so % much simpler. And also safer, because \cs{mathbf} could have been % redefined using \cs{DeclareSymbolFontAlphabet}... (I could have % provided the necessary check to the already bloated code...) @@ -1709,7 +2307,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % also employ \cs{SetSymbolFont} later. % \begin{macrocode} \DeclareSymbolFont{mtoperatorfont} - {\m@t@enc}{\m@t@fam}{\m@t@ser}{\m@t@opsh} + {\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh} % \end{macrocode} % \end{macro} % \begin{macro}{\operator@font} @@ -1722,10 +2320,20 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % who expect that \cs{operator@font} will always refer to the % `operators' math font might be in for a surprise\dots{} well, % we'll see. +% \begin{macro}{\operatornames-}\begin{macro}{obeymathalphabets} +% \begin{macro}{\operatornames-}\begin{macro}{donot-}\begin{macro}{obeymathalphabets} +% v1.2: rather than just replacing \cs{symoperators} by \cs{symmtoperatorfont} +% I add a modification which makes the declared operator names sensitive to +% the math alphabets... ouh le vilain! % \begin{macrocode} -\def\operator@font{\mathgroup\symmtoperatorfont} +\newcommand{\operatornamesobeymathalphabets} +{\def\operator@font{\mathgroup\ifnum\fam=-\@ne\symmtoperatorfont\else\fam\fi}} +\newcommand{\operatornamesdonotobeymathalphabets} +{\def\operator@font{\mathgroup\symmtoperatorfont}} +\operatornamesobeymathalphabets +\ifmst@subdued\operatornamesdonotobeymathalphabets\fi % \end{macrocode} -% \end{macro} +% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % \begin{macro}{mtletterfont} % In version 1.1, we add the possibility to mimick the standard % behavior, that is to have italic letters and upright @@ -1733,7 +2341,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % Kevin~\textsc{Klement} who asked for such a feature. % \begin{macrocode} \DeclareSymbolFont{mtletterfont} - {\m@t@enc}{\m@t@fam}{\m@t@ser}{\m@t@ltsh} + {\mst@enc}{\mst@fam}{\mst@ser}{\mst@ltsh} % \end{macrocode} % \end{macro} % \begin{macro}{\Mathnormal} @@ -1767,42 +2375,42 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % used it, and the |subdued| option will probably serve in cases one % would have found some utility in this possibility. % \begin{macrocode} -\let\mt@alph@omicron\mathnormal -\@ifpackageloaded{fourier}{\ifsloped\else\let\mt@alph@omicron\mathrm\fi}{} +\let\mst@alph@omicron\mathnormal +\@ifpackageloaded{fourier}{\ifsloped\else\let\mst@alph@omicron\mathrm\fi}{} \DeclareSymbolFontAlphabet{\Mathnormal}{mtletterfont} \DeclareSymbolFontAlphabet{\Mathrm}{mtoperatorfont} -\ifmt@nonormalbold\else - \DeclareMathAlphabet{\mathnormalbold}{\m@t@enc}{\m@t@fam}{\m@t@bold}{\m@t@ltsh} -\fi\ifmt@defaultbf\else - \DeclareMathAlphabet{\Mathbf}{\m@t@enc}{\m@t@fam}{\m@t@bold}{\m@t@opsh} -\fi\ifmt@defaultit\else - \DeclareMathAlphabet{\Mathit}{\m@t@enc}{\m@t@fam}{\m@t@ser}{\itdefault} -\fi\ifmt@defaultsf\else - \DeclareMathAlphabet{\Mathsf}{\m@t@enc}{\sfdefault}{\m@t@ser}{\m@t@opsh} -\fi\ifmt@defaulttt\else - \DeclareMathAlphabet{\Mathtt}{\m@t@enc}{\ttdefault}{\m@t@ser}{\m@t@opsh} +\ifmst@nonormalbold\else + \DeclareMathAlphabet{\mathnormalbold}{\mst@enc}{\mst@fam}{\mst@bold}{\mst@ltsh} +\fi\ifmst@defaultbf\else + \DeclareMathAlphabet{\Mathbf}{\mst@enc}{\mst@fam}{\mst@bold}{\mst@opsh} +\fi\ifmst@defaultit\else + \DeclareMathAlphabet{\Mathit}{\mst@enc}{\mst@fam}{\mst@ser}{\itdefault} +\fi\ifmst@defaultsf\else + \DeclareMathAlphabet{\Mathsf}{\mst@enc}{\sfdefault}{\mst@ser}{\mst@opsh} +\fi\ifmst@defaulttt\else + \DeclareMathAlphabet{\Mathtt}{\mst@enc}{\ttdefault}{\mst@ser}{\mst@opsh} \fi -\let\mt@original@normal\mathnormal -\let\mt@original@rm\mathrm -\let\mt@original@bf\mathbf -\let\mt@original@it\mathit -\let\mt@original@sf\mathsf -\let\mt@original@tt\mathtt -\def\mt@restorealphabets{% for subdued -\let\mathnormal\mt@original@normal -\let\mathrm\mt@original@rm -\let\mathbf\mt@original@bf -\let\mathit\mt@original@it -\let\mathsf\mt@original@sf -\let\mathtt\mt@original@tt} -\def\mt@setalphabets{% -\ifmt@defaultnormal\else\renewcommand{\mathnormal}{\Mathnormal}\fi -\ifmt@defaultrm\else\renewcommand{\mathrm}{\Mathrm}\fi -\ifmt@defaultbf\else\renewcommand{\mathbf}{\Mathbf}\fi -\ifmt@defaultit\else\renewcommand{\mathit}{\Mathit}\fi -\ifmt@defaultsf\else\renewcommand{\mathsf}{\Mathsf}\fi -\ifmt@defaulttt\else\renewcommand{\mathtt}{\Mathtt}\fi} -\ifmt@subdued\else\mt@setalphabets\fi +\let\mst@original@normal\mathnormal +\let\mst@original@rm\mathrm +\let\mst@original@bf\mathbf +\let\mst@original@it\mathit +\let\mst@original@sf\mathsf +\let\mst@original@tt\mathtt +\def\mst@restorealphabets{% for subdued +\let\mathnormal\mst@original@normal +\let\mathrm\mst@original@rm +\let\mathbf\mst@original@bf +\let\mathit\mst@original@it +\let\mathsf\mst@original@sf +\let\mathtt\mst@original@tt} +\def\mst@setalphabets{% +\ifmst@defaultnormal\else\renewcommand{\mathnormal}{\Mathnormal}\fi +\ifmst@defaultrm\else\renewcommand{\mathrm}{\Mathrm}\fi +\ifmst@defaultbf\else\renewcommand{\mathbf}{\Mathbf}\fi +\ifmst@defaultit\else\renewcommand{\mathit}{\Mathit}\fi +\ifmst@defaultsf\else\renewcommand{\mathsf}{\Mathsf}\fi +\ifmst@defaulttt\else\renewcommand{\mathtt}{\Mathtt}\fi} +\ifmst@subdued\else\mst@setalphabets\fi % \end{macrocode} % \end{macro} % \end{macro} @@ -1842,35 +2450,35 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % \cs{Mathastext} and re-adjust the shapes. And the command \cs{MTgreekfont} % changes the Greek font family. % \begin{macrocode} -\def\mt@update@greeksh{ - \def\m@t@greek@lsh{\m@t@ltsh} %% default behavior - \def\m@t@greek@ush{\m@t@opsh} - \ifmt@itgreek\def\m@t@greek@lsh{\itdefault} - \def\m@t@greek@ush{\itdefault}\fi - \ifmt@upgreek\def\m@t@greek@lsh{\updefault} - \def\m@t@greek@ush{\updefault}\fi - \ifmt@frenchmath - \ifmt@itgreek\else - \ifmt@upgreek\else - \def\m@t@greek@lsh{\m@t@opsh} - \def\m@t@greek@ush{\m@t@opsh} +\def\mst@update@greeksh{ + \def\mst@greek@lsh{\mst@ltsh} %% default behavior + \def\mst@greek@ush{\mst@opsh} + \ifmst@itgreek\def\mst@greek@lsh{\itdefault} + \def\mst@greek@ush{\itdefault}\fi + \ifmst@upgreek\def\mst@greek@lsh{\updefault} + \def\mst@greek@ush{\updefault}\fi + \ifmst@frenchmath + \ifmst@itgreek\else + \ifmst@upgreek\else + \def\mst@greek@lsh{\mst@opsh} + \def\mst@greek@ush{\mst@opsh} \fi\fi \fi - \ifcase\mt@greek@select - \or\def\m@t@greek@ush{\itdefault} - \or\def\m@t@greek@ush{\updefault} + \ifcase\mst@greek@select + \or\def\mst@greek@ush{\itdefault} + \or\def\mst@greek@ush{\updefault} \fi} -\mt@update@greeksh -\ifmt@LGRgreek +\mst@update@greeksh +\ifmst@LGRgreek \DeclareFontEncoding{LGR}{}{} \DeclareSymbolFont{mtlgrfontlower}{LGR} - {\m@t@fam}{\m@t@ser}{\m@t@greek@lsh} + {\mst@fam}{\mst@ser}{\mst@greek@lsh} \DeclareSymbolFont{mtlgrfontupper}{LGR} - {\m@t@fam}{\m@t@ser}{\m@t@greek@ush} + {\mst@fam}{\mst@ser}{\mst@greek@ush} \else -\ifmt@selfGreek +\ifmst@selfGreek \DeclareSymbolFont{mtselfGreekfont}{OT1} - {\m@t@fam}{\m@t@ser}{\m@t@greek@ush} + {\mst@fam}{\mst@ser}{\mst@greek@ush} \fi\fi % \end{macrocode} % \end{macro} @@ -1884,10 +2492,10 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % In case we need the Euler font, we declare it here. It will use % |uzeur.fd| from the |eulervm| package of Walter~\textsc{Schmidt} % \begin{macrocode} -\ifmt@needeuler +\ifmst@needeuler \DeclareSymbolFont{mteulervm}{U}{zeur}{m}{n} \DeclareSymbolFontAlphabet{\MathEuler}{mteulervm} -\DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\m@t@bold}{n} +\DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\mst@bold}{n} \fi \newcommand\MTEulerScale[1]{\edef\zeu@Scale{#1}} \let\MathastextEulerScale\MTEulerScale @@ -1938,7 +2546,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % \cs{psy@scale} will be used to scale the font (see at the % very end of this file). % \begin{macrocode} -\ifmt@needsymbol +\ifmst@needsymbol \def\psy@scale{1} \DeclareSymbolFont{mtpsymbol}{U}{psy}{m}{n} \DeclareSymbolFontAlphabet{\MathPSymbol}{mtpsymbol} @@ -1966,7 +2574,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % serious thought to what one can do to simulate a math accent % without doing such a wasteful thing. % \begin{macrocode} -\ifmt@fouriervec +\ifmst@fouriervec \DeclareFontEncoding{FML}{}{} \DeclareFontSubstitution{FML}{futm}{m}{it} \DeclareSymbolFont{mtfourierpourvec}{FML}{futm}{m}{it} @@ -1994,13 +2602,13 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % same time not modifying the \cs{familydefault} or \cs{romandefault} % etc\dots % \begin{macrocode} -\newcommand*\MTencoding[1]{\def\m@t@enc{#1}} -\newcommand*\MTfamily[1]{\def\m@t@fam{#1}} -\newcommand*\MTseries[1]{\def\m@t@ser{#1}} -\newcommand*\MTshape[1]{\def\m@t@opsh{#1} - \ifmt@italic\else\def\m@t@ltsh{#1}\fi} -\newcommand*\MTboldvariant[1]{\def\m@t@bold{#1}} -\newcommand*\MTlettershape[1]{\def\m@t@ltsh{#1}} +\newcommand*\MTencoding[1]{\def\mst@enc{#1}} +\newcommand*\MTfamily[1]{\def\mst@fam{#1}} +\newcommand*\MTseries[1]{\def\mst@ser{#1}} +\newcommand*\MTshape[1]{\def\mst@opsh{#1} + \ifmst@italic\else\def\mst@ltsh{#1}\fi} +\newcommand*\MTboldvariant[1]{\def\mst@bold{#1}} +\newcommand*\MTlettershape[1]{\def\mst@ltsh{#1}} \@onlypreamble\MTencoding \@onlypreamble\MTfamily \@onlypreamble\MTseries @@ -2032,11 +2640,11 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % selfGreeks. % \begin{macrocode} \newcommand\MTitgreek{% -\mt@itgreektrue\mt@upgreekfalse\def\mt@greek@select{0}} +\mst@itgreektrue\mst@upgreekfalse\def\mst@greek@select{0}} \newcommand\MTupgreek{% -\mt@upgreektrue\mt@itgreekfalse\def\mt@greek@select{0}} - \newcommand\MTitGreek{\def\mt@greek@select{1}} - \newcommand\MTupGreek{\def\mt@greek@select{2}} +\mst@upgreektrue\mst@itgreekfalse\def\mst@greek@select{0}} + \newcommand\MTitGreek{\def\mst@greek@select{1}} + \newcommand\MTupGreek{\def\mst@greek@select{2}} \@onlypreamble\MTitgreek \@onlypreamble\MTupgreek \@onlypreamble\MTitGreek @@ -2045,7 +2653,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} \let\Mathastextupgreek\MTupgreek \let\MathastextitGreek\MTitGreek \let\MathastextupGreek\MTupGreek - \newcommand*\MTgreekfont[1]{\def\m@t@greekfont{#1}} + \newcommand*\MTgreekfont[1]{\def\mst@greekfont{#1}} \@onlypreamble\MTgreekfont \let\Mathastextgreekfont\MTgreekfont % \end{macrocode} @@ -2054,24 +2662,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % \end{macro} % \end{macro} % \end{macro} -% \begin{macro}{\MTexistsskip} -% \begin{macro}{\MTforallskip} -% v1.15e: These new user macros allow to put some amount of mu skip -% or glue after \cs{exists} or \cs{forall}, on a math version basis -% [the normal and bold math versions inherit the same skips; these -% skips are set to zero in case of the subdued, or the italic -% option]. The user must follow these macros with a \cs{Mathastext} -% command (optionally with the intended math version name). -% \begin{macrocode} -\newcommand*\MTexistsskip[1]{\def\m@t@existsskip{#1}} -\newcommand*\MTforallskip[1]{\def\m@t@forallskip{#1}} -\@onlypreamble\MTexistsskip -\@onlypreamble\MTforallskip -\let\Mathastextexistsskip\MTexistsskip -\let\Mathastextforallskip\MTforallskip -% \end{macrocode} -% \end{macro} -% \end{macro} % \begin{macro}{\MTWillUse} % This is a preamble-only command, which can be used more than once, only the % latest one counts. Sets up the math fonts in the normal and bold @@ -2082,12 +2672,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} \MTfamily{#3} \MTseries{#4} \MTshape{#5} - \ifmt@italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior + \ifmst@italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior \ifx\@empty#1 \else %% we check if optional argument was [], this does not detect [ ] - \def\mt@tmp{#1} - \ifx\@empty\mt@tmp\else\MTlettershape{#1}\fi + \def\mst@tmp{#1} + \ifx\@empty\mst@tmp\else\MTlettershape{#1}\fi \fi \Mathastext} \@onlypreamble\MTWillUse @@ -2113,116 +2703,124 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % \begin{macrocode} \newcommand*\Mathastext[1][\@empty]{ \ifx\@empty#1 % no optional argument - \mt@update@greeksh - \edef\mt@encoding@normal{\m@t@enc} - \edef\mt@family@normal{\m@t@fam} - \edef\mt@series@normal{\m@t@ser} - \edef\mt@shape@normal{\m@t@opsh} - \edef\mt@ltshape@normal{\m@t@ltsh} - \edef\mt@itdefault@normal{\itdefault} - \edef\mt@rmdefault@normal{\rmdefault} - \edef\mt@sfdefault@normal{\sfdefault} - \edef\mt@ttdefault@normal{\ttdefault} - \edef\mt@boldvariant@normal{\m@t@bold} - \edef\mt@existsskip@normal{\m@t@existsskip} - \edef\mt@forallskip@normal{\m@t@forallskip} - \edef\mt@encoding@bold{\m@t@enc} - \edef\mt@family@bold{\m@t@fam} - \edef\mt@series@bold{\m@t@bold} - \edef\mt@shape@bold{\m@t@opsh} - \edef\mt@ltshape@bold{\m@t@ltsh} - \edef\mt@boldvariant@bold{\m@t@bold} - \edef\mt@itdefault@bold{\itdefault} - \edef\mt@rmdefault@bold{\rmdefault} - \edef\mt@sfdefault@bold{\sfdefault} - \edef\mt@ttdefault@bold{\ttdefault} - \edef\mt@existsskip@bold{\m@t@existsskip} - \edef\mt@forallskip@bold{\m@t@forallskip} -\ifmt@subdued - \edef\mt@existsskip@normal{0mu} - \edef\mt@forallskip@normal{0mu} - \edef\mt@existsskip@bold{0mu} - \edef\mt@forallskip@bold{0mu} + \mst@update@greeksh + \edef\mst@encoding@normal{\mst@enc} + \edef\mst@family@normal{\mst@fam} + \edef\mst@series@normal{\mst@ser} + \edef\mst@shape@normal{\mst@opsh} + \edef\mst@ltshape@normal{\mst@ltsh} + \edef\mst@itdefault@normal{\itdefault} + \edef\mst@rmdefault@normal{\rmdefault} + \edef\mst@sfdefault@normal{\sfdefault} + \edef\mst@ttdefault@normal{\ttdefault} + \edef\mst@boldvariant@normal{\mst@bold} + \edef\mst@exists@skip@normal{\mst@exists@skip} + \edef\mst@forall@skip@normal{\mst@forall@skip} + \edef\mst@prime@skip@normal{\mst@prime@skip} + \edef\mst@encoding@bold{\mst@enc} + \edef\mst@family@bold{\mst@fam} + \edef\mst@series@bold{\mst@bold} + \edef\mst@shape@bold{\mst@opsh} + \edef\mst@ltshape@bold{\mst@ltsh} + \edef\mst@boldvariant@bold{\mst@bold} + \edef\mst@itdefault@bold{\itdefault} + \edef\mst@rmdefault@bold{\rmdefault} + \edef\mst@sfdefault@bold{\sfdefault} + \edef\mst@ttdefault@bold{\ttdefault} + \edef\mst@exists@skip@bold{\mst@exists@skip} + \edef\mst@forall@skip@bold{\mst@forall@skip} + \edef\mst@prime@skip@bold{\mst@prime@skip} +\ifmst@subdued + \edef\mst@exists@skip@normal{0mu} + \edef\mst@forall@skip@normal{0mu} + \edef\mst@prime@skip@normal{0mu} + \edef\mst@exists@skip@bold{0mu} + \edef\mst@forall@skip@bold{0mu} + \edef\mst@prime@skip@bold{0mu} \else -\ifmt@italic -\ifmt@frenchmath - \expandafter\m@t@existsmuskip\m@t@existsskip - \expandafter\m@t@forallmuskip\m@t@forallskip +\ifmst@italic +\ifmst@frenchmath + \expandafter\mst@exists@muskip\mst@exists@skip\relax + \expandafter\mst@forall@muskip\mst@forall@skip\relax + \expandafter\mst@prime@muskip\mst@prime@skip\relax \else - \edef\mt@existsskip@normal{0mu} - \edef\mt@forallskip@normal{0mu} - \edef\mt@existsskip@bold{0mu} - \edef\mt@forallskip@bold{0mu} + \edef\mst@exists@skip@normal{0mu} + \edef\mst@forall@skip@normal{0mu} + \edef\mst@prime@skip@normal{0mu} + \edef\mst@exists@skip@bold{0mu} + \edef\mst@forall@skip@bold{0mu} + \edef\mst@prime@skip@bold{0mu} \fi\else - \expandafter\m@t@existsmuskip\m@t@existsskip - \expandafter\m@t@forallmuskip\m@t@forallskip + \expandafter\mst@exists@muskip\mst@exists@skip\relax + \expandafter\mst@forall@muskip\mst@forall@skip\relax + \expandafter\mst@prime@muskip\mst@prime@skip\relax \fi\fi %% v1.15f -\ifmt@nonormalbold\else - \SetMathAlphabet{\mathnormalbold}{normal}{\mt@encoding@normal} - {\mt@family@normal} - {\mt@boldvariant@normal} - {\mt@ltshape@normal} - \SetMathAlphabet{\mathnormalbold}{bold}{\mt@encoding@bold} - {\mt@family@bold} - {\mt@boldvariant@bold} - {\mt@ltshape@bold} +\ifmst@nonormalbold\else + \SetMathAlphabet{\mathnormalbold}{normal}{\mst@encoding@normal} + {\mst@family@normal} + {\mst@boldvariant@normal} + {\mst@ltshape@normal} + \SetMathAlphabet{\mathnormalbold}{bold}{\mst@encoding@bold} + {\mst@family@bold} + {\mst@boldvariant@bold} + {\mst@ltshape@bold} \fi -%% v1.15f adds \ifmt@default.. checks -\ifmt@subdued\else - \SetSymbolFont{mtletterfont}{normal}{\mt@encoding@normal} - {\mt@family@normal} - {\mt@series@normal} - {\mt@ltshape@normal} - \SetSymbolFont{mtletterfont}{bold} {\mt@encoding@bold} - {\mt@family@bold} - {\mt@series@bold} - {\mt@ltshape@bold} - \SetSymbolFont{mtoperatorfont}{normal}{\mt@encoding@normal} - {\mt@family@normal} - {\mt@series@normal} - {\mt@shape@normal} - \SetSymbolFont{mtoperatorfont}{bold} {\mt@encoding@bold} - {\mt@family@bold} - {\mt@series@bold} - {\mt@shape@bold} -\ifmt@defaultbf\else - \SetMathAlphabet{\Mathbf}{normal}{\mt@encoding@normal} - {\mt@family@normal} - {\mt@series@bold} - {\mt@shape@normal} - \SetMathAlphabet{\Mathbf}{bold}{\mt@encoding@bold} - {\mt@family@bold} - {\mt@series@bold} - {\mt@shape@bold} -\fi\ifmt@defaultit\else - \SetMathAlphabet{\Mathit}{normal}{\mt@encoding@normal} - {\mt@family@normal} - {\mt@series@normal} - {\mt@itdefault@normal} - \SetMathAlphabet{\Mathit}{bold}{\mt@encoding@bold} - {\mt@family@bold} - {\mt@series@bold} - {\mt@itdefault@bold} -\fi\ifmt@defaultsf\else - \SetMathAlphabet{\Mathsf}{normal}{\mt@encoding@normal} - {\mt@sfdefault@normal} - {\mt@series@normal} - {\mt@shape@normal} - \SetMathAlphabet{\Mathsf}{bold}{\mt@encoding@bold} - {\mt@sfdefault@bold} - {\mt@series@bold} - {\mt@shape@bold} -\fi\ifmt@defaulttt\else - \SetMathAlphabet{\Mathtt}{normal}{\mt@encoding@normal} - {\mt@ttdefault@normal} - {\mt@series@normal} - {\mt@shape@normal} - \SetMathAlphabet{\Mathtt}{bold}{\mt@encoding@bold} - {\mt@ttdefault@bold} - {\mt@series@bold} - {\mt@shape@bold} -\fi\fi % de \ifmt@subdued +%% v1.15f adds \ifmst@default.. checks +\ifmst@subdued\else + \SetSymbolFont{mtletterfont}{normal}{\mst@encoding@normal} + {\mst@family@normal} + {\mst@series@normal} + {\mst@ltshape@normal} + \SetSymbolFont{mtletterfont}{bold} {\mst@encoding@bold} + {\mst@family@bold} + {\mst@series@bold} + {\mst@ltshape@bold} + \SetSymbolFont{mtoperatorfont}{normal}{\mst@encoding@normal} + {\mst@family@normal} + {\mst@series@normal} + {\mst@shape@normal} + \SetSymbolFont{mtoperatorfont}{bold} {\mst@encoding@bold} + {\mst@family@bold} + {\mst@series@bold} + {\mst@shape@bold} +\ifmst@defaultbf\else + \SetMathAlphabet{\Mathbf}{normal}{\mst@encoding@normal} + {\mst@family@normal} + {\mst@series@bold} + {\mst@shape@normal} + \SetMathAlphabet{\Mathbf}{bold}{\mst@encoding@bold} + {\mst@family@bold} + {\mst@series@bold} + {\mst@shape@bold} +\fi\ifmst@defaultit\else + \SetMathAlphabet{\Mathit}{normal}{\mst@encoding@normal} + {\mst@family@normal} + {\mst@series@normal} + {\mst@itdefault@normal} + \SetMathAlphabet{\Mathit}{bold}{\mst@encoding@bold} + {\mst@family@bold} + {\mst@series@bold} + {\mst@itdefault@bold} +\fi\ifmst@defaultsf\else + \SetMathAlphabet{\Mathsf}{normal}{\mst@encoding@normal} + {\mst@sfdefault@normal} + {\mst@series@normal} + {\mst@shape@normal} + \SetMathAlphabet{\Mathsf}{bold}{\mst@encoding@bold} + {\mst@sfdefault@bold} + {\mst@series@bold} + {\mst@shape@bold} +\fi\ifmst@defaulttt\else + \SetMathAlphabet{\Mathtt}{normal}{\mst@encoding@normal} + {\mst@ttdefault@normal} + {\mst@series@normal} + {\mst@shape@normal} + \SetMathAlphabet{\Mathtt}{bold}{\mst@encoding@bold} + {\mst@ttdefault@bold} + {\mst@series@bold} + {\mst@shape@bold} +\fi\fi % de \ifmst@subdued % \end{macrocode} % \begin{macro}{\MathEulerBold} % v1.14c: We reset |mteulervm| and \cs{MathEulerBold} here as the @@ -2230,71 +2828,72 @@ defaultbf,defaultit,defaultsf,defaulttt}\mt@nonormalboldtrue} % \cs{Mathastextboldvariant}|{m}|; and we should keep this local to % math versions. % \begin{macrocode} - \ifmt@needeuler - \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mt@boldvariant@normal}{n} + \ifmst@needeuler + \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst@boldvariant@normal}{n} \SetMathAlphabet{\MathEulerBold}{normal} - {U}{zeur}{\mt@boldvariant@normal}{n} + {U}{zeur}{\mst@boldvariant@normal}{n} \SetMathAlphabet{\MathEulerBold}{bold} - {U}{zeur}{\mt@boldvariant@normal}{n} + {U}{zeur}{\mst@boldvariant@normal}{n} \fi % \end{macrocode} % \end{macro} % \begin{macrocode} - \ifmt@needsymbol\SetSymbolFont{mtpsymbol}{bold} - {U}{psy}{\mt@boldvariant@normal}{n} + \ifmst@needsymbol\SetSymbolFont{mtpsymbol}{bold} + {U}{psy}{\mst@boldvariant@normal}{n} \fi % \end{macrocode} % \begin{macro}{LGRgreek*} % \begin{macro}{selfGreek*} % LGRgreek, LGRgreeks, selfGreek, and selfGreeks options. % \begin{macrocode} -\ifmt@subdued\else -\ifmt@LGRgreek +\ifmst@subdued\else +\ifmst@LGRgreek \SetSymbolFont{mtlgrfontlower}{normal}{LGR} - {\m@t@greekfont}{\mt@series@normal}{\m@t@greek@lsh} + {\mst@greekfont}{\mst@series@normal}{\mst@greek@lsh} \SetSymbolFont{mtlgrfontlower}{bold}{LGR} - {\m@t@greekfont}{\mt@boldvariant@normal}{\m@t@greek@lsh} + {\mst@greekfont}{\mst@boldvariant@normal}{\mst@greek@lsh} \SetSymbolFont{mtlgrfontupper}{normal}{LGR} - {\m@t@greekfont}{\mt@series@normal}{\m@t@greek@ush} + {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush} \SetSymbolFont{mtlgrfontupper}{bold}{LGR} - {\m@t@greekfont}{\mt@boldvariant@bold}{\m@t@greek@ush} + {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush} \else -\ifmt@selfGreek +\ifmst@selfGreek \SetSymbolFont{mtselfGreekfont}{normal}{OT1} - {\m@t@greekfont}{\mt@series@normal}{\m@t@greek@ush} + {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush} \SetSymbolFont{mtselfGreekfont}{bold}{OT1} - {\m@t@greekfont}{\mt@boldvariant@bold}{\m@t@greek@ush} + {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush} \fi\fi\fi % \end{macrocode} % \end{macro} % \end{macro} % \begin{macrocode} -\ifmt@subdued +\ifmst@subdued \typeout{** subdued mode will be activated for the normal and bold math versions} \else \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J% ** set up to use the fonts -\mt@encoding@normal/\mt@family@normal/\mt@series@normal% -(\mt@boldvariant@normal)/\mt@ltshape@normal} -\ifmt@LGRgreek\typeout{** Greek letters (\m@t@greek@lsh/\m@t@greek@ush) -will use LGR/\m@t@greekfont} +\mst@encoding@normal/\mst@family@normal/\mst@series@normal% +(\mst@boldvariant@normal)/\mst@ltshape@normal} +\ifmst@LGRgreek\typeout{** Greek letters (\mst@greek@lsh/\mst@greek@ush) +will use LGR/\mst@greekfont} \fi -\ifmt@nodigits\else\typeout{** Other characters (digits, ...) +\ifmst@nodigits\else\typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J% -** typeset with the \mt@shape@normal\space shape.} +** typeset with the \mst@shape@normal\space shape.} \fi \fi \else % optional argument, then we rather do DeclareVersion - \edef\mt@tmp{#1} - \ifx\mt@tmp\@empty + \edef\mst@tmp{#1} + \ifx\mst@tmp\@empty \Mathastext % no infinite loop! \else - \MTDeclareVersion[\m@t@ltsh]{#1} - {\m@t@enc}{\m@t@fam}{\m@t@ser}{\m@t@opsh} + \MTDeclareVersion[\mst@ltsh]{#1} + {\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh} \fi \fi } \@onlypreamble\Mathastext +\let\mathastext\Mathastext % \end{macrocode} % \end{macro} % \begin{macro}{\MTDeclareVersion} @@ -2316,59 +2915,63 @@ and \protect\log-like names will be^^J% % that case! % \begin{macrocode} \newcommand*\MTDeclareVersion[6][\@empty]{ - \edef\mt@version{#2} - \DeclareMathVersion{\mt@version} - \expandafter\edef\csname mt@encoding@\mt@version\endcsname{#3} - \expandafter\edef\csname mt@family@\mt@version\endcsname{#4} - \expandafter\edef\csname mt@series@\mt@version\endcsname{#5} - \expandafter\edef\csname mt@shape@\mt@version\endcsname{#6} - \expandafter\edef\csname mt@boldvariant@\mt@version\endcsname{\m@t@bold} - \expandafter\edef\csname mt@itdefault@\mt@version\endcsname{\itdefault} - \expandafter\edef\csname mt@rmdefault@\mt@version\endcsname{\rmdefault} - \expandafter\edef\csname mt@sfdefault@\mt@version\endcsname{\sfdefault} - \expandafter\edef\csname mt@ttdefault@\mt@version\endcsname{\ttdefault} - \expandafter\edef\csname mt@existsskip@\mt@version\endcsname{\m@t@existsskip} - \expandafter\edef\csname mt@forallskip@\mt@version\endcsname{\m@t@forallskip} - \mt@optionalparamfalse + \edef\mst@version{#2} + \DeclareMathVersion{\mst@version} + \expandafter\edef\csname mst@encoding@\mst@version\endcsname{#3} + \expandafter\edef\csname mst@family@\mst@version\endcsname{#4} + \expandafter\edef\csname mst@series@\mst@version\endcsname{#5} + \expandafter\edef\csname mst@shape@\mst@version\endcsname{#6} + \expandafter\edef\csname mst@boldvariant@\mst@version\endcsname{\mst@bold} + \expandafter\edef\csname mst@itdefault@\mst@version\endcsname{\itdefault} + \expandafter\edef\csname mst@rmdefault@\mst@version\endcsname{\rmdefault} + \expandafter\edef\csname mst@sfdefault@\mst@version\endcsname{\sfdefault} + \expandafter\edef\csname mst@ttdefault@\mst@version\endcsname{\ttdefault} + \expandafter\edef\csname mst@exists@skip@\mst@version\endcsname + {\mst@exists@skip} + \expandafter\edef\csname mst@forall@skip@\mst@version\endcsname + {\mst@forall@skip} + \expandafter\edef\csname mst@prime@skip@\mst@version\endcsname + {\mst@prime@skip} + \mst@optionalparamfalse \ifx\@empty#1 \else % we check nevertheless for [] situation, will not work with [ ] - \def\mt@tmp{#1} - \ifx\mt@tmp\@empty\else\mt@optionalparamtrue\fi + \def\mst@tmp{#1} + \ifx\mst@tmp\@empty\else\mst@optionalparamtrue\fi \fi - \ifmt@optionalparam + \ifmst@optionalparam \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1} \typeout{** Latin letters in math version `#2' will use the font #3/#4/#5/#1^^J% ** Other characters (digits, ...) and \protect\log-like names will be in #6 shape.} - \expandafter\edef\csname mt@ltshape@\mt@version\endcsname{#1} + \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1} \else - \ifmt@italic - \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\m@t@ltsh} + \ifmst@italic + \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst@ltsh} \typeout{** Latin letters in math version `#2' will use the font - #3/#4/#5/\m@t@ltsh^^J% + #3/#4/#5/\mst@ltsh^^J% ** Other characters (digits, ...) and \protect\log-like names will be in #6 shape.} - \expandafter\edef\csname mt@ltshape@\mt@version\endcsname{\m@t@ltsh} + \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{\mst@ltsh} \else \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6} \typeout{** Latin letters in math version `#2' will use the fonts - #3/#4/#5(\m@t@bold)/#6} - \expandafter\edef\csname mt@ltshape@\mt@version\endcsname{#6} + #3/#4/#5(\mst@bold)/#6} + \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#6} \fi \fi - \ifmt@nonormalbold\else - \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\m@t@bold} + \ifmst@nonormalbold\else + \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst@bold} {\csname - mt@ltshape@\mt@version\endcsname} + mst@ltshape@\mst@version\endcsname} \fi \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6} - \ifmt@defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\m@t@bold}{#6}\fi - \ifmt@defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi - \ifmt@defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi - \ifmt@defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi - \ifmt@needeuler - \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\m@t@bold}{n} + \ifmst@defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst@bold}{#6}\fi + \ifmst@defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi + \ifmst@defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi + \ifmst@defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi + \ifmst@needeuler + \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst@bold}{n} \fi % \end{macrocode} % \begin{macro}{LGRgreeks} @@ -2380,46 +2983,46 @@ and \protect\log-like names will be^^J% % options as well as on the (local to this version) shapes for letters % and digits. % \begin{macrocode} - \def\m@t@greek@lsh@loc{\csname mt@ltshape@\mt@version\endcsname} - \def\m@t@greek@ush@loc{\csname mt@shape@\mt@version\endcsname} - \ifmt@itgreek\def\m@t@greek@lsh@loc{\itdefault} - \def\m@t@greek@ush@loc{\itdefault}\fi - \ifmt@upgreek\def\m@t@greek@lsh@loc{\updefault} - \def\m@t@greek@ush@loc{\updefault}\fi - \ifmt@frenchmath - \ifmt@itgreek\else - \ifmt@upgreek\else - \def\m@t@greek@lsh@loc{\csname mt@shape@\mt@version\endcsname} - \def\m@t@greek@ush@loc{\csname mt@shape@\mt@version\endcsname} + \def\mst@greek@lsh@loc{\csname mst@ltshape@\mst@version\endcsname} + \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname} + \ifmst@itgreek\def\mst@greek@lsh@loc{\itdefault} + \def\mst@greek@ush@loc{\itdefault}\fi + \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault} + \def\mst@greek@ush@loc{\updefault}\fi + \ifmst@frenchmath + \ifmst@itgreek\else + \ifmst@upgreek\else + \def\mst@greek@lsh@loc{\csname mst@shape@\mst@version\endcsname} + \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname} \fi\fi \fi - \ifcase\mt@greek@select - \or\def\m@t@greek@ush@loc{\itdefault} - \or\def\m@t@greek@ush@loc{\updefault} + \ifcase\mst@greek@select + \or\def\mst@greek@ush@loc{\itdefault} + \or\def\mst@greek@ush@loc{\updefault} \fi - \ifmt@LGRgreeks - \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\m@t@greek@lsh@loc} - \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\m@t@greek@ush@loc} - \typeout{** Greek letters (\m@t@greek@lsh@loc/\m@t@greek@ush@loc) will use + \ifmst@LGRgreeks + \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst@greek@lsh@loc} + \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst@greek@ush@loc} + \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use LGR font #4} \else - \ifmt@selfGreeks - \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\m@t@greek@ush@loc} - \typeout{** Capital Greek letters (\m@t@greek@lsh@loc/\m@t@greek@ush@loc) + \ifmst@selfGreeks + \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst@greek@ush@loc} + \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use OT1 font #4} \else - \ifmt@LGRgreek - \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\m@t@greekfont}{#5}{\m@t@greek@lsh@loc} - \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\m@t@greekfont}{#5}{\m@t@greek@ush@loc} - \typeout{** Greek letters (\m@t@greek@lsh@loc/\m@t@greek@ush@loc) will use - LGR font \m@t@greekfont} + \ifmst@LGRgreek + \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@lsh@loc} + \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@ush@loc} + \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use + LGR font \mst@greekfont} \else - \ifmt@selfGreek - \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\m@t@greekfont}{#5}{\m@t@greek@ush@loc} - \typeout{** Capital Greek letters (\m@t@greek@lsh@loc/\m@t@greek@ush@loc) - will use OT1 font \m@t@greekfont} + \ifmst@selfGreek + \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst@greekfont}{#5}{\mst@greek@ush@loc} + \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) + will use OT1 font \mst@greekfont} \fi\fi\fi\fi -%\mt@font@info@on +%\mst@font@info@on } \@onlypreamble\MTDeclareVersion % \end{macrocode} @@ -2437,60 +3040,77 @@ and \protect\log-like names will be^^J% % % v1.15: some modifications for the subdued option vs LGRgreek and % for the math muskips after \cs{exists} and \cs{forall}. +% +% v1.2: the subdued option sets up the math alphabets in the +% normal and bold math versions to not apply to operator +% names and non-alphabetical symbols. The switch for braces +% is left as it is. % \begin{macrocode} \newcommand*\MTVersion[2][\@empty]{% \mathversion{#2}% \ifx\@empty#1% no optional argument - \edef\mt@tmp{#2} + \edef\mst@tmp{#2} \else% we check nevertheless for [] situation, will not work with [ ] - \def\mt@tmpa{#1}% - \ifx\mt@tmpa\@empty\edef\mt@tmp{#2}% - \else\edef\mt@tmp{#1}% + \def\mst@tmpa{#1}% + \ifx\mst@tmpa\@empty\edef\mst@tmp{#2}% + \else\edef\mst@tmp{#1}% \fi% \fi% - \usefont{\csname mt@encoding@\mt@tmp\endcsname}% - {\csname mt@family@\mt@tmp\endcsname}% - {\csname mt@series@\mt@tmp\endcsname}% - {\csname mt@shape@\mt@tmp\endcsname}% - \edef\m@t@@encoding{\csname mt@encoding@\mt@tmp\endcsname}% - \renewcommand{\encodingdefault}{\m@t@@encoding}% + \usefont{\csname mst@encoding@\mst@tmp\endcsname}% + {\csname mst@family@\mst@tmp\endcsname}% + {\csname mst@series@\mst@tmp\endcsname}% + {\csname mst@shape@\mst@tmp\endcsname}% + \edef\mst@@encoding{\csname mst@encoding@\mst@tmp\endcsname}% + \renewcommand{\encodingdefault}{\mst@@encoding}% %% some modifications for v1.15b - \edef\m@t@@famdefault{\csname mt@family@\mt@tmp\endcsname}% - \renewcommand{\familydefault}{\m@t@@famdefault}% - \edef\m@t@@series{\csname mt@series@\mt@tmp\endcsname}% - \renewcommand{\mddefault}{\m@t@@series}% - \edef\m@t@@shape{\csname mt@shape@\mt@tmp\endcsname}% - \renewcommand{\shapedefault}{\m@t@@shape}% - \edef\m@t@@boldvariant{\csname mt@boldvariant@\mt@tmp\endcsname}% - \renewcommand{\bfdefault}{\m@t@@boldvariant}% - \edef\m@t@@itdefault{\csname mt@itdefault@\mt@tmp\endcsname}% - \renewcommand{\itdefault}{\m@t@@itdefault}% - \edef\m@t@@rmdefault{\csname mt@rmdefault@\mt@tmp\endcsname}% - \renewcommand{\rmdefault}{\m@t@@rmdefault}% - \edef\m@t@@sfdefault{\csname mt@sfdefault@\mt@tmp\endcsname}% - \renewcommand{\sfdefault}{\m@t@@sfdefault}% - \edef\m@t@@ttdefault{\csname mt@ttdefault@\mt@tmp\endcsname}% - \renewcommand{\ttdefault}{\m@t@@ttdefault}% + \edef\mst@@famdefault{\csname mst@family@\mst@tmp\endcsname}% + \renewcommand{\familydefault}{\mst@@famdefault}% + \edef\mst@@series{\csname mst@series@\mst@tmp\endcsname}% + \renewcommand{\mddefault}{\mst@@series}% + \edef\mst@@shape{\csname mst@shape@\mst@tmp\endcsname}% + \renewcommand{\shapedefault}{\mst@@shape}% + \edef\mst@@boldvariant{\csname mst@boldvariant@\mst@tmp\endcsname}% + \renewcommand{\bfdefault}{\mst@@boldvariant}% + \edef\mst@@itdefault{\csname mst@itdefault@\mst@tmp\endcsname}% + \renewcommand{\itdefault}{\mst@@itdefault}% + \edef\mst@@rmdefault{\csname mst@rmdefault@\mst@tmp\endcsname}% + \renewcommand{\rmdefault}{\mst@@rmdefault}% + \edef\mst@@sfdefault{\csname mst@sfdefault@\mst@tmp\endcsname}% + \renewcommand{\sfdefault}{\mst@@sfdefault}% + \edef\mst@@ttdefault{\csname mst@ttdefault@\mst@tmp\endcsname}% + \renewcommand{\ttdefault}{\mst@@ttdefault}% %% v1.15e: muskips - \expandafter\m@t@existsmuskip\csname mt@existsskip@\mt@tmp\endcsname - \expandafter\m@t@forallmuskip\csname mt@forallskip@\mt@tmp\endcsname + \expandafter\mst@exists@muskip\csname mst@exists@skip@\mst@tmp\endcsname\relax + \expandafter\mst@forall@muskip\csname mst@forall@skip@\mst@tmp\endcsname\relax +%% v1.2: muskip for \cs{prime} + \expandafter\mst@prime@muskip\csname mst@prime@skip@\mst@tmp\endcsname\relax %% v1.15c: extending subdued to LGRgreek %% v1.15f: subdueing math alphabets in a simpler way than in 1.15e -\ifmt@subdued -\edef\mt@tmp{#2}\def\mt@tmpa{normal}% -\ifx\mt@tmp\mt@tmpa -\mt@restorealphabets\ifmt@LGRgreek\mt@restoregreek\fi +\ifmst@subdued +\edef\mst@tmp{#2}\def\mst@tmpa{normal}% +\ifx\mst@tmp\mst@tmpa +\mst@restorealphabets +\operatornamesdonotobeymathalphabets +\nonlettersdonotobeymathalphabets +\ifmst@LGRgreek\mst@restoregreek\fi \else -\def\mt@tmpa{bold}% -\ifx\mt@tmp\mt@tmpa -\mt@restorealphabets\ifmt@LGRgreek\mt@restoregreek\fi +\def\mst@tmpa{bold}% +\ifx\mst@tmp\mst@tmpa +\mst@restorealphabets +\operatornamesdonotobeymathalphabets +\nonlettersdonotobeymathalphabets +\ifmst@LGRgreek\mst@restoregreek\fi \else -\mt@setalphabets\ifmt@LGRgreek\mt@setuplgrgreek\fi +\mst@setalphabets +\operatornamesobeymathalphabets +\nonlettersobeymathalphabets +\ifmst@LGRgreek\mst@setuplgrgreek\fi \fi\fi\fi } \let\MathastextVersion\MTVersion \let\Mathastextversion\MTVersion \let\MTversion\MTVersion +\let\mathastextversion\MTVersion % \end{macrocode} % \end{macro} % \begin{macro}{\Mathastext} @@ -2501,11 +3121,11 @@ and \protect\log-like names will be^^J% % \end{macro} % Additional appropriate messages to the terminal and the log. % \begin{macrocode} -\ifmt@eulergreek +\ifmst@eulergreek \typeout{** Greek letters will use the Euler font. Use^^J% ** \protect\MathastextEulerScale{} to scale the font.} \else -\ifmt@symbolgreek +\ifmst@symbolgreek \typeout{** Greek letters will use the PostScript Symbol font. Use^^J% ** \protect\MathastextSymbolScale{} to scale the font.} \fi\fi @@ -2540,92 +3160,114 @@ and \protect\log-like names will be^^J% \DeclareMathSymbol{x}{\mathalpha}{mtletterfont}{`x} \DeclareMathSymbol{y}{\mathalpha}{mtletterfont}{`y} \DeclareMathSymbol{z}{\mathalpha}{mtletterfont}{`z} -\ifmt@frenchmath\def\mt@font@tbu{mtoperatorfont} - \else\def\mt@font@tbu{mtletterfont}\fi -\DeclareMathSymbol{A}{\mathalpha}{\mt@font@tbu}{`A} -\DeclareMathSymbol{B}{\mathalpha}{\mt@font@tbu}{`B} -\DeclareMathSymbol{C}{\mathalpha}{\mt@font@tbu}{`C} -\DeclareMathSymbol{D}{\mathalpha}{\mt@font@tbu}{`D} -\DeclareMathSymbol{E}{\mathalpha}{\mt@font@tbu}{`E} -\DeclareMathSymbol{F}{\mathalpha}{\mt@font@tbu}{`F} -\DeclareMathSymbol{G}{\mathalpha}{\mt@font@tbu}{`G} -\DeclareMathSymbol{H}{\mathalpha}{\mt@font@tbu}{`H} -\DeclareMathSymbol{I}{\mathalpha}{\mt@font@tbu}{`I} -\DeclareMathSymbol{J}{\mathalpha}{\mt@font@tbu}{`J} -\DeclareMathSymbol{K}{\mathalpha}{\mt@font@tbu}{`K} -\DeclareMathSymbol{L}{\mathalpha}{\mt@font@tbu}{`L} -\DeclareMathSymbol{M}{\mathalpha}{\mt@font@tbu}{`M} -\DeclareMathSymbol{N}{\mathalpha}{\mt@font@tbu}{`N} -\DeclareMathSymbol{O}{\mathalpha}{\mt@font@tbu}{`O} -\DeclareMathSymbol{P}{\mathalpha}{\mt@font@tbu}{`P} -\DeclareMathSymbol{Q}{\mathalpha}{\mt@font@tbu}{`Q} -\DeclareMathSymbol{R}{\mathalpha}{\mt@font@tbu}{`R} -\DeclareMathSymbol{S}{\mathalpha}{\mt@font@tbu}{`S} -\DeclareMathSymbol{T}{\mathalpha}{\mt@font@tbu}{`T} -\DeclareMathSymbol{U}{\mathalpha}{\mt@font@tbu}{`U} -\DeclareMathSymbol{V}{\mathalpha}{\mt@font@tbu}{`V} -\DeclareMathSymbol{W}{\mathalpha}{\mt@font@tbu}{`W} -\DeclareMathSymbol{X}{\mathalpha}{\mt@font@tbu}{`X} -\DeclareMathSymbol{Y}{\mathalpha}{\mt@font@tbu}{`Y} -\DeclareMathSymbol{Z}{\mathalpha}{\mt@font@tbu}{`Z} +\ifmst@frenchmath\def\mst@font@tbu{mtoperatorfont} + \else\def\mst@font@tbu{mtletterfont}\fi +\DeclareMathSymbol{A}{\mathalpha}{\mst@font@tbu}{`A} +\DeclareMathSymbol{B}{\mathalpha}{\mst@font@tbu}{`B} +\DeclareMathSymbol{C}{\mathalpha}{\mst@font@tbu}{`C} +\DeclareMathSymbol{D}{\mathalpha}{\mst@font@tbu}{`D} +\DeclareMathSymbol{E}{\mathalpha}{\mst@font@tbu}{`E} +\DeclareMathSymbol{F}{\mathalpha}{\mst@font@tbu}{`F} +\DeclareMathSymbol{G}{\mathalpha}{\mst@font@tbu}{`G} +\DeclareMathSymbol{H}{\mathalpha}{\mst@font@tbu}{`H} +\DeclareMathSymbol{I}{\mathalpha}{\mst@font@tbu}{`I} +\DeclareMathSymbol{J}{\mathalpha}{\mst@font@tbu}{`J} +\DeclareMathSymbol{K}{\mathalpha}{\mst@font@tbu}{`K} +\DeclareMathSymbol{L}{\mathalpha}{\mst@font@tbu}{`L} +\DeclareMathSymbol{M}{\mathalpha}{\mst@font@tbu}{`M} +\DeclareMathSymbol{N}{\mathalpha}{\mst@font@tbu}{`N} +\DeclareMathSymbol{O}{\mathalpha}{\mst@font@tbu}{`O} +\DeclareMathSymbol{P}{\mathalpha}{\mst@font@tbu}{`P} +\DeclareMathSymbol{Q}{\mathalpha}{\mst@font@tbu}{`Q} +\DeclareMathSymbol{R}{\mathalpha}{\mst@font@tbu}{`R} +\DeclareMathSymbol{S}{\mathalpha}{\mst@font@tbu}{`S} +\DeclareMathSymbol{T}{\mathalpha}{\mst@font@tbu}{`T} +\DeclareMathSymbol{U}{\mathalpha}{\mst@font@tbu}{`U} +\DeclareMathSymbol{V}{\mathalpha}{\mst@font@tbu}{`V} +\DeclareMathSymbol{W}{\mathalpha}{\mst@font@tbu}{`W} +\DeclareMathSymbol{X}{\mathalpha}{\mst@font@tbu}{`X} +\DeclareMathSymbol{Y}{\mathalpha}{\mst@font@tbu}{`Y} +\DeclareMathSymbol{Z}{\mathalpha}{\mst@font@tbu}{`Z} %% -\ifmt@nodigits\else -\def\mt@font@tbu{mtoperatorfont} +\ifmst@nodigits\else +\def\mst@font@tbu{mtoperatorfont} % \end{macrocode} % In version 1.1, we have now separated digits from letters, so paradoxically % it is less problematic to give them the |mathalpha| type. % \begin{macrocode} -\ifmt@symboldigits \def\mt@font@tbu{mtpsymbol} \fi -\ifmt@eulerdigits \def\mt@font@tbu{mteulervm} \fi -\DeclareMathSymbol{0}{\mathalpha}{\mt@font@tbu}{`0} -\DeclareMathSymbol{1}{\mathalpha}{\mt@font@tbu}{`1} -\DeclareMathSymbol{2}{\mathalpha}{\mt@font@tbu}{`2} -\DeclareMathSymbol{3}{\mathalpha}{\mt@font@tbu}{`3} -\DeclareMathSymbol{4}{\mathalpha}{\mt@font@tbu}{`4} -\DeclareMathSymbol{5}{\mathalpha}{\mt@font@tbu}{`5} -\DeclareMathSymbol{6}{\mathalpha}{\mt@font@tbu}{`6} -\DeclareMathSymbol{7}{\mathalpha}{\mt@font@tbu}{`7} -\DeclareMathSymbol{8}{\mathalpha}{\mt@font@tbu}{`8} -\DeclareMathSymbol{9}{\mathalpha}{\mt@font@tbu}{`9} +\ifmst@symboldigits \def\mst@font@tbu{mtpsymbol} \fi +\ifmst@eulerdigits \def\mst@font@tbu{mteulervm} \fi +\DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0} +\DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1} +\DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2} +\DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3} +\DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4} +\DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5} +\DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6} +\DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7} +\DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8} +\DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9} \fi % \end{macrocode} % When |symboldelimiters| is passed as an option, we use the % Symbol font for the printable characters other than % letters and digits. % \begin{macrocode} -\ifmt@symboldelimiters -\def\mt@font@tbu{mtpsymbol} -\mt@endashfalse -\mt@emdashfalse +\ifmst@symboldelimiters +\def\mst@font@tbu{mtpsymbol} +\mst@endashfalse +\mst@emdashfalse \else -\def\mt@font@tbu{mtoperatorfont} +\def\mst@font@tbu{mtoperatorfont} \fi -%% -\ifmt@noexclam\else -\DeclareMathSymbol{!}{\mathclose}{\mt@font@tbu}{"21} -\DeclareMathSymbol{?}{\mathclose}{\mt@font@tbu}{"3F} +% \end{macrocode} +% |v1.2| adds the tricks to let non letters/digits obey math alphabets. We have +% to double the definitions for easy switch on-off of the mechanism, via a token +% list which is put into \cs{everymath} and \cs{everydisplay}. +% \begin{macrocode} +\ifmst@noexclam\else +\DeclareMathSymbol{!}{\mathclose}{\mst@font@tbu}{"21} +\DeclareMathSymbol{\mst@alpha@exclam}{\mathalpha}{\mst@font@tbu}{"21} +\mst@addtoactivate\!\mathclose\mst@alpha@exclam +\DeclareMathSymbol{?}{\mathclose}{\mst@font@tbu}{"3F} +\DeclareMathSymbol{\mst@alpha@question}{\mathalpha}{\mst@font@tbu}{"3F} +\mst@addtoactivate\?\mathclose\mst@alpha@question \fi %% -\ifmt@noast\else -\DeclareMathSymbol{*}{\mathalpha}{\mt@font@tbu}{"2A} +\ifmst@noast\else +\DeclareMathSymbol{*}{\mathalpha}{\mst@font@tbu}{"2A} \fi % \end{macrocode} -% We completely renounced to try to do things with all the various dots, they -% are defined in many different ways, and there is the amsmath also. Dealing -% with this issue would mean a lot a time for a minuscule result. Better to -% leave the user use the |mathdots| package and accept that we can not avoid +% (2011) I completely renounced to try to do things with all the various dots, +% they are defined in many different ways, and there is the amsmath also. +% Dealing with this issue would mean a lot a time for a minuscule result. Better +% to leave the user use the |mathdots| package and accept that we can not avoid % the default fonts in that case. So here I just treat |.| (in the hope to % really lessen by 1 the number of fonts embedded at the end in the PDF). +% [(Dec. 2012) should I reexamine these definitive sounding remarks?] % \begin{macrocode} -\ifmt@nopunct\else -\DeclareMathSymbol{,}{\mathpunct}{\mt@font@tbu}{"2C} -\DeclareMathSymbol{.}{\mathord}{\mt@font@tbu}{"2E} -\DeclareMathSymbol{:}{\mathrel}{\mt@font@tbu}{"3A} % relation spacing +\ifmst@nopunct\else +\DeclareMathSymbol{,}{\mathpunct}{\mst@font@tbu}{"2C} +\DeclareMathSymbol{\mst@alpha@comma}{\mathalpha}{\mst@font@tbu}{"2C} +\mst@addtoactivate\,\mathpunct\mst@alpha@comma +\DeclareMathSymbol{.}{\mathpunct}{\mst@font@tbu}{"2E} +\DeclareMathSymbol{\mst@alpha@dot}{\mathalpha}{\mst@font@tbu}{"2E} +\mst@addtoactivate\.\mathpunct\mst@alpha@dot +\DeclareMathSymbol{:}{\mathrel}{\mst@font@tbu}{"3A} % relation spacing +\DeclareMathSymbol{\mst@alpha@colon}{\mathalpha}{\mst@font@tbu}{"3A} +\mst@addtoactivate\:\mathrel\mst@alpha@colon \@ifpackageloaded{amsmath} - {} % \colon defined in amsmath.sty (enlarged punctuation spacing) - {\let\colon\undefined % no amsmath, use punctuation spacing - \DeclareMathSymbol{\colon}{\mathpunct}{\mt@font@tbu}{"3A}} -\DeclareMathSymbol{;}{\mathpunct}{\mt@font@tbu}{"3B} +{} % \colon defined in amsmath.sty in terms of : with some enlarged explicit + % spacing. No need to intervene. +{% \let\colon\undefined % I had this \undefined since ages but why? + % the reason is if some package has redefined \colon as amsmath does + % no amsmath, use standard punctuation spacing + \DeclareMathSymbol{\colon}{\mathpunct}{\mst@font@tbu}{"3A} + \mst@activatelist\expandafter{\the\mst@activatelist + \def\colon{\mathpunct{\mst@alpha@colon}}}} +\DeclareMathSymbol{;}{\mathpunct}{\mst@font@tbu}{"3B} +\DeclareMathSymbol{\mst@alpha@pointvirgule}{\mathalpha}{\mst@font@tbu}{"3B} +\mst@addtoactivate\;\mathpunct\mst@alpha@pointvirgule \fi % \end{macrocode} % \begin{macro}{\relbar} @@ -2639,28 +3281,28 @@ and \protect\log-like names will be^^J% % XeTeX, not for LuaLatex. Also I do my modifications to \cs{relbar} % in a manner testing for the presence of amsmath. % \begin{macrocode} -\ifmt@nominus\else +\ifmst@nominus\else \ifXeTeX -\XeTeXmathcharnumdef\mt@minus@sign=\XeTeXmathcodenum`\-\relax +\XeTeXmathcharnumdef\mst@minus@sign=\XeTeXmathcodenum`\-\relax % \end{macrocode} % We could also have used\\ -% \verb|\edef\mt@minus@sign{\expandafter\XeTeXmathcharnum\the\XeTeXmathcodenum`\-\relax}| -% but not \verb|\def\mt@minus@sign{\XeTeXmathcharnum\XeTeXmathcodenum`\-}| +% \verb|\edef\mst@minus@sign{\expandafter\XeTeXmathcharnum\the\XeTeXmathcodenum`\-\relax}| +% but not \verb|\def\mst@minus@sign{\XeTeXmathcharnum\XeTeXmathcodenum`\-}| % \begin{macrocode} \else \ifLuaTeX -%% \luatexUmathcharnumdef\mt@minus@sign=\luatexUmathcodenum`\-\relax ne +%% \luatexUmathcharnumdef\mst@minus@sign=\luatexUmathcodenum`\-\relax ne %% marche pas pour le moment car \luatexUmathcodenum retourne parfois un %% legacy mathcode, parfois un Unicode mathcode, \`a mon avis c'est un bug %% de LuaLatex. En fait Taco H me dit que la prochaine version -%% r\'eglera ce probl\`eme. \luatexUmathchardef\mt@minus@sign="2 "2 "0\relax -\mathchardef\mt@minus@sign=8704\relax % "2200 +%% r\'eglera ce probl\`eme. \luatexUmathchardef\mst@minus@sign="2 "2 "0\relax +\mathchardef\mst@minus@sign=8704\relax % "2200 \else -\mathchardef\mt@minus@sign=\mathcode`\-\relax +\mathchardef\mst@minus@sign=\mathcode`\-\relax \fi\fi \@ifpackageloaded{amsmath} -{\def\relbar{\mathrel{\mathpalette\mathsm@sh\mt@minus@sign}}} -{\DeclareRobustCommand\relbar{\mathrel{\smash\mt@minus@sign}}} +{\def\relbar{\mathrel{\mathpalette\mathsm@sh\mst@minus@sign}}} +{\DeclareRobustCommand\relbar{\mathrel{\smash\mst@minus@sign}}} \def\rightarrowfill{$\m@th\mathord{\relbar}\mkern-7mu% \cleaders\hbox{$\mkern-2mu\relbar\mkern-2mu$}\hfill \mkern-7mu\mathord\rightarrow$} @@ -2672,112 +3314,130 @@ and \protect\log-like names will be^^J% % \end{macro} % \begin{macro}{endash} % 2011/01/29, v1.1. Producing this next piece of code was not a piece -% of cake for a novice like myself!\\% +% of cake for a novice like myself!\\ % 2011/02/05, v1.11. Compatibility with Unicode (via use of fontspec -% encodings EU1 and EU2)\\% -% 2011/02/07, v1.12. Improved dealing of Unicode possibility.\\% +% encodings EU1 and EU2)\\ +% 2011/02/07, v1.12. Improved dealing of Unicode possibility.\\ % 2011/04/02, v1.14b. Corrected some very irresponsible bug in the % Unicode part which caused a problem when 10 or more math families have -% been allocated.\\% +% been allocated.\\ % 2012/09/24, v1.15. Added AtBeginDocument to circumvent some amsmath % problem with unicode engines. % \begin{macrocode} -\def\do@the@endashstuff{\edef\mt@tmp@enc{\encodingdefault} - \ifx\mt@tmp@enc\mt@eui % xetex+fontspec - \AtBeginDocument{\XeTeXmathcode`\-="2 \symmtoperatorfont "2013 \relax} +\def\do@the@endashstuff{\edef\mst@tmp@enc{\encodingdefault} + \ifx\mst@tmp@enc\mst@eui % xetex+fontspec +\AtBeginDocument{\XeTeXmathcode`\-="2 \symmtoperatorfont "2013\relax} +\AtBeginDocument{\XeTeXmathchardef\mst@alpha@minus="7 \symmtoperatorfont "2013\relax} +\else + \ifx\mst@tmp@enc\mst@euii % luatex+fontspec +\AtBeginDocument{\luatexUmathcode`\-="2 \symmtoperatorfont "2013\relax} +\AtBeginDocument{\luatexUmathchardef\mst@alpha@minus="7 \symmtoperatorfont "2013\relax} \else -\ifx\mt@tmp@enc\mt@euii % luatex+fontspec - \AtBeginDocument{\luatexUmathcode`\-="2 \symmtoperatorfont "2013 \relax} -\ifx\mt@tmp@enc\mt@ti % T1 + \ifx\mst@tmp@enc\mst@ti % T1 \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{21} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont}{21} \else -\ifx\mt@tmp@enc\mt@oti % OT1 + \ifx\mst@tmp@enc\mst@oti % OT1 \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{123} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont}{123} \else -\ifx\mt@tmp@enc\mt@lyi % LY1 + \ifx\mst@tmp@enc\mst@lyi % LY1 \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{150} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont}{150} \else % make sure we have neither xetex nor luatex - \ifXeTeX\mt@aborttrue\else\ifLuaTeX\mt@aborttrue\else + \ifXeTeX\mst@aborttrue\else\ifLuaTeX\mst@aborttrue\else \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont} -{\expandafter\the\expandafter\csname\mt@tmp@enc\string\textendash\endcsname} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont} +{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textendash\endcsname} \fi\fi \fi\fi\fi\fi\fi} -\def\do@the@emdashstuff{\edef\mt@tmp@enc{\encodingdefault} -\ifx\mt@tmp@enc\mt@eui % xetex+fontspec - \AtBeginDocument{\XeTeXmathcode`\-="2 \symmtoperatorfont "2014 \relax} +\def\do@the@emdashstuff{\edef\mst@tmp@enc{\encodingdefault} +\ifx\mst@tmp@enc\mst@eui % xetex+fontspec +\AtBeginDocument{\XeTeXmathcode`\-="2 \symmtoperatorfont "2014\relax} +\AtBeginDocument{\XeTeXmathchardef\mst@alpha@minus="7 \symmtoperatorfont "2014\relax} \else -\ifx\mt@tmp@enc\mt@euii % luatex+fontspec - \AtBeginDocument{\luatexUmathcode`\-="2 \symmtoperatorfont "2014 \relax} -\ifx\mt@tmp@enc\mt@ti % T1 +\ifx\mst@tmp@enc\mst@euii % luatex+fontspec +\AtBeginDocument{\luatexUmathcode`\-="2 \symmtoperatorfont "2014\relax} +\AtBeginDocument{\luatexUmathchardef\mst@alpha@minus="7 \symmtoperatorfont "2014\relax} +\else + \ifx\mst@tmp@enc\mst@ti % T1 \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{22} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont}{22} \else -\ifx\mt@tmp@enc\mt@oti % OT1 +\ifx\mst@tmp@enc\mst@oti % OT1 \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{124} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont}{124} \else -\ifx\mt@tmp@enc\mt@lyi % LY1 +\ifx\mst@tmp@enc\mst@lyi % LY1 \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{151} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont}{151} \else % make sure we have neither xetex nor luatex - \ifXeTeX\mt@aborttrue\else\ifLuaTeX\mt@aborttrue\else + \ifXeTeX\mst@aborttrue\else\ifLuaTeX\mst@aborttrue\else \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont} -{\expandafter\the\expandafter\csname\mt@tmp@enc\string\textemdash\endcsname} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{mtoperatorfont} +{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textemdash\endcsname} \fi\fi \fi\fi\fi\fi\fi} -\ifmt@nominus\else -\mt@abortfalse -\ifmt@endash\do@the@endashstuff\else -\ifmt@emdash\do@the@emdashstuff\else - \DeclareMathSymbol{-}{\mathbin}{\mt@font@tbu}{"2D} +\ifmst@nominus\else +\mst@abortfalse +\ifmst@endash\do@the@endashstuff\else +\ifmst@emdash\do@the@emdashstuff\else + \DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{\mst@font@tbu}{"2D} \fi\fi -\ifmt@abort\DeclareMathSymbol{-}{\mathbin}{\mt@font@tbu}{"2D}\fi +\ifmst@abort + \DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D} + \DeclareMathSymbol{\mst@alpha@minus}{\mathalpha}{\mst@font@tbu}{"2D} +\fi +\mst@addtoactivate\-\mathbin\mst@alpha@minus \fi % \end{macrocode} % \end{macro} % \begin{macro}{\hbar} -% \begin{macro}{\mt@ltbar} +% \begin{macro}{\mst@ltbar} % 2011/01/31, v1.1 I decide to settle the question of the |\hbar|. First, I % should recall the \LaTeX{} definition % \begin{macrocode} %%\def\hbar{{\mathchar'26\mkern-9muh}} %% (original definition from latex.ltx) % \end{macrocode} -% Well, the fact is that there is a DeclareMathSymbol in |amsfonts.sty|, so I -% can not always rely on the original which had the advantage that at least +% Well, the fact is that there is a \cs{DeclareMathSymbol} in |amsfonts.sty|, so +% I can not always rely on the original which had the advantage that at least % |h| would be in the correct font. But of course not the macron character -% (|\=|, |\bar|). And there is also the issue of the kern whose length is -% given in a way which depends on |cmsy| (18mu=1em and em taken from info in -% |cmsy|). The first problem is that I don't know how to get the slot position -% of the macron, given the encoding. So I found another way. I will need an -% |rlap| adapted to math mode, and this is provided by code from -% Alexander~R.~\textsc{Perlis} in his TugBoat article 22 (2001), 350--352, -% which I found by googling |rlap|. -% (as an aside, I am only now (04/02) aware that the package |mathtools| -% provides the |mathrlap| tc... ) +% (|\=|, |\bar|). And there is also the issue of the kern whose length is given +% in a way which depends on |cmsy| (18mu=1em and em taken from info in |cmsy|). +% The first problem is that I don't know how to get the slot position of the +% macron, given the encoding. So I found another way. I will need an |rlap| +% adapted to math mode, and this is provided by code from +% Alexander~R.~\textsc{Perlis} in his TugBoat article 22 (2001), 350--352, which +% I found by googling |rlap|. (as an aside, I am only now (April 2, 2011) aware +% that the package |mathtools| provides the |mathrlap| etc... ) % % v1.14b (2011/04/02): again this bug in the EU1/EU2 encoding part, as in the % code redefining \$ etc in math mode (see below). Fixed. % \begin{macrocode} % -\def\mt@mathrlap{\mathpalette\mt@mathrlapinternal} -\def\mt@mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} -\def\do@the@hbarstuff{\edef\mt@tmp@enc{\encodingdefault} -\ifx\mt@tmp@enc\mt@eui % xetex and unicode font +\def\mst@mathrlap{\mathpalette\mst@mathrlapinternal} +\def\mst@mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} +\def\do@the@hbarstuff{\edef\mst@tmp@enc{\encodingdefault} +\ifx\mst@tmp@enc\mst@eui % xetex and unicode font \XeTeXmathchardef\hbar="7 \symmtletterfont "0127 \relax \else -\ifx\mt@tmp@enc\mt@euii % luatex and unicode font +\ifx\mst@tmp@enc\mst@euii % luatex and unicode font \luatexUmathchardef\hbar="7 \symmtletterfont "0127 \relax %% or 210F? \else % I must leave open the T1, OT1 possibility also for XeTeX or LuaTeX - \ifx\mt@ti\mt@tmp@enc - \DeclareMathAccent{\mt@ltbar}{\mathalpha}{mtletterfont}{9} + \ifx\mst@ti\mst@tmp@enc + \DeclareMathAccent{\mst@ltbar}{\mathalpha}{mtletterfont}{9} \else %% assume OT1. Bad idea? Should not provoke an error anyhow - \DeclareMathAccent{\mt@ltbar}{\mathalpha}{mtletterfont}{22} + \DeclareMathAccent{\mst@ltbar}{\mathalpha}{mtletterfont}{22} \fi - \def\hbar{\mt@mathrlap{\mt@ltbar{\ }}h} + \def\hbar{\mst@mathrlap{\mst@ltbar{\ }}h} \fi\fi} -\ifmt@nohbar\else\do@the@hbarstuff\fi +\ifmst@nohbar\else\do@the@hbarstuff\fi % \end{macrocode} % \end{macro} % \end{macro} -% As |h| is from |mtletterfont|, the accent \cs{mt@ltbar} is the +% As |h| is from |mtletterfont|, the accent \cs{mst@ltbar} is the % \cs{bar} accent from that same font. Of course, if the user % defines math versions with other encodings than the default one % when loading the package this will probably not work there (if I @@ -2792,94 +3452,179 @@ and \protect\log-like names will be^^J% % sorry!) made Unicode compatible. % \begin{macro}{+,=,\Relbar} % \begin{macrocode} -\ifmt@noplus\else -\DeclareMathSymbol{+}{\mathbin}{\mt@font@tbu}{"2B} +\ifmst@noplus\else +\DeclareMathSymbol{+}{\mathbin}{\mst@font@tbu}{"2B} +\DeclareMathSymbol{\mst@alpha@plus}{\mathalpha}{\mst@font@tbu}{"2B} +\mst@addtoactivate\+\mathbin\mst@alpha@plus \fi -\ifmt@noequal\else +\ifmst@noequal\else \ifXeTeX -\XeTeXmathcharnumdef\mt@equal@sign=\XeTeXmathcodenum`\=\relax +\XeTeXmathcharnumdef\mst@equal@sign=\XeTeXmathcodenum`\=\relax \else \ifLuaTeX %% 12 octobre 2012 \luatexUmathcodenum`\= %% ne marche pas pour le moment \`a cause du fait que \luatexUmathcodenum %% donne un mathcode sur 8bit ou un Unicode mathcode sans qu'on puisse %% savoir lequel -%% \luatexUmathchardef\mt@equal@sign="3 "0 "3D\relax -\mathchardef\mt@equal@sign=12349\relax +%% \luatexUmathchardef\mst@equal@sign="3 "0 "3D\relax +\mathchardef\mst@equal@sign=12349\relax \else -\mathchardef\mt@equal@sign=\mathcode`\=\relax +\mathchardef\mst@equal@sign=\mathcode`\=\relax \fi\fi \@ifpackageloaded{amsmath} -{\def\Relbar{\mathrel\mt@equal@sign}} -{\DeclareRobustCommand\Relbar{\mathrel{\mt@equal@sign}}} -\DeclareMathSymbol{=}{\mathrel}{\mt@font@tbu}{"3D} +{\def\Relbar{\mathrel\mst@equal@sign}} +{\DeclareRobustCommand\Relbar{\mathrel{\mst@equal@sign}}} +\DeclareMathSymbol{=}{\mathrel}{\mst@font@tbu}{"3D} +\DeclareMathSymbol{\mst@alpha@equal}{\mathalpha}{\mst@font@tbu}{"3D} +% \end{macrocode} +% \begin{macro}{\nfss@catcodes} +% 2012/12/18: Activating = (only in math mode actually) seems very bad but +% surprisingly works well. However I had a problem with |eu2lmtt.fd| which +% should not be loaded with an active =. So far I have not detected other +% problems with |"8000|. +% \begin{macrocode} +\ifLuaTeX\g@addto@macro\nfss@catcodes{\@makeother\=}\fi +\mst@addtoactivate\=\mathrel\mst@alpha@equal \fi % \end{macrocode} -% \end{macro} +% \end{macro}\end{macro} +% \begin{macro}{noparenthesis} % \begin{macro}{(,),[,],/} +% \cs{lbrack} and \cs{rbrack} are defined in |latex.ltx| by +% |\def\lbrack{[}\def\rbrack{]}| so this fits well with what we do here. +% \cs{lparen} and \cs{rparen} are similarly defined in |mathtools|. On the +% other hand the \emph{opposite} thing is done in |latex.ltx| with |\{| and +% |\}| which are defined in terms of the control sequences \cs{lbrace} and +% \cs{rbrace}. % \begin{macrocode} -\ifmt@noparen\else -\DeclareMathDelimiter{(}{\mathopen} {\mt@font@tbu}{"28}{largesymbols}{"00} -\DeclareMathDelimiter{)}{\mathclose}{\mt@font@tbu}{"29}{largesymbols}{"01} -\DeclareMathDelimiter{[}{\mathopen} {\mt@font@tbu}{"5B}{largesymbols}{"02} -\DeclareMathDelimiter{]}{\mathclose}{\mt@font@tbu}{"5D}{largesymbols}{"03} -\DeclareMathDelimiter{/}{\mathord}{\mt@font@tbu}{"2F}{largesymbols}{"0E} -\DeclareMathSymbol{/}{\mathord}{\mt@font@tbu}{"2F} +\ifmst@noparen\else +\ifmst@nosmalldelims + \DeclareMathSymbol{(}{\mathopen}{\mst@font@tbu}{"28} + \DeclareMathSymbol{)}{\mathclose}{\mst@font@tbu}{"29} + \DeclareMathSymbol{[}{\mathopen} {\mst@font@tbu}{"5B} + \DeclareMathSymbol{]}{\mathclose}{\mst@font@tbu}{"5D} + \DeclareMathSymbol{/}{\mathord}{\mst@font@tbu}{"2F} +\else + \DeclareMathDelimiter{(}{\mathopen}{\mst@font@tbu}{"28}{largesymbols}{"00} + \DeclareMathDelimiter{)}{\mathclose}{\mst@font@tbu}{"29}{largesymbols}{"01} + \DeclareMathDelimiter{[}{\mathopen} {\mst@font@tbu}{"5B}{largesymbols}{"02} + \DeclareMathDelimiter{]}{\mathclose}{\mst@font@tbu}{"5D}{largesymbols}{"03} + \DeclareMathDelimiter{/}{\mathord}{\mst@font@tbu}{"2F}{largesymbols}{"0E} +\fi +\DeclareMathSymbol{\mst@alpha@lparen}{\mathalpha}{\mst@font@tbu}{40} +\DeclareMathSymbol{\mst@alpha@rparen}{\mathalpha}{\mst@font@tbu}{41} +\DeclareMathSymbol{\mst@alpha@lbrack}{\mathalpha}{\mst@font@tbu}{"5B} +\DeclareMathSymbol{\mst@alpha@rbrack}{\mathalpha}{\mst@font@tbu}{"5D} +\DeclareMathSymbol{\mst@alpha@slash}{\mathalpha}{\mst@font@tbu}{"2F} +\mst@addtoactivate\(\mathopen\mst@alpha@lparen +\mst@addtoactivate\)\mathclose\mst@alpha@rparen +\mst@addtoactivate\[\mathopen\mst@alpha@lbrack +\mst@addtoactivate\]\mathclose\mst@alpha@rbrack +\mst@addtoactivate\/\mathord\mst@alpha@slash \fi % \end{macrocode} -% \end{macro} +% \end{macro}\end{macro} % \begin{macro}{alldelims} +% \begin{macro}{<,>,\}\begin{macro}{\setminus}\begin{macro}{\backslash} +% \begin{macrocode} +\ifmst@alldelims +\ifmst@nosmalldelims +% \end{macrocode} +% Dec 18, 2012. We then want |\let\backslash\mst@alpha@backslash| to do nothing +% when the \cs{backslash} is used as a delimiter. So I just copy here the +% original definition from |latex.ltx|, generally speaking when people use other +% math symbol fonts they do respect the encoding of the CM symbols and +% largesymbols, so this is 90\% safe. But in truth I should extract from the +% meaning of \cs{backslash} the |delcode|. % \begin{macrocode} -\ifmt@alldelims -\DeclareMathDelimiter{<}{\mathopen}{\mt@font@tbu}{"3C}{largesymbols}{"0A} -\DeclareMathDelimiter{>}{\mathclose}{\mt@font@tbu}{"3E}{largesymbols}{"0B} -\DeclareMathSymbol{<}{\mathrel}{\mt@font@tbu}{"3C} -\DeclareMathSymbol{>}{\mathrel}{\mt@font@tbu}{"3E} + \DeclareMathDelimiter{\mst@alpha@backslash} + {\mathalpha}{symbols}{"6E}{largesymbols}{"0F} +\else + \DeclareMathDelimiter{<}{\mathopen}{\mst@font@tbu}{"3C}{largesymbols}{"0A} + \DeclareMathDelimiter{>}{\mathclose}{\mst@font@tbu}{"3E}{largesymbols}{"0B} % \end{macrocode} -% There is no backslash in the Symbol font. +% There is no backslash in the Symbol font hence |mtoperatorfont| here. % \begin{macrocode} -\expandafter\DeclareMathDelimiter\@backslashchar - {\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F} -\DeclareMathDelimiter{\backslash} - {\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F} -\DeclareMathSymbol\setminus\mathbin{mtoperatorfont}{"5C} + \expandafter\DeclareMathDelimiter\@backslashchar + {\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F} + \DeclareMathDelimiter{\backslash} + {\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F} + \DeclareMathDelimiter{\mst@alpha@backslash} + {\mathalpha}{mtoperatorfont}{"5C}{largesymbols}{"0F} +\fi +\DeclareMathSymbol{<}{\mathrel}{\mst@font@tbu}{"3C} +\DeclareMathSymbol{>}{\mathrel}{\mst@font@tbu}{"3E} +\DeclareMathSymbol{\mst@alpha@less}{\mathalpha}{\mst@font@tbu}{"3C} +\DeclareMathSymbol{\mst@alpha@more}{\mathalpha}{\mst@font@tbu}{"3E} +\mst@addtoactivate\<\mathrel\mst@alpha@less +\mst@addtoactivate\>\mathrel\mst@alpha@more +\mst@activatelist\expandafter{\the\mst@activatelist + \let\backslash\mst@alpha@backslash} +\DeclareMathSymbol{\setminus}{\mathbin}{mtoperatorfont}{"5C} +\DeclareMathSymbol{\mst@alpha@setminus}{\mathalpha}{mtoperatorfont}{"5C} +\mst@activatelist\expandafter{\the\mst@activatelist + \def\setminus{\mathbin{\mst@alpha@setminus}}} % \end{macrocode} +% \end{macro}\end{macro}\end{macro} % \begin{macro}{\models} % 1.15d: 13 oct 2012. Before modifying \string| we must preserve \cs{models}. % \begin{macrocode} \ifXeTeX -\XeTeXmathcharnumdef\mt@vert@bar=\XeTeXmathcodenum`\|\relax +\XeTeXmathcharnumdef\mst@vert@bar=\XeTeXmathcodenum`\|\relax \else \ifLuaTeX -%% \luatexUmathchardef\mt@vert@bar="0 "2 "006A\relax -\mathchardef\mt@vert@bar=618\relax -\else\mathchardef\mt@vert@bar=\mathcode`\|\relax +%% \luatexUmathchardef\mst@vert@bar="0 "2 "006A\relax +\mathchardef\mst@vert@bar=618\relax +\else\mathchardef\mst@vert@bar=\mathcode`\|\relax \fi\fi -\DeclareRobustCommand\models{\mathrel{\mt@vert@bar}\joinrel\Relbar} +\DeclareRobustCommand\models{\mathrel{\mst@vert@bar}\joinrel\Relbar} % \end{macrocode} % \end{macro} +% \begin{macro}{|,\mid,\vert} +% (2011) I did not do anything then to try to emulate \cs{Vert} with the +% vertical bar from the text font... and now (2012) \mst is not as radical as +% it used to be anyhow, so it is too late. % \begin{macrocode} -\DeclareMathSymbol{|}\mathord{\mt@font@tbu}{"7C} -\DeclareMathDelimiter{|}{\mt@font@tbu}{"7C}{largesymbols}{"0C} -% \end{macrocode} -% I did not do anything with \cs{Vert}! Maybe I should! -% \begin{macrocode} -\DeclareMathDelimiter\vert - \mathord{\mt@font@tbu}{"7C}{largesymbols}{"0C} -\DeclareMathSymbol\mid\mathrel{\mt@font@tbu}{"7C} +\ifmst@nosmalldelims + \DeclareMathSymbol{|}{\mathord}{\mst@font@tbu}{124} +\else + \DeclareMathDelimiter{|}{\mathord}{\mst@font@tbu}{124}{largesymbols}{"0C} +\fi +\def\vert{|} +\DeclareMathSymbol{\mst@alpha@vbar}{\mathalpha}{\mst@font@tbu}{124} +\mst@addtoactivate\|\mathord\mst@alpha@vbar +\mst@activatelist\expandafter{\the\mst@activatelist} +\DeclareMathSymbol{\mid}{\mathrel}{\mst@font@tbu}{124} +\mst@activatelist\expandafter{\the\mst@activatelist + \def\mid{\mathrel{\mst@alpha@vbar}}} % \end{macrocode} -% 24sep12: la red\'eclaration directe de \cs{lbrace} enclenchait une -% erreur sous xetex/luatex avec mathtools si je me souviens bien. +% \begin{macro}{\explicitbraces-}\begin{macro}{obey-}\begin{macro}{mathalphabets} +% \begin{macro}{\explicitbraces-}\begin{macro}{donotobey-}\begin{macro}{mathalphabets} +% Braces. |\{| and |\}| will not be acceptable as delimiters anymore if the +% redefinitions below in \cs{mst@dobraces} are enacted. But they will obey math +% alphabets. % \begin{macrocode} -\let\lbrace\undefined -\DeclareMathDelimiter{\lbrace} - {\mathopen}{\mt@font@tbu}{"7B}{largesymbols}{"08} -\let\rbrace\undefined -\DeclareMathDelimiter{\rbrace} - {\mathclose}{\mt@font@tbu}{"7D}{largesymbols}{"09} +\ifmst@nosmalldelims + \DeclareMathSymbol{\lbrace}{\mathopen}{\mst@font@tbu}{123} + \DeclareMathSymbol{\rbrace}{\mathclose}{\mst@font@tbu}{125} +\else + \DeclareMathDelimiter{\lbrace} + {\mathopen}{\mst@font@tbu}{123}{largesymbols}{"08} + \DeclareMathDelimiter{\rbrace} + {\mathclose}{\mst@font@tbu}{125}{largesymbols}{"09} \fi +\DeclareMathSymbol{\mst@alpha@lbrace}{\mathalpha}{\mst@font@tbu}{123} +\DeclareMathSymbol{\mst@alpha@rbrace}{\mathalpha}{\mst@font@tbu}{125} +\mst@activatelist\expandafter{\the\mst@activatelist + \mst@dobraces{\def\{{\mathopen\mst@alpha@lbrace}% + \def\}{\mathclose\mst@alpha@rbrace}}} +\fi % end of \ifmst@alldelims +\newcommand{\explicitbracesobeymathalphabets}{\let\mst@dobraces\@firstofone} +\newcommand{\explicitbracesdonotobeymathalphabets}{\let\mst@dobraces\@gobble} +\explicitbracesdonotobeymathalphabets % \end{macrocode} -% \end{macro} +% \end{macro}\end{macro}\end{macro}\end{macro} +% \end{macro}\end{macro}\end{macro}\end{macro} % \begin{macro}{specials} % \leavevmode\kern\parindent 1.14b (2011/04/02): the redefinitions of % \#, \$, \% and \& were buggy (this showed up when 10 or more math @@ -2892,17 +3637,9 @@ and \protect\log-like names will be^^J% % % 1.15g (2012/10/25): ... but it was \emph{not} that insane, I just had % forgotten the reason I did it that way! I just extended to the other -% specials what latex was doing with \char92\$ (\cs{mathdollar}!)... Apart -% from that the \cs{mathalpha} (=7) thing -% makes me nuts and reminds me that \TeX{} is not satisfying at all -% here: why exclude the variable family from being assigned a type for -% spacings? yes he had only 3 bits but perhaps that was too clever. I am -% stuck as I just can't change for example $>$ to be of type -% \cs{mathalpha} as it is \cs{mathrel}, etc\dots so perhaps I should -% stop being stubborn and renounce doing \cs{mathalpha} here. -% +% specials what latex was doing with \char92\$ (\cs{mathdollar}!)... % \begin{macrocode} -\ifmt@nospecials\else +\ifmst@nospecials\else \ifXeTeX \XeTeXmathcode`\#=7 \symmtoperatorfont "0023 \relax \XeTeXmathchardef\mathdollar=7 \symmtoperatorfont "0024 \relax @@ -2950,7 +3687,7 @@ and \protect\log-like names will be^^J% % % Note oct 2012: maybe I should re-examine what I did? % \begin{macrocode} -\ifmt@symbolmisc +\ifmst@symbolmisc \let\mst@prod\prod \let\defaultprod\prod \DeclareMathSymbol{\prodpsy}{\mathop}{mtpsymbol}{213} @@ -2963,20 +3700,20 @@ and \protect\log-like names will be^^J% % \end{macro} % \end{macro} % \begin{macrocode} -\DeclareMathSymbol{\mt@implies}{\mathrel}{mtpsymbol}{222} -\DeclareRobustCommand{\implies}{\;\mt@implies\;} -\DeclareMathSymbol{\mt@impliedby}{\mathrel}{mtpsymbol}{220} -\DeclareRobustCommand{\impliedby}{\;\mt@impliedby\;} -\DeclareRobustCommand{\iff}{\;\mt@impliedby\mathrel{\mkern-3mu}\mt@implies\;} -\DeclareMathSymbol{\mt@iff}{\mathrel}{mtpsymbol}{219} -\DeclareRobustCommand{\shortiff}{\;\mt@iff\;} -\DeclareMathSymbol{\mt@to}{\mathrel}{mtpsymbol}{174} -\DeclareMathSymbol{\mt@trait}{\mathrel}{mtpsymbol}{190} -\DeclareRobustCommand\to{\mt@to} -\DeclareRobustCommand\longto{\mkern2mu\mt@trait\mathrel{\mkern-10mu}\mt@to} -\DeclareRobustCommand\mapsto{\mapstochar\mathrel{\mkern0.2mu}\mt@to} +\DeclareMathSymbol{\mst@implies}{\mathrel}{mtpsymbol}{222} +\DeclareRobustCommand{\implies}{\;\mst@implies\;} +\DeclareMathSymbol{\mst@impliedby}{\mathrel}{mtpsymbol}{220} +\DeclareRobustCommand{\impliedby}{\;\mst@impliedby\;} +\DeclareRobustCommand{\iff}{\;\mst@impliedby\mathrel{\mkern-3mu}\mst@implies\;} +\DeclareMathSymbol{\mst@iff}{\mathrel}{mtpsymbol}{219} +\DeclareRobustCommand{\shortiff}{\;\mst@iff\;} +\DeclareMathSymbol{\mst@to}{\mathrel}{mtpsymbol}{174} +\DeclareMathSymbol{\mst@trait}{\mathrel}{mtpsymbol}{190} +\DeclareRobustCommand\to{\mst@to} +\DeclareRobustCommand\longto{\mkern2mu\mst@trait\mathrel{\mkern-10mu}\mst@to} +\DeclareRobustCommand\mapsto{\mapstochar\mathrel{\mkern0.2mu}\mst@to} \DeclareRobustCommand\longmapsto{% -\mapstochar\mathrel{\mkern2mu}\mt@trait\mathrel{\mkern-10mu}\mt@to} +\mapstochar\mathrel{\mkern2mu}\mst@trait\mathrel{\mkern-10mu}\mst@to} \DeclareMathSymbol{\aleph}{\mathord}{mtpsymbol}{192} \DeclareMathSymbol{\inftypsy}{\mathord}{mtpsymbol}{165} \DeclareMathSymbol{\emptyset}{\mathord}{mtpsymbol}{198} @@ -3032,7 +3769,7 @@ and \protect\log-like names will be^^J% % \begin{macro}{symbolre} % I like the \cs{Re} and \cs{Im} from Symbol, so I overwrite the CM ones. % \begin{macrocode} -\ifmt@symbolre +\ifmst@symbolre \DeclareMathSymbol{\Re}{\mathord}{mtpsymbol}{"C2} \DeclareMathSymbol{\Im}{\mathord}{mtpsymbol}{"C1} \DeclareMathSymbol{\DotTriangle}{\mathord}{mtpsymbol}{92} @@ -3064,20 +3801,20 @@ and \protect\log-like names will be^^J% % * version 1.12b did not define the \cs{omicron} in the case when no % Greek-related option was passed to the package. This was a bug. % \begin{macrocode} -\let\mt@mathord\mathalpha -\mt@goaheadtrue -\ifmt@selfGreek - \def\mt@font@tbu{mtselfGreekfont} +\let\mst@mathord\mathalpha +\mst@goaheadtrue +\ifmst@selfGreek + \def\mst@font@tbu{mtselfGreekfont} \else -\ifmt@eulergreek - \def\mt@font@tbu{mteulervm} +\ifmst@eulergreek + \def\mst@font@tbu{mteulervm} \else -\ifmt@symbolgreek - \def\mt@font@tbu{mtpsymbol} - \let\mt@mathord\mathord +\ifmst@symbolgreek + \def\mst@font@tbu{mtpsymbol} + \let\mst@mathord\mathord \else -\ifmt@LGRgreek - \mt@goaheadfalse +\ifmst@LGRgreek + \mst@goaheadfalse \else % \end{macrocode} % The \cs{omicron} requires special treatment. By default we use the o from the @@ -3085,31 +3822,31 @@ and \protect\log-like names will be^^J% % also a special adjustment if the package |fourier| was loaded in its % |upright| variant: we then take \cs{omicron} from the (original) rm alphabet. % \begin{macrocode} - \mt@goaheadfalse + \mst@goaheadfalse \ifx\omicron\undefined - \newcommand{\omicron}{\mt@alph@omicron{o}} + \newcommand{\omicron}{\mst@alph@omicron{o}} \fi \fi\fi\fi\fi -\ifmt@goahead -\DeclareMathSymbol{\Alpha}{\mt@mathord}{\mt@font@tbu}{"41} -\DeclareMathSymbol{\Beta}{\mt@mathord}{\mt@font@tbu}{"42} -\DeclareMathSymbol{\Epsilon}{\mt@mathord}{\mt@font@tbu}{"45} -\DeclareMathSymbol{\Zeta}{\mt@mathord}{\mt@font@tbu}{"5A} -\DeclareMathSymbol{\Eta}{\mt@mathord}{\mt@font@tbu}{"48} -\DeclareMathSymbol{\Iota}{\mt@mathord}{\mt@font@tbu}{"49} -\DeclareMathSymbol{\Kappa}{\mt@mathord}{\mt@font@tbu}{"4B} -\DeclareMathSymbol{\Mu}{\mt@mathord}{\mt@font@tbu}{"4D} -\DeclareMathSymbol{\Nu}{\mt@mathord}{\mt@font@tbu}{"4E} -\DeclareMathSymbol{\Omicron}{\mt@mathord}{\mt@font@tbu}{"4F} -\DeclareMathSymbol{\Rho}{\mt@mathord}{\mt@font@tbu}{"50} -\DeclareMathSymbol{\Tau}{\mt@mathord}{\mt@font@tbu}{"54} -\DeclareMathSymbol{\Chi}{\mt@mathord}{\mt@font@tbu}{"58} +\ifmst@goahead +\DeclareMathSymbol{\Alpha}{\mst@mathord}{\mst@font@tbu}{"41} +\DeclareMathSymbol{\Beta}{\mst@mathord}{\mst@font@tbu}{"42} +\DeclareMathSymbol{\Epsilon}{\mst@mathord}{\mst@font@tbu}{"45} +\DeclareMathSymbol{\Zeta}{\mst@mathord}{\mst@font@tbu}{"5A} +\DeclareMathSymbol{\Eta}{\mst@mathord}{\mst@font@tbu}{"48} +\DeclareMathSymbol{\Iota}{\mst@mathord}{\mst@font@tbu}{"49} +\DeclareMathSymbol{\Kappa}{\mst@mathord}{\mst@font@tbu}{"4B} +\DeclareMathSymbol{\Mu}{\mst@mathord}{\mst@font@tbu}{"4D} +\DeclareMathSymbol{\Nu}{\mst@mathord}{\mst@font@tbu}{"4E} +\DeclareMathSymbol{\Omicron}{\mst@mathord}{\mst@font@tbu}{"4F} +\DeclareMathSymbol{\Rho}{\mst@mathord}{\mst@font@tbu}{"50} +\DeclareMathSymbol{\Tau}{\mst@mathord}{\mst@font@tbu}{"54} +\DeclareMathSymbol{\Chi}{\mst@mathord}{\mst@font@tbu}{"58} % \end{macrocode} % When we in fact use Symbol, we have to correct \cs{Rho} and % \cs{Chi}. And \cs{Digamma} is non-existent in fact (no F % in Symbol, F codes a \cs{Phi}). % \begin{macrocode} -\ifx\mt@mathord\mathord +\ifx\mst@mathord\mathord % \end{macrocode} % symbolgreek but neither eulergreek nor selfGreek % \begin{macrocode} @@ -3133,18 +3870,18 @@ and \protect\log-like names will be^^J% % \end{macrocode} % not symbolgreek but eulergreek or selfGreek or both % \begin{macrocode} -\DeclareMathSymbol{\Digamma}{\mathalpha}{\mt@font@tbu}{"46} -\DeclareMathSymbol\Gamma {\mathalpha}{\mt@font@tbu}{"00} -\DeclareMathSymbol\Delta {\mathalpha}{\mt@font@tbu}{"01} -\DeclareMathSymbol\Theta {\mathalpha}{\mt@font@tbu}{"02} -\DeclareMathSymbol\Lambda {\mathalpha}{\mt@font@tbu}{"03} -\DeclareMathSymbol\Xi {\mathalpha}{\mt@font@tbu}{"04} -\DeclareMathSymbol\Pi {\mathalpha}{\mt@font@tbu}{"05} -\DeclareMathSymbol\Sigma {\mathalpha}{\mt@font@tbu}{"06} -\DeclareMathSymbol\Upsilon {\mathalpha}{\mt@font@tbu}{"07} -\DeclareMathSymbol\Phi {\mathalpha}{\mt@font@tbu}{"08} -\DeclareMathSymbol\Psi {\mathalpha}{\mt@font@tbu}{"09} -\DeclareMathSymbol\Omega {\mathalpha}{\mt@font@tbu}{"0A} +\DeclareMathSymbol{\Digamma}{\mathalpha}{\mst@font@tbu}{"46} +\DeclareMathSymbol\Gamma {\mathalpha}{\mst@font@tbu}{"00} +\DeclareMathSymbol\Delta {\mathalpha}{\mst@font@tbu}{"01} +\DeclareMathSymbol\Theta {\mathalpha}{\mst@font@tbu}{"02} +\DeclareMathSymbol\Lambda {\mathalpha}{\mst@font@tbu}{"03} +\DeclareMathSymbol\Xi {\mathalpha}{\mst@font@tbu}{"04} +\DeclareMathSymbol\Pi {\mathalpha}{\mst@font@tbu}{"05} +\DeclareMathSymbol\Sigma {\mathalpha}{\mst@font@tbu}{"06} +\DeclareMathSymbol\Upsilon {\mathalpha}{\mst@font@tbu}{"07} +\DeclareMathSymbol\Phi {\mathalpha}{\mst@font@tbu}{"08} +\DeclareMathSymbol\Psi {\mathalpha}{\mst@font@tbu}{"09} +\DeclareMathSymbol\Omega {\mathalpha}{\mst@font@tbu}{"0A} \fi \fi % \end{macrocode} @@ -3156,8 +3893,8 @@ and \protect\log-like names will be^^J% % we use the Euler font it is perhaps better to have them be of type % |mathalpha| % \begin{macrocode} -\ifmt@goahead -\ifmt@eulergreek +\ifmst@goahead +\ifmst@eulergreek \DeclareMathSymbol{\alpha} {\mathalpha}{mteulervm}{"0B} \DeclareMathSymbol{\beta} {\mathalpha}{mteulervm}{"0C} \DeclareMathSymbol{\gamma} {\mathalpha}{mteulervm}{"0D} @@ -3193,7 +3930,7 @@ and \protect\log-like names will be^^J% \DeclareMathSymbol{\wp}{\mathalpha}{mteulervm}{"7D} \DeclareMathSymbol{\ell}{\mathalpha}{mteulervm}{"60} \else -\ifmt@symbolgreek +\ifmst@symbolgreek \DeclareMathSymbol{\alpha}{\mathord}{mtpsymbol}{"61} \DeclareMathSymbol{\beta}{\mathord}{mtpsymbol}{"62} \DeclareMathSymbol{\gamma}{\mathord}{mtpsymbol}{"67} @@ -3229,225 +3966,225 @@ and \protect\log-like names will be^^J% \DeclareMathSymbol{\wp}{\mathord}{mtpsymbol}{"C3} \fi\fi\fi %% -\ifmt@LGRgreek % internal names for subdued implementation (1.15c-1.15e) -\let\m@t@origAlpha\Alpha -\let\m@t@origBeta\Beta -\let\m@t@origGamma\Gamma -\let\m@t@origDelta\Delta -\let\m@t@origEpsilon\Epsilon -\let\m@t@origZeta\Zeta -\let\m@t@origEta\Eta -\let\m@t@origTheta\Theta -\let\m@t@origIota\Iota -\let\m@t@origKappa\Kappa -\let\m@t@origLambda\Lambda -\let\m@t@origMu\Mu -\let\m@t@origNu\Nu -\let\m@t@origXi\Xi -\let\m@t@origOmicron\Omicron -\let\m@t@origPi\Pi -\let\m@t@origRho\Rho -\let\m@t@origSigma\Sigma -\let\m@t@origTau\Tau -\let\m@t@origUpsilon\Upsilon -\let\m@t@origPhi\Phi -\let\m@t@origChi\Chi -\let\m@t@origPsi\Psi -\let\m@t@origOmega\Omega +\ifmst@LGRgreek % internal names for subdued implementation (1.15c-1.15e) +\let\mst@origAlpha\Alpha +\let\mst@origBeta\Beta +\let\mst@origGamma\Gamma +\let\mst@origDelta\Delta +\let\mst@origEpsilon\Epsilon +\let\mst@origZeta\Zeta +\let\mst@origEta\Eta +\let\mst@origTheta\Theta +\let\mst@origIota\Iota +\let\mst@origKappa\Kappa +\let\mst@origLambda\Lambda +\let\mst@origMu\Mu +\let\mst@origNu\Nu +\let\mst@origXi\Xi +\let\mst@origOmicron\Omicron +\let\mst@origPi\Pi +\let\mst@origRho\Rho +\let\mst@origSigma\Sigma +\let\mst@origTau\Tau +\let\mst@origUpsilon\Upsilon +\let\mst@origPhi\Phi +\let\mst@origChi\Chi +\let\mst@origPsi\Psi +\let\mst@origOmega\Omega % -\let\m@t@origalpha\alpha -\let\m@t@origbeta\beta -\let\m@t@origgamma\gamma -\let\m@t@origdelta\delta -\let\m@t@origepsilon\epsilon -\let\m@t@origzeta\zeta -\let\m@t@origeta\eta -\let\m@t@origtheta\theta -\let\m@t@origiota\iota -\let\m@t@origkappa\kappa -\let\m@t@origlambda\lambda -\let\m@t@origmu\mu -\let\m@t@orignu\nu -\let\m@t@origxi\xi -\let\m@t@origomicron\omicron -\let\m@t@origpi\pi -\let\m@t@origrho\rho -\let\m@t@origvarsigma\varsigma -\let\m@t@origsigma\sigma -\let\m@t@origtau\tau -\let\m@t@origupsilon\upsilon -\let\m@t@origphi\phi -\let\m@t@origchi\chi -\let\m@t@origpsi\psi -\let\m@t@origomega\omega -\let\m@t@origDigamma\Digamma -\let\m@t@origdigamma\digamma +\let\mst@origalpha\alpha +\let\mst@origbeta\beta +\let\mst@origgamma\gamma +\let\mst@origdelta\delta +\let\mst@origepsilon\epsilon +\let\mst@origzeta\zeta +\let\mst@origeta\eta +\let\mst@origtheta\theta +\let\mst@origiota\iota +\let\mst@origkappa\kappa +\let\mst@origlambda\lambda +\let\mst@origmu\mu +\let\mst@orignu\nu +\let\mst@origxi\xi +\let\mst@origomicron\omicron +\let\mst@origpi\pi +\let\mst@origrho\rho +\let\mst@origvarsigma\varsigma +\let\mst@origsigma\sigma +\let\mst@origtau\tau +\let\mst@origupsilon\upsilon +\let\mst@origphi\phi +\let\mst@origchi\chi +\let\mst@origpsi\psi +\let\mst@origomega\omega +\let\mst@origDigamma\Digamma +\let\mst@origdigamma\digamma %% -\def\mt@restoregreek{% -\let\Alpha\m@t@origAlpha -\let\Beta\m@t@origBeta -\let\Gamma\m@t@origGamma -\let\Delta\m@t@origDelta -\let\Epsilon\m@t@origEpsilon -\let\Zeta\m@t@origZeta -\let\Eta\m@t@origEta -\let\Theta\m@t@origTheta -\let\Iota\m@t@origIota -\let\Kappa\m@t@origKappa -\let\Lambda\m@t@origLambda -\let\Mu\m@t@origMu -\let\Nu\m@t@origNu -\let\Xi\m@t@origXi -\let\Omicron\m@t@origOmicron -\let\Pi\m@t@origPi -\let\Rho\m@t@origRho -\let\Sigma\m@t@origSigma -\let\Tau\m@t@origTau -\let\Upsilon\m@t@origUpsilon -\let\Phi\m@t@origPhi -\let\Chi\m@t@origChi -\let\Psi\m@t@origPsi -\let\Omega\m@t@origOmega +\def\mst@restoregreek{% +\let\Alpha\mst@origAlpha +\let\Beta\mst@origBeta +\let\Gamma\mst@origGamma +\let\Delta\mst@origDelta +\let\Epsilon\mst@origEpsilon +\let\Zeta\mst@origZeta +\let\Eta\mst@origEta +\let\Theta\mst@origTheta +\let\Iota\mst@origIota +\let\Kappa\mst@origKappa +\let\Lambda\mst@origLambda +\let\Mu\mst@origMu +\let\Nu\mst@origNu +\let\Xi\mst@origXi +\let\Omicron\mst@origOmicron +\let\Pi\mst@origPi +\let\Rho\mst@origRho +\let\Sigma\mst@origSigma +\let\Tau\mst@origTau +\let\Upsilon\mst@origUpsilon +\let\Phi\mst@origPhi +\let\Chi\mst@origChi +\let\Psi\mst@origPsi +\let\Omega\mst@origOmega % -\let\alpha\m@t@origalpha -\let\beta\m@t@origbeta -\let\gamma\m@t@origgamma -\let\delta\m@t@origdelta -\let\epsilon\m@t@origepsilon -\let\zeta\m@t@origzeta -\let\eta\m@t@origeta -\let\theta\m@t@origtheta -\let\iota\m@t@origiota -\let\kappa\m@t@origkappa -\let\lambda\m@t@origlambda -\let\mu\m@t@origmu -\let\nu\m@t@orignu -\let\xi\m@t@origxi -\let\omicron\m@t@origomicron -\let\pi\m@t@origpi -\let\rho\m@t@origrho -\let\varsigma\m@t@origvarsigma -\let\sigma\m@t@origsigma -\let\tau\m@t@origtau -\let\upsilon\m@t@origupsilon -\let\phi\m@t@origphi -\let\chi\m@t@origchi -\let\psi\m@t@origpsi -\let\omega\m@t@origomega -\let\Digamma\m@t@origDigamma -\let\digamma\m@t@origdigamma +\let\alpha\mst@origalpha +\let\beta\mst@origbeta +\let\gamma\mst@origgamma +\let\delta\mst@origdelta +\let\epsilon\mst@origepsilon +\let\zeta\mst@origzeta +\let\eta\mst@origeta +\let\theta\mst@origtheta +\let\iota\mst@origiota +\let\kappa\mst@origkappa +\let\lambda\mst@origlambda +\let\mu\mst@origmu +\let\nu\mst@orignu +\let\xi\mst@origxi +\let\omicron\mst@origomicron +\let\pi\mst@origpi +\let\rho\mst@origrho +\let\varsigma\mst@origvarsigma +\let\sigma\mst@origsigma +\let\tau\mst@origtau +\let\upsilon\mst@origupsilon +\let\phi\mst@origphi +\let\chi\mst@origchi +\let\psi\mst@origpsi +\let\omega\mst@origomega +\let\Digamma\mst@origDigamma +\let\digamma\mst@origdigamma } %% -\def\mt@setuplgrgreek{% -\let\Alpha\m@t@Alpha -\let\Beta\m@t@Beta -\let\Gamma\m@t@Gamma -\let\Delta\m@t@Delta -\let\Epsilon\m@t@Epsilon -\let\Zeta\m@t@Zeta -\let\Eta\m@t@Eta -\let\Theta\m@t@Theta -\let\Iota\m@t@Iota -\let\Kappa\m@t@Kappa -\let\Lambda\m@t@Lambda -\let\Mu\m@t@Mu -\let\Nu\m@t@Nu -\let\Xi\m@t@Xi -\let\Omicron\m@t@Omicron -\let\Pi\m@t@Pi -\let\Rho\m@t@Rho -\let\Sigma\m@t@Sigma -\let\Tau\m@t@Tau -\let\Upsilon\m@t@Upsilon -\let\Phi\m@t@Phi -\let\Chi\m@t@Chi -\let\Psi\m@t@Psi -\let\Omega\m@t@Omega +\def\mst@setuplgrgreek{% +\let\Alpha\mst@Alpha +\let\Beta\mst@Beta +\let\Gamma\mst@Gamma +\let\Delta\mst@Delta +\let\Epsilon\mst@Epsilon +\let\Zeta\mst@Zeta +\let\Eta\mst@Eta +\let\Theta\mst@Theta +\let\Iota\mst@Iota +\let\Kappa\mst@Kappa +\let\Lambda\mst@Lambda +\let\Mu\mst@Mu +\let\Nu\mst@Nu +\let\Xi\mst@Xi +\let\Omicron\mst@Omicron +\let\Pi\mst@Pi +\let\Rho\mst@Rho +\let\Sigma\mst@Sigma +\let\Tau\mst@Tau +\let\Upsilon\mst@Upsilon +\let\Phi\mst@Phi +\let\Chi\mst@Chi +\let\Psi\mst@Psi +\let\Omega\mst@Omega % -\let\alpha\m@t@alpha -\let\beta\m@t@beta -\let\gamma\m@t@gamma -\let\delta\m@t@delta -\let\epsilon\m@t@epsilon -\let\zeta\m@t@zeta -\let\eta\m@t@eta -\let\theta\m@t@theta -\let\iota\m@t@iota -\let\kappa\m@t@kappa -\let\lambda\m@t@lambda -\let\mu\m@t@mu -\let\nu\m@t@nu -\let\xi\m@t@xi -\let\omicron\m@t@omicron -\let\pi\m@t@pi -\let\rho\m@t@rho -\let\varsigma\m@t@varsigma -\let\sigma\m@t@sigma -\let\tau\m@t@tau -\let\upsilon\m@t@upsilon -\let\phi\m@t@phi -\let\chi\m@t@chi -\let\psi\m@t@psi -\let\omega\m@t@omega -\let\Digamma\m@t@Digamma -\let\digamma\m@t@digamma +\let\alpha\mst@alpha +\let\beta\mst@beta +\let\gamma\mst@gamma +\let\delta\mst@delta +\let\epsilon\mst@epsilon +\let\zeta\mst@zeta +\let\eta\mst@eta +\let\theta\mst@theta +\let\iota\mst@iota +\let\kappa\mst@kappa +\let\lambda\mst@lambda +\let\mu\mst@mu +\let\nu\mst@nu +\let\xi\mst@xi +\let\omicron\mst@omicron +\let\pi\mst@pi +\let\rho\mst@rho +\let\varsigma\mst@varsigma +\let\sigma\mst@sigma +\let\tau\mst@tau +\let\upsilon\mst@upsilon +\let\phi\mst@phi +\let\chi\mst@chi +\let\psi\mst@psi +\let\omega\mst@omega +\let\Digamma\mst@Digamma +\let\digamma\mst@digamma } %% -\DeclareMathSymbol{\m@t@Alpha}{\mathalpha}{mtlgrfontupper}{65} -\DeclareMathSymbol{\m@t@Beta}{\mathalpha}{mtlgrfontupper}{66} -\DeclareMathSymbol{\m@t@Gamma}{\mathalpha}{mtlgrfontupper}{71} -\DeclareMathSymbol{\m@t@Delta}{\mathalpha}{mtlgrfontupper}{68} -\DeclareMathSymbol{\m@t@Epsilon}{\mathalpha}{mtlgrfontupper}{69} -\DeclareMathSymbol{\m@t@Zeta}{\mathalpha}{mtlgrfontupper}{90} -\DeclareMathSymbol{\m@t@Eta}{\mathalpha}{mtlgrfontupper}{72} -\DeclareMathSymbol{\m@t@Theta}{\mathalpha}{mtlgrfontupper}{74} -\DeclareMathSymbol{\m@t@Iota}{\mathalpha}{mtlgrfontupper}{73} -\DeclareMathSymbol{\m@t@Kappa}{\mathalpha}{mtlgrfontupper}{75} -\DeclareMathSymbol{\m@t@Lambda}{\mathalpha}{mtlgrfontupper}{76} -\DeclareMathSymbol{\m@t@Mu}{\mathalpha}{mtlgrfontupper}{77} -\DeclareMathSymbol{\m@t@Nu}{\mathalpha}{mtlgrfontupper}{78} -\DeclareMathSymbol{\m@t@Xi}{\mathalpha}{mtlgrfontupper}{88} -\DeclareMathSymbol{\m@t@Omicron}{\mathalpha}{mtlgrfontupper}{79} -\DeclareMathSymbol{\m@t@Pi}{\mathalpha}{mtlgrfontupper}{80} -\DeclareMathSymbol{\m@t@Rho}{\mathalpha}{mtlgrfontupper}{82} -\DeclareMathSymbol{\m@t@Sigma}{\mathalpha}{mtlgrfontupper}{83} -\DeclareMathSymbol{\m@t@Tau}{\mathalpha}{mtlgrfontupper}{84} -\DeclareMathSymbol{\m@t@Upsilon}{\mathalpha}{mtlgrfontupper}{85} -\DeclareMathSymbol{\m@t@Phi}{\mathalpha}{mtlgrfontupper}{70} -\DeclareMathSymbol{\m@t@Chi}{\mathalpha}{mtlgrfontupper}{81} -\DeclareMathSymbol{\m@t@Psi}{\mathalpha}{mtlgrfontupper}{89} -\DeclareMathSymbol{\m@t@Omega}{\mathalpha}{mtlgrfontupper}{87} +\DeclareMathSymbol{\mst@Alpha}{\mathalpha}{mtlgrfontupper}{65} +\DeclareMathSymbol{\mst@Beta}{\mathalpha}{mtlgrfontupper}{66} +\DeclareMathSymbol{\mst@Gamma}{\mathalpha}{mtlgrfontupper}{71} +\DeclareMathSymbol{\mst@Delta}{\mathalpha}{mtlgrfontupper}{68} +\DeclareMathSymbol{\mst@Epsilon}{\mathalpha}{mtlgrfontupper}{69} +\DeclareMathSymbol{\mst@Zeta}{\mathalpha}{mtlgrfontupper}{90} +\DeclareMathSymbol{\mst@Eta}{\mathalpha}{mtlgrfontupper}{72} +\DeclareMathSymbol{\mst@Theta}{\mathalpha}{mtlgrfontupper}{74} +\DeclareMathSymbol{\mst@Iota}{\mathalpha}{mtlgrfontupper}{73} +\DeclareMathSymbol{\mst@Kappa}{\mathalpha}{mtlgrfontupper}{75} +\DeclareMathSymbol{\mst@Lambda}{\mathalpha}{mtlgrfontupper}{76} +\DeclareMathSymbol{\mst@Mu}{\mathalpha}{mtlgrfontupper}{77} +\DeclareMathSymbol{\mst@Nu}{\mathalpha}{mtlgrfontupper}{78} +\DeclareMathSymbol{\mst@Xi}{\mathalpha}{mtlgrfontupper}{88} +\DeclareMathSymbol{\mst@Omicron}{\mathalpha}{mtlgrfontupper}{79} +\DeclareMathSymbol{\mst@Pi}{\mathalpha}{mtlgrfontupper}{80} +\DeclareMathSymbol{\mst@Rho}{\mathalpha}{mtlgrfontupper}{82} +\DeclareMathSymbol{\mst@Sigma}{\mathalpha}{mtlgrfontupper}{83} +\DeclareMathSymbol{\mst@Tau}{\mathalpha}{mtlgrfontupper}{84} +\DeclareMathSymbol{\mst@Upsilon}{\mathalpha}{mtlgrfontupper}{85} +\DeclareMathSymbol{\mst@Phi}{\mathalpha}{mtlgrfontupper}{70} +\DeclareMathSymbol{\mst@Chi}{\mathalpha}{mtlgrfontupper}{81} +\DeclareMathSymbol{\mst@Psi}{\mathalpha}{mtlgrfontupper}{89} +\DeclareMathSymbol{\mst@Omega}{\mathalpha}{mtlgrfontupper}{87} % -\DeclareMathSymbol{\m@t@alpha}{\mathalpha}{mtlgrfontlower}{97} -\DeclareMathSymbol{\m@t@beta}{\mathalpha}{mtlgrfontlower}{98} -\DeclareMathSymbol{\m@t@gamma}{\mathalpha}{mtlgrfontlower}{103} -\DeclareMathSymbol{\m@t@delta}{\mathalpha}{mtlgrfontlower}{100} -\DeclareMathSymbol{\m@t@epsilon}{\mathalpha}{mtlgrfontlower}{101} -\DeclareMathSymbol{\m@t@zeta}{\mathalpha}{mtlgrfontlower}{122} -\DeclareMathSymbol{\m@t@eta}{\mathalpha}{mtlgrfontlower}{104} -\DeclareMathSymbol{\m@t@theta}{\mathalpha}{mtlgrfontlower}{106} -\DeclareMathSymbol{\m@t@iota}{\mathalpha}{mtlgrfontlower}{105} -\DeclareMathSymbol{\m@t@kappa}{\mathalpha}{mtlgrfontlower}{107} -\DeclareMathSymbol{\m@t@lambda}{\mathalpha}{mtlgrfontlower}{108} -\DeclareMathSymbol{\m@t@mu}{\mathalpha}{mtlgrfontlower}{109} -\DeclareMathSymbol{\m@t@nu}{\mathalpha}{mtlgrfontlower}{110} -\DeclareMathSymbol{\m@t@xi}{\mathalpha}{mtlgrfontlower}{120} -\DeclareMathSymbol{\m@t@omicron}{\mathalpha}{mtlgrfontlower}{111} -\DeclareMathSymbol{\m@t@pi}{\mathalpha}{mtlgrfontlower}{112} -\DeclareMathSymbol{\m@t@rho}{\mathalpha}{mtlgrfontlower}{114} -\DeclareMathSymbol{\m@t@varsigma}{\mathalpha}{mtlgrfontlower}{99} -\DeclareMathSymbol{\m@t@sigma}{\mathalpha}{mtlgrfontlower}{115} -\DeclareMathSymbol{\m@t@tau}{\mathalpha}{mtlgrfontlower}{116} -\DeclareMathSymbol{\m@t@upsilon}{\mathalpha}{mtlgrfontlower}{117} -\DeclareMathSymbol{\m@t@phi}{\mathalpha}{mtlgrfontlower}{102} -\DeclareMathSymbol{\m@t@chi}{\mathalpha}{mtlgrfontlower}{113} -\DeclareMathSymbol{\m@t@psi}{\mathalpha}{mtlgrfontlower}{121} -\DeclareMathSymbol{\m@t@omega}{\mathalpha}{mtlgrfontlower}{119} -\DeclareMathSymbol{\m@t@digamma}{\mathalpha}{mtlgrfontlower}{147} -\DeclareMathSymbol{\m@t@Digamma}{\mathalpha}{mtlgrfontlower}{195} +\DeclareMathSymbol{\mst@alpha}{\mathalpha}{mtlgrfontlower}{97} +\DeclareMathSymbol{\mst@beta}{\mathalpha}{mtlgrfontlower}{98} +\DeclareMathSymbol{\mst@gamma}{\mathalpha}{mtlgrfontlower}{103} +\DeclareMathSymbol{\mst@delta}{\mathalpha}{mtlgrfontlower}{100} +\DeclareMathSymbol{\mst@epsilon}{\mathalpha}{mtlgrfontlower}{101} +\DeclareMathSymbol{\mst@zeta}{\mathalpha}{mtlgrfontlower}{122} +\DeclareMathSymbol{\mst@eta}{\mathalpha}{mtlgrfontlower}{104} +\DeclareMathSymbol{\mst@theta}{\mathalpha}{mtlgrfontlower}{106} +\DeclareMathSymbol{\mst@iota}{\mathalpha}{mtlgrfontlower}{105} +\DeclareMathSymbol{\mst@kappa}{\mathalpha}{mtlgrfontlower}{107} +\DeclareMathSymbol{\mst@lambda}{\mathalpha}{mtlgrfontlower}{108} +\DeclareMathSymbol{\mst@mu}{\mathalpha}{mtlgrfontlower}{109} +\DeclareMathSymbol{\mst@nu}{\mathalpha}{mtlgrfontlower}{110} +\DeclareMathSymbol{\mst@xi}{\mathalpha}{mtlgrfontlower}{120} +\DeclareMathSymbol{\mst@omicron}{\mathalpha}{mtlgrfontlower}{111} +\DeclareMathSymbol{\mst@pi}{\mathalpha}{mtlgrfontlower}{112} +\DeclareMathSymbol{\mst@rho}{\mathalpha}{mtlgrfontlower}{114} +\DeclareMathSymbol{\mst@varsigma}{\mathalpha}{mtlgrfontlower}{99} +\DeclareMathSymbol{\mst@sigma}{\mathalpha}{mtlgrfontlower}{115} +\DeclareMathSymbol{\mst@tau}{\mathalpha}{mtlgrfontlower}{116} +\DeclareMathSymbol{\mst@upsilon}{\mathalpha}{mtlgrfontlower}{117} +\DeclareMathSymbol{\mst@phi}{\mathalpha}{mtlgrfontlower}{102} +\DeclareMathSymbol{\mst@chi}{\mathalpha}{mtlgrfontlower}{113} +\DeclareMathSymbol{\mst@psi}{\mathalpha}{mtlgrfontlower}{121} +\DeclareMathSymbol{\mst@omega}{\mathalpha}{mtlgrfontlower}{119} +\DeclareMathSymbol{\mst@digamma}{\mathalpha}{mtlgrfontlower}{147} +\DeclareMathSymbol{\mst@Digamma}{\mathalpha}{mtlgrfontlower}{195} % cf http://milde.users.sourceforge.net/LGR/lgrxenc.def.html % et greek.ldf du package babel -\ifmt@subdued\else\mt@setuplgrgreek\fi +\ifmst@subdued\else\mst@setuplgrgreek\fi \fi % \end{macrocode} % \end{macro} @@ -3459,42 +4196,42 @@ and \protect\log-like names will be^^J% % v1.14b (2011/04/02): again this bug in the EU1/EU2 encoding part, as in the % code redefining \$ etc in math mode (see above). Fixed. % \begin{macrocode} -\edef\mt@tmp@enc{\encodingdefault} -\mt@goaheadtrue -\ifx\mt@tmp@enc\mt@eui % xetex and unicode font +\edef\mst@tmp@enc{\encodingdefault} +\mst@goaheadtrue +\ifx\mst@tmp@enc\mst@eui % xetex and unicode font \XeTeXmathchardef\inodot="7 \symmtletterfont "0131 \relax \XeTeXmathchardef\jnodot="7 \symmtletterfont "0237 \relax \else -\ifx\mt@tmp@enc\mt@euii % luatex and unicode font +\ifx\mst@tmp@enc\mst@euii % luatex and unicode font \luatexUmathchardef\inodot="7 \symmtletterfont "0131 \relax \luatexUmathchardef\jnodot="7 \symmtletterfont "0237 \relax \else -\ifx\mt@tmp@enc\mt@ti % T1 +\ifx\mst@tmp@enc\mst@ti % T1 \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{25} \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{26} \else -\ifx\mt@tmp@enc\mt@oti % OT1 +\ifx\mst@tmp@enc\mst@oti % OT1 \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16} \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17} \else -\ifx\mt@tmp@enc\mt@lyi % LY1 +\ifx\mst@tmp@enc\mst@lyi % LY1 \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16} \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17} \else - \ifXeTeX\mt@goaheadfalse\else\ifLuaTeX\mt@goaheadfalse\else + \ifXeTeX\mst@goaheadfalse\else\ifLuaTeX\mst@goaheadfalse\else \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont} -{\expandafter\the\expandafter\csname\mt@tmp@enc\string\i\endcsname} +{\expandafter\the\expandafter\csname\mst@tmp@enc\string\i\endcsname} \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont} -{\expandafter\the\expandafter\csname\mt@tmp@enc\string\j\endcsname} +{\expandafter\the\expandafter\csname\mst@tmp@enc\string\j\endcsname} \fi\fi \fi\fi\fi\fi\fi -\ifmt@defaultimath\else - \ifmt@goahead +\ifmst@defaultimath\else + \ifmst@goahead \renewcommand{\imath}{\inodot} \renewcommand{\jmath}{\jnodot} - \let\mt@oldi\i \let\mt@oldj\j - \DeclareRobustCommand{\i}{\ifmmode\inodot\else\mt@oldi\fi} - \DeclareRobustCommand{\j}{\ifmmode\jnodot\else\mt@oldj\fi} + \let\mst@oldi\i \let\mst@oldj\j + \DeclareRobustCommand{\i}{\ifmmode\inodot\else\mst@oldi\fi} + \DeclareRobustCommand{\j}{\ifmmode\jnodot\else\mst@oldj\fi} \fi \fi % \end{macrocode} @@ -3512,9 +4249,9 @@ and \protect\log-like names will be^^J% % package, else OT1. % v1.12b: I add LY1 which is quasi like OT1 % \begin{macrocode} -\edef\mt@tmp@enc{\encodingdefault} %% rather one too many than sorry -\ifmt@mathaccents -\ifx\mt@ti\mt@tmp@enc +\edef\mst@tmp@enc{\encodingdefault} %% rather one too many than sorry +\ifmst@mathaccents +\ifx\mst@ti\mst@tmp@enc \DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{1} \DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{0} \DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{4} @@ -3536,10 +4273,10 @@ and \protect\log-like names will be^^J% \DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{94} \DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{95} \DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{23} - \ifx\mt@lyi\mt@tmp@enc % LY1 encoding + \ifx\mst@lyi\mst@tmp@enc % LY1 encoding \DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{5} \else - \ifx\mt@oti\mt@tmp@enc\else + \ifx\mst@oti\mst@tmp@enc\else \typeout{** mathastext: math accents have been assumed to be^^J% ** as in OT1 encoding.} \fi @@ -3551,10 +4288,10 @@ and \protect\log-like names will be^^J% % I took the code for \cs{Huge} and \cs{HUGE} from the |moresize| package of % Christian~\textsc{Cornelssen} % \begin{macrocode} -\ifmt@defaultsizes\else +\ifmst@defaultsizes\else \providecommand\@xxxpt{29.86} \providecommand\@xxxvipt{35.83} -\ifmt@twelve +\ifmst@twelve \def\Huge{\@setfontsize\Huge\@xxxpt{36}} \def\HUGE{\@setfontsize\HUGE\@xxxvipt{43}} \typeout{** \protect\Huge\space and \protect\HUGE\space have been (re)-defined.} @@ -3585,30 +4322,29 @@ and \protect\log-like names will be^^J% % Scaling mechanism for the Symbol font. % \begin{macrocode} \AtBeginDocument{ -\ifmt@needsymbol +\ifmst@needsymbol \DeclareFontFamily{U}{psy}{} \DeclareFontShape{U}{psy}{m}{n}{<->s*[\psy@scale] psyr}{} - \fi -} + \fi} % \end{macrocode} -% \begin{macro}{\exists,\forall} -% Redefined to account for user or package defined skips +% \begin{macro}{\exists} +% \begin{macro}{\forall} % \begin{macrocode} -\let\mt@stdexists\exists -\let\mt@stdforall\forall -\renewcommand\exists{\mt@stdexists\mskip\m@t@existsmuskip} -\renewcommand\forall{\mt@stdforall\mskip\m@t@forallmuskip} +\let\mst@stdexists\exists % must be at end of code +\let\mst@stdforall\forall +\renewcommand\exists{\mst@stdexists\mskip\mst@exists@muskip} +\renewcommand\forall{\mst@stdforall\mskip\mst@forall@muskip} % \end{macrocode} -% \end{macro} +% \end{macro}\end{macro} % \begin{macro}{subdued} % v1.15: the subdued option (second half of the implementation). % \begin{macrocode} -\ifmt@subdued +\ifmst@subdued \typeout{** ...entering subdued mode...} -\expandafter\SetSymbolFont@ \expandafter\mv@normal\mt@normalmv@letter\symmtletterfont -\expandafter\SetSymbolFont@ \expandafter\mv@bold\mt@boldmv@letter\symmtletterfont -\expandafter\SetSymbolFont@ \expandafter\mv@normal\mt@normalmv@operator\symmtoperatorfont -\expandafter\SetSymbolFont@ \expandafter\mv@bold\mt@boldmv@operator\symmtoperatorfont +\expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@letter\symmtletterfont +\expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@letter\symmtletterfont +\expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@operator\symmtoperatorfont +\expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@operator\symmtoperatorfont \typeout{** ...done.} \fi % \end{macrocode} @@ -3616,10 +4352,7 @@ and \protect\log-like names will be^^J% % \begin{macrocode} \endinput % \end{macrocode} -% \Finale -%\iffalse -%<*dtx> -%\fi +% \MakePercentComment \CharacterTable {Upper-case \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 Lower-case \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 @@ -3635,7 +4368,9 @@ and \protect\log-like names will be^^J% Right bracket \] Circumflex \^ Underscore \_ Grave accent \` Left brace \{ Vertical bar \| Right brace \} Tilde \~} -%\iffalse -% -%\fi -\endinput + +\CheckSum{4363} + +\Finale +%% +%% End of file `mathastext.dtx'. diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.ins b/Master/texmf-dist/source/latex/mathastext/mathastext.ins index c1d3a6a4669..c5994f9b261 100644 --- a/Master/texmf-dist/source/latex/mathastext/mathastext.ins +++ b/Master/texmf-dist/source/latex/mathastext/mathastext.ins @@ -1,92 +1,37 @@ +\def\pkgname{mathastext} +\def\pkgdate{2012/12/20} +\def\pkgversion{v1.2} +\def\pkgdescription{Use the text font in math mode (jfB)} %% -%% This file will generate mathastext.sty from -%% mathastext.dtx when run through latex +%% Package `mathastext' by Jean-Francois Burnol +%% Copyright (C) 2011, 2012 by Jean-Francois Burnol %% -%% Copyright (C) 2011, 2012 by Jean-Francois Burnol -%% -%% Please report errors to jfbu (at) free.fr -%% -%% This file be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3 of this license or (at your option) any -%% later version. The latest version of this license is -%% in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions -%% of LaTeX version 2003/12/01 or later. +%% This file `mathastext.ins' is provided for compatibility with TeX +%% distributions expecting to find it for installation of `mathastext.sty'. %% -%% --------------- start of docstrip commands ------------------ +%% As usual `latex mathastext.ins' produces `mathastext.sty' from the source +%% `mathastext.dtx' +%% +%% (an already existing `mathastext.sty' in the same repertory will be +%% overwritten) +%% +%% Put `mathastext.sty' in a suitable location within the TeX installation: +%% mathastext.sty -> ................/tex/latex/mathastext/ +%% +%% Some test files are also generated, processing them through latex, pdflatex, +%% lualatex or xetex checks if some of the package commands work as advertised. +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. %% -\def\filedate{2012/10/23} -\def\batchfile{mathastext.ins} \input docstrip.tex - -{\ifx\generate\undefined -\Msg{**********************************************} -\Msg{*} -\Msg{* This installation requires docstrip} -\Msg{* version 2.3c or later.} -\Msg{*} -\Msg{* An older version of docstrip has been input} -\Msg{*} -\Msg{**********************************************} -\errhelp{Move or rename old docstrip.tex.} -\errmessage{Old docstrip in input path} -\batchmode -\csname @@end\endcsname -\fi} - -\declarepreamble\mainpreamble - - Copyright (C) 2011, 2012 by Jean-Francois Burnol - - Many examples available at - http://jf.burnol.free.fr/mathastext.html - Please report errors to jfbu (at) free.fr - - This file may be distributed and/or modified under the - conditions of the LaTeX Project Public License, either - version 1.3 of this license or (at your option) any - later version. The latest version of this license is in - http://www.latex-project.org/lppl.txt - and version 1.3 or later is part of all distributions of - LaTeX version 2003/12/01 or later. - - NO PERMISSION is granted to distribute a modified - version of this file under its original name. - - The list of derived (unpacked) files belonging to the - distribution and covered by LPPL is defined by the - unpacking scripts (with extension .ins) which are part - of the distribution. - -\endpreamble - -\keepsilent - -\usedir{tex/latex/mathastext} - -\usepreamble\mainpreamble - \askforoverwritefalse - -\generate{\file{mathastext.sty}{\from{mathastext.dtx}{package}} - } - -\ifToplevel{ -\Msg{***********************************************************} -\Msg{*} -\Msg{* To finish the installation you have to move the following} -\Msg{* file into a directory searched by TeX:} -\Msg{*} -\Msg{* \space\space mathastext.sty} -\Msg{*} -\Msg{* To produce the documentation run mathastext.dtx through} -\Msg{* LaTeX.} -\Msg{*} -\Msg{* Happy TeXing} -\Msg{***********************************************************} -} - - +\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J% +\string\ProvidesPackage{\pkgname}^^J% +\space[\pkgdate\space\pkgversion\space\pkgdescription]} +\generate{\usepreamble\pkgpreamble +\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}} \endbatchfile +\endinput +%% +%% End of file `mathastext.ins'. -- cgit v1.2.3