diff options
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/ChangeLog.md | 26 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/INSTALL.txt | 38 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/README.md | 28 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastext.pdf | bin | 475056 -> 480591 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastext.tex | 35 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf | bin | 43064 -> 43198 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex | 264 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex | 42 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex | 119 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex | 118 |
10 files changed, 669 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md b/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md index f1668078e9f..428e9c2fadd 100644 --- a/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md +++ b/Master/texmf-dist/doc/latex/mathastext/ChangeLog.md @@ -1,6 +1,32 @@ MATHASTEXT CHANGE LOG ===================== +1.3w \[2019/11/16\] +---- + +* LaTeX 2019-10-01 release (up to patch level 3 inclusive) + together with `amsmath` conspired `:-)` to break `mathastext`, + in connexion with math accents. This has been fixed upstream, + but I am releasing nevertheless a hot fix to this + https://github.com/latex3/latex2e/issues/216 issue + (this is compatible with future LaTeX releases). + +* Fix: the `\hbar` is originally a robust command but + becomes a `\mathchardef` token if (e.g.) `amsfonts` is + loaded and then with recent LaTeX `\hbar<space>` is + made undefined and `mathastext` definition of it + remained without effect. The `\mathastext` own `\hbar` + is now defined `\protected`. + +* Fix: option `noendash` (or `symboldelimiters` which implies + it) caused (since `1.3u`) a bug under Unicode engines when + setting up the minus sign. + +* Version names declared via the optional argument of + `\Mathastext` or as first argument of `\MTDeclareVersion` + must not be `normal` or `bold`. Enforce that! (this was + marked as a bug to fix since `2012/10/24`...) + 1.3v \[2019/09/19\] ---- diff --git a/Master/texmf-dist/doc/latex/mathastext/INSTALL.txt b/Master/texmf-dist/doc/latex/mathastext/INSTALL.txt new file mode 100644 index 00000000000..3efdaf8bbf6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathastext/INSTALL.txt @@ -0,0 +1,38 @@ +The simplest for most users is to use the manager script of the TeX +installation to either install or upgrade mathastext to its current +version. + +Else, download mathastext.dtx and follow these instructions: + +- Run tex or etex on mathastext.dtx to generate the package style + file mathastext.sty as well as additional files: + + mathastext.tex, README.md, ChangeLog.md, and some test files. + +- Move the style file mathastext.sty to a location where TeX can + find it. In a TDS compliant hierarchy this will be + + <TDS>:tex/latex/mathastext/mathastext.sty + +For the documentation: + +- Follow the above steps, then run latex thrice on mathastext.tex + then dvipdfmx on mathastext.dvi. The file mathastext.tex can be + customized to change the font size or set other options therein. + The produced file mathastext.pdf will by default include the + commented source code. + +It is also possible to run pdflatex (thrice) directly on mathastext.dtx. +In that case mathastext.pdf is produced without the commented source code. + +One can NOT use lualatex or xelatex to compile the documentation. + +The test files + + mathastexttestmathversions.tex + mathastexttestunicodemacos.tex + mathastexttestunicodelinux.tex + mathastexttestalphabets.tex + +illustrate some features of the package and are an addendum to the +main documentation mathastext.pdf. diff --git a/Master/texmf-dist/doc/latex/mathastext/README.md b/Master/texmf-dist/doc/latex/mathastext/README.md index 7d92a4018b4..fd15e838426 100644 --- a/Master/texmf-dist/doc/latex/mathastext/README.md +++ b/Master/texmf-dist/doc/latex/mathastext/README.md @@ -14,7 +14,7 @@ The Author of this Work is Jean-Francois Burnol Copyright (C) 2011-2019 Jean-Francois Burnol (`jfbu at free dot fr`) - Source: mathastext.dtx 1.3v 2019/09/19 + Source: mathastext.dtx 1.3w 2019/11/16 DESCRIPTION @@ -82,6 +82,32 @@ Main options: `italic`, `subdued`, `LGRgreek`. RECENT CHANGES ============== +1.3w \[2019/11/16\] +---- + +* LaTeX 2019-10-01 release (up to patch level 3 inclusive) + together with `amsmath` conspired `:-)` to break `mathastext`, + in connexion with math accents. This has been fixed upstream, + but I am releasing nevertheless a hot fix to this + [issue](https://github.com/latex3/latex2e/issues/216) + (this is compatible with future LaTeX releases). + +* Fix: the `\hbar` is originally a robust command but + becomes a `\mathchardef` token if (e.g.) `amsfonts` is + loaded and then with recent LaTeX `\hbar<space>` is + made undefined and `mathastext` definition of it + remained without effect. The `\mathastext` own `\hbar` + is now defined `\protected`. + +* Fix: option `noendash` (or `symboldelimiters` which implies + it) caused (since `1.3u`) a bug under Unicode engines when + setting up the minus sign. + +* Version names declared via the optional argument of + `\Mathastext` or as first argument of `\MTDeclareVersion` + must not be `normal` or `bold`. Enforce that! (this was + marked as a bug to fix since `2012/10/24`...) + 1.3v \[2019/09/19\] ---- diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf b/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf Binary files differindex 21fdfef4993..dc8c864908d 100644 --- a/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf +++ b/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastext.tex b/Master/texmf-dist/doc/latex/mathastext/mathastext.tex new file mode 100644 index 00000000000..81672ed4240 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathastext/mathastext.tex @@ -0,0 +1,35 @@ +\def\MSTpkgdate {2019/11/16} +\def\MSTpkgversion {1.3w} +%%---------------------------------------------------------------- +%% Package: mathastext +%% Info: Use the text font in math mode (JFB) +%% Version: 1.3w 2019/11/16 +%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt) +%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr> +%% Examples of use of mathastext: +%% http://jf.burnol.free.fr/mathastext.html +%% http://jf.burnol.free.fr/showcase.html +%%---------------------------------------------------------------- +%% This is a generated file. Run latex thrice on this file mathastext.tex then +%% run dvipdfmx on mathastext.dvi to produce the documentation mathastext.pdf, +%% with the package source code included. +%% +%% Customize as desired the class options and the two toggles below. +%% +%% See mathastext.dtx for the copyright and the conditions for distribution +%% and/or modification of this work. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{mathastext.tex}% +[\MSTpkgdate\space v\MSTpkgversion\space + driver file for mathastext documentation (JFB)]% +\PassOptionsToClass{a4paper,fontsize=11pt}{scrdoc} +\chardef\Withdvipdfmx 1 % replace 1<space> by 0<space> for using latex/pdflatex +\chardef\NoSourceCode 0 % replace 0<space> by 1<space> for no source code +\input mathastext.dtx +%%% Local Variables: +%%% mode: latex +%%% End: +\endinput +%% +%% End of file `mathastext.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf Binary files differindex 0163ff573e9..ff43ebc0d05 100644 --- a/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.pdf diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex new file mode 100644 index 00000000000..4472f388101 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex @@ -0,0 +1,264 @@ +\def\testfileincipit{Test file to accompany \texttt{mathastext} +version \texttt{1.3w} of \texttt{2019/11/16}} +%%---------------------------------------------------------------- +%% Package: mathastext +%% Info: Use the text font in math mode (JFB) +%% Version: 1.3w 2019/11/16 +%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt) +%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr> +%% Examples of use of mathastext: +%% http://jf.burnol.free.fr/mathastext.html +%% http://jf.burnol.free.fr/showcase.html +%%---------------------------------------------------------------- +%% This file `mathastexttestalphabets.tex' is for testing the extended +%% scope of the math alphabet commands with package `mathastext', via +%% the package command \MTnonlettersobeymathxx. +%% +%% 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[hscale=0.66, vscale=0.72]{geometry} +\usepackage{amsmath} +\usepackage{mathtools}\mathtoolsset{centercolon} +%% WARNING THIS IS INCOMPATIBLE WITH BABEL+FRENCHB +%% BUT WITH MATHASTEXT LOADED THIS IS CORRECTED +%% *IF* \MTnonlettersobeymathxx IS MADE USE OF. +\usepackage{iftex} +\ifXeTeX +\expandafter\def\expandafter\testfileincipit\expandafter + {\testfileincipit\ (compiled with \XeLaTeX)} +\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 +\expandafter\def\expandafter\testfileincipit\expandafter + {\testfileincipit\ (compiled with \LuaLaTeX)} +\usepackage[no-math]{fontspec} +\setmainfont[Ligatures=TeX]{TeX Gyre Termes} +\setmonofont[Ligatures=TeX]{TeX Gyre Cursor} +\setsansfont[Ligatures=TeX]{TeX Gyre Heros} +\else +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{tgtermes} +\usepackage{tgcursor} +\usepackage{tgheros} +\fi\fi +\usepackage{metalogo} % must be loaded /after/ [no-math]fontspec +\usepackage[french]{babel} +\usepackage[italic,asterisk]{mathastext} +\MTlettershape{n}\Mathastext[upright] +\MTnonlettersobeymathxx +\MTexplicitbracesobeymathxx +\delimitershortfall-1pt +\usepackage{color} +\begin{document} +\testfileincipit + +\begin{center} + \bfseries Two features of \texttt{mathastext}:\\ +extended scope of the math alphabets and added italic corrections\par +\end{center} + +The package makes +${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}\,{\{}\,{\}}$, +the asterisk $*$, and $.\,/\,\vert\,\backslash\,{\#}\,{\$}\,{\%}\,{\&}$ obey the +math alphabet commands (this is the maximal list, some characters may have been +excluded by the corresponding package options). For the characters listed first +the mechanism involves a `mathematical activation'. + +As this process may create incompatibilities, it will be put into action +for +${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}$ +only if the user makes use of the package command +\verb|\MTnonlettersobeymathxx| (and the braces necessitate +\verb|\MTexplicitbracesobeymathxx|). + +It could be that one such character has been made `active' in the entire +document by some other package, typically a language definition file for the +\verb|babel| system. Here for example we have used \verb|babel| with the +\verb|french| option, which makes the high punctuation characters !?:; active +throughout the document (extra spacing is put in front of the character when +used in text; no change in math but perhaps for other languages and characters +this could happen, it is up to the language definition file to decide). + +When \verb|mathastext| detects that a character it wants to `mathematically +activate' is already `active', it does not go further except if it seems that +the activation was done by Babel. If the activation was done by Babel, then +\verb|mathastext| replaces the expansion of the active character in math mode by +what is necessary to achieve its goal. It does not additionally mathematically +activate the character; rather it makes sure that the character is \emph{not} +mathematically active. In the present document the colon was made mathematically +active by \verb|mathtools| but this was already canceled in the preamble by +\verb|mathastext| as it was loaded later. And it is better so, because the +combination \verb|babel| (with option \verb|frenchb|) +\verb|mathtools| (with +\verb|centercolon|) makes \verb|$:$| create an infinite loop! + +But even if someone had mathematically activated the colon after the preamble, +or after the loading of \verb|mathastext|, this would be canceled again +automatically for each inline or displayed mathematical formula (if the user +does \verb|\MTnonlettersobeymathxx|). + +The conclusion with \verb|\MTnonlettersobeymathxx| is: if some package has tried +to make the character mathematically active, this will be overruled by +\verb|mathastext|; if some package has made the character globally active, then +the package wins except if it is Babel, as \verb|mathastext| may in the latter +case safely modify the action in math mode (paying attention to the fact that +the character should be usable in \verb|\label| and \verb|\ref| in and outside +of math mode). + +The displayed equations next illustrate the extended scope of the math alphabets +which now apply to $=$, $-$, $($, $)$, $[$, $]$ (but not to the large delimiters +of course). Furthermore, for testing purposes the equations were labeled using +such characters, for example the last one has label \verb|eq=7|, to check that +the mathematical activation of $=$ does not cause problems with +\verb|\label/\ref|. + +\def\testformula{\quad\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = +\sec(d)]\right]\right)\biggr)\Biggr\rbrace} +\begin{equation}\testformula\label{eq:1}\end{equation} +\begin{equation}\mathnormalbold{mathnormalbold:\testformula}\label{eq;2}\end{equation} +\begin{equation}\mathrm{mathrm:\testformula}\label{eq?3}\end{equation} +\begin{equation}\mathbf{mathbf:\testformula}\label{eq!4}\end{equation} +\begin{equation}\mathit{mathit:\testformula}\label{eq(5}\end{equation} +\begin{equation}\mathtt{mathtt:\testformula}\label{eq)6}\end{equation} +\begin{equation}\mathsf{mathsf:\testformula}\label{eq=7}\end{equation} + +Equations above are numbered \ref{eq:1}, \ref{eq;2}, \ref{eq?3}, \ref{eq!4}, and +$\ref{eq(5}$, $\ref{eq)6}$, and $\ref{eq=7}$. + +\def\testline#1{$#1$&$\mathnormalbold{#1}$&$\mathrm{#1}$&$\mathbf{#1}$&$\mathit{#1}$&$\mathtt{#1}$&$\mathsf{#1}$} + +\centerline{\begin{tabular}{ccccccc} +\testline{a!b}\\ +\testline{a?b}\\ +\testline{a,b}\\ +\testline{a;b}\\ +\testline{a:b}\\ +\testline{a:=b}\\ +\testline{a\vcentcolon= b}\\ +\testline{a\colon b}\\ +\testline{a.b}\\ +\testline{a-b}\\ +\testline{a+b}\\ +\testline{a=b}\\ +\testline{a<b}\\ +\testline{a>b}\\ +\testline{<x,y>}\\ +\testline{\mathopen{<} x,y\mathclose{>}}\\ +\testline{\left< x,y\right>}\\ +\testline{a/b}\\ +\testline{a\backslash b}\\ +\testline{a\setminus b}\\ +\testline{a|b}\\ +\testline{a\mid b}\\ +\testline{(a,b)}\\ +\testline{[a,b]}\\ +\testline{\{a,b\}} +\end{tabular}} + +The question mark has been made active by \verb|babel+frenchb|. +\verb|mathastext| has imposed in math mode its ways (now \verb|$\mathbf{???}$| +gives $\mathbf{???}$). As the extra spacing is added by \verb|frenchb| only in +text, we had to use the math alphabet to check that indeed \verb|mathastext| +overruled Babel. + +To double-check we will now make \string? mathematically active: +\verb|\mathcode`?="8000|\mathcode`?="8000. This is a sure cause for disaster +normally with Babel (don't do this at home without \verb|mathastext|!). But here +with \verb|$?$| no bad surprise (infinite loop!) awaits us: just $?$. + +Let's take some other character, for example the opening parenthesis, and make +it catcode active: +\verb|\catcode`(=\active \def ({X}|. +Let's try the input +\verb|( and $($|. +\begingroup +\catcode`(=\active \gdef ({X} +This gives ( and $($. We see that \verb|mathastext| does not attempt to modify +the definition of the active character, as this activation was not done via the +\verb|babel| services. \catcode`\(=12 \mathcode`(="8000 We now revert the +parenthesis to catcode other (but maintain \verb|\def ({X}| as definition of its +active version), and then make it mathematically active using the command +\verb|\mathcode`(="8000|. If we try \verb|$((($| we see that the parenthesis is +not converted into an $X$: $((($. The mathematically active character was +overruled by \verb|mathastext|. + +Issuing \verb|\MTnonlettersdonotobeymathxx|\MTnonlettersdonotobeymathxx\ we do +get the $X$'s from the input \verb|$((($|: $((($ +\endgroup +This shows that \verb|mathastext| now does not modify in math mode the +non-letter \verb|(|. + +\MTversion{upright}\MTnonlettersobeymathxx +We defined in the preamble of the document a \verb|mathastext|-enhanced +math version (named \verb|upright|) having the Latin letters upright in +math mode. Let's switch to +it: \newline +\hbox to\linewidth{\hss\verb|\MTversion{upright}|\hss} + +With a font which is neither italic nor slanted, \verb|mathastext| automatically +inserts italic corrections for better positioning of the subscript: +\verb|$f_i^i$| gives +$f_i^i$. +After \verb|\MTnoicinmath| which turns off this feature\MTnoicinmath{}, the same +input gives $f_i^i$, which is different. +\footnote{last time I tried, this only worked with PDF\LaTeX{}, not with + \LuaLaTeX{} or \XeTeX{}.} + +Again with italic corrections on (\verb|\MTicinmath|)\MTicinmath{} +\verb|$f_{abc}^{def}$| gives $f_{abc}^{def}$, and here is another one: +$f^{f_{abc}^{def}}_u$. Without italic corrections\MTnoicinmath: $f_{abc}^{def}$, +and respectively $f^{f_{abc}^{def}}_u$. + +\MTicinmath + +\verb|mathastext| does not add these italic corrections inside arguments of +math alphabets, as this would prevent the formation of ligatures: +$\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$ +(no ligature in teletype) and $\mathsf{ff}$.\footnote{\llap{\textcolor{magenta}{\bfseries Changed!\kern3em}}Prior to 1.3i, + italic corrections were added to the \string\mathnormal\ arguments.} + +\centerline{\begin{tabular}{ccccccc} +\testline{a!b}\\ +\testline{a?b}\\ +\testline{a,b}\\ +\testline{a;b}\\ +\testline{a:b}\\ +\testline{a:=b}\\ +\testline{a\vcentcolon= b}\\ +\testline{a\colon b}\\ +\testline{a.b}\\ +\testline{a-b}\\ +\testline{a+b}\\ +\testline{a=b}\\ +\testline{a<b}\\ +\testline{a>b}\\ +\testline{<x,y>}\\ +\testline{\mathopen{<} x,y\mathclose{>}}\\ +\testline{\left< x,y\right>}\\ +\testline{a/b}\\ +\testline{a\backslash b}\\ +\testline{a\setminus b}\\ +\testline{a|b}\\ +\testline{a\mid b}\\ +\testline{(a,b)}\\ +\testline{[a,b]}\\ +\testline{\{a,b\}} +\end{tabular}} + +\end{document} +\endinput +%% +%% End of file `mathastexttestalphabets.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex new file mode 100644 index 00000000000..a5e256dfa3d --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex @@ -0,0 +1,42 @@ +\def\testfileincipit{Test file to accompany \texttt{mathastext} +version \texttt{1.3w} of \texttt{2019/11/16}} +%%---------------------------------------------------------------- +%% Package: mathastext +%% Info: Use the text font in math mode (JFB) +%% Version: 1.3w 2019/11/16 +%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt) +%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr> +%% Examples of use of mathastext: +%% http://jf.burnol.free.fr/mathastext.html +%% http://jf.burnol.free.fr/showcase.html +%%---------------------------------------------------------------- +%% This file `mathastexttestversions.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} +\testfileincipit + +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} +\endinput +%% +%% End of file `mathastexttestmathversions.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex new file mode 100644 index 00000000000..d4e3e8d652f --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodelinux.tex @@ -0,0 +1,119 @@ +\def\testfileincipit{Test file to accompany \texttt{mathastext} +version \texttt{1.3w} of \texttt{2019/11/16}} +%%---------------------------------------------------------------- +%% Package: mathastext +%% Info: Use the text font in math mode (JFB) +%% Version: 1.3w 2019/11/16 +%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt) +%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr> +%% Examples of use of mathastext: +%% http://jf.burnol.free.fr/mathastext.html +%% http://jf.burnol.free.fr/showcase.html +%%---------------------------------------------------------------- +%% This file `mathastexttestunicodelinux.tex' is for testing the use +%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX. +%% +%% Fonts which were available on a Linux machine are used. Beware that +%% compilation with LuaLaTeX will abort with errors if specified fonts do not +%% exist on your system. +%% +%% 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{metalogo} +\usepackage{iftex} +\ifXeTeX +\expandafter\def\expandafter\testfileincipit\expandafter + {\testfileincipit\ (compiled with \XeLaTeX)} +\else +\ifLuaTeX +\expandafter\def\expandafter\testfileincipit\expandafter + {\testfileincipit\ (compiled with \LuaLaTeX)} +\fi\fi +\usepackage[subdued,italic,asterisk]{mathastext} +\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana] +\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial] +\setmainfont[Color=00C000]{DejaVu Serif} \Mathastext[DejaVu] +\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale] +%% commented out as these fonts do not exist anymore on the Linux box +%% I have access to (test last done 2016/01/15) +%%\setmainfont[Color=C000C0]{URW Chancery L} \Mathastext[Chancery] +%%\setmainfont[Color=800080]{URW Palladio L} \Mathastext[Palladio] +\setmainfont[Color=808000]{Liberation Serif} \Mathastext[Liberation] +\MTDeclareVersion{Times}{T1}{ptm}{m}{n} +\begin{document} +\MTversion{normal} +\testfileincipit + +This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and +\emph{subdued} options. The base document fonts are the Latin Modern ones (in +OpenType format). The other OpenType fonts were chosen from those available on +a Linux machine. We also used the Times font in traditional \TeX\ font T1 +encoding, to demonstrate the removal since release \texttt{1.3u} of a former +limitation that all math versions had to share the same font encoding, else +some characters such as the dotless \texttt{i} ($\imath$), or the minus sign +could well vanish from the output in the non-normal math versions. + +Furthermore we test (last line of each block, on the left) if the non-letter +characters obey the math alphabet \verb|\mathbf|. In the normal and bold math +versions, this feature is de-activated, as option \emph{subdued} was used; and +if activated we should then use in these math versions the package +\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original +one, which will use encoding \verb|OT1| in the normal and bold versions, as we +loaded \verb|fontspec| with its option \emph{no-math}. + +Some among the fonts tested have no bold variant or no italic variant. + +Note: the two unicode engines \XeLaTeX\ and \LuaLaTeX\ give likely not fully +identical results particularly for the math mode. At least this is what I +observed regularly over the years with the variant of this file prepared for +fonts available on Mac OS, which is my main system where I develop +|\mathastext|. Lastly for example (TL2019, august 2019), \LuaLaTeX\ could not +find the bold variant of some system font, but \XeLaTeX\ did. And the spacing +for the letters of the Didot font was vastly different between the two +engines. + +\newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}% + \def\tmpb{normal}\def\tmpc{bold}% + \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx + \MTexplicitbracesobeymathxx\fi\fi +\begin{multicols}{2} +\hbox to\columnwidth{\hbox to\columnwidth{\hfil + $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} + \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } + \centerline{ $0123456789$ } + \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } + \centerline{ $\mathbf{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash}$ } +\columnbreak + \centerline{ abcdefghijklmnopqrstuvwxyz } + \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } + \centerline{ 0123456789} + \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } + \centerline{\bfseries !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } +\end{multicols}} +\begin{multicols}{2} + \centerline{\textbf{math mode}} +\columnbreak + \centerline{ \textbf{text} } +\end{multicols} +\TEST{DejaVu} +\TEST{Verdana} +\TEST{Andale} +%%\TEST{Palladio} +\TEST{Arial} +%%\TEST{Chancery} +\TEST{Liberation} +\TEST{bold}\TEST{normal}\TEST{Times} +\end{document} +\endinput +%% +%% End of file `mathastexttestunicodelinux.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex new file mode 100644 index 00000000000..ff7e3ca2a02 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestunicodemacos.tex @@ -0,0 +1,118 @@ +\def\testfileincipit{Test file to accompany \texttt{mathastext} +version \texttt{1.3w} of \texttt{2019/11/16}} +%%---------------------------------------------------------------- +%% Package: mathastext +%% Info: Use the text font in math mode (JFB) +%% Version: 1.3w 2019/11/16 +%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt) +%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr> +%% Examples of use of mathastext: +%% http://jf.burnol.free.fr/mathastext.html +%% http://jf.burnol.free.fr/showcase.html +%%---------------------------------------------------------------- +%% This file `mathastexttestunicodemacos.tex' is for testing the use +%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX. +%% +%% Mac OS X specific fonts are used (initially tested on 10.8.2). +%% +%% See `mathastext.dtx' for the copyright and conditions of distribution or +%% modification. +%% +\documentclass{article} +\usepackage[hscale=0.85]{geometry} +\usepackage{multicol} +\usepackage[no-math]{fontspec} +\usepackage{lmodern} +\usepackage{metalogo} +\usepackage{iftex} +\ifXeTeX +\expandafter\def\expandafter\testfileincipit\expandafter + {\testfileincipit\ (compiled with \XeLaTeX)} +\else +\ifLuaTeX +\expandafter\def\expandafter\testfileincipit\expandafter + {\testfileincipit\ (compiled with \LuaLaTeX)} +\fi\fi +\usepackage[subdued,italic,asterisk]{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] +\MTDeclareVersion{Times}{T1}{ptm}{m}{n} +\begin{document} +\MTversion{normal} +\testfileincipit + +This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and +\emph{subdued} options. The base document fonts are the Latin Modern ones (in +OpenType format). The other OpenType fonts were chosen from those available on +a Mac OS machine. We also used the Times font in traditional \TeX\ font T1 +encoding, to demonstrate the removal since release \texttt{1.3u} of a former +limitation that all math versions had to share the same font encoding, else +some characters such as the dotless \texttt{i} ($\imath$), or the minus sign +could well vanish from the output in the non-normal math versions. + +Furthermore we test (last line of each block, on the left) if the non-letter +characters obey the math alphabet \verb|\mathbf|. In the normal and bold math +versions, this feature is de-activated, as option \emph{subdued} was used; and +if activated we should then use in these math versions the package +\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original +one, which will use encoding \verb|OT1| in the normal and bold versions, as we +loaded \verb|fontspec| with its option \emph{no-math}. + +Some among the fonts tested have no bold variant or no italic variant. + +Note (tested 2013/09/03): for some reason the \verb|Color| specifications in the +\verb|\setmainfont| commands work only +with \XeLaTeX{}, not with \LuaLaTeX{}; a few months back I had not noticed +such a difference between the two engines. + +Update (tested 2016/01/15 with reasonably up-to-date TL2015): \verb|Color| +spec in use of \verb|\setmainfont| command now functional again with +\LuaLaTeX. + +Note (tested 2019/08/11, reasonably up-to-date TL2019): spacing with the Didot +font differs widely between \XeLaTeX\ and \LuaLaTeX{} (perhaps related to +italic corrections, see the package documentation), and also it seems +\LuaLaTeX{} will not find (from our generic usage of the \verb|fontspec| +interface, at least) bold variants of the Hoefler Text and American Typewriter +fonts, contrarily to \XeLaTeX. Also, the \emph{italic} option remains +seemingly without effect with \LuaLaTeX{} in the case of the Hoefler Text font +(see the package source code comments on some problems with the two ``modes'' +for text fonts under \LuaLaTeX, which may be related with this specific issue +here). + +\newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}% + \def\tmpb{normal}\def\tmpc{bold}% + \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx + \MTexplicitbracesobeymathxx\fi\fi +\begin{multicols}{2} +\hbox to\columnwidth{\hbox to\columnwidth{\hfil + $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}} + \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ } + \centerline{ $0123456789$ } + \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ } + \centerline{ $\mathbf{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash}$ } +\columnbreak + \centerline{ abcdefghijklmnopqrstuvwxyz } + \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ } + \centerline{ 0123456789 } + \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 } + \centerline{\bfseries !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,% + \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\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}\TEST{Times} +\end{document} +\endinput +%% +%% End of file `mathastexttestunicodemacos.tex'. |