diff options
author | Karl Berry <karl@freefriends.org> | 2013-09-05 22:37:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-09-05 22:37:53 +0000 |
commit | 9d9546d7063ae0cd4c8d42e86c3fd58e338b4314 (patch) | |
tree | 733fcb06d26f6467ce9590f3939c96fb8ea6de2f /Master/texmf-dist/doc/latex/mathastext | |
parent | 708b6d464538f70ef04e1f2128802bbff99da2e8 (diff) |
mathastext (5sep13)
git-svn-id: svn://tug.org/texlive/trunk@31578 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mathastext')
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/README | 74 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastext.pdf | bin | 338197 -> 358684 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex (renamed from Master/texmf-dist/doc/latex/mathastext/testmathastextalphabets.tex) | 132 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestlinux.tex (renamed from Master/texmf-dist/doc/latex/mathastext/testmathastextlinux.tex) | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestmacos.tex (renamed from Master/texmf-dist/doc/latex/mathastext/testmathastextmacos.tex) | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex (renamed from Master/texmf-dist/doc/latex/mathastext/testmathastextmathversions.tex) | 11 |
6 files changed, 147 insertions, 98 deletions
diff --git a/Master/texmf-dist/doc/latex/mathastext/README b/Master/texmf-dist/doc/latex/mathastext/README index 88c623cf584..53b5f754ddb 100644 --- a/Master/texmf-dist/doc/latex/mathastext/README +++ b/Master/texmf-dist/doc/latex/mathastext/README @@ -1,11 +1,11 @@ -Copyright (C) 2011, 2012 by Jean-Francois Burnol. +Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol. [see bottom of this file for the LPPL statement] +-------------------------------------------+ + mathastext + + + + `Use the text font in math mode' + - + v1.2f 2013/01/21 + + + v1.3 2013/09/02 + + jfbu (at) free.fr + +-------------------------------------------+ @@ -93,6 +93,31 @@ illustrate some features of the package. CHANGE LOG +1.3 [2013/09/02] + + * commands \MTsetmathskips and \MTunsetmathskips added. + + * commands \MTmathactiveletters and \MTmathstandardletters to govern +the math activation of letters independently of its use for insertion of +the italic corrections (\MTicinmath and \MTnoicinmath correspondingly +modified). + + * the new \luatexUmathcodenum as available since TL2013 allows +identical treatment by mathastext of = and - under both LuaTeX and +XeTeX. + + * \newmcodes@ of amsmath is left untouched in case of option basic. + + * a sentence containing | which was written to the log during the +loading caused a problem if | was active (typically if +\MakeShortVerb{\|} was added to the preamble prior to the loading of +mathastext). + + * some preemptive measures taken regarding things such as \mid, +\lbrace, and \rbrace, as some packages define these things in manners +which made the re-definitions done by mathastext issue errors. + + 1.2f [2013/01/21] * minor code improvements. Change log added to the user manual. @@ -104,32 +129,33 @@ This version should be the last one in the 1.2 series as it seems to correct most of the main problems which were introduced with the massive use of mathematically active characters in versions 1.2 and 1.2b. - * It is indeed a thorny point when one wants to modify only in math mode - how an active character acts, without breaking things. The package now - does that /only/ if the activation appears to originate in the Babel - system, as it is then possible to modify appropriately the Babel macros - \user@active<char> and \normal@char<char>. The relevant issues are - discussed in section 2.10 of the user manual, in the test file - testmathastextalphabets.tex, and in the source code comments to the - macro \mst@mathactivate. The inherent incompatibility of Babel with - packages having made mathematically active the characters itself makes - document active is circumvented by this interference of mathastext. A - generally applicable Babel patch could be derived from the method used - by mathastext. + * It is indeed a thorny point when one wants to modify only in math + mode how an active character acts, without breaking things. The + package now does that /only/ if the activation appears to originate + in the Babel system, as it is then possible to modify appropriately + the Babel macros \user@active<char> and \normal@char<char>. The + relevant issues are discussed in section 2.10 of the user manual, + in the test file testmathastextalphabets.tex, and in the source + code comments to the macro \mst@mathactivate. The inherent + incompatibility of Babel with packages having made mathematically + active the characters itself makes document active is circumvented + by this interference of mathastext. A generally applicable Babel + patch could be derived from the method used by mathastext. * The technique of mathematical activation is maintained only for the - characters which are not catcode active (at the entrance in math mode, - as mathastext does all its activation job at everymath and everydisplay). + characters which are not catcode active (at the entrance in math + mode, as mathastext does all its activation job at everymath and + everydisplay). - * Sadly, the feature of added italic corrections introduced in version - 1.2b did not behave as described in the user manual, due to forgotten - group braces. Fixed. + * Sadly, the feature of added italic corrections introduced in + version 1.2b did not behave as described in the user manual, due to + forgotten group braces. Fixed. - * The command \MTlowerast from the user manual of v1.2d was not the one - implemented in the source code. Fixed. + * The command \MTlowerast from the user manual of v1.2d was not the + one implemented in the source code. Fixed. - * The test files automatically extracted from a latex run on the dtx file - have been revised and extended. + * The test files automatically extracted from a latex run on the dtx + file have been revised and extended. * The code is better documented. @@ -328,7 +354,7 @@ use of mathematically active characters in versions 1.2 and 1.2b. 1.0 [2011/01/25] Initial version. -Copyright (C) 2011, 2012 by Jean-Francois Burnol. +Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol. The files of this package may be distributed and/or modified under the conditions of the LaTeX Project Public License, diff --git a/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf b/Master/texmf-dist/doc/latex/mathastext/mathastext.pdf Binary files differindex 9db2e186a5c..2c60a335efe 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/testmathastextalphabets.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex index 8bff0d94a83..05a95786181 100644 --- a/Master/texmf-dist/doc/latex/mathastext/testmathastextalphabets.tex +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestalphabets.tex @@ -1,10 +1,11 @@ \def\testfileincipit{Test file to accompany \texttt{mathastext} -version \texttt{v1.2f} of \texttt{2013/01/21.}} +version \texttt{1.3} of \texttt{2013/09/02.}} %% -%% Package `mathastext' by Jean-Francois Burnol -%% Copyright (C) 2011, 2012 by Jean-Francois Burnol +%% Package `mathastext', for LaTeX2e. +%% Author: Jean-Francois Burnol +%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol %% -%% This file `testmathastextalphabets.tex' is for testing the extended +%% This file `mathastexttestalphabets.tex' is for testing the extended %% scope of the math alphabet commands with package `mathastext', via %% the package command \MTnonlettersobeymathxx. %% @@ -55,6 +56,11 @@ version \texttt{v1.2f} of \texttt{2013/01/21.}} \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 @@ -100,25 +106,31 @@ to make the character mathematically active, this will be overruled by 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 below have been labeled using various -characters from our list, to test if it works ok with then. +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{\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) = +\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{\testformula}\label{eq;2}\end{equation} -\begin{equation}\mathrm{\testformula}\label{eq?3}\end{equation} -\begin{equation}\mathbf{\testformula}\label{eq!4}\end{equation} -\begin{equation}\mathit{\testformula}\label{eq(5}\end{equation} -\begin{equation}\mathtt{\testformula}\label{eq)6}\end{equation} -\begin{equation}\mathsf{\testformula}\label{eq=7}\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}$} -\begin{tabular}{ccccccc} +\centerline{\begin{tabular}{ccccccc} \testline{a!b}\\ \testline{a?b}\\ \testline{a,b}\\ @@ -144,7 +156,7 @@ $\ref{eq(5}$, $\ref{eq)6}$, and $\ref{eq=7}$. \testline{(a,b)}\\ \testline{[a,b]}\\ \testline{\{a,b\}} -\end{tabular} +\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{???}$| @@ -157,57 +169,59 @@ To double-check we will now make \string? mathematically active: 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 which was not made active by -\verb|babel+frenchb|, for example the opening parenthesis: +Let's take some other character, for example the opening parenthesis, and make +it catcode active: \verb|\catcode`(=\active \def ({X}|. -Let's try now \verb|( vs $($|.\begingroup\catcode`(=\active \gdef ({X} This -gives ( vs $($\endgroup. We see that \verb|mathastext| does not -attempt anything (this could not safely be done for technical reasons). - -We have now cancelled the activation of the parenthesis, and let's make it only -mathematically active with \verb|\mathcode`(="8000|.\mathcode`(="8000\ If -we try \verb|$((($| we see that nothing special happens $((($. The -mathematically active character was overruled by \verb|mathastext|. - -But if we now issue -\verb|\MTnonlettersdonotobeymathxx|\MTnonlettersdonotobeymathxx\ we get $((($ -from the input \verb|$((($|. This shows that indeed the parenthesis had been -made mathematically active. - -By the way -don't do this at home without \verb|mathastext|: \verb|amsmath| is not -compatible with a mathematically active opening parenthesis, and -\verb|mathastext| does a patch. Always load \verb|amsmath| before -\verb|mathastext|. +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.\footnote{\texttt{\char92MTversion\{upright\}}. This maintains - the status of the `difficult non-letters'.}\footnote{as we - left \string? mathematically active, we initially had the bad surprise - to fall into an infinite loop. And indeed we had forgotten our - previous \texttt{\char92MTnonlettersdonotobeymathxx}. So a new - \texttt{\char92MTnonlettersobeymathxx} was done to prevent this - problem of \texttt{babel} when it activates a character which is - mathematically active.} -Then, italic corrections are added,\footnote{this has an effect only - with \LaTeX{} and PDF\LaTeX{} not with \XeTeX{} or \LuaLaTeX{}.} as we -can see here, to correct the positioning of the subscript: $f_i^i$. -After using \verb|\MTnoicinmath| to turns off the -feature\MTnoicinmath{}, this is $f_i^i$. Let's turn it back on -(\verb|\MTicinmath|)\MTicinmath{} and try \verb|$f_{abc}^{def}$|, this -gives $f_{abc}^{def}$, or this other one: $f^{f_{abc}^{def}}_u$. Without -italic corrections\MTnoicinmath: $f_{abc}^{def}$, and respectively -$f^{f_{abc}^{def}}_u$.\MTicinmath We can also check that the added -italic corrections do not prevent the formation of ligatures when using +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 We can also check that the +added italic corrections do not prevent the formation of ligatures when using the math alphabets, apart from \verb|\mathnormal| (which comes first): -$\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, -$\mathtt{ff}$ (no ligature in teletype) and $\mathsf{ff}$. +$\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$ +(no ligature in teletype) and $\mathsf{ff}$. -\begin{tabular}{ccccccc} +\centerline{\begin{tabular}{ccccccc} \testline{a!b}\\ \testline{a?b}\\ \testline{a,b}\\ @@ -233,9 +247,9 @@ $\mathtt{ff}$ (no ligature in teletype) and $\mathsf{ff}$. \testline{(a,b)}\\ \testline{[a,b]}\\ \testline{\{a,b\}} -\end{tabular} +\end{tabular}} \end{document} \endinput %% -%% End of file `testmathastextalphabets.tex'. +%% End of file `mathastexttestalphabets.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/testmathastextlinux.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestlinux.tex index 67c5d792d2b..126abb8ac2c 100644 --- a/Master/texmf-dist/doc/latex/mathastext/testmathastextlinux.tex +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestlinux.tex @@ -1,10 +1,11 @@ \def\testfileincipit{Test file to accompany \texttt{mathastext} -version \texttt{v1.2f} of \texttt{2013/01/21.}} +version \texttt{1.3} of \texttt{2013/09/02.}} %% -%% Package `mathastext' by Jean-Francois Burnol -%% Copyright (C) 2011, 2012 by Jean-Francois Burnol +%% Package `mathastext', for LaTeX2e. +%% Author: Jean-Francois Burnol +%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol %% -%% This file `testmathastextlinux.tex' is for testing the use of the package +%% This file `mathastexttestlinux.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. @@ -81,4 +82,4 @@ Some among the fonts tested have no bold variant or no italic variant. \end{document} \endinput %% -%% End of file `testmathastextlinux.tex'. +%% End of file `mathastexttestlinux.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/testmathastextmacos.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmacos.tex index 4aba7d84c7d..744e7c0f9ff 100644 --- a/Master/texmf-dist/doc/latex/mathastext/testmathastextmacos.tex +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmacos.tex @@ -1,10 +1,11 @@ \def\testfileincipit{Test file to accompany \texttt{mathastext} -version \texttt{v1.2f} of \texttt{2013/01/21.}} +version \texttt{1.3} of \texttt{2013/09/02.}} %% -%% Package `mathastext' by Jean-Francois Burnol -%% Copyright (C) 2011, 2012 by Jean-Francois Burnol +%% Package `mathastext', for LaTeX2e. +%% Author: Jean-Francois Burnol +%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol %% -%% This file `testmathastextmacos.tex' is for testing the use of the package +%% This file `mathastexttestmacos.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). @@ -17,6 +18,7 @@ version \texttt{v1.2f} of \texttt{2013/01/21.}} \usepackage{multicol} \usepackage[no-math]{fontspec} \usepackage{lmodern} +\usepackage{metalogo} \usepackage[subdued,italic,asterisk]{mathastext} \setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler] \setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter] @@ -46,6 +48,11 @@ use encoding \verb|OT1| in the normal and bold versions, as we loaded 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 \XeTeX{}, not with \LuaLaTeX{}; a few months back I had not noticed +such a difference 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 @@ -78,4 +85,4 @@ Some among the fonts tested have no bold variant or no italic variant. \end{document} \endinput %% -%% End of file `testmathastextmacos.tex'. +%% End of file `mathastexttestmacos.tex'. diff --git a/Master/texmf-dist/doc/latex/mathastext/testmathastextmathversions.tex b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex index d65abeb663b..2b3dc463397 100644 --- a/Master/texmf-dist/doc/latex/mathastext/testmathastextmathversions.tex +++ b/Master/texmf-dist/doc/latex/mathastext/mathastexttestmathversions.tex @@ -1,10 +1,11 @@ \def\testfileincipit{Test file to accompany \texttt{mathastext} -version \texttt{v1.2f} of \texttt{2013/01/21.}} +version \texttt{1.3} of \texttt{2013/09/02.}} %% -%% Package `mathastext' by Jean-Francois Burnol -%% Copyright (C) 2011, 2012 by Jean-Francois Burnol +%% Package `mathastext', for LaTeX2e. +%% Author: Jean-Francois Burnol +%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol %% -%% This file `testmathastextversions.tex' is for testing the enhanced +%% 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 @@ -33,4 +34,4 @@ $math\ in\ AvantGarde$. \end{document} \endinput %% -%% End of file `testmathastextmathversions.tex'. +%% End of file `mathastexttestmathversions.tex'. |