Home

The mathastext package

image

Contents

1. 204 newtoks mst do nonletters 205 newtoks mst do easynonletters 206 newtoks mst do az 207 newtoks mst do AZ 208 newcommand MTnonlettersdonotobeymathxx let mst the gobble 209 newcommand MTnonlettersobeymathxx let mst the the 210 newcommand MTeasynonlettersdonotobeymathxx let mst theeasy gobble 211 newcommand MTeasynonlettersobeymathxx let mst theeasy the 212 MTnonlettersdonotobeymathxx 1 2c 213 MTeasynonlettersobeymathxx 214 newcommand MTicinmath 215 let mst thef the 216 let mst theF the 217 def mst itcorr ifnum fam m ne else ifnum fam symmtletterfont fi fi 218 let mst ITcorr mst itcorr 219 newcommand MTnoicinmath also usable in math mode 220 def mst itcorr def mst ITcorr 221 let mst thef gobble let mst theF gobble 222 newcommand MTICinmath 223 let mst theF the 224 def mst ITcorr ifnum fam m ne fi 225 newcommand MTnoICinmath also usable in math mode 226 def mst ITcorr 227 let mst theF gobble 228 newcommand MTicalsoinmathxx 229 ifx mst itcorr empty else def mst itcorr fi 42 mst mathactivate jaddtodo nonletters odo easynonletters mst addtodo az mst addtodo AZ 230 ifx mst ITcorr empty else def mst ITcorr fi 231 AtBeginDocument 232 everymath expandafter the everymath mst the mst do nonletters 233 mst theeasy mst do easynonletters 234 nst thef mst do az mst theF mst do AZ 235 everydis
2. centerline ABCDEFGHIJKLMNOPQRSTUVWXYZ centerline 0123456789 centerline 7 5 t 7 4 Q EN TN A AMAA Z S VZA amp lt gt 1 f F backslash columnbreak centerline abcdefghijklmnopgrstuvwxyz centerline ABCDEFGHIJKLMNOPQRSTUVWXYZ centerline 0123456789 centerline E Aa A bAT LE AN EA A AAAA B VAAL NEN lt A IN AAA AA char92 end multicols begin multicols 2 centerline textbf math mode columnbreak centerline textbf text end multicols TEST De jaVu TEST Verdana TEST times TEST Andale TEST Arial TEST bold TEST normal end document And now the same thing with fonts available on Mac OS X documentclass article usepackage hscale 0 8 geometry usepackage multicol usepackage no math fontspec usepackage 1modern 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 FFOOFF Didot Mathastext Didot setmainfont Color 999999 Comic Sans MS Mathastext Comic begin document 20 copy here the code from the previous example TEST Didot TEST Comic TEST normal TEST Herculanum TEST Hoef ler TEST Typewriter TEST bold end document The test files which will be pr
3. eglera ce probl eme luatexUmathchardef mst minus sign 2 2 O relax 1065 mathchardef mst minus sign 8704 relax 2200 1066 else 1067 mathchardef mst minus sign mathcode relax 1068 fi fi 1069 ifpackageloaded amsmath 1070 def relbar mathrel mathpalette mathsm sh mst minus sign 1071 DeclareRobustCommand relbar mathrel smash mst minus sign 1072 def rightarrowf ill m th mathord relbar mkern 7mu 1073 cleaders hbox mkern 2mu relbar mkern 2mu hfill 1074 _ mkern 7mu mathord rightarrow 64 1075 def leftarrowf ill m th mathord leftarrow mkern 7mu 1076 cleaders hbox mkern 2mu relbar mkern 2mu hfill 1077 _ mkern 7mu mathord relbar 1078 fi endash 2011 01 29 1 1 Producing this next piece of code was not a piece of cake for a novice like myself 2011 02 05 1 11 Compatibility with Unicode via use of fontspec encodings EU1 and EU2 2011 02 07 1 12 Improved dealing of Unicode possibility 2011 04 02 1 14b Corrected some very irresponsible bug in the Unicode part which caused a problem when 10 or more math families have been allocated 2012 09 24 1 15 Added AtBeginDocument to circumvent some amsmath problem with unicode engines 1079 def do the endashstuff edef mst tmp enc encodingdefault 1080 ifx mst tmp enc mst eui xetex fontspec 1081 AtBeginDocument XeTeXmathcode 2 symmtoperatorfont 2013 relax 1082 AtBeginDocument XeTeXmathchardef mst varfa
4. xxpt 1846 DeclareMathSizes xxxvipt xxxvipt xxxpt xxvpt 1847 typeout mathastext has declared larger sizes for subscripts J4 1848 To keep LaTeX defaults use option defaultmathsizes 1849 fi 1850 endinput 84
5. mathalpha mtletterfont n 914 mst DeclareMathSymbol o mathalpha mtletterfont o 915 mst DeclareMathSymbol p mathalpha mtletterfont p 916 mst DeclareMathSymbol q mathalpha mtletterfont q 917 mst DeclareMathSymbol r mathalpha mtletterfont r 918 mst DeclareMathSymbol s mathalpha mtletterfont s 919 mst DeclareMathSymbol t mathalpha mtletterfont t 920 mst DeclareMathSymbol u mathalpha mtletterfont u 921 mst DeclareMathSymbol v mathalpha mtletterfont v 922 mst DeclareMathSymbol w mathalpha mtletterfont w 923 mst DeclareMathSymbol x mathalpha mtletterfont x 924 mst DeclareMathSymbol y mathalpha mtletterfont y 925 mst DeclareMathSymbol z mathalpha mtletterfont z 926 ifmst frenchmath def mst font tbu mtoperatorfont 927 else def mst f ont Ot bu mtletterfont fi 928 def mst DeclareMathSymbol 1 2 3 4 929 DeclareMathSymbol 1 2 3 4 930 expandafter DeclareMathSymbol csname mst 1 endcsname 2 3 4 931 expandafter mst addtodo AZ 932 expandafter 1 csname mst 1 endcsname mst ITcorr 933 mst DeclareMathSymbol A mathalpha mst font tbu A 934 mst DeclareMathSymbol B mathalpha mst font tbu BI 935 mst DeclareMathSymbol C mathalpha mst font tbu C 936 mst DeclareMathSymbol D mathalpha mst font tbu 1 DJ 937 mst DeclareMathSymbol E mathalpha mst font tbu 1 EF 938 mst DeclareMathSy
6. 1 2b 2012 12 31 doing catcode active global let mst active math prime is awfully wrong when the right quote is made active at begin document by some other package as happens with babel for some languages So mathastext treats now the right quote with the same method as applied to the other characters it makes mathematically active This uses the macro mst mathactivate which is defined later in the package Babel does let prim s bbl prim s when is made active via its services the czech and slovak languages also store the initial version of prim s else the quote would not work correctly when being again of catcode 12 and it doesn t matter if mathastext is loaded before or after this happens as the mst mathactivate does its job only as part of the everymath and everydisplay token lists 1 2e being paranoid we take precautions against a possibly catcode active right quote at the time of loading mathastext 162 newmuskip mst prime muskip h v 1 2 163 def mst prime skip 5mu 164 ifmst italic ifmst frenchmath else def mst prime skip Omu fi fi 165 def mst act ive math prime sp bgroup mskip mst prime muskip prim s 166 catcode 12 167 gdef mst modifyprime mst mathactivate mst active math prime 168 expandafter let csname mst ifdone string endcesname iffalse 169 AtBeginDocument 170 everymath expandafter the everymath mst modifyprime 171 everydisplay expandafter the everydisp
7. 1198 ifmst nosmalldelims 1199 DeclareMathSymbol mathopen mst Gf ont tbu 28 1200 DeclareMathSymbol mathclose mst font tbu 29 1201 DeclareMathSymbol mathopen mst font tbu 5B 1202 DeclareMathSymbol mathclose mst font tbu 5D 1203 DeclareMathSymbol mathord mst font tbu 2F 1204 else 1205 DeclareMathDelimiter mathopen mst font tbu 28 largesymbols 00 1206 DeclareMathDelimiter mathclose mst font tbu 29 largesymbols 01 1207 DeclareMathDelimiter mathopen mst font tbu 5B largesymbols 02 68 1208 DeclareMathDelimiter mathclose mst font tbu 5D largesymbols 03 1209 DeclareMathDelimiter mathord mst font tbu 2F largesymbols OE 1210 fi 1211 DeclareMathSymbol mst varfam lparen mathalpha mst font tbu 40 1212 DeclareMathSymbol mst varfam rparen mathalpha mst font tbu 41 1213 DeclareMathSymbol mst varfam lbrack mathalpha mst font tbu 5B 1214 DeclareMathSymbol mst varfam rbrack mathalpha mst font tbu 5D 1215 DeclareMathSymbol mst varfam slash mathalpha mst font tbu 2F 1216 expandafter mst addtodo nonletters string mathopen mst varfam lparen 1217 expandaf ter mst addtodo nonletters string mathclose mst varfam rparen 1218 expandaf ter mst addtodo nonletters string mathopen mst varfam lbrack 1219 expandaf ter mst addtodo nonletters string mathclose mst varfam rbrack 1220 mst
8. Lambda mst origLambda 1599 let Mu mst origMu 1600 let Nu mst origNu 1601 let Xi mst origXi 1602 let Omicron mst origOmicron 1603 let Pi mst origPi 1604 let Rho mst origRho 1605 let Sigma mst origSigma 1606 let Tau mst origTau 1607 let Upsilon mst origUpsilon 1608 let Phi mst origPhi 1609 let Chi mst origChi 1610 let Psi mst origPsi 1611 let Omega mst origOmega 1612 1613 let alpha mst origalpha 1614 let beta mst origbeta 78 1615 let gamma mst origgamma 1616 let delta mst origdelta 1617 let epsilon mst origepsilon 1618 let zeta mst origzeta 1619 let eta mst origeta 1620 let theta mst origtheta 1621 let iota mst origiota 1622 let kappa mst origkappa 1623 let lambda mst origlambda 1624 let mu mst origmu 1625 let nu mst orignu 1626 let xi mst origxi 1627 let omicron mst origomicron 1628 let pi mst origpi 1629 let rho mst origrho 1630 let varsigma mst origvarsigma 1631 let sigma mst origsigma 1632 let tau mst origtau 1633 let upsilon mst origupsilon 1634 let phi mst origphi 1635 let chi mst origchi 1636 let psi mst origpsi 1637 let omega mstOorigomega 1638 let Digamma mst origDigamma 1639 let digamma mst origdigamma 1640 1641 hh 1642 def mst setuplgrgreek 1643 let Alpha mst Alpha 1644 let Beta mst Beta 1645 let Gamma mst Gamma 1646 let Delta mst Delta 1647 let Epsilon mst Epsilon 1648 let Zeta mst Zeta 1649 let Eta mst Eta 165
9. The mathcode thing has to be used with care under Unicode engines Unfortunately the luatexUmathcode macro is helpless update I have since been told by TH that the next LuaLaTeX release will change this as it is not possible to know if it will return a legacy mathcode or a Unicode mathcode On the other hand the much saner XeTeXmathcodenum always return a Unicode mathcode 1 15e Oct 22 2012 I add the necessary things to also subdue the mathbf mathit mathsf and mathtt macros previous version only took care of the symbol alphabets mathnormal and mathrm update 1 15f does that in a completely different and much simpler way Notice that the package defines a mathnormalbold macro but it will not be subdued in the normal and bold math versions 1 15f Oct 23 2012 The previous version of the code queried the math family of a respectively 1 to guess and then extract the fonts to be reassigned to mtletterfont and mtoperatorfont which is done at the end of this sty file The present code simply directly uses letters and operators so mathastext could not subdue itself if it was somehow cloned but obtains indeed the corresponding font specifications in normal and bold in a cleaner manner But it is so much shorter and avoids the LualATEX problem with luatexUmathcode Anyhow for example the euler package puts the digits in the letters math family so the previous method was also error prone In fact there is no way to do this su
10. The disactivating macro MTnonlettersdonotobeymathxx is made the default 40 mst mathactivate The mechanism is even more off by default for and as this is not compatible with their use as delimiters lbrace and rbrace should be used instead but it can be activated for them too 1 2b 2012 12 30 there were bad oversights in the 1 2 code for mst mathactivate related to the possibility for some characters to have been made active in the sense of the catcode elsewhere something which often is done by language definition files of the babel system The code from v1 2b tried to provide correct behavior using a prefix called mst fork its definition and its use has since been modified which let the active character expand to the mathastext re definition only in math mode and only if protect was typeset protect This indeed took care of situations such as hbox with an active or label eq 1 with an active assuming for the latter that things would have worked ok before the twiddling by mathastext 1 2e 2013 01 09 alas ref eq 1 still was a problem Indeed in that case the mathastext prefix had no means to know it was inside a ref so it made the character expand to its mathastext redefinition which is not acceptable inside a csname endcsname What happens with Babel is that it patches things such as ref newlabel we can test the if safe actives flag to detect it in that case but this is Babe
11. mathchardef tempa mathcode relax and is made a part of the hook every math size inside glb settings This is called from check mathfonts which is done in particular in frozen everymath hence before but wait what mathastext puts in everymath Also glb settings is triggered by mathversion which must be done outside of math mode Alas with things such as hbox mathastext will have already made the parenthesis mathematically active And boldsymbol from amsbsy disables the nomath switch and executes mathversion bold directly in math mode So we have a problem with resetMathstrut lualatex math replaces resetMathstrut with its own version which also looks at With lualatex no error is signaled when mathastext has done mathcode 8000 but the Mathstrutbox is then wrong The replacement macro avoids a potentially math active It assumes that there is still some appropriate glyph in slot 40 of operators and it sets the height and depth of Mathstrutbox to be large enough to accomodate both this glyph and the one from the mathastext font both in the current math version If option noparen was used we leave everything untouched 186 ifmst noparen else 187 AtBeginDocument 188 ifundef ined resetMathstrut 189 PackageWarningNoLine mathastext a custom version of the amsmath macro J 190 space space space string resetMathstrut space will replace the original 191 ifmst symboldeli
12. mtlgrfontlower 98 1724 DeclareMathSymbol mst gamma mathalpha mtlgrfontlower 103 1725 DeclareMathSymbol mst delta mathalpha mtlgrfontlower 100 1726 DeclareMathSymbol mst epsilon mathalpha mtlgrfontlower 101 1727 DeclareMathSymbol mst zeta mathalpha mtlgrfontlower 122 1728 DeclareMathSymbol mst eta mathalpha mtlgrfontlower 104 1729 DeclareMathSymbol mst theta mathalpha mtlgrfontlower 106 1730 DeclareMathSymbol mst iota mathalpha mtlgrfontlower 105 1731 DeclareMathSymbol mst kappa mathalpha mtlgrfontlower 107 1732 DeclareMathSymbol mst lambda mathalpha mtlgrfontlower 108 1733 DeclareMathSymbol mst mu mathalpha mtlgrfontlower 109 1734 DeclareMathSymbol mst nu mathalpha mtlgrfontlower 110 1735 DeclareMathSymbol mst xi mathalpha mtlgrfontlower 120 1736 DeclareMathSymbol mst omicron mathalpha mtlgrfontlower 111 1737 DeclareMathSymbol mst pi mathalpha mtlgrfontlower 112 1738 DeclareMathSymbol mst rho mathalpha mtlgrfontlower 114 1739 DeclareMathSymbol mst varsigma mathalpha mtlgrfontlower 99 1740 DeclareMathSymbol mst sigma mathalpha mtlgrfontlower 115 1741 DeclareMathSymbol mst tau mathalpha mtlgrfontlower 116 1742 DeclareMathSymbol mst upsilon mathalpha mtlgrfontlower 117 1743 DeclareMathSymbol mst phi mathalpha mtlgrfontlower 102 1744 DeclareMathSymbol mst chi mathalpha mtlgrfontlower 113 1745 DeclareMathS
13. vi 15c extending subdued to LGRgreek vi 15f subdueing math alphabets in a simpler way than in 1 15e vi 2b subdueing the activation of characters in math mode vi 2d special treatment of the asterisk MTmathoperatorsobeymathxx MTeasynonlettersobeymathxx ifmst asterisk let mst doasterisk mst doasterisk fi ifmst subdued edef mst tmp 2 def mst tmpa normal ifx mst tmp mst tmpa mst restorealphabets MTmathoperatorsdonotobeymathxx MTnonlettersdonotobeymathxx MTeasynonlettersdonotobeymathxx MTnoicinmath ifmst asterisk let mst doasterisk relax fi ifmst LGRgreek mst restoregreek fi else def mst tmpa bold ifx mst tmp mst tmpa mst restorealphabets 59 871 MTmathoperatorsdonotobeymathxx 872 MTnonlettersdonotobeymathxx 873 MTeasynonlettersdonotobeymathxx 874 MTnoicinmath 875 ifmst asterisk let mst doasterisk relax fi 876 ifmst LGRgreek mst restoregreek fi 877 else 878 mst setalphabets 879 ifmst LGRgreek mst setuplgrgreek fi 880 fi fi fi 881 882 let MathastextVersion MTVersion 883 let Mathastextversion MTVersion 884 let MTversion MTVersion 885 let mathastextversion MTVersion Mathastext Initialization call 886 Mathastext Additional appropriate messages to the terminal and the log 887 ifmst eulergreek 888 typeout Greek letters will use the Euler font Use J 889 kk protect MathastextEulerScale lt factor gt to scale the font 890 else 891 ifmst symbolgreek 89
14. 1440 DeclareMathSymbol Sigma mathord mtpsymbol 53 1441 DeclareMathSymbol Upsilon mathord mtpsymbol A1 1442 DeclareMathSymbol Phi mathord mtpsymbol 46 1443 DeclareMathSymbol Psi mathord mtpsymbol 59 1444 DeclareMathSymbol Omega mathord mtpsymbol 57 1445 else not symbolgreek but eulergreek or selfGreek or both 1446 DeclareMathSymbol Digamma mathalpha mst font tbu 46 1447 DeclareMathSymbol Gamma mathalpha mst font tbu 00 1448 DeclareMathSymbol Delta mathalpha mst font tbu 01 1449 DeclareMathSymbol Theta mathalpha mst font tbu 02 1450 DeclareMathSymbol Lambda mathalpha mst font tbu 03 1451 DeclareMathSymbol Xi mathalpha mst font tbu 04 1452 DeclareMathSymbol Pi mathalpha mst font tbu 05 1453 DeclareMathSymbol Sigma mathalpha mst font tbu 06 1454 DeclareMathSymbol Upsilon mathalpha mst font tbu 07 1455 DeclareMathSymbol Phi mathalpha mst font tbu 08 1456 DeclareMathSymbol Psi mathalpha mst font tbu 09 1457 DeclareMathSymbol Omega mathalpha mst font tbu 0A 1458 fi 1459 fi There are differences regarding Euler and Symbol with respect to the available var letters We include one or two things like the wp and the partial The lower case Greek letters in default ATEX are of type mathord If we use the Euler font it is perhaps better to have them be of type mathalpha 1460 ifmst goahead 1461 ifmst eulerg
15. 3 1 Summary of main options italic frenchmath italic letters in math upright uppercase if frenchmath subdued acts in a subdued way The ATEX normal and bold math versions are left quasi unchanged With version 1 15e of the package this statement applies also to the math alphabets mathbf mathit mathsf and mathtt and not only to mathnormal and mathrm as in previous versions LGRgreek eulergreek symbolgreek the Greek letters will be taken respec tively from the text font itself in LGR encoding or from the Euler font or from the Postscript Symbol font 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 mathastext with option symbolmax may give in the end a PDF file quite smaller than the one one would get without the package defaultmathsizes mathastext sets up bigger sizes for subscripts it also copies code from the moresize package to redefine Huge and define HUGE Use this option to prevent it from doing so defaultalphabets by default mathastext redeclares the math alphabets mathrn mathit mathtt etc but not mathcal of course to refer to the cur rent document text fonts at the time of loading the package and in each mathastext math version Use this option to prevent
16. 61 newif ifmst noequal 62 DeclareOption noequal mst noequaltrue 63 newif ifmst noexclam 64 DeclareOption noexclam mst noexclamtrue 65 newif ifmst asterisk 66 DeclareOption noasterisk PackageWarningNoLine mathastext 67 option noasterisk is deprecated J space space space 68 Check the documentation 69 DeclareOption asterisk mst asterisktrue 70 AtBeginDocument 71 everymath expandafter the everymath mst doasterisk 72 everydisplay expandafter the everydisplay mst doasterisk 73 newif ifmst nospecials 74 DeclareOption nospecials mst nospecialstrue 75 DeclareOption basic ExecuteOptions noparenthesis nopunctuation 76 noplusnominus noequal noexclam nospecials nolessnomore 77 hh 78 newif ifmst nohbar 79 DeclareOption nohbar mst nohbartrue 80 newif ifmst nodigits 81 DeclareOption nodigits mst nodigitstrue 82 newif ifmst defaultimath 83 DeclareOption defaultimath mst defaultimathtrue 84 newif ifmst mathaccents 36 85 DeclareOption mathaccents mst mathaccentstrue 86 hh 87 newif ifmst needsymbol 88 newif ifmst symboldelimiters 89 DeclareOption symboldelimiters mst needsymboltrue mst symboldelimiterstrue 90 newif ifmst symboldigits 91 DeclareOption symboldigits mst needsymboltrue mst symboldigitstrue 92 newif ifmst symbolgreek 93 DeclareOption symbolgreek mst needsymboltrue mst symbolgreektrue 94 newif ifmst symbolre 95 DeclareOpti
17. As is usual with ATEX one can limit the scope to the inside of a group or also switch back to the main set up through issuing Mathastextver sion normal When 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 familydefault But it is still possible for a mathastext declared math version to have distinct fonts for text and math 1 in the body of the TEX source an optional argument the name of a mathastext declared math version to MTversion is allowed and for exam ple we used in the source of this document MTversion newcent helvet meaning New Century Schoolbook for the text and Helvetica for the math 2 there are preamble only commands MTencoding MTfamily MTseries MTshape MTlettershape which tell mathastext what to do for math only in each math version declared afterwards independently of the text fonts In the body of the document the ATEX command mathversion version_name will change only the fonts used in math mode It is recommended to use instead the package command mathastextversion or its synonyms MTversion Mathas textversion MTVersion with a mandatory argument version_name It e checks in case the subdued option was specified whether the asked for math version is normal or bold and adapts the following to that c
18. Lual TEX it is recommended to use the fontspec package Else some of the encoding dependent things done by mathastext like using the en dash character to get a minus sign in math mode will not be put in place Furthermore it is necessary to load fontspec with its no math option and this must happen before loading mathastext Use fontspec with its no math option and load it prior to mathastext The amsmath package if used must be loaded prior to mathastext A little piece of the functionality of mathastext is less fully realized under the LualATEX engine than it is with KHIRK This is a temporary situation as the needed feature of Lual4TfX has been implemented in its latest development release I will update mathastext when these binaries will have reached the distribution stage I already mentioned in the section 29 the fact that the italic corrections were not available for OpenType fonts under the XqIfX engine and only partially available for the LualATEX engine with the result that the spacings in math mode when using for the letters an upright text font will be less satisfying than with the standard pdfetex engine the OpenType fonts not being usable with the latter engine this is not a criterion of choice anyhow To specify math versions using unicode fonts use the fontspec setmainfont command with arbitrary optional features This command can be issued before loading mathastext or after and then will be follow
19. MTfamily 472 let Mathastextseries MTseries 473 let Mathastextshape MTshape 474 let Mathastextboldvariant MTboldvariant 475 let Mathastextlettershape MTlettershape 1 15c These new macros can be used in between calls to Mathastext They reset the shapes for Greek letters applies to LGRgreek s and selfGreek s options The MTgreekfont presupposes either LGRgreek or selfGreek MTgreekfont familydefault acts like turning on LGRgreeks or selfGreeks 476 newcommand MTitgreek 477 mst itgreektrue mst upgreekfalse def mst greek select 0 478 newcommand MTupgreek 479 mst upgreektrue mst itgreekfalse def mst greek select 0 50 MTWillUse Mathastext 480 newcommand MTitGreek def mst greek select 1 481 newcommand MTupGreek def mst greek select 2 482 onlypreamble MTitgreek 483 onlypreamble MTupgreek 484 onlypreamble MTitGreek 485 onlypreamble MTitGreek 486 let Mathastextitgreek MTitgreek 487 let Mathastextupgreek MTupgreek 488 let MathastextitGreek MTitGreek 489 let MathastextupGreek MTupGreek 490 newcommand MTgreekf ont 1 def mst greekfont 1 491 onlypreamble MTgreekfont 492 let Mathastextgreekfont MTgreekf ont 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 versions as does Mathastext 493 newcommand MTWillUse 5 empty 494 MTencoding 2 495 MTfamily
20. all the Greek at the time of usepackage Modifiable in the preamble via MTgreekfont font_name Mathastext 29 edef mst greekfont familydefault h v 1 15c 2011 03 09 1 13 introduces the option LGRgreek and systematic use of if conditionals for better readability by myself of the code 30 newif ifmst italic 31 newif ifmst frenchmath 32 DeclareOption italic mst italictrue 33 def mst ltsh itdefault 34 DeclareOption frenchmath mst frenchmathtrue mst italictrue 35 def mst ltsh itdefault 35 36 ah 37 newif ifmst endash mst endashtrue 38 DeclareOption endash mst endashtrue 39 DeclareOption noendash mst endashfalse 40 newif ifmst emdash 41 DeclareOption emdash mst emdashtrue mst endashfalse 42 hh 43 newif ifmst alldelims 44 edef mst Qtmp encodingdefault ifx mst oti mst tmp else mst alldelimstrue fi 45 DeclareOption alldelims mst alldelimstrue 46 DeclareOption nolessnomore mst alldelimsfalse 47 hh new with 1 2 48 newif ifmst nosmalldelims 49 DeclareOption nosmalldelims mst nosmalldelimstrue 50 hh 51 newif ifmst noplus 52 DeclareOption noplus mst noplustrue 53 newif ifmst nominus 54 DeclareOption nominus mst nominustrue 55 DeclareOption noplusnominus ExecuteOptions noplus nominus 56 hh 57 newif ifmst noparen 58 DeclareOption noparenthesis mst noparentrue 59 newif ifmst nopunct 60 DeclareOption nopunctuation mst nopuncttrue
21. case of necessity this is what option subdued does mathnormalbold a bold version of mathnormal Differs from mathbf when the italic option has been used or when use has been made of MTlet tershape 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 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 jn odot This should work for all 8bit encodings having these glyphs and also in Unicode MathEuler MathEulerBold math alphabets to access all the glyphs of the Euler font if option eulergreek or eulerdigits was passed to the package MathPSymbol math alphabet to access the Symbol font 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 Digamma Alpha Beta Epsilon Meta Eta Iota Kappa Mu Nu Omicron Rho Tau Chi no Digamma for Symbol Also an omicron control sequence is provided LGR Greek and var letters only the varsigma is available in this encoding so using for example varphi will load the previous default math font It might thus be suitable when recompilin
22. fam m ne symmtoperatorfont else fam f i 359 newcommand MTmathoperatorsdonotobeymathxx 46 mtletterfont Mathnormal Mathrm Mathbf Mathit Mathsf Mathtt mathnormalbold 360 def operator f ont mathgroup symmtoperatorfont 361 MTmathoperatorsobeymathxx In version 1 1 we add the possibility to mimick the standard behavior that is to have italic letters and upright digits Thanks to Tariq PERWEZ and Kevin KLEMENT who asked for such a feature 362 DeclareSymbolFont mtletterfont 363 mst enc mst fam mst ser mst ltsh We redefine the default normal rm bf it sf and tt alphabets but this will be done via renewcommand mathrm Mathrm etc and 1 15f the previous status of the math alpha bets is recorded for the sake of the subdued option We follow the standard TX behavior for mathbf which is to pick up the bold series of the roman font digits and operator names We will access if no option is passed for Greek the omicron via mathnormal But un fortunately the fourier package with the upright option does not have an upright omicron obtainable by simply typing mathnormal o So if fourier is loaded we use mathrm and not mathnormal 364 let mst alph omicron mathnormal 365 ifpackageloaded fourier ifsloped else let mst alph omicron mathrm fi 366 DeclareSymbolFontAlphabet Mathnormal mtletterfont 367 DeclareSymbolFontAlphabet Mathrm mtoperatorfont 368 ifmst nonorm
23. greek lsh loc mst greek ush loc will use 776 LGR font 4 777 else 778 ifmst selfGreeks 779 SetSymbolFont mtselfGreekfont 2 OT1 4 5 mst greek ush loc 780 typeout Capital Greek letters mst greek lsh loc mst greek ush loc 781 will use OT1 font 4 782 else 783 ifmst LGRgreek 784 SetSymbolFont mtlgrfontlower 2 LGR mst greekfont 5 mst greek lsh loc 785 SetSymbolFont mtlgrfontupper 2 LGR mstOgreekfont 5 mstOgreek ush loc 786 typeout Greek letters mst greek lsh loc mst greek ush loc will use 57 MTVersion 787 LGR font mst greekfont 788 else 789 ifmst selfGreek 790 SetSymbolFont mtselfGreekfont 2 0T1 mst greekfont 5 mst greek ush loc 791 typeout Capital Greek letters mst greek lsh loc mst greek ush loc 792 will use OT1 font mst greekfont 793 fi fi fi fi 794 mst f ont info on 795 796 G onlypreamble MTDeclareVersion 797 let MathastextDeclareVersion MTDeclareVersion This is a wrapper around TEX s mathversion here we have an optional argument allowing a quick and easy change of the text fonts additionally to the math fonts Present already in the initial version of the package January 2011 1 15 some modifications for the subdued option vs LGRgreek and for the math muskips after exists and forall 1 2 with the subdued option sets the math alphabets in the normal and bold math versions do not apply to operator names and non a
24. 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 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 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 itgreek upgreek both lowercase and uppercase are in the itdefault respec tively the updefault shape at the time of loading the package or at the time of a subsequent call to Mathastext or MathastextWillUse itGreek upGreek same as above but only for the uppercase letters So the default gives the classic TEX behavior when option italic was passed Each call to Mathastext or 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 avail
25. the Greek letters in the versions which will be declared next e MTgreekfont fontfamily optional command with a mandatory argument which specifies the font for Greek letters in all mathastext math versions declared afterwards via Mathastext or MTDeclareVersion Only effective with LGRgreek option 38The allowed version names are as for the ATEX DeclareMathVersion macro Do not use normal or bold this is already taken care of by the initial loading of the package or a later command Mathastext without any optional argument 391 do not especially recommend to use this in real life 40 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 itdefault of the time of loading the package 27 3 3 2 Commands usable everywhere e MTexistsskip math glue specifies the amount of skip or more generally glue to put after each 3 math symbol Indeed upright letters or digits for that matter often appear to be positioned a bit too close to the quantifier JB The package default is to add a imu skip this default is set to zero in the case of italic JB One can change the default with the following syntax MTexistsskip 2mu plus mu minus imu which if used in the preamble and followed with a Mathastext command or MTDeclareVersion will be recorded in the definition of this math version and subsequent ones One may also use the c
26. the text font or the Symbol font asterisk in math mode noendash the minus sign will be the from the text font not the en dash nohbar prevents mathastext from defining its own hbar nolessnomore besides amp mathastext treats also lt gt and Use this option to let it not do it This is the default in case of OT1 encoding further excluding options noexclam nopunctuation noplus nomi nus noplusnominus noequal noparenthesis nospecials 5 amp and nodigits alldelims true by default means that the characters excluded by noless nomore are treated Use this option in case of a mono width OT1 encoded font nosmalldelims this prevents mathastext 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 and if not disabled by the corresponding options these characters are always picked up from the text font symbolgreek symboldigits to let Greek letters digits use the Symbol font symbolre replaces Re and Im by the Symbol glyphs R 3 and defines a Dot Triangle command symbolmisc takes quite a few glyphs including logical arrows product and sum signs from Symbol They are listed gupra Doing renewcom
27. 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 imath macro and nohbar which prevents redefinition of the hbar macro And even then in some circumstances this will still not suffice for example the euler package puts the digits in the same font as the Latin letters in math mode but the subdued mathastext will pick them up in the same font as used in operator names and in the case of the euler package this is the main document font So even subdued mathastext 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 not extinguish package options euler greek symbolgreek or symbol But LGRgreek is receptive to it 2 4 Math versions ATEX has the concept of 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 mathastext 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 pr
28. typeout Latin letters in the normal resp bold math versions are now Ji 673 kk set up to use the fonts 674 mst encoding normal mst family normal mst series normal 675 mst boldvariant normal mst ltshape normal 676 ifmst LGRgreek typeout Greek letters mst greek lsh mst greek ush 677 will use LGR mst greekfont 678 fi 679 ifmst nodigits else typeout Other characters digits 680 and protect log like names will be J 681 typeset with the mst shape normal space shape 682 fi 683 fi 684 else optional argument then we rather do DeclareVersion 685 edef mst tmp 1 686 ifx mst tmp empty 687 Mathastext no infinite loop 688 else 689 MTDeclareVersion mst ltsh 1 690 mst enc mst fam mst ser mst opsh 691 fi 692 fi 693 694 Gonlypreamble Mathastext 695 let mathastext Mathastext MTDeclareVersion The MTDeclareVersion command is to be used in the preamble to declare a math version A more complicated variant would also specify a choice of series for the Euler and Symbol font anyhow Symbol only has the medium series and Euler has medium and bold so what is lacking is the possibility to create a version with a bold Euler There is already one such version the default bold one And there is always the possibility to add to the preamble SetSymbolFont mteulervm versionname U zeur bx n if one wants to have a math version with bold Euler characters For ve
29. 0 let Theta mst Theta 1651 let Iota mst Iota 1652 let Kappa mst Kappa 1653 let Lambda mst Lambda 1654 let Mu mst Mu 1655 let Nu mst Nu 1656 let Xi mst Xi 1657 let Omicron mst Omicron 1658 let Pi mst Pi 1659 let Rho mst Rho 1660 let Sigma mst Sigma 1661 let Tau mst Tau 1662 let Upsilon mst Upsilon 1663 let Phi mst Phi 79 1664 let Chi mst Chi 1665 let Psi mst Psi 1666 let Omega mst Omega 1667 1668 let alpha mst alpha 1669 let beta mst beta 1670 let gamma mst gamma 1671 let delta mst delta 1672 let epsilon mst epsilon 1673 let zeta mst zeta 1674 let eta mst eta 1675 let theta mst theta 1676 let iota mst iota 1677 let kappa mst kappa 1678 let lambda mst lambda 1679 let mu mst mu 1680 let nu mst nu 1681 let xi mst xi 1682 let omicron mst omicron 1683 let pi mst pi 1684 let rho mst rho 1685 let varsigma mst varsigma 1686 let sigma mst sigma 1687 let tau mst tau 1688 let upsilon mst upsilon 1689 let phi mst phi 1690 let chi mst chi 1691 let psi mst psi 1692 let omega mst omega 1693 let Digamma mst Digamma 1694 let digamma mst digamma 1695 1696 1697 DeclareMathSymbol mst Alpha mathalpha mtlgrfontupper 65 1698 DeclareMathSymbol mst Beta mathalpha mtlgrfontupper 66 1699 DeclareMathSymbol mst Gamma mathalpha mtlgrfontupper 71 1700 DeclareMathSymbol mst Delta mathalpha mtlgrfontupper 68 1701 DeclareM
30. 2 219921 g bf ab 5 1 q bf db aq 9 6 erf 1 zE Pb 1 Pat a bP with parameters a y 6 on ae ef 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 Let X Y be two functions of a variable a If they obey the differential system V Iyn d 2na aX Y X vX 1 X i7 j liae d 9 2na X aY Y 1 Y 1 Y da WA may then the quantity q agy satisfies as function of b a the Pyr differential equation with parameters a 8 7 6 ce v n 1 n2 Ln 2 2 OE il Notice that the Greek letters also changed according to the math version mathastext 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 2 2 Overview 2 2 1 Basic use The initial ideology of mathastext was to produce mathematical texts with a very uniform look not separating math from text as strongly as is usually done The first two are available with no need to load explicitely any package in the document via the combination cbfonts cbgreek complete amp babel and the LGR encoded txr font again no package loading is necessary is part of the files of the txfonstb package As soon as one tries out other fonts for text than the Computer Modern ones one r
31. 2 typeout Greek letters will use the PostScript Symbol font Use J 893 kk protect MathastextSymbolScale lt factor gt to scale the font 894 fi fi At long last we now change the font for the letters of the latin alphabet In version 1 1 Latin letters have their own font shape 1 2b uses mathcode x 8000 to insert the italic corrections after letters 895 def mst DeclareMathSymbol 1 2 3 4 896 DeclareMathSymbol 1 2 3 4 897 expandafter DeclareMathSymbol csname mst 1 endcsname 2 3 4 898 expandafter mst addtodo az 899 expandafter 1 csname mst 1 endcsname mst itcorr 900 mst DeclareMathSymbol a mathalpha mtletterfont a 901 mst DeclareMathSymbol b mathalpha mtletterfont b 902 mst DeclareMathSymbol c mathalpha mtletterfont c 903 mst DeclareMathSymbol d mathalpha mtletterfont d 904 mst DeclareMathSymbol e mathalpha mtletterfont e 905 mst DeclareMathSymbol f mathalpha mtletterfont f 906 mst DeclareMathSymbol g mathalpha mtletterfont g 907 mst DeclareMathSymbol h mathalpha mtletterfont h 908 mst DeclareMathSymbol i mathalpha mtletterfont i 909 mst DeclareMathSymbol j mathalpha mtletterfont j 910 mst DeclareMathSymbol k mathalpha mtletterfont k 911 mst DeclareMathSymbol 1 mathalpha mtletterfont 1 912 mst DeclareMathSymbol m mathalpha mtletterfont m 60 913 mst DeclareMathSymbol n
32. 22 823 824 825 826 827 828 829 830 831 832 47 833 834 835 836 837 Ah 838 839 840 hi 841 4 842 843 844 845 846 847 848 849 850 851 4 852 4 853 hh 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 renewcommand bfdefault mst boldvariant edef mst itdefault csname mst itdefault mst tmp endesname renewcommand itdefault mst itdefault edef mst rmdefault csname mst rmdefault mst tmp endesname renewcommand rmdefault mst rmdefault edef mst sfdefault csname mst sfdefault mst tmp endesname renewcommand sfdefault mst sfdefault edef mst ttdefault csname mst ttdefault mst tmp endesname renewcommand ttdefault mst ttdefault edef mst tmp 2 vi 15e muskips expandafter mst exists muskip csname mst exists skip mst tmp endesname relax expandafter mst forall muskip csname mst forall skip mst tmp endesname relax vi 2 muskip for cs prime expandafter mst prime muskip csname mst prime skip mst tmp endcesname relax vi 2b italic corrections except for italic slanted sic letters and of course except in the subdued normal and bold math versions edef mst tmpa csname mst ltshape mst tmp endesname edef mst tmpb csname mst shape mst tmp endesname MTicinmath for mst tmp it sl do ifx mst tmp mst tmpa MTnoicinmath fi ifmst frenchmath MTICinmath for mst tmp it sl do ifx mst tmp mst tmpb MTnoICinmath fi fi
33. 3 496 MTseries 4 497 MTshape 5 498 ifmst italic MTlettershape itdefault fi was missing in v 1 14 and prior 499 ifx empty 1 500 else 501 h we check if optional argument was this does not detect 502 def mst tmp 1 503 ifx empty mst tmp else MTlettershape 1 fi 504 fi 505 Mathastext 506 onlypreamble MTWillUse 507 let MathastextWillUse MTWillUse 508 let Mathastextwilluse MTWillUse The command Mathastext can be used anywhere in the preamble and any number of time the last one is the one that counts In version 1 1 we have two fonts they only differ in shape The mtletterfont is for letters and the mtoperatorfont for digits and log like operator names The default is that both are upright Starting with version 1 12 an optional argument makes Mathastext act as the declaration of a math version to be later used in the document Versions 1 15x brought some adaptations related to the subdued option 509 newcommand Mathastext 1 empty 510 ifx empty 1 no optional argument 511 mst update greeksh 512 edef mst encoding normal mst enc 513 edef mst family normal mst fam 514 edef mst series normal mst ser 515 edef mst shape normal mst opsh 516 edef mst ltshape normal mst ltsh 51 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 55
34. 5 556 557 558 559 560 561 562 563 564 565 edef mst itdefault normal itdefault edef mst rmdefaultGnormal 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 MTicinmath for mst tmp it sl do ifx mst tmp mst ltshape normal MTnoicinmath fi ifmst frenchmath MTICinmath for mst tmp it sl do ifx mst tmp mst shape normal MTnoICinmath fi fi ifmst subdued MTeasynonlettersdonotobeymathxx MTnonlettersdonotobeymathxx MTmathoperatorsdonotobeymathxx MTnoicinmath ifmst asterisk let mst doasterisk relax fi def mst exists skip normal Omu def mst forall skip normal Omu def mst prime skip normal Omu def mst exists skip bold Omu def mst forall skip bold 0mu def mst prime skip bold Omu else
35. 6 th 267 expandafter edef csname normal char 1 endcsname 268 noexpand mst safefork 2 noexpand 3 expandafter 269 noexpand csname mst orig normal char 1 endcsname 270 th 271 fi 272 begingroup make sure is active at mathastext loading time 273 catcode active 274 def x endgroup 275 def mst mathactivatet 1 H2H 3 h 1 guaranteed of cat 11 or 12 276 begingroup 43 newmcodes subdued 277 lccode 1 278 Iccode 1 1 279 lowercase endgroup 280 csname mst ifdone 1 endcsname 281 else 282 ifnum catcode 1 active 283 mst do activecase 1 2 3 284 careful as 2 is empty in the asterisk and 285 prime case 286 else 287 mathcode 1 8000 288 I use many times later string everywhere would be a pain 289 ifcat 1a def 2 3 else def 2 3 fi 290 fi 291 fi 292 expandafter let csname mst ifdone 1 endcsname iftrue 293 x 294 def mst addtodo nonletters 1 2 3 295 1 will be of cat 11 or 12 296 2 is empty for asterisk and right quote 297 expandafter let csname mst ifdone 1 endcsname iffalse 298 mst do nonletters expandafter the mst do nonletters 299 mst mathactivate 1 2 3 300 301 def mst addtodo easynonletters 1 2 1 is a one char control sequence 302 mst do easynonletters expandafter the mst do easynonletters mathcode 1 2 303 304 def mst addtodo az 1 2 3 305 expandafter let csnam
36. DeclareMathSymbol pi mathord mtpsymbol 70 1515 DeclareMathSymbol rho mathord mtpsymbol 72 1516 DeclareMathSymbol sigma mathord mtpsymbol 73 76 1517 DeclareMathSymbol tau mathord mtpsymbol 74 1518 DeclareMathSymbol upsilon mathord mtpsymbol 75 1519 DeclareMathSymbol phi mathord mtpsymbol 66 1520 DeclareMathSymbol chi mathord mtpsymbol 63 1521 DeclareMathSymbol psi mathord mtpsymbol 79 1522 DeclareMathSymbol omega mathord mtpsymbol 77 1523 let varepsilon epsilon 1524 DeclareMathSymbol vartheta mathord mtpsymbol 4A 1525 DeclareMathSymbol varpi mathord mtpsymbol 76 1526 let varrho rho 1527 DeclareMathSymbol varsigma mathord mtpsymbol 56 1528 DeclareMathSymbol varphi mathord mtpsymbol 6A 1529 DeclareMathSymbol partial mathord mtpsymbol B6 1530 DeclareMathSymbol wp mathord mtpsymbol C3 1531 fi fi fi 1532 hh 1533 ifmst LGRgreek internal names for subdued implementation 1 15c 1 15e 1534 let mst origAlpha Alpha 1535 let mst origBeta Beta 1536 let mst origGamma Gamma 1537 let mst origDelta Delta 1538 let mst origEpsilon Epsilon 1539 let mst origZeta Zeta 1540 let mst origEta Eta 1541 let mst origTheta Theta 1542 let mst origIota Iota 1543 let mst origKappa Kappa 1544 let mst origLambda Lambda 1545 let mst origMu Mu 1546 let mst origNu Nu 1547 let mst origXi Xi 1548 let mst origOm
37. Mathastext which will only change the font in math To use epigrafica for Greek in math mode one can use the package op tion LGRgreek and the command MTgreekfont epigrafica Mathastext Or usepackage epigrafica followed with usepackage LGRgreek mathastext 2 5 Extended scope of the math alphabets commands Ever since the initial version of the package some characters usually unaffected by the math alphabet commands mathbf mathtt mathsf are declared to be of variable family type in order for them to obey these commands for example the hash sign gives if input as mathbf mathastext especially in its beginnings wanted as many characters as possible to be picked up from the text font and to behave similarly to letters and digits So it was especially frustrating that mathematical characters such as or lt or could not be declared of variable family in addition to being picked up in the text font as this would for reasons of the inner workings of TEX not be compatible with the automatically inserted spaces around them A revolutionary novelty is introduced with version 1 2 of the package 1 the pre declared or user declared using the amsmath DeclareMathOperator or equivalent operator names obey the math alphabet commands 12 may typically give a too many math alphabets error message sometimes one needs to look in the sty file of the font package to figure out the font name i
38. The mathastezt package JEAN FRANGOIS BURNOL jibu at free dot fr Package version v1 2e 2013 01 10 Documentation generated from the source file with timestamp 10 01 2013 at 16 35 39 CET The mathastext 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 mathastext provides a simple mechanism in order to use more than one math as text font in the same document Contents Installation instructions and recent changes Op Exampleg CI p B Basic usd bans In math Glways load mathastext lasq pption LORgresH Bvoid OTT encoding Main options ua The italic option The defaultmathsizes option The subdued option ZY p 1 talic correction Za p 3 Greek lettera Z3 p 10 reek letters Unicode engines Z9 p 18 Compatibility issued ZID p ZI Package options and commands Bp 2 Miscellaneous ZA p 23 Command B3 p 29 Preamble only commandg ommands usable everywherd Body only commands Implementation p 8 1 Installation instructions and recent changes 1 1 Installation If you did not download thi
39. able in LGR or OT1 encoding and also the shapes will be local to the math version Finally version 1 15c of mathastext introduces new preamble only commands to change the shapes and even the font used for Greek letters in case of pack age options LGRgreek selfGreek They are MTitgreek MTupgreek MTit Greek MTupGreek these are used like the options and change only the shapes for the math versions which will be declared next in the preamble and MTgreek font name_of_font will tell the nert 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 2 9 Unicode engines mathastext has been made minimally unicode aware and can be used with X4T X or LualATpX but the user is strongly advised to look first at the mathspec package 18 which is a far more powerful package designed for unicode only for X4I X and to unicode math to use OpenType math fonts Of course mathastext 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 mathastext with either X4I X or
40. addtodo easynonletters mst varfam slash 1221 fi alldelims lt gt 1222 ifmst alldelims typeout alldelims string lt string gt setminus 1223 string backslash space string setminus space backslash 1224 string vert space string mid space string space and string 1225 ifmst nosmalldelims Dec 18 2012 We then want let backslash mst varfam backslash to do nothing when the backslash is used as a delimiter So here the original definition from latex 1tx is copied 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 backslash the delcode 1226 DeclareMathDelimiter mst varfam backslash 1227 mathalpha symbols 6E largesymbols 0F 1228 else 1229 DeclareMathDelimiter lt mathopen mst font tbu 3C largesymbols 0A 1230 DeclareMathDelimiter gt mathclose mst font tbu 3E largesymbols 0B There is no backslash in the Symbol font hence mtoperatorfont here 1231 expandafter DeclareMathDelimiter backslashchar 1232 mathord mtoperatorfont 5C largesymbols 0F 1233 DeclareMathDelimiter backslash 1234 mathord mtoperatorfont 5C largesymbols 0F 1235 DeclareMathDelimiter mst varfam backslash 1236 mathalpha mtoperatorfont 5C H largesymbols OF 1237 fi 1238 DeclareMathSymbol lt mathrel mst font tbu 3C 1239 Dec
41. albold else 369 DeclareMathAlphabet mathnormalbold mst enc mst fam mst bold mst ltsh 370 fi ifmst defaultbf else 371 DeclareMathAlphabet Mathbf mst enc mst fam mst bold mst opsh 372 fi ifmst defaultit else 373 DeclareMathAlphabet Mathit mst enc mst fam mst ser itdefault 374 fi ifmst defaultsf else 375 DeclareMathAlphabet Mathsf mst enc sfdefault mst ser mst opsh 376 fi ifmst defaulttt else 377 DeclareMathAlphabet Mathtt mst enc ttdefault mst ser mst opsh 378 fi 379 let mst original normal mathnormal 380 let mst original rm mathrm 381 let mst original bf mathbf 382 let mst original it mathit 383 let mst original sf mathsf 384 let mst original tt mathtt 385 def mst restorealphabets for subdued 386 let mathnormal mst original normal 387 let mathrm mst original rm 388 let mathbf mst original bf 389 let mathit mst original it 390 let mathsf mst original sf 391 let mathtt mst original tt 392 def mst setalphabets 393 ifmst defaultnormal else renewcommand mathnormal Mathnormal fi 394 ifmst defaultrm else renewcommand mathrm Mathrm fi 47 LGRgreek selfGreek mtlgrfontupper mtlgrfontlower mtselfGreekfont 395 ifmst defaultbf else renewcommand mathbf Mathbf fi 396 ifmst defaultit else renewcommand mathit Mathit fi 397 ifmst defaultsf else renewcommand mathsf Mathsf fi 398 ifmst defaulttt else renewcommand mat
42. and MathEuler Bold alphabet commands the eulervm package does this only for the bold font mtpsymbol In case we need the Symbol font we declare it here The macro psy scale will be used to scale MathPSymbol the font see at the very end of this file 437 ifmst needsymbol typeout will use Symbol font command string MTSymbolScale 438 def psy scale 1 439 DeclareSymbolFont mtpsymbol U psy m n 440 DeclareSymbolFontAlphabet MathPSymbol mtpsymbol 441 AtBeginDocument 442 DeclareFontFamily U psy 443 DeclareFontShape U psy m n lt gt s psy scale psyr 444 445 fi 446 newcommand MTSymbolScale 1 edef psy scale 1 447 let MathastextSymbolScale MTSymbolScale I did not choose for name MathSymbol as this may be defined somewhere for another thing There is no bold for the postscript Symbol font distributed with the TEX 2e psnffs core package pmvec Definition of a poor man version of the vec accent 49 fouriervec MTencoding MTfamily MTseries MTshape MTboldvariant MTlettershape MTitgreek MTupgreek MTitGreek MTupGreek MTgreekfont 448 DeclareRobustCommand pmvec 1 mathord stackrel raisebox 5ex 449 tiny boldmath mathord rightarrow 1 The glyph is taken from the Fourier font of Michel BOVANI Note oct 2012 I should not allocate an entire symbol font just for one glyph But I have not given any serious thought to what one can do to simu
43. arnt since that TEX does not look at the mathcode inside a csname endcsname Example mathcode x 8000 begingroup catcode x active global everymath defx Hello endgroup def foox World x csname foox endcsname yA We need nevertheless to inactivate the for the following reason Imagine someone did catcode active def string or another definition which would not lead to a tragedy in a csname endcsname Then the is active and the re definition done by mathastext will not be compatible with loading eu2lmtt fd for the first time from math mode as this re definition can not be expanded inside a csname endcsname 2012 12 28 to be on the safe side I add also and and do it without discriminating between engines 1189 typeout adding string string and string to string nfss catcodes 1190 g addto macro nfss catcodes 1191 makeother 1192 makeother 1193 makeother 1194 1195 expandafter mst addtodo nonletters string mathrel mst varfam equal 1196 fi lbrack and rbrack are defined in latex 1tx by def lbrack def rbrack so this fits well with what we do here lparen and rparen are similarly defined in mathtools On the other hand in latex 1tx with and are defined in math mode in terms of the control sequences lbrace and rbrace 1197 ifmst noparen else typeout parentheses string string string string and slash s
44. ase e sets the font which will be used in math mode for letters including math operator names digits punctuations and other ascii symbols e sets the font of the document text if another version name is additionally passed as optional argument it uses instead the corresponding font for text e resets the family rm sf tt defaults to their values as registered at the time of definition of the version e see section 27 resets the user defined extra spaces after the symbols 3 V and before the derivative to the values as decided in the preamble on a per version basis e see section 28 checks if the used font is upright and then activates the automatic insertion of italic corrections after each letter in math mode e see section ZA makes the math operator names as well as the easy non letter characters and the asterisk obey the math alphabets e does some additional set up for Greek letters when the LGRgreek option was used The scope is limited to the current ATX environment or group It is sometimes not compatible with mathastext to load a font package after it as the font package may contain instructions which will 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 mathastext if it is loaded after it F But one can use instead renewcommand rmdefault epigrafica followed with Mathastext or also MTfamily epigrafica
45. athAccent mathring mathalpha mtoperatorfont 23 1815 ifx mst lyi mst tmp enc LY1 encoding 1816 DeclareMathAccent dot mathalpha mtoperatorfont 5 1817 else 1818 ifx mst oti mst tmp enc else 1819 typeout mathastext math accents have been assumed to be J 1820 xk as in OT1 encoding 1821 fi 1822 fi 1823 fi fi I took the code for Huge and HUGE from the moresize package of Christian CORNELSSEN 1824 ifmst defaultsizes else 1825 providecommand xxxpt 29 86 1826 providecommand xxxvipt 35 83 1827 ifmst twelve 1828 def Huge setfontsize Huge xxxpt 36 1829 def HUGE setfontsize HUGE Oxxxvipt 43 1830 typeout protect Huge space and protect HUGE space have been re defined 1831 else 1832 def HUGE setfontsize HUGE Oxxxpt 36 1833 typeout protect HUGE space has been re defined 1834 fi I choose rather big subscripts 1835 def defaultscriptratio 8333 1836 def defaultscriptscriptratio 7 1837 DeclareMathSizes 9 9 7 5 1838 DeclareMathSizes xpt xpt 8 6 1839 DeclareMathSizes xipt G xipt 9 7 1840 DeclareMathSizes xiipt xiipt 10 8 1841 DeclareMathSizes xivpt xivpt xiipt 10 1842 DeclareMathSizes xviipt xviipt xivpt xiipt 1843 DeclareMathSizes xxpt Oxxpt xviipt xivpt 83 1844 DeclareMathSizes xxvpt xxvpt xxpt xviipt 1845 DeclareMathSizes xxxpt xxxpt xxvpt
46. athSymbol mst Epsilon mathalpha mtlgrfontupper 69 1702 DeclareMathSymbol mst Zeta mathalpha mtlgrfontupper 90 1703 DeclareMathSymbol mst Eta mathalpha mtlgrfontupper 72 1704 DeclareMathSymbol mst Theta mathalpha mtlgrfontupper 74 1705 DeclareMathSymbol mst Iota mathalpha mtlgrfontupper 73 1706 DeclareMathSymbol mst Kappa mathalpha mtlgrfontupper 75 1707 DeclareMathSymbol mst Lambda mathalpha mtlgrfontupper 76 1708 DeclareMathSymbol mst Mu mathalpha mtlgrfontupper 77 1709 DeclareMathSymbol mst Nu mathalpha mtlgrfontupper 78 1710 DeclareMathSymbol mst Xi mathalpha mtlgrfontupper 88 1711 DeclareMathSymbol mst Omicron mathalpha mtlgrfontupper 79 1712 DeclareMathSymbol mst Pi mathalpha mtlgrfontupper 80 80 Vinodot jnodot 1713 DeclareMathSymbol mst Rho mathalpha mtlgrfontupper 82 1714 DeclareMathSymbol mst Sigma mathalpha mtlgrfontupper 83 1715 DeclareMathSymbol mst Tau mathalpha mtlgrfontupper 84 1716 DeclareMathSymbol mst Upsilon mathalpha mtlgrfontupper 85 1717 DeclareMathSymbol mst Phi mathalpha mtlgrfontupper 70 1718 DeclareMathSymbol mst Chi mathalpha mtlgrfontupper 81 1719 DeclareMathSymbol mst Psi mathalpha mtlgrfontupper 89 1720 DeclareMathSymbol mst Omega mathalpha mtlgrfontupper 87 1721 1722 DeclareMathSymbol mst alpha mathalpha mtlgrfontlower 97 1723 DeclareMathSymbol mst beta mathalpha
47. athrel mtpsymbol 206 1377 DeclareMathSymbol sim mathrel mtpsymbol 126 1378 let cong undef ined 1379 DeclareMathSymbol cong mathrel mtpsymbol 64 1380 DeclareMathSymbol perp mathrel mtpsymbol 94 1381 DeclareMathSymbol equiv mathrel mtpsymbol 186 1382 let notin undef ined 1383 DeclareMathSymbol notin mathrel mtpsymbol 207 1384 DeclareMathDelimiter rangle 1385 mathclose mtpsymbol 241 largesymbols 0B 1386 DeclareMathDelimiter langle 1387 mathopen mtpsymbol 225 largesymbols OA 1388 fi I like the Re and Im from Symbol so I overwrite the CM ones 1389 ifmst symbolre typeout symbolre string Re space and string Im space from Sym bol font 1390 DeclareMathSymbol Re mathord mtpsymbol C2 1391 DeclareMathSymbol Im mathord mtpsymbol C1 1392 DeclareMathSymbol DotTriangle mathord mtpsymbol 92 1393 fi LGRgreek gt selfGreek gt eulergreek gt symbolgreek 1 11 I correct some bugs on how eulergreek and symbolgreek interacted 1 12b I introduced another very stupid bug regarding uppercase Greek in 1 1 This is corrected here All this business of checking for digamma was truly stupid as some package 73 might well have defined the font for Greek without having defined digamma I don t know what crossed my dumb mind when 1 committed this insane code and started redefining uppercase Greek and it is even worse than that as I was redefining not o
48. bdued mechanism on the basis of the legacy code of mathastext The only way is to rewrite entirely the package to query all mathcodes of things it changes in order to be able to revert these changes and one would have to do even more hacking for mathversion normal and not only MIversion normal to work 1 15f and also I take this opportunity to do the subdued math alphabets things in a much much easier way see below 315 ifmst subdued 316 def mst reserved 1 getanddef ine fonts symletters 2 3 nil 317 def mst normalmv letter 2 318 expandafter mst reserved mv normal nil 319 def mst reserved 1 getanddef ine fonts symletters 2 3 nil 320 def mst boldmv letter 2 321 expandafter mst reserved mv bold nil 322 def mst reserved 1 getanddef ine fonts symoperators 2 3 nil 323 def mst normalmv operator 2 324 expandafter mst reserved mv normal nil 325 def mst reserved 1 getanddef ine fonts symoperators 2 3 nil 326 def mst boldmv operator 2 327 expandafter mst reserved mv bold nil 328 hh 329 edef mst tmp encodingdefault 330 def mst reserved 1 2 3 4 gdef mst debut 1 gdef mst reste 2 3 4 331 begingroup escapechar m ne 332 xdef mst funnyoti expandafter string csname 0T1 endcsname 333 expandafter expandafter expandafter 334 mst reserved expandafter string mst normalmv operator 335 endgroup 336 6 ifx mst debut mst funnyoti ifx mst tmp mst oti def mst tmp T1 fi fi 337 e
49. cal to the group or environment where it was issued e MTICinmath MTnoICinmath these commands set up the italic corrections only for the uppercase letters Using MTICinmath de activates the added italic corrections for uppercase letters in the arguments of all the math al phabet commands e MTicalsoinmathxx this command de activates the de activation of the italic corrections inside the arguments to the math alphabet commands apart from mathnormal It can be issued in as well as outside of math mode To cancel its effect either enclose it in a group or environment or re issue MTicinmath after it 3 3 3 Body only commands e MTversion nametezt namemath in the absence of the optional argu ment changes simultaneously the text and the math fonts to be the fonts cor responding to the version namemath If there is an optional argument then the text fonts will use nametezt and the math mode will use namemath To change only the math fonts one may use the ATFX command mathver sion However this is not recommended as mathastext does quite a lot of additional configuration when invoked with MTversion Each invocation of MTversion checks the chosen shape of letters in math mode and if it is not italic or slanted it activates the automatic insertion of italic corrections in math mode for better positioning of subscripts See the discussion in the section 28 With the frenchmath option the package checks separately whethe
50. ce and 994 ifmst symbolmisc 995 def mst bin ast 996 mathbin mathchoice raisebox 1 height 997 the textfont symmtpsymbol char42 998 raisebox 1 height 999 the textfont symmtpsymbol char42 1000 raisebox 1 height 1001 the scriptfont symmtpsymbol char42 1002 raisebox 1 height 1003 the scriptscriptfont symmtpsymbol char42 1004 else 1005 def mst bin ast 1006 mathbin mathchoice raisebox mst lowerast 1007 the textfont symmtoperatorfont char42 1008 raisebox mst lowerast 1009 the textfont symmtoperatorfont char42 1010 raisebox mst lowerast 1011 the scriptfont symmtoperatorfont char42 1012 raisebox mst lowerast 1013 the scriptscriptfont symmtoperatorfont char42 1014 fi 1015 def mst varfam ast ifnum fam mOne mst bin ast else 1016 mathbin mathchoice raisebox mst lowerast 1017 the textfont fam char42 1018 raisebox mst lowerast 1019 the textfont fam char42 1020 raisebox mst lowerast 1021 the scriptfont fam char42 1022 raisebox mst lowerast 1023 the scriptscriptfont fam char42 fi 1024 let mst doasterisk mst doasterisk 1025 DeclareRobustCommand mst ast mst bin ast 1026 newcommand MTlowerast 1 def mst lowerast 1 1027 MTlowerast 3 height 1028 mst do easynonletters expandafter the mst do easynonletters 1029 expandafter def csname mst ast endcsname mst varfam ast 1030 fi 2011 I renounced to
51. def mst normalmv operator expandafter noexpand csname 45 mtoperatorfont operator font MTmathoperators obeymathxx MTmathoperators donot obeymathxx 338 mst tmp mst reste endcsname 339 begingroup escapechar m ne 340 expandafter expandafter expandafter 341 mst reserved expandafter string mst boldmv operator 342 endgroup 343 ifx mst debut mst funnyoti ifx mst tmp mst oti def mst tmp T1 fi fi 344 edef mst boldmv operator expandafter noexpand csname 345 mst tmp mst reste endcsname 346 AtEndOfPackagef 347 typeout entering subdued mode 348 expandafter SetSymbolFont expandafter mv normal mst normalmv letter symmtletterfont 349 expandafter SetSymbolFont expandafter mv bold mst boldmv letter symmtletterfont 350 expandafter SetSymbolFont expandafter mv normal mst normalmv operator symmtoperatorfon 351 expandafter SetSymbolFont expandafter mv bold mst boldmv operator symmtoperatorfont 352 typeout done 353 354 fi fin de ce ifmst subdued In the short lived 1 15e I was doing the following for alphabets 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 Onil mstOreservedc 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 expa
52. e mst ifdone 1 endcsname iffalse 306 6 mst do az expandafter the mst do az mst mathactivate 1 2 3 307 308 def mst addtodo AZ 1 2 3 309 expandafter let csname mst ifdone 1 endcsname iffalse 310 mst do AZ expandafter the mst do AZ mst mathactivate 1l 2 3 311 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 DeclareMathOperator declaration Furthermore it hard codes the font family 0 as being the one to be used Moreover just putting the concerned signs inside braces emulates enough the behavior although the tick will give a prime 312 ifpackageloaded amsmath 313 let newmcodes relax brutal but bye bye and don t come back 314 1 15 The subdued code was initiated in May 2011 I returned to mathastext on Sep 24 2012 and decided to complete what I had started then but in the mean time I had forgotten almost all of the little I knew about ATEX macro programming The point was to extract the data about how are letters and operators in the normal and bold versions through obtaining the math families of a and 1 respectively Due to the 44 reassignements done for characters by mathastext I also had decided in 2011 that the OT1 encoding if detected should be replaced by T1 1 but the euler package for example assigns the digits to the letters symbol font 1 15d Oct 13 2012
53. ealizes how extremely thin are the default TEX fonts for mathematics they defi nitely do not fit well visually with the majority of text fonts With mathastext one can get one s simple 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 usepackage T1 fontenc usepackage times usepackage italic mathastext All letters digits and punctuation signs inside math mode will then be typeset in Times 4 The exact list of characters concerned by mathastext is a subset of the basic ASCII set abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 Peres t QO 8R amp lt gt and As one can see this is a very limited list some possibilities are offered by mathastext for Greek letters and will be described later The text characters and are not used and the asterisk is done optionally e the derivative sign is left to its default as the text font glyph is not asa rule a satisfying alternative e for the minus sign mathastext uses the endash character if available and not the hyphen character e the option asterisk is necessary for mathastext to replace the binary math operator x and the equivalent control sequence ast with a version which uses the text asterisk suitably lowered and with the correct spaces around it as binar
54. eby make it pos sible to de activate this feature with the macro MTeasynonlettersdonotobeymathxx Besides I have absolutely no idea why I had different looking code depending on the engine XeTeX LuaTeX or default Removed 1291 ifmst nospecials else typeout string space string mathdollar space string space st 1292 count255 symmtoperatorfont 1293 multiply count255 by 256 1294 advance count255 by 35 1295 mathcode count255 1296 advance count255 by 1 1297 mathchardef mathdollar count255 1298 advance count255 by 1 1299 mathcode count255 1300 advance count255 by 1 1301 mathcode amp count255 1302 count255 symmtoperatorfont 1303 multiply count255 by 256 1304 advance count255 by 28707 7023 1305 mathchardef mst varfam mathhash count255 1306 advance count255 by 1 1307 mathchardef mst varfam mathdollar count255 1308 advance count255 by 1 1309 mathchardef mst varfam mathpercent count255 1310 advance count255 by 1 1311 mathchardef mst varfam mathampersand count255 1312 mst do easynonletters expandafter the mst do easynonletters 1313 mathcode mst varfam mathhash 1314 let mathdollar mst varfam mathdollar 1315 mathcode mst varfam mathpercent 1316 mathcode amp mst varfam mathampersand 1317 fi 71 symbolmisc prod sum We construct with some effort some long arrows from the Symbol glyphs of almost the same lengths as the standard ones B
55. eclareMathSymbol omega mathalpha mteulervm 21 1487 DeclareMathSymbol varepsilon mathalpha mteulervm 22 1488 DeclareMathSymbol vartheta mathalpha mteulervm 23 1489 DeclareMathSymbol varpi mathalpha mteulervm 24 1490 let varrho rho 1491 let varsigma sigma 1492 DeclareMathSymbol varphi mathalpha mteulervm 27 1493 DeclareMathSymbol partial mathalpha mteulervm 40 1494 DeclareMathSymbol wp mathalpha mteulervm 7D 1495 DeclareMathSymbol el1 mathalpha mteulervm 60 1496 else 1497 ifmst symbolgreek 1498 DeclareMathSymbol alpha mathord mtpsymbol 61 1499 DeclareMathSymbol beta mathord mtpsymbol 62 1500 DeclareMathSymbol gamma mathord mtpsymbol 67 1501 DeclareMathSymbol delta mathord mtpsymbol 64 1502 DeclareMathSymbol epsilon mathord mtpsymbol 65 1503 DeclareMathSymbol zeta mathord mtpsymbol 7A 1504 DeclareMathSymbol eta mathord mtpsymbol 68 1505 DeclareMathSymbol theta mathord mtpsymbol 71 1506 DeclareMathSymbol iota mathord mtpsymbol 69 1507 DeclareMathSymbol kappa mathord mtpsymbol 6B 1508 DeclareMathSymbol lambda mathord mtpsymbol 6C 1509 DeclareMathSymbol mu mathord mtpsymbol 6D 1510 DeclareMathSymbol nu mathord mtpsymbol 6E 1511 DeclareMathSymbol xi mathord mtpsymbol 78 1512 let omicron undef ined 1513 DeclareMathSymbol omicron mathord mtpsymbol 6F 1514
56. ed by a 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 not recommended as mathastext 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 I include here two examples which compiled successfully with X4IFX and Lual TEX the first one on a Linux machine the second one on a Mac OS X machine running latex in a temporary repertory on a copy of the file mathastext dtx will extract extended versions of these examples as test files 19 documentclass article usepackage hscale 0 8 geometry usepackage multicol usepackage no math fontspec usepackage 1modern 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 T1i ptm m 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
57. efaultsum will refer to the prod and 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 prod and sum as re defined by the package 3 4 Complete list of options e basic only mathastextify letters and digits e subdued do not change the default fonts or the math alphabets in math mode for the normal and bold math versions turn on the mathastext ification only after an explicit MTversion or mathastextversion command activating an additional math version as declared in the preamble With option subdued each MTversion normal or MIversion bold does MTmathoperators donotobeymathxx and MTnonlettersdonotobeymathxx e italic the letters default to italic shape in math mode e 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 option asterisk is also required to treat the Recall from section that the asterisk in math mode also when using the control sequence ast appears then to TEX to be a composite object 31 endash emdash use the text font en dash or even the em dash but this seems crazy for the minus sign rather than endash option is default for the package asterisk use
58. ense It is thus not necessary to use them to activate the package basic functionalities loading mathastext is enough e Mathastext or mathastext reinitializes mathastext according to the current defaults of encoding family series and shape It can also be preceded optionally by one or more of MTencod ing enc MTfamily fam MTseries ser MTshape sh and new with version 1 1 MTlettershape sh For example valid values are respectively T1 phv m n and it this is the Helvetica font in Tl encoding regular medium series upright shape and the letters will be in italic shape Once used their effect applies to all succeeding calls to Mathastext and can only be undone by using them again 30 updates also the font and shapes for the Greek letters LGRgreek option and the skips to be inserted after the symbols V and 3 see infra 37 these commands exist also with long names Mathastextencoding etc The same applies to the other commands mentioned in this section 26 math versions starting with version 1 12 Mathastext accepts an optional argument version_name which will serve as a name to designate the corresponding math version without optional argument Mathastext redefines the default normal and bold versions This ar gument being optional must be enclosed within square brackets e MTWill1Use Kltsh enc fam ser sh tells mathastext to use the font with
59. eously active this is made by babel at begin document and mathematically active done by mathtools in the preamble The interaction gives an infinite loop Such a situation will be cured by mathastext even loaded before mathtools if use is made of MTnonlettersobeymathxx At each math formula mathastext will detect that Babel has activated the colon and will cancel the mathematical activation the precise definition done by mathtools was already lost at begin document due to overwriting by babel but the fact that the character was mathematically active remained true So far I have briefly described the problem of document active characters see the test file testmathastextalphabets tex for more explanations and illustrations and the commented source code of the package Pure mathematical activation revealed an incompatibility of another type with amsmath To fix it mathastext now replaces an inner macro of amsmath resetMathstrut with its own version Always load amsmath before mathastext Actually this last commandment was already made necessary by the use of the text endash to represent the minus sign in math mode and especially for Unicode engines some aspects of the DeclareMathOperator macro from amsmath Important As is mentioned in the section Zal with the non letters obey math alphabets mechanism characters such as or now represent two tokens and this will utterly confuse TEX if some p
60. es fi and reveals use the zoom of your viewer that only the vertical placement was affected not the horizontal placement We learn in Appendix G of the TEXbook that the italic correction is used for the horizontal shift of the superscript with respect to the position of the subscript bie or going back now to the the standard math italics f In the next paragraphs we use f for more accurate comparison of the positioning of the sub and superscript If we try something like this _i7i we obtain fa Our overlapping game with rlap f_i i _i7i gives fi We discover that the effect of the ex plicit italic correction has mainly been to translate the subscript horizontally to be positioned exactly below the superscript We most probably do not want this to happen for our indices and exponents in math mode So perhaps we can rejoice in how astute TEX has been in judiciously using the italic correction data and there seems to be no need into fiddling with this algorithm which seems to work well even when applied to a text italic font Actually we may even be of the opinion that the text italic version ff is a bit better looking than the true math italic ff But wait mathastext was initially developed to easily use in math mode the document text font not in its italic variant but as is so usually upright And upright TEX fonts may also have italic correction data And what I just said about the shift of the superscript with re
61. et commands are al ways created as they are SymbolFontAlphabets 124 newif ifmst defaultnormal 125 DeclareOption defaultnormal mst defaultnormaltrue 126 newif ifmst defaultrm 127 DeclareOption defaultrm mst defaultrmtrue 128 newif ifmst defaultbf 129 DeclareOption defaultbf mst defaultbftrue 37 exists mst exists skip forall mst forall skip prime mst prime skip active math prime MTnormalprime 130 newif ifmst defaultit 131 DeclareOption defaultit mst defaultittrue 132 newif ifmst defaultsf 133 DeclareOption defaultsf mst defaultsftrue 134 newif ifmst defaulttt 135 DeclareOption defaulttt mst defaulttttrue 136 newif ifmst nonormalbold 137 DeclareOption defaultalphabets ExecuteOptions defaultnormal defaultrm 138 defaultbf defaultit defaultsf defaulttt mst nonormalboldtrue mathastext considers the default script and especially scriptscript sizes to be far too small and it will modify them An option maintains the default 139 newif ifmst defaultsizes 140 DeclareOption defaultmathsizes mst defaultsizestrue 141 newif ifmst twelve 142 DeclareOption 12pt mst twelvetrue 143 newif ifmst fouriervec 144 DeclareOption fouriervec mst fouriervectrue 1 15 the subdued option 145 newif ifmst subdued 146 DeclareOption subdued mst subduedtrue 147 DeclareOption PackageWarningNoLine mathastext Unknown option CurrentOption 148 ProcessOption
62. g already written IATFX sources to add to the preamble let varphi phi let varepsilon epsilon etc in case only the variant form of the letter was used in the documents 30 e Miscelleneous mathematical symbols from the postscript Symbol font are made available or replaced by option symbolmisc 2 They are prod TI sum implies gt impliedby iff shortiff to gt longto mapsto gt longmapsto gt aleph XN inftypsy co empty set surd nabla V angle Z forall V exists 4 neg club suit amp diamondsuit heartsuit Vv spadesuit 4 smallint wedge Vee v cap N cup U bullet e div otimes oplus pm ast times x proptopsy mid leq lt geq approx supset gt sub set C supseteq D subseteg C Vin sim cong perp L equiv notin langle rangle And a DotTriangle is made available by option symbolre which overwrites Re and Im R 3 The inftypsy and proptopsy have these names to leave up to the user the choice to replace or no the original larger infty oo and propto x Regarding the prod and sum commands they will use the Symbol glyphs IIX in inline math and in display math the Computer Modern ones or whatever is set up by other packages ID The package provides prodpsy and sumpsy if one really wants in all situa tions the Symbol glyphs one can do let prod prodpsy and let sum sumpsy Also defaultprod and d
63. htt Mathtt fi 399 ifmst subdued else mst setalphabets fi 1 14b We can not move the DeclareSymbolFont to the Mathastext macro because it resets the font family in all math versions and some could have been defined by the user with previous calls to Mathastext So we have to have them here The problem is that at this stage it is impossible to know if we really need in the case of LGRgreek two separate shapes for upper and lowercase and in the case of selfGreek a shape distinct from the one used in mtoperatorfont So I opted in the end for declaring possibly one too many font To achieve more economy the only way would be to keep cumulative track of all previously declared math versions and to redeclare appropriately the LGR or self greek fonts at each call to Mathastext with no optional argument a bit painful and as I am possibly the sole user in the world of this possibility of multiple math versions with this package Also the advantage to systematically allocate a font for the selfGreek option is that we can force the use of the OT1 encoding First we establish the cumulative effect of the greek related options 1 15c introduces some possibilities to change the shapes of Greek letters in each math versions and even the Greek font in LGR encoding The commands MTitgreek etc will be used in between calls to Mathastext and re adjust the shapes And the command MTgreekfont changes the Greek font family 400 def mst update g
64. icron Omicron 1549 let mst origPi Pi 1550 let mst origRho Rho 1551 let mst origSigma Sigma 1552 let mst origTau Tau 1553 let mst origUpsilon Upsilon 1554 let mst origPhi Phi 1555 let mst origChi Chi 1556 let mst origPsi Psi 1557 let mst origOmega Omega 1558 1559 let mst origalpha alpha 1560 let mst origbeta beta 1561 let mst origgamma gamma 1562 let mst origdelta delta 1563 let mst origepsilon epsilon 1564 let mst origzeta zeta 1565 let mst origeta eta 77 1566 let mst origtheta theta 1567 let mst origiota iota 1568 let mst origkappa kappa 1569 let mst origlambda lambda 1570 let mst origmu mu 1571 let mst orignu nu 1572 let mst origxi xi 1573 let mst origomicron omicron 1574 let mst origpi pi 1575 let mst origrho rho 1576 let mst origvarsigma varsigma 1577 let mst origsigma sigma 1578 let mst origtau tau 1579 let mst origupsilon upsilon 1580 let mst origphi phi 1581 let mst origchi chi 1582 let mst origpsi psi 1583 let mst origomega omega 1584 let mst origDigamma Digamma 1585 let mst origdigamma digamma 1586 1587 def mst restoregreek 1588 let Alpha mst origAlpha 1589 let Beta mst origBeta 1590 let Gamma mst origGamma 1591 let Delta mst origDelta 1592 let Epsilon mst origEpsilon 1593 let Zeta mst origZeta 1594 let Eta mst origEta 1595 let Theta mst origTheta 1596 let Iota mst origIota 1597 let Kappa mst origKappa 1598 let
65. ing 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 mathastext manages these things Examples mathbf lt a b gt gives lt a b gt mathbf left lt a b right gt gives a b mathbf mathopen lt a b mathclose gt gives lt a b gt The TEX standard behavior for mathbf mathopen lt a b mathclose gt is lt a b gt tthis last example uses the mathnormalbold additional alphabet defined by mathastext 12 2 6 Italic corrections With the italic option the letters in math will be generally in italic shape and normally upright in operator names For the built in placement routines of TEX in math mode to work as well as they usually do the characters from the math italic font obviously should have their bounding boxes wide enough for the glyphs not to collide with other symbols A letter from a text italic font such as f extends way out of its declared bounding box let us compare the bounding boxes for the letter f in the math italic font to the one from the text italic font fl vs ff This could make us think that attempting to use in math a text italic font will lead to disaster Well surprisingly the situation is not that bad Sure f x is wider with the standard math italic f x 21 31474pt than it is with the text italic font used in math F z 19 74986pt but we should be surprised that our text
66. inus mathalpha mst font tbu 2D 1139 fi fi 1140 ifmst abort 1141 DeclareMathSymbol mathbin mst font tbu 2D 1142 DeclareMathSymbol mst varfam minus mathalpha mst font tbu 2D 1143 fi 1144 expandaf ter mst addtodo nonletters string mathbin mst varfam minus 1145 fi hbar 2011 01 31 1 1 I decide to settle the question of the hbar First the ATEX definition mst ltbar 1146 def hbar mathchar 26 mkern 9muh original definition from latex 1tx 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 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 lem 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 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 1147 66 Relbar 1148 def mst mathrlap mathpalette mst mathrlapinternal 1149 def mst mathrlapinternal 1 2 rlap mathsurround 0pt 1 2 1150 def do the hbarstuff edef mst
67. it from doing so each alphabet also has its own disabling option 3 2 Miscellaneous 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 Sho command is provided to revert it but its scope is limited to the current environment or group 23 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 amsmath the behavior of the DeclareMathOperator command of amsmath is hbar slightly modified by mathastext This command initially allows crazy things like DeclareMathOperator 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 char acter 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 crazy is used with a Unicode engine but there are now some spacings around the punctuation characters To avoid this use also with TEX DeclareMathOperator crazy m ch in tr u c Note though that the quote will be ty
68. italic f did not end up even closer to the opening parenthesis Why is it so The explanation is that T X uses in such a situation the italic correction for the letter f The italic correction also exists and is used for the math italic font it was inserted in without us having to ask anything Its value is 1 17865pt for the math italic f and 1 8919pt for the text italic 24 With the italic corrections included our bounding boxes are indeed more alike f vs f Without the italic corrections it is fl vs f I said that f included the italic correction automatically but if we tell TFX to use the text italic in math and typeset the alphabet we obtain something exactly identical to typing the letters in text hence without any italic correction abcdefghijklmnopqrstuvwxyz text italic in text abcdefghijklmnopqrstuvwxryz text italic in math abcde f ghijklmnopgqr stuvwxyz math italic in math abcde fghijklmnopgarstuvwxyz math italic in text Where are our italic corrections gone the last line was done with use font OML 1mm m it and confirms that italic corrections have been used for the math italic in math Turning to the TEXbook and its Appendix G we learn that in such circum stances for the italic corrections to be put in from the font one of its parameters the interword space aka fontdimen2 should be zero It is indeed zero for the math italic font not for the text italic It is pos
69. l specific After having thought hard about this I see no general solution except patching all macros such as ref in an im itation of what Babel does So the final decision is to not do anything when the character is catcode active except it it seems that Babel is behind the scenes Incidently Babel and TikZ are buggy with characters which are mathcode actives For example the combination of french babel and mathtools with its centercolon turns into an infinite loop In the case of Babel the reason is that generally but not always the right quote is an exception the normal char char fall back is string char But this is wrong if the mathcode is 32768 The fall back becomes the default if the user switches to a language where char is normal and then an infinite loop arises As a further example I am not familiar with other languages from the Babel system with frenchb the active expand in math mode to string or or or This creates an infinite loop if the mathcode is 32768 For the special case of the right quote 7 when it is made active by Babel its fall back does not invoke string so being still of mathcode 32768 is not a problem I have posted on TeX StackExchange how Babel should possibly modify its definitions and I use this here I simplify a bit my proposed replacement of normal char char as the check for protect is superfluous I think having been done already at the level of the Babel p
70. lareMathSymbol gt mathrel mst font tbu 3E 1240 DeclareMathSymbol mst varfam less mathalpha mst font tbu 3C 1241 DeclareMathSymbol mst varfam more mathalpha mst font tbu 3E 1242 expandafter mst addtodo nonletters string lt mathrel mst varfam less 1243 expandafter mst addtodo nonletters string gt mathrel mst varfam more 1244 mst do easynonletters expandafter the mst do easynonletters 1245 let backslash mst varfam backslash 1246 DeclareMathSymbol setminus mathbin mtoperatorfont 5C 1247 DeclareMathSymbol mst varfam setminus mathalpha mtoperatorfont 5C 69 models mid vert MTexplicitbraces obeymathxx MTexplicitbraces donotobeymathxx 1248 mst do nonletters expandafter the mst do nonletters 1249 def setminus mathbin mst varfam setminus 1 15d 13 oct 2012 Before modifying we must preserve models 1250 ifmst XeTeX 1251 XeTeXmathcharnumdef mst vert bar XeTeXmathcodenum relax 1252 else 1253 ifmst LuaTeX 1254 luatexUmathchardef mst vert bar 0 2 006A relax 1255 mathchardef mst vert bar 618 relax 1256 else mathchardef mst vert bar mathcode relax 1257 fi fi 1258 DeclareRobustCommand models mathrel mst vert bar joinrel Relbar 2011 I did not do anything then to try to emulate Vert with the vertical bar from the text font and now 2012 mathastext is not as radical as it used to be anyhow so it is too late 1259 ifms
71. late a math accent without doing such a wasteful thing 450 ifmst fouriervec 451 DeclareFontEncoding FML 452 DeclareFontSubstitution FML futm m it 453 DeclareSymbolFont mtfourierpourvec FML futm m it 454 SetSymbolFont mtfourierpourvec bold FML futm b it 455 DeclareMathAccent fouriervec mathord mtfourierpourvec 7E 456 fi Some public macros to modify our private internals and we will use them also ourself In version 1 1 we add the possibility to have two distinct font shapes for letters and digits So in fact we could as well have two really unrelated fonts but this is really not the spirit of the package Note that using these macros in the preamble allows Mathastext to set up math versions with a given font for math mode and at the same time not modifying the familydefault or romandefault etc 457 newcommand MTencoding 1 def mst enc 1 458 newcommand MTfamily 1 def mst fam 1 459 newcommand MTseries 1 def mst ser 1 460 newcommand MTshape 1 def mst opsh 1 461 ifmst italic else def mst ltsh 1 fi 462 newcommand MTboldvariant 1 def mst bold 1 463 newcommand MTlettershape 1 def mst ltsh 1 464 onlypreamble MTencoding 465 onlypreamble MTfamily 466 onlypreamble MTseries 467 onlypreamble MTshape 468 onlypreamble MTboldvariant 469 onlypreamble MTlettershape 470 let Mathastextencoding MTencoding 471 let Mathastextfamily
72. lay mst modifyprime 172 173 newcommand MTnormalprime let mst modifyprime relax MTexistsskip 1 15e These user macros set up the amount of mu skip or glue after exists or forall on MTforallskip a math version basis the normal and bold math versions inherit the same skips these skips are MTprimeskip set to zero in case of the subdued or the italic option as each Mathastext version_name stores the then current values in the definition of the math version 1 2 MTprimeskip added the silly onlypreamble are removed and the macros are modified to have immediate effect in the document independently of their possible use in the preamble for the math versions to store values 174 newcommand MTexistsskip 1 edef mst exists skip 1 175 expandafter mst exists muskip mst exists skip relax 176 newcommand MTforallskip 1 edef mst forall skip 1 177 expandafter mst forall muskip mst forall skip relax 178 newcommand MTprimeskip 1 edef mst prime skip 1 179 expandafter mst prime muskip mst prime skip relax 180 let Mathastextexistsskip MTexistsskip 181 let Mathastextforallskip MTforallskip 182 let Mathastextprimeskip MTprimeskip 183 let mathastextexistsskip MTexistsskip 184 let mathastextforallskip MTforallskip 185 let mathastextprimeskip MTprimeskip resetMathstrut 2012 12 31 The amsmath macro resetMathstrut is not compatible with a mathematically 39 active opening parenthesis it does
73. ld here as the variant for bold may have been changed by the user via Mathastextboldvariant m and we should keep this local to math versions 642 ifmst needeuler 643 SetSymbolFont mteulervm bold U zeur mst boldvariant normal n 644 SetMathAlphabet MathEulerBold normal 645 U zeur mst boldvariant normal n 646 SetMathAlphabet MathEulerBold bold 647 U zeur mst boldvariant normal n 648 fi 649 ifmst needsymbol SetSymbolFont mtpsymbol bold 650 U psy mst boldvariant normal n 651 fi LGRgreek LGRgreeks selfGreek and selfGreeks options 652 ifmst subdued else 653 ifmst LGRgreek 654 SetSymbolFont mtlgrfontlower normal LGR 655 mst greekfont mst series normal mst greek lsh 656 SetSymbolFont mtlgrfontlower bold LGR 54 657 mst greekfont mst boldvariant normal mst greek lsh 658 SetSymbolFont mtlgrfontupper normal LGR 659 mst greekfont mst series normal mst greek ush 660 SetSymbolFont mtlgrfontupper bold LGR 661 mst greekfont mst boldvariant bold mst greek ush 662 else 663 ifmst selfGreek 664 SetSymbolFont mtselfGreekfont normal 0T1 665 mst greekfont mst series normal mst greek ush 666 SetSymbolFont mtselfGreekfont bold OT1 667 mst greekfont mst boldvariant bold mst greek ush 668 fi fi fi 669 ifmst subdued 670 typeout subdued mode will be activated for the normal and bold math versions 671 else 672
74. le MTEulerScale BTEX 2e has a strange initial configuration where the capital Greek letters are of type mathalpha but the lower Greek letters of type mathord so that mathbf does not act on them although lowercase Greek letters and Latin letters are from the same font This is because mathbf is set up to be like a bold version of mathrm and mathrm uses the operators font by default cmr where there are NO lowercase greek letters This set up is ok for the Capital Greek letters which are together with the Latin letters in both cmmi and cmr The package eulervm sets the lowercase Greek letters to be of type mathalpha the default mathbf and mathrm will act wierdly on them but a mathbold is defined which will use the bold series of the Euler roman font it gives something coherent for Latin and Greek lowercase letters and this is possible because the same font contains upright forms for them all Here in mathastext Latin letters and Greek letters lower and upper case must be generally assumed to come from two different fonts as a result the standard mathbf and mathrm will give weird results when used for Greek letters We could coerce mathbf to do something reasonable cf http tug org pipermail texhax 2011 January 016605 htm1 but at this time 30 01 2011 09 42 27 CET I decided I would not try to implement it here I prefer to respect the default things I followed the simpler idea of the eulervm package and defineed MathEuler
75. lowering is non customizable however if a math alphabet command is used the asterisk is then again from a text font and the lowering will be as specified by MTlowerast Sin a hopefully safe way for example label eq 1 is ok 25 e mathnormal mathrm mathbf mathit mathsf and mathtt are modified to make reference to the document text fonts this can be dis abled by suitable package options e version 1 2 of mathastext 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 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 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 mathastext 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 It is thus recommended that all declared mathastext math versions use the same font encoding 3 3 Commands 3 3 1 Preamble only commands These commands mainly facilitate the definition of math versions in a mathastext extended s
76. lpha mtletterfont 16 1769 DeclareMathSymbol jnodot mathalpha mtletterfont 17 1770 else 1771 ifx mst tmp enc mst lyi LY1 1772 DeclareMathSymbol inodot mathalpha mtletterfont 16 1773 DeclareMathSymbol jnodot mathalpha mtletterfont 17 1774 else 1775 ifmst XeTeX mst goaheadfalse else ifmst LuaTeX mst goaheadfalse else 1776 DeclareMathSymbol inodot mathalpha mtletterfont 1777 expandafter the expandafter csname mst tmp enc string i endcsname 1778 DeclareMathSymbol jnodot mathalpha mtletterfont 1779 expandafter the expandafter csname mst tmp enc string j endcsname 1780 fi fi 1781 fi fi fi fi fi 1782 ifmst defaultimath else typeout string i space and string j space 1783 ifmst goahead 1784 renewcommand imath inodot 1785 renewcommand jmath jnodot 1786 let mst oldi i let mst oldj j 1787 DeclareRobustCommand i ifmmode inodot else mst oldi fi 1788 DeclareRobustCommand j ifmmode jnodot else mst oldj fit 1789 fi 1790 fi math accents I don t know how to get from the encoding to the slot positions of the accents apart from going to look at all possible encodings definition files and putting this info here In standard ATEX the mathaccents are taken from the operators font So we do the same here Of course there is the problem that the user can define math versions with different encodings Here I take T1 if it was the default at the time of loading
77. lphabetical symbols The switch for braces is left as it is 1 2b with the subdued option the italic corrections are not added Else we check the shape of letters in this version Also there was a bug since 1 15 the values of the math skips were taken not from the settings for the math version 2 but from those of the optional argument 1 if present 798 newcommand MTVersion 2 Gempty 799 mathversion 2 800 ifx empty 1 no optional argument 801 def mst tmp 2 802 else we check nevertheless for situation will not work with 803 def mst tmpa 1 804 ifx mst tmpa empty def mst tmp 2 805 else def mst tmp 1 806 fi 807 fi 808 usefont csname mst encoding mst tmp endesname 809 csname mst family mst tmp endcsname 810 csname mst series mst tmp endcsname 811 csname mst shape mst tmp endcsname 812 edef mst encoding csname mst encoding mst tmp endcsname 813 renewcommand encodingdefault mst encoding 814 Ah some modifications for v1 15b 815 edef mst famdefault csname mst family mst tmp endcsname 816 renewcommand familydefault mst famdefault 817 edef mst series csname mst series mst tmp endcsname 818 renewcommand mddefault mst series 819 edef mst shape csname mst shape mst tmp endcsname 820 renewcommand shapedefault mst shape 821 edef mst boldvariant csname mst boldvariant mst tmp endcsname 58 8
78. m minus 7 symmtoperatorfont 2013 re lax 1083 else 1084 ifx mst tmp enc mst euii luatextfontspec 1085 AtBeginDocument luatexUmathcode 2 symmtoperatorfont 2013 relax 1086 AtBeginDocument luatexUmathchardef mst varfam minus 7 symmtoperatorfont 2013 re lax 1087 else 1088 ifx mst tmp enc mst ti T1 1089 DeclareMathSymbol mathbin mtoperatorfont 21 1090 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 21 1091 else 1092 ifx mst tmpOenc mst oti OT1 1093 DeclareMathSymbol mathbin mtoperatorfont 123 1094 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 123 1095 else 1096 ifx mst tmpOenc mst lyi LY1 1097 DeclareMathSymbol mathbin mtoperatorfont 150 1098 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 150 1099 else make sure we have neither xetex nor luatex 1100 ifmst XeTeX mst aborttrue else ifmst LuaTeX mst aborttrue else 1101 DeclareMathSymbol mathbin mtoperatorfont 1102 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 1103 expandafter the expandaf ter csname mst tmp enc string textendash endesname 1104 fi fi 1105 fi fi fi fi fi 1106 def do the emdashstuff edef mst tmp enc encodingdefault 1107 ifx mst tmp enc mst eui xetex fontspec 1108 AtBeginDocument XeTeXmathcode 2 symmtoperatorfont 2014 relax 1109 AtBeginDocument XeTeXmathchardef mst varfam minus 7 s
79. m the Symbol font option sym bolmisc or symbolmax to get also the Greek letters from Symbol 2 2 4 option 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 mathastext to pick up these Greek letters And it is possible to specify whether the Greek letters should be upright or italic Of course it is always possible to leave the responsability to set up Greek letters in math mode to packages loaded previously to mathastext 2 2 5 avoid 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 lt gt and glyphs If mathastext detects OT1 as the default encoding it will leave these characters to their defaults from the math fonts amp If mathastext detects the obsolete OT1 encoding it does not do anything with lt gt and which except for monospace fonts are not available in that encoding To fully benefit from mathastext it is recommended to use some other encoding having these glyphs such as T1 or LY1 5a 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 Sthe subdued option described next ac
80. mand int smallint will maximize even more the use of the Symbol font symboldelimiters the characters apart from letters and digits will be taken from the Symbol font symbol combines symbolgreek symbolre and symbolmisc symbolmax combines symbol and symboldelimiters eulergreek eulerdigits to let Greek letters digits use the Euler font 32 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 MTgreekf ont command in the preamble LGRgreeks each declared math version will be supposed to be with a font which is also available in LGR encoding selfGreek this is for a font which is also available in OT1 encoding and contains the glyphs for the default eleven capital Greek letters selfGreeks each declared math version will be supposed to be with a font with the eleven capital Greek letters in its OT1 encoded version upgreek itgreek upGreek itGreek options to tell to use itdefault or updefault for the lowercase and uppercase or only the uppercase Greek letters Only operant in the case of the LGRgreek s and selfGreek s op tions mathaccents use the text font also for the math accents As in vanilla ATpx they are taken from the font for the digits and log like names Obey the alphabet changing commands Will work only for T1 LY1 or OT1 compatible encodings defaultbf defaultit defaultsf defaulttt do not set up
81. mbol F mathalpha mst font tbu F 939 mst DeclareMathSymbol G mathalpha mst font tbu G 940 mst DeclareMathSymbol H mathalpha mst font tbu HI 941 mst DeclareMathSymbol I mathalpha mst font tbu I 942 mst DeclareMathSymbol J mathalpha mst font tbu J 943 mst DeclareMathSymbol K mathalpha mst font tbu KI 944 mst DeclareMathSymbol L mathalpha mst font tbu 1 LI 945 mst DeclareMathSymbol M mathalpha mst font tbu M 946 mst DeclareMathSymbol N mathalpha mst font tbu N 947 mst DeclareMathSymbol O mathalpha mst font tbu 03 948 mst DeclareMathSymbol P mathalpha mst font tbu P 949 mst DeclareMathSymbol Q mathalpha mst font tbu Q 950 mst DeclareMathSymbol R mathalpha mst font tbu R 951 mst DeclareMathSymbol S mathalpha mst font tbu S 952 mst DeclareMathSymbol T mathalpha mst font tbu T 953 mst DeclareMathSymbol U mathalpha mstfont tbu U 954 mst DeclareMathSymbol V mathalpha mst font tbu V 955 mst DeclareMathSymbol W mathalpha mst font tbu W 956 mst DeclareMathSymbol X mathalpha mst font tbu X 957 mst DeclareMathSymbol Y mathalpha mst font tbu Y 958 mst DeclareMathSymbol Z mathalpha mst font tbu Z 959 hh 960 ifmst nodigits else 961 def mst font tbu mtoperatorfont 61 In version 1 1 we have now separated digits from letters so pa
82. miters 192 def resetMathstrut 193 setbox z hbox the textfont symmtpsymbol char40 194 the textfont symmtoperatorfont char40 195 the textfont symoperators char40 196 ht Mathstrutbox ht z dp Mathstrutbox dp z 197 else 198 def resetMathstrut 199 setbox z hbox the text font symmtoperatorfont char40 200 the textfont symoperators char40 201 ht Mathstrutbox ht z dp Mathstrutbox dp z 202 fi 203 fi 1 2 2012 12 20 does some rather daring math activation of lt gt 1 in math mode to achieve something I wanted to do since a long time overcome the mutually excluding relation between the variable family concept and the automatic spacing concept After loading mathastext 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 activation is done via setting the mathcode to 8000 through the macro mst mathactivate which in turn is put into the everymath and everydisplay token lists No character is made active in the sense of the catcode the issues with catcode active characters at the entrance of the math mode are discussed later but the concerned characters will now expand in math mode to two tokens 1 2c 2012 12 31 hence this current implementation puts constraints on the input x or x mathrel y now create errors They must be input x respectively x mathrel y
83. mplementation 1 ProvidesPackage mathastext 2 2013 01 10 v1 2e Use the text font in math mode jfB 3 NeedsTeXFormat LaTeX2e Testing for XeTeX and LuaLaTeX I should load some package for this code which I copied some where 2013 01 01 at least the code now does not overwrite previous ifXeTeX or ifLuaTeX 4 newif ifmst XeTeX 5 begingroup expandaf ter expandafter expandaf ter endgroup 6 expandafter ifx csname XeTeXinterchartoks endcsname relax 7 mst XeTeXfalse 8 else 9 mst XeTeXtrue 10 fi 11 newif ifmst LuaTeX 12 begingroup expandafter expandafter expandafter endgroup 13 expandafter ifx csname directlua endcsname relax 14 mst LuaTeXfalse 15 else 16 mst LuaTeXtrue 17 fi 1 2 all inner macros of mathastext now starts with mst for a cleaner name space 18 def mst oti OT1 def mst ti T1 def mst lyi LY1 19 def mst eui EU1 def mst eui i EU2 20 newif ifmst goahead 21 newif ifmst abort 22 newif ifmst optionalparam Macros to store the font settings each math version will store its own records 23 def mst enc encodingdefault 24 def mst fam familydefault 25 def mst ser seriesdefault 26 def mst opsh shapedefault h will be default shape for operator names 27 def mst bold bfdefault 28 def mst ltsh shapedefault will be default shape for letters 1 15c for use by the LGRgreek and selfGreek options Defined as an edef in order to be able to set up once and for
84. mpty else mst optionalparamtrue fi 719 fi 720 ifmst optionalparam 721 SetSymbolFont mtletterfont 2 3 4 5 1 722 typeout Latin letters in math version 2 will use the font 723 3 4 5 17 J7 724 kk Other characters digits and protect log like 725 names will be in 6 shape 726 expandafter edef csname mst ltshape mst version endcsname 1 727 else 728 ifmst italic 729 SetSymbolFont mtletterfont 2 3 4 5 mst ltsh 730 typeout Latin letters in math version 2 will use the font 731 3 4 5 mst ltsh J 732 kk Other characters digits and protect log like names 733 will be in 6 shape 734 expandafter edef csname mst ltshape mst version endcsname mst ltsh 735 else 736 SetSymbolFont mtletterfont 2 3 4 5 6 737 typeout Latin letters in math version 2 will use the fonts 738 3 4 5 mst bold 6 739 expandafter edef csname mst ltshape mst version endcsname 6 740 fi 741 fi 742 ifmst nonormalbold else 56 LGRgreeks selfGreeks 743 SetMathAlphabet mathnormalbold 2 3 4 mst bold 744 csname 745 mst ltshape mst version endcsname 746 fi 747 SetSymbolFont mtoperatorfont 2 3 4 5 6 748 ifmst defaultbf else SetMathAlphabet Mathbf 2 3 4 mst bold 6 fi 749 ifmst defaultit else SetMathAlphabet Mathit 2 3 4 5 itdefault fi 750 ifmst defaultsf else SetMathAlphabet Math
85. nd string 1166 DeclareMathSymbol mathbin mst font tbu 2B 1167 DeclareMathSymbol mst varfam plus mathalpha mst font tbu 2B 1168 expandaf ter mst addtodo nonletters string mathbin mst varfam plus 1169 fi 1170 ifmst noequal else 1171 ifmst XeTeX 1172 XeTeXmathcharnumdef mst equal sign XeTeXmathcodenum relax 1173 else 1174 ifmst LuaTeX 1175 hh 12 octobre 2012 luatexUmathcodenum 1176 44 ne marche pas pour le moment a cause du fait que luatexUmathcodenum 1177 44 donne un mathcode sur 8bit ou un Unicode mathcode sans qu on puisse 1178 4 savoir lequel 1179 4 7 luatexUmathchardef mst equal sign 3 0 3D relax 1180 mathchardef mst equal sign 12349 relax 1181 else 1182 mathchardef mst equal sign mathcode relax 1183 fi fi 1184 ifpackageloaded amsmath 1185 def Relbar mathrel mst equal sign 67 nfss catcodes noparenthesis 0 1186 DeclareRobustCommand Relbar mathrel mst equal sign 1187 DeclareMathSymbol mathrel mst font tbu 3D 1188 DeclareMathSymbol mst varfam equal mathalpha mst font tbu 3D 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 2012 12 25 Since then I had switched to only math activation And in fact the problematic from eu2lmtt fd end up in csname endcsname and I have le
86. ndafter mvGnormal 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 mathbf could have been redefined using DeclareSymbolFontAlphabet I could have provided the necessary check to the already bloated code Declaration of the current default font as our math font The characteristics of the used font can be changed by a user call to the macros Mathastext or Mathastextwilluse which will be defined next We will also make one internal call to Mathastext to set up the normal and bold math versions so we will also employ SetSymbolFont later 355 DeclareSymbolFont mtoperatorfont 356 mst enc mst fam mst ser mst opsh We modify this TEX internal variable in order for the predefined cos sin etc to be typeset with the mathastext font This will also work for things declared through the amsmath package command DeclareMathOperator The alternative would have been to redefine the operators Math Symbol Font Obviously people who expect that operator font will always refer to the operators math font might be in for a surprise well we ll see 1 2 rather than just replacing symoperators by symmtoperatorfont I add a modification which makes the declared operator names sensitive to the math alphabets ouh le vilain 357 newcommand MTmathoperatorsobeymathxx 358 def operator font mathgroup ifnum
87. nly relatively benign things such as Alpha but also Phi etc 1 13 Option LGRgreek Also a behavior has been changed it regards the selfGreek case the default shape is now the one for letters not for operator names and digits This complies to the ISO standard version 1 12b did not define the omicron in the case when no Greek related option was passed to the package This was a bug 1394 let mst mathord mathalpha 1395 mst goaheadtrue 1396 ifmst selfGreek 1397 def mst f ont t bu mtselfGreekfont 1398 else 1399 ifmst eulergreek 1400 def mst f ont tbu mteulervm 1401 else 1402 ifmst symbolgreek 1403 def mst f ont t bu mtpsymbol 1404 let mst mathord mathord 1405 else 1406 ifmst LGRgreek 1407 mst goaheadfalse 1408 else The omicron requires special treatment By default we use the o from the original normal alphabet if eulergreek or symbolgreek we adapt There is also a special adjustment if the package fourier was loaded in its upright variant we then take omicron from the original rm alphabet 1409 mst goaheadfalse 1410 ifx omicron undef ined 1411 newcommand omicron mst alph omicron o 1412 fi 1413 fi fi fi fi 1414 ifmst goahead 1415 DeclareMathSymbol Alpha mst mathord mst font tbu 41 1416 DeclareMathSymbol Beta mst mathord mst font tbu 42 1417 DeclareMathSymbol Epsilon mst mathord mst font tbu 45 1418 DeclareMathSymbol Zeta mst matho
88. normal 601 SetSymbolFont mtoperatorfont bold mst encoding bold 602 mst family bold 603 mst series bold 604 mst shape bold 605 ifmst defaultbf else 606 SetMathAlphabet Mathbf normal mst encoding normal 607 mst family normal 608 mst series bold 609 mst shape normal 610 SetMathAlphabet Mathbf bold mst encoding bold 611 mst family bold 612 mst series bold 613 mst shape bold 614 fi ifmst defaultit else 53 MathEulerBold LGRgreek selfGreek 615 SetMathAlphabet Mathit normal mst encoding normal 616 mst family normal 617 mst series normal 618 mst itdefault normal 619 SetMathAlphabet Mathit bold mst encoding bold 620 mst family bold 621 mst series bold 622 mst itdefault bold 623 fi ifmst defaultsf else 624 SetMathAlphabet Mathsf normal mst encoding normal 625 mst sf def ault normal 626 mst series normal 627 mst shape normal 628 SetMathAlphabet Mathsf bold mst encoding bold 629 mst sfdefault bold 630 mst series bold 631 mst shape bold 632 fi ifmst defaulttt else 633 SetMathAlphabet Mathtt normal mst encoding normal 634 mst ttdefault normal 635 mst series normal 636 mst shape normal 637 SetMathAlphabet Mathtt bold mst encoding bold 638 mst ttdefault bold 639 mst series bold 640 mst shape bold 641 fi fi de ifmst subdued 1 14c We reset mteulervm and MathEulerBo
89. not subdued 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 def mst exists skip normal Omu def mst forall skip normal Omu def mst prime skip normal Omu 52 566 def mst exists skip bold Omu 567 def mst forall skip bold Omu 568 def mst prime skip bold Omu 569 fi 570 else 571 expandafter mst exists muskip mst exists skip relax 572 expandafter mst forall muskip mst forall skip relax 573 expandafter mst prime muskip mst prime skip relax 574 fi 575 fi 576 hh v1 15f 577 ifmst nonormalbold else 578 SetMathAlphabet mathnormalbold normal mst encoding normal 579 mst family normal 580 mst boldvariant normal 581 mst ltshape normal 582 SetMathAlphabet mathnormalbold bold mst encoding bold 583 mst family bold 584 mst boldvariant bold 585 mst ltshape bold 586 fi 587 h vi 15f adds ifmst default checks 588 ifmst subdued else 589 SetSymbolFont mtletterfont normal mst encoding normal 590 mst family normal 591 mst series normal 592 mst ltshape normal 593 SetSymbolFont mtletterfont bold mst encoding bold 594 mst family bold 595 mst series bold 596 mst ltshape bold 597 SetSymbolFont mtoperatorfont normal mst encoding normal 598 mst family normal 599 mst series normal 600 mst shape
90. oduced by running latex on mathastext dtx are more extent 2 10 Compatibility issues Compatibility issues or just questions of who decides last are naturally to be expected with packages dealing with the math setting the fix is simply to load mathastext last And one should always load amsmath before mathastext this is especially true when using Unicode engines but applies in general as well Any definition made in a package loaded before mathastext of the font to be used for letters or for the common characters in the ascii basic range will be overruled by the loading of mathastext this includes the case when the earlier package had made the character mathematically active Conversely most of the set up done by mathastext may well be overruled by packages loaded later which do math related things In case of a too many math alphabets message try the defaultalphabets option or one of its defaultnormal defaulttt etc sub options Starting with version 1 2 mathastext makes some characters mathematically active to achieve certain effects automatic insertion of the italic corrections when using an upright text font in math extended scope of the math alphabet commands which now apply to non letter symbols and also to math operator names but this is much easier to achieve And the already mathematically active right quote is modified to have some extra space added before the derivative glyph This is compatible wi
91. oducts integrals logical signs etc will be the same throughout the document as it is not in mathastext 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 usepackage lmodern usepackage T1 fontenc usepackage subdued italic defaultmathsizes mathastext MTDeclareVersion n 1lmvtt T1 lmvtt m n usepackage newcent Mathastext newcent usepackage times Mathastext times usepackage scaled helvet renewcommand familydefault sfdefault Mathastext helvet begin document MTversion normal Let us examine this code it uses once the command MTDeclareVersion and three times the command Mathastext thus defining four math versions 1mvtt math versions are discussed in the document fntguide pdf from your TEX distribution newcent times and helvet The names can be taken arbitrarily they only need to be suitable arguments to the ATEX DeclareMathVersion command which is invoked internally so no spaces in the names Two additional math versions pre exist the normal and bold which because there was the subdued option were left untouched by mathastext Once these math versions are defined Mathastextversion name of version or equivalently MTversion name_ of version in the body of the document en acts the font switches
92. of a binary operator and was treated 33To the experts the sin cos operator names are not defined by amsmath with the help of the DeclareMathOperator macro hence are not the cause of an error in X4I X LualATEX What mathastext does is to let to relax the newmcodes macro so it is possible to save it before loading mathastext and re establish later if really really this is what you want 24 as an ordinary symbol An option noasterisk turned this feature off Start ing with 1 2d the noasterisk option is deprecated and the new default is to do nothing But when option asterisk is received by the package then both ast and are simultaneously modified to use as binary operators the text asterisk slightly lowered The amount of lowering is decided by the mandatory argument to the command MTlowerast dimen The package initially does MTlowerast 3 height Doing MTlowerast 5ex is not a good idea as it does not scale properly in the script and scriptscript styles With an argument given as a multiple of height the asterisk will behave as expected in subscripts and subscripts of subscripts But is now math ematically active 2 and R7 or R ast must be input as R7 and R ast Furthermore they will obey the math alphabet commands XJTEX and LuaWTex 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 Lual TEX this will be tr
93. ommand 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 e MTforallskip math glue the default is to add a 6667mu math skip after each V except with the option italic for which the default is set to zero Compare VF has the skip with VF has no skip Use this command in the preamble to set up the skip or glue to be used in the 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 e MTprimeskip 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 e MTlowerast dimen a raisebox command is used to lower the text as terisk to produce a reasonable math asterisk The package uses this command initially with argument 0 3 height this will have to be fine tuned for each given text font but worked out ok with the fonts we tried Note that the di mension argument will be used also in sub scripts and sub sub scripts so it is best not to use an absolute dimension e MTmathoperatorsobeymathxx MTmathoperatorsdono
94. on symbolre mst needsymboltrue mst symbolretrue 96 newif ifmst symbolmisc 97 DeclareOption symbolmisc mst needsymboltrue mst symbolmisctrue 98 DeclareOption symbol ExecuteOptions symbolgreek symbolmisc symbolre 99 DeclareOption symbolmax ExecuteOptions symbol symboldelimiters 100 101 newif ifmst needeuler 102 newif ifmst eulerdigits 103 DeclareOption eulerdigits mst needeulertrue mst eulerdigitstrue 104 newif ifmst eulergreek 105 DeclareOption eulergreek mst needeulertrue mst eulergreektrue 106 Ye 107 newif ifmst selfGreek 108 DeclareOption selfGreek mst selfGreektrue 109 newif ifmst selfGreeks 110 DeclareOption selfGreeks mst selfGreekstrue mst selfGreektrue 111 newif ifmst LGRgreek 112 DeclareOption LGRgreek mst LGRgreektrue 113 newif ifmst LGRgreeks 114 DeclareOption LGRgreeks mst LGRgreekstrue mst LGRgreektrue 115 116 def mst greek select 0 117 newif ifmst itgreek 118 newif ifmst upgreek 119 DeclareOption itgreek mst itgreektrue 120 DeclareOption upgreek mst upgreektrue 121 DeclareOption itGreek def mst greek select 1 122 DeclareOption upGreek def mst greek select 2 123 hhh 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 alphab
95. peset as a derivative sign the definition of hbar inherited from default ATEX 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 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 hslash provided by the package though The version 1 12 of the package when dealing with a Unicode font tries to get the hbar directly as a glyph from the font dotless i and j by default the package redefines i and j to give the dotless i and j if it exists at all also in math mode in the text font Will overwrite the default commands imath and 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 asterisk previous versions of mathastext did not do anything with the ast con trol sequence but did pick the asterisk in the document text font and this often was a rather silly thing as the text asterisk is generally in a raised posi tion Furthermore the lost its status
96. play expandafter the everydisplay mst the mst do nonletters 236 mst theeasy mst do easynonletters 237 nst thef mst do az mst theF mst do AZ 238 239 def mst magicOv 1 2 3 4 5 1 3 4 240 def mst magic vi 1 2 3 4 5 6 1 2 4 5 241 def mst fork ifmmode mst magic v fi thirdofthree 242 def mst safefork ifmmode if safe actives else mst magic vi fi fi thirdofthree 243 def mst do activecase 1 2 3 1 is a category 11 or 12 character token 244 ifundefined factive char 1 1 245 ifcat 1a mathcode 1 2 else 246 ifx relax 2 relax mathcode 1 1 else mathcode 1 3 fi fi 247 expandafter expandafter expandafter let expandafter expandafter 248 csname mst orig user active t1 endcsname 249 csname user active 1 endcsname 250 expandafter expandafter expandafter let expandafter expandafter 251 csname mst orig normal char 1 endcsname 252 csname normal char 1 endcsname 253 ifcat 1a 254 expandafter edef csname user active 1 endcsname 255 noexpand mst fork 2 noexpand 3 expandafter 256 noexpand csname mst orig user active t1 endcsname 257 yh 258 expandafter edef csname normal char 1 endcsname 259 noexpand mst safefork 2 noexpand 3 expandafter 260 noexpand csname mst orig normal char 1 endcsname 261 th 262 else 263 expandafter edef csname user active 1 endcsname 264 noexpand mst fork 2 noexpand 3 expandafter 265 noexpand csname mst orig user active 1 endcsname 26
97. plies mathrel mtpsymbol 222 1328 DeclareRobustCommand implies mst implies 1329 DeclareMathSymbol mst impliedby mathrel mtpsymbol 220 1330 DeclareRobustCommand impliedby mst impliedby 1331 DeclareRobustCommand iff mst impliedby mathrel mkern 3mu mst implies 1332 DeclareMathSymbol mst iff mathrel mtpsymbol 219 1333 DeclareRobustCommand shortiff mst iff 1334 DeclareMathSymbol mst to mathrel mtpsymbol 174 1335 DeclareMathSymbol mst trait mathrel mtpsymbol 190 1336 DeclareRobustCommand to mst to 1337 DeclareRobustCommand longto mkern2mu mst trait mathrel mkern 10mu mst to 1338 DeclareRobustCommand mapsto mapstochar mathrel mkern0 2mu mst to 1339 DeclareRobustCommand longmapsto 1340 mapstochar mathrel mkern2mu mst trait mathrel mkern 10mu mst to 1341 DeclareMathSymbol aleph mathord mtpsymbol 192 1342 DeclareMathSymbol inftypsy mathord mtpsymbol 165 1343 DeclareMathSymbol emptyset mathord mtpsymbol 198 1344 let varnothing emptyset 1345 DeclareMathSymbol nabla mathord mtpsymbol 209 1346 DeclareMathSymbol surd mathop mtpsymbol 214 1347 let angle undef ined 1348 DeclareMathSymbol angle mathord mtpsymbol 208 1349 DeclareMathSymbol forall mathord mtpsymbol 34 1350 DeclareMathSymbol exists mathord mtpsymbol 36 1351 DeclareMathSymbol neg mathord mtpsymbol 216 72 s
98. qTpXdoes not have the italic corrections LualATRX does but only for the italic font pdf ATRK has them for both the italic and the upright font the situation is rather ironical by the way the warnings in section ZA with 277 or similar are less of an issue here because the letter is only followed by and anyhow the whole is put by mathastext within group braces so no surprises with x y or mathbin x Nevertheless it is still true that in math mode only the letter characters a z A Z expand to composite objects something which could surprise other packages The macro MTnoicinmath cancels the mechanism 15 2 7 Additional whitespaces MTforallskip MTexistsskip and MTprimeskip are three commands with each a mandatory argument like for example 3mu plus imu minus 1mu or just 2 5mu They are especially useful when using an upright font in math mode Z e compare VB with VB typeset after MTforallskip 2mu e compare JN with AN typeset after MTexistsskip 2mu e and finally compare f with f typeset after MTprimeskip 2mu 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 mathastext applies the following small default skips 0 6667mu for the skip after V 1mu for the skip after 4 and 0 5mu for the skip before the prime The examples above become VB AN and f 2 With the italic option
99. r to insert the italic corrections after lowercase and or up percase letters With the subdued option MTversion normal and MTversion bold do MTmathoperatorsdonotobeymathxx and MTnonlettersdonotobeymathxx lit is provided for the mathastext defined math alphabet mathnormalbold which contrarily to mathnormal is not treated apart from the other math alphabets 42 mTversion is also available as MTVersion Mathastextversion and mathastextversion 29 All further commands are for math mode only hbar this is constructed in a way compatible with the italic option from the h letter and the accent from the mathastext font Note that mathrm hbar and mathbf hbar should work and that hbar does scale in subscripts and exponents Only for T1 and OT1 or LY1 encodings fouriervec this is a vec accent taken from the Fourier font the fourier package need not be loaded Active only if option fouriervec pmvec this provides a poor man vec accent command for upright letters It uses the right arrow Does not change size in subscripts and exponents mathnormal mathrm mathbf mathit mathsf mathtt modifications of the original mathnormal mathrm mathbf mathit mathsf mathtt to use the mathastextified font The underlying internal TEX structures related to the original commands are not overwritten so the original com mands can be saved under other names before usepackage mathastext to be used in
100. radoxically it is less problematic to give them the mathalpha type 962 ifmst symboldigits def mst font tbu mtpsymbol fi 963 ifmst eulerdigits def mst font tbu mteulervm fi 964 DeclareMathSymbol 0 mathalpha mst font tbu 0 965 DeclareMathSymbol 1 mathalpha mst font tbu 1 966 DeclareMathSymbol 2 mathalpha mst font tbu 2 967 DeclareMathSymbol 3 mathalpha mst font tbu 3 968 DeclareMathSymbol 4 mathalpha mst font tbu 4 969 DeclareMathSymbol 5 mathalpha mst font tbu 5 970 DeclareMathSymbol 6 mathalpha mst font tbu 6 971 DeclareMathSymbol 7 mathalpha mst font tbu 7 972 DeclareMathSymbol 8 mathalpha mst font tbu 8 973 DeclareMathSymbol 9 mathalpha mst font tbu 9 974 fi When symboldelimiters is passed as an option we use the Symbol font for the printable characters other than letters and digits 975 ifmst symboldelimiters 976 def mst f ont t bu mtpsymbol 977 mst endashfalse 978 mst emdashfalse 979 else 980 def mst font tbu mtoperatorfont 981 fi 1 2 adds the tricks to let non letters digits obey math alphabets We have to double the defini tions for easy switch on off of the mechanism via a token list which is put into everymath and everydisplay 982 ifmst noexclam else typeout string and string 983 DeclareMathSymbol mathclose mst font tbu 21 984 DeclareMathSymbol mst varfam exclam ma
101. rd mst font tbu 5A 1419 DeclareMathSymbol Eta mst mathord mst font tbu 48 1420 DeclareMathSymbol Iota mst mathord mst font tbu 49 1421 DeclareMathSymbol Kappa mst mathord mst font tbu 4B 1422 DeclareMathSymbol Mu mst mathord mst font tbu 4D 1423 DeclareMathSymbol Nu mst mathord mst font tbu 4E 1424 DeclareMathSymbol Omicron mst mathord mst font tbu 4F 1425 DeclareMathSymbol Rho mst mathord mst font tbu 50 1426 DeclareMathSymbol Tau mst mathord mst font tbu 54 1427 DeclareMathSymbol Chi mst mathord mst font tbu 58 When we in fact use Symbol we have to correct Rho and Chi And Digamma is non existent 74 in fact no F in Symbol F codes a Phi 1428 ifx mst mathord mathord symbolgreek but neither eulergreek nor selfGreek 1429 A4 attention le P de Symbol est un Pi pas un Rho 1430 DeclareMathSymbol Rho mathord mtpsymbol 52 1431 4 4 attention le X de Symbol est un Xi pas un Chi 1432 DeclareMathSymbol Chi mathord mtpsymbol 43 1433 4 4 attention le F de Symbol est un Phi Il n y a pas de Digamma 1434 DeclareMathSymbol Gamma mathord mtpsymbol 47 1435 DeclareMathSymbol Delta mathord mtpsymbol 44 1436 DeclareMathSymbol Theta mathord mtpsymbol 51 1437 DeclareMathSymbol Lambda mathord mtpsymbol 4C 1438 DeclareMathSymbol Xi mathord mtpsymbol 58 1439 DeclareMathSymbol Pi mathord mtpsymbol 50
102. recautions are not taken Examples 07 or x mathrel y or R must be input now as 0 and respectively x mathrel y or R This is why the package does MTnonlettersdonotobeymathxx by default One thing to take note of is that this mechanism uses the everymath and ev erydisplay so if it is needed to add to these TEX token lists some additional things this should be done in a way preserving the former contents Doing after the begin document everymath and everydisplay preemptively annihilates all of the mathastext evil doing with math active characters but it annihilates also everything else some other package might have put in there so it is much better in case the need arises to preemptively cancel the action of mathastext to use the package macros MTmathoperatorsdono tobeymathxx MTnonlettersdonotobeymathxx this is default MTnoicinmath 22 and MTnormalprime which cancels action of the right quote in math mode An exception is with the modifications to J and V which are done by the package in the preamble the old definitions can be saved before to be reestablished after loading the package Just using MTexistsskip Omu and MTforallskip Omu should be sufficient except if it is important that the exists and forall control sequences always expand to only one token each the redefinition done by mathastext of the 3 Package options and commands
103. reek 1462 DeclareMathSymbol alpha mathalpha mteulervm 0B 1463 DeclareMathSymbol beta mathalpha mteulervm 0C 1464 DeclareMathSymbol gamma mathalpha mteulervm OD 1465 DeclareMathSymbol delta mathalpha mteulervm 0E 1466 DeclareMathSymbol epsilon mathalpha mteulervm OF 1467 DeclareMathSymbol zeta mathalpha mteulervm 10 75 1468 DeclareMathSymbol eta mathalpha mteulervm 11 1469 DeclareMathSymbol theta mathalpha mteulervm 12 1470 DeclareMathSymbol iota mathalpha mteulervm 13 1471 DeclareMathSymbol kappa mathalpha mteulervm 14 1472 DeclareMathSymbol lambda mathalpha mteulervm 15 1473 DeclareMathSymbol mu 1474 DeclareMathSymbol nu 1475 DeclareMathSymbol xi 1476 let omicron undef ined mathalpha mteulervm 16 mathalpha mteulervm 17 mathalpha mteulervm 18 1477 DeclareMathSymbol omicron mathalpha mteulervm 6F 1478 DeclareMathSymbol pi 1479 DeclareMathSymbol rho mathalpha mteulervm 19 mathalpha mteulervm 1A 1480 DeclareMathSymbol sigma mathalpha mteulervm 1B 1481 DeclareMathSymbol tau mathalpha mteulervm 1C 1482 DeclareMathSymbol upsilon mathalpha mteulervm 1D 1483 DeclareMathSymbol phi 1484 DeclareMathSymbol chi 1485 DeclareMathSymbol psi mathalpha mteulervm 1E mathalpha mteulervm 1F mathalpha mteulervm 20 1486 D
104. reeksh 401 def mst greek lsh mst ltsh default behavior 402 def mst greek ush mst opsh 403 ifmst itgreek def mst greek lsh itdefault 404 def mst greek ush itdefault fi 405 ifmst upgreek def mst greek lsh updefault 406 def mst greek ush updefault fi 407 ifmst frenchmath 408 ifmst itgreek else 409 ifmst upgreek else 410 def mst greek 1sh mst opsh 411 def mst greek ush mst opsh 412 fi fi 413 fi 414 ifcase mst greek select 415 or def mst greek ush itdefault 416 or def mst greek ush updefault 417 fi 418 mst update greeksh 419 ifmst LGRgreek 420 DeclareFontEncoding LGR 421 DeclareSymbolFont mtlgrfontlower LGR 422 mst fam mst ser mst greek lsh 423 DeclareSymbolFont mtlgrfontupper LGR 424 mst fam mst ser mst greek ush 425 else 426 ifmst selfGreek 48 427 DeclareSymbolFont mtselfGreekfont OT1 428 mst fam mst ser mst greek ush 429 fi fi mteulervm In case we need the Euler font we declare it here It will use uzeur fd from the eulervm package MathEuler of Walter SCHMIDT MathEulerBold 430 ifmst needeuler typeout will use Euler font command string MTEulerScale 431 DeclareSymbolFont mteulervm U zeur m n 432 DeclareSymbolFontAlphabet MathEuler mteulervm 433 DeclareMathAlphabet MathEulerBold U zeur mst bold n 434 fi 435 newcommand MTEulerScale 1 edef zeu Scale 1 436 let MathastextEulerSca
105. refix Replacing user active char is indeed not enough and normal char char also must be changed because when the user switches back to a language where the character is normal it remains catcode active The crucial thing is the test of if safe actives in the replacement of the normal char char besides of course the test for math mode in both replacements When the character is not catcode active then mathastext uses the math activation method As the mathcode is not looked at in edef write or inside csname endcsname nothing special needs to be done I think in terms of protection against premature expansion I did not know that initially So to recapitulate mathastext will use the mechanism of the active mathcode if the char acter is not catcode active and in the opposite case will do something only in the context of Babel modifying directly its user active char and its normal char char macros and it does NOT then set the mathcode to 32768 rather it makes sure the character is not math ematically active As 1 2e is a bit paranoid it takes precautions against the possibility of characters it treats 41 mst do az mst do AZ mst addtodo az mst addtodo AZ MTicinmath MTICinmath MTnoicinmath MTicalsoinmathxx mst the MTnonletters obeymathxx MTnonletters donotobeymathxx being active at the time of its loading Excepted from the scope of the paranoia are the latin letters that
106. respec tively the mathbf mathit mathsf and mathtt commands to use the mathastext ified font This also prevents mathastext to create internally Mathxx alphabets it never overwrites the original mathxx things but let mathxx point to Mathxx instead so one can use these options if one en counters a too many math alphabets TEX error defaulnormal defaultrm do not identify the default mathnormal resp mathrm with the newly created Mathnormal resp Mathrm commands which use the mathastextified fonts in each math version defaultalphabets all the defaultxx options together and additionally tells mathastext not to create the mathnormalbold alphabet either defaultimath do not overwrite imath and jmath do not extend i and j to math mode use defaultmathsizes do not change the IAT X defaults for the sizes of expo nents and subscripts fouriervec provides a fouriervec command The user can then add in the preamble let vec fouriervec There is also always available a poor man vec accent pmvec for upright letters 33 Thanks to Kevin KLEMENT Tarig PERWEZ and Ricard TORRES for sending bug reports and feature requests when the first version of the package was issued Numerous examples will be found there http jf burnol free fr mathastext html http jf burnol free fr showcase html 34 mst enc mst fam mst ser mst opsh mst bold mst ltsh mst greekfont Package options 4 I
107. rsion 1 1 we add an optional parameter specifying the shape to be used for letters 55 Note 2012 10 24 I really should check whether the user attempts to redefine the normal and bold versions and issue a warning in that case 696 newcommand MTDeclareVersion 6 Gempty 697 edef mst version 2 698 DeclareMathVersion mst version 699 expandafter edef csname mst encoding mst version endcsname 3 700 expandafter edef csname mst family mst version endcsname 4 701 expandafter edef csname mst series mst version endcsname 5 702 expandafter edef csname mst shape mst version endcsname 6 703 expandafter edef csname mst boldvariant mst version endcsname mst bold 704 expandafter edef csname mst itdefault mst version endcsname itdefault 705 expandafter edef csname mst rmdefault mst version endcsname rmdefault 706 expandafter edef csname mst sfdefault mst version endcsname sfdefault 707 expandafter edef csname mst ttdefault mst version endcsname ttdefault 708 expandafter edef csname mst exists skip mst version endcsname 709 mst exists skip 710 expandafter edef csname mst forall skip mst version endcsname 711 mst forall skip 712 expandafter edef csname mst prime skip mst version endcsname 713 mst prime skip 714 mst optionalparamfalse 715 ifx empty 1 716 else we check nevertheless for situation will not work with 717 def mst tmp 1 718 ifx mst tmp e
108. s a manner to switch on the mathastext ification only for limited portions of the document with the help of the mechanism of math versions Without the subdued option the mathasteztification 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 mathasteztification is done only in math versions distinct from the standard and bold ones The previous description is in fact a bit optimistic mathastext 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 mathastext 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 ATX math mode set up to three distinct fonts whereas mathastext will pick even subdued the three of them in the same font and although it will make a reasonable this means more then one 8 thank in particular Tariq PERWEZ and Kevin KLEMENT for their kind remarks chronological order more precisely stated the value of itdefault is used 10more precisely stated the value of shapedefault is used choice of this font this is not a return to the previously prevailing situation And then arbitrary packages could have done arbitrary
109. s file from the internet chances are that mathastext is already in your TEX installation and that you are reading this documentation after having done something like texdoc mathastext Still read the following which explains how to produce some test files illustrating package features Download from the internet from CTAN or from the package home page mathastext dtx or copy the file already installed on your system assuming it is up to date put it in a temporary repertory and do latex or pdflatex on it The compilation will not succeed if your installation is missing package etoc but even then it will have generated the package file mathastext sty You may then if installing manually the package move this up to date mathastext sty to the appropriate location within your TEX installation i e to a repertory with name mathastext inside a repertory latex inside a repertory tex inside This latex run generated also a number of test files They are provided to illus trate some features of the package You can then run latex pdflatex lualatex or xelatex on them Some test files are to be used only with KHIRK and LuaTpx as they use Unicode fonts 1 2 Recent changes The current version is 1 2e Additions were made in this user manual to the sec tion 210 describing the compatibility issues and to the test files illustrating various package features Important changes to the source code were done to fix compat ibility problems with acti
110. s relax 1 15e 2012 10 21 math skip glue after exists and forall this is useful with upright letters in math mode Each math version has its own user defined values for the skips stored as macros The redefinitions of 3 and V are done only at the end of the package as the symbol option will also want to redefine these math symbols The subdued option later and only for the normal and bold math version and the italic option here set to zero the package default skips With 1 2 the skips can be modified on the fly in the document they are not necessarily set in the preamble once and for all for each math version 149 newmuskip mst exists muskip h v 1 15e 150 newmuskip mst forall muskip 151 def mst exists skip 1mu 152 def mst forall skip 6667mu 153 ifmst italic ifmst frenchmath else 154 def mst Oexists skip Omu def mst forall skip Omu def mst prime skip Omu 155 fi fi 156 AtEndOfPackage must be at end of code 157 let mst stdexists exists 158 let mst stdforall forall 159 renewcommand exists mst stdexists mskip mst exists muskip 160 renewcommand forall mst stdforall mskip mst forall muskip 161 1 2 2012 12 17 math skip glue before the prime glyph This is useful with the default CM glyph and upright letters in contrast the prime from txfonts works fine with upright letters 38 For this we replace the MTRK kernel active math prime with our own skip enhanced version mst active math prime
111. ser then is supposed to know that R is no valid input anymore and should be replaced by R7 The remaining difficult cases create similar constraints which will be commented more upon next The relevant commands are MTmathoperatorsdonotobeymathxx MTnonlettersdonotobeymathxx MTeasynonlettersdonotobeymathxx for deactivation and MTmathoperatorsobeymathxx MTnonlettersobeymathxx MTeasynonlettersobeymathxx for activation ZB Bof course some of them are input preceded by a backslash and the backslash itself is input as backslash BE T amp obey the math alphabets since the initial version of mathastext the dot the slash the vertical bar and the backslash do not have specific spacings inserted by TEX around them and the procedure is then not a devilish one this is why it is made the default for these characters which are listed apart The math symbols mid which is with type mathrel and setminus with type mathbin are counted among the difficult cases not the easy non letters these commands are to be used outside of math mode Their scope is limited to the current TEX environment or group They use the everymath and everydisplay mechanism so if the document needs to modify these token lists it has to do so in a responsible manner extending not annihilating their previous contents 18 when in subdued mode the math alphabets are the default ones not the ones modified by mathastext to
112. sf 2 3 sfdefault 5 6 fi 751 ifmst defaulttt else SetMathAlphabet Mathtt 2 3 ttdefault 5 6 fi 752 ifmst needeuler 753 SetMathAlphabet MathEulerBold 2 U zeur mst bold n 754 fi In the case of option LGRgreeks selfGreeks it is expected that the fonts used in each math versions exist in LGR OT1 encoding We first recalculate the shapes to be used for lowercase and uppercase Greek letters depending on the frenchmath and it up g G reek options as well as on the local to this version shapes for letters and digits 755 def mst greek lsh loc csname mst ltshape mst version endcsname 756 def mst greek ush loc csname mst shape mst version endcsname 757 ifmst itgreek def mst greek lsh loc itdefault 758 def mst greek ush loc itdefault fi 759 ifmst upgreek def mst greek lsh loc updefault 760 def mst greek ush loc updefault fi 761 ifmst frenchmath 762 ifmst itgreek else 763 ifmst upgreek else 764 def mst greek lsh loc csname mst shape mst version endcsname 765 def mst greek ush loc csname mst shape mst version endcsname 766 fi fi 767 fi 768 ifcase mst greek select 769 or def mst greek ush loc itdefault 770 or def mst greek ush loc updefault 771 fi 772 ifmst LGRgreeks 773 SetSymbolFont mtlgrfont lower 2 LGR 4 5 mst greek 1sh loc 774 SetSymbolFont mtlgrfontupper 2 LGR 4 5 mst greek ush loc 775 typeout Greek letters mst
113. sf ff all give ligatures ff ff ff and ff and we would like to preserve this behavior Starting with version v1 2b mathastext adds the italic correction au tomatically after each letter of the Latin alphabet in math mode except when these letters are italic or slanted These italic corrections are cancelled inside the arguments to the math alphabet commands others than mathnormal to allow the formation of ligatures as is expected in the standard default TEX font set up in math The feature implementing commands MTicinmath MTnoicinmath MTical soinmathxx are described in section B32 Note from brief testing on 2012 12 28 KHTIRK seems not to create fake italic corrections for OpenType fonts Hence the TEX placement algorithms for math mode described in this section do not work well when an OpenType text font is used for the letters in math mode and the document is compiled with the XqTfX engine On the other hand Lua TRA seems to implement the italic corrections when using OpenType fonts but only with italic fonts as far as I could tell Try the following which will use the OpenType Latin Modern font on a recent TEX installation and compare the output of both engines documentclass article usepackage fontspec begin document Huge mathit f_i i par mathrm f_i7 i end document Comment out the fontspec line and use pdflAIEX All three outputs are different on my TEX installation X
114. sible to make TFX believe it is Doing so we obtain in math mode with the text italic abcdef ghijklmnopgrstuvwryz text italic in math abcde f ghijklmnopgrstuvwxyz math italic in math let s be honest we are lying here about what exactly the first of these is bounding this is explained later we used simply mathit f x these values are for the Latin Modern fonts of course 3here we give correctly the bounding box for the math italic f without its italic correction 21 13 We saw that the italic correction was taken into acount automatically indepen dently of the value of the interword space font parameter in expressions such as f x Another clever thing done by TEX is to use it for the placement of super scripts the next examples systematically use the text italic in math We see that ff is very different from f where the latter was coded with hbox itshape 373 The inputs mathit hbox itshape f j and mathit f j give al most identical results ff vs f Close examination reveals that the horizontal spac ing is exactly identical however the exponent in the second case is a bit lower Anyway the point is that in the second case the italic correction for f was indeed used Subscripts are another matter they do not take into account the italic cor rection For example mathit f_i gives the same horizontal positions as mathit hbox itshape f _i fi vs fi Printing them one on another giv
115. son is if some package has redefined colon which then 1047 could not be used in cs DeclareMathSymbol anymore 1048 DeclareMathSymbol colon mathpunct mst font tbu 3A 1049 mst do nonletters expandafter the mst do nonletters 1050 def colon mathpunct mst varfam colon 1051 DeclareMathSymbol H mathpunct mst f ont tbu 3B 1052 DeclareMathSymbol mst varfam pointvirgule mathalpha mst font tbu 3B 1053 expandafter mst addtodo nonletters string mathpunct mst varfam pointvirgule 1054 fi Due to the way and are used by TEX in arrows we will have to redefine Relbar and relbar in order for them to preserve their original meanings 1 15d Oct 13 2012 Belated amendment of the code to be compatible with Unicode engines in case someone changed the mathcode of However for the time being I can do it in an easy way only for XeTeX not for LuaLatex Also I do my modifications to relbar in a manner testing for the presence of amsmath 1055 ifmst nominus else 1056 ifmst XeTeX 1057 XeTeXmathcharnumdef mst Qninus sign XeTeXmathcodenum relax 1058 else 1059 ifmst LuaTeX 1060 luatexUmathcharnumdef mst minus sign luatexUmathcodenum relax ne 1061 4 4 marche pas pour le moment car luatexUmathcodenum retourne parfois un 1062 47 legacy mathcode parfois un Unicode mathcode a mon avis c est un bug 1063 44 de LuaLatex En fait Taco H me dit que la prochaine version 1064 4 4 r
116. spect to the subscript apply equally well to such a font if TEX has been told to use it Let s try Latin Modern Upright for letters in math f_i i now gives fi We see the italic correction in action for the positioning of the superscript Compare with mathrm hbox f _i7i Overlapping with rlap mathrm f_i i mathrm hbox f _i i gives fi and shows that the upright f has an italic correction which was used to shift the superscript to the right and it is now in a slightly lower position Let s now do mathrm f _i7i this gives fi and the subscript is shifted to the right and is now on the same vertical axis as the superscript There are also some slight vertical displacements rlap mathrm f_i i mathrm f _i7i gives fi there are also some tiny vertical displacements of the sub and superscripts we just use mathrm f_ii 14 People will tell me crazy but if we decide for using upright fonts in math wouldn t it be satisfying to have the subscript and superscript positioned on the same vertical axis the letter has no slant why should the indices display one We end up in this strange situation that it is attractive to systematically incor porate the italic corrections after the upright Latin letters in math But we don t want to do this inside the arguments to math alphabets as this would make im possible the formation of ligatures the standard mathrm ff mathit ff mathbf ff math
117. t have to load the eulervm package mathastext 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 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 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 There is also LGRgreeks which tells mathastext to pick up in each math version the letters from the LGR encoded font used in that version and selfGreeks to tell mathastext 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 1 in its presence the LGRgreek and LGRgreeks options cease to have any effect in the normal and bold math versions 2 selfGreek s eulergreek and symbolgreek act normally they are not af fected by the presence or absence of subdued 17 2 8 1 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
118. t 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 contrarily to the next feature this one is not likely to create incompatibilities with other packages so it is activated by default 1 10 2 and optionally all non alphabetical characters treated by mathastext i e if not disabled by options lt gt the asterisk and amp 4 will also obey the math alphabet commands when not used as delimiters The important thing is that the spaces added by TEX before and after are not modified Let us compare for example the new behavior of mathtt and mathbf sin n lt cos m p sin x y cos z t with the traditional default behavior sin n lt cos m p sin x y cos z t The first feature is activated by default except of course for the normal and bold math versions when the package was given the subdued option The second feature is off by default for the characters listed first It is on for the easy cases amp activating the feature for them puts no constraint on the user input and should not be too upsetting to other packages and also for but only if this was required explicitely by the option asterisk as the u
119. t nosmalldelims 1260 DeclareMathSymbol mathord mst font tbu 124 1261 else 1262 DeclareMathDelimiter mathord mst font tbu 124 largesymbols OC 1263 fi 1264 def vert 1265 DeclareMathSymbol mst varfam vbar mathalpha mst font tbu 124 1266 mst addtodo easynonletters mst varfam vbar 1267 DeclareMathSymbol mid mathrel mst font tbu 124 1268 mst doGnonletters expandafter the mst do nonletters 1269 def mid mathrel mst varfam vbar Braces With version 1 2 and will not be acceptable as delimiters anymore if the redefi nitions below in mst dobraces are enacted But they will obey math alphabets Improvements in 1 2a to preserve robustness 1270 ifmst nosmalldelims 1271 DeclareMathSymbol lbrace mathopen mst f ont tbu 123 1272 DeclareMathSymbol rbrace mathclose mst font tbu 125 1273 else 1274 DeclareMathDelimiter lbrace 1275 mathopen mst Of ont tbu 123 largesymbols 08 1276 DeclareMathDelimiter rbrace 1277 mathclose mst font tbu 125 largesymbols 09 1278 fi 1279 DeclareMathSymbol mst varfam lbrace mathalpha mst font tbu 123 1280 DeclareMathSymbol mst varfam rbrace mathalpha mst font tbu 125 1281 DeclareRobustCommand mst lbrace 1282 ifmmode mathopen mst varfam lbrace else textbraceleft fi 1283 DeclareRobustCommand mst rbrace 1284 ifmmode mathclose mst varfam rbrace else textbraceright fi 1285 mst doGnonlet
120. t should be loaded last after all packages dealing with math things The brace control sequences and have their own supplementary switch which is even less activated by default The reason is that after MTexplic itbracesobeymathxx 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 we can now enjoy a a gt b a a gt b a a gt b or even a a gt b P 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 lt and gt or to any of the other characters such as the slashes 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 lt used as a delimiter is in IATpX a langle With standard ATEX left lt x right gt gives x Actually mathastext does try to pick up most of the small variants in the text font left lt x right gt gives lt r gt but left lt b right gt gives b If you don t like that use the option nosmalldelims it is indeed perhaps a bit strange to have lt z gt next to X again before blaming me consider us
121. ters expandafter the mst do nonletters 1286 mst dobraces let mst lbrace let mst rbrace 1287 fi end of ifmst alldelims 70 1288 newcommand MTexplicitbracesobeymathxx let mst dobraces firstofone 1289 newcommand MTexplicitbracesdonotobeymathxx let mst dobraces gobble 1290 MTexplicitbracesdonotobeymathxx specials 1 14b 2011 04 02 the redefinitions of and amp were buggy this showed up when 10 or more math families had been created 1 15f 2012 10 23 the code although working was perhaps a bit insane and had definitions which could surprise other packages For example it did renewcommand ifmmode mt mmode percent else char37 relax fi But it seems this provokes a problem with microtype Perhaps the problem was that the com mand was not declared robust For the dollar TEX itself does DeclareRobustCommand ifmmode mathdollar else textdollar fi So here I just modify mathdollar Then we have in latex 1tx the same definitions as in plain tex chardef chardef amp amp and chardef It turns out that we can just adjust the mathcodes of these characters and achieve exactly what is wanted for the corre sponding one char control sequences In math mode the control sequence will use the specified mathcode So here it is not a redefinition of the control sequences purely an adjustment of mathcodes 1 2d 2013 01 01 previous versions imposed the variable family type I her
122. th using label and ref in and outside of math mode But a difficulty arises when some other package has made the character globally active everywhere in the document The action of mathastext is made anew at each mathematical inline or displayed formula If it is detected that a character has been activated then nothing further will be done so the mathastext feature for that character is lost except if it appears that this activation was done by the Ba bel system In that case mathastext does not make the character mathematically active but it modifies in the appropriate manner the action of Babel for that char acter in math mode Furthermore mathastext makes the character mathematically inactive Here is indeed some code that you should ABSOLUTELY NOT try at home italic correction insertion for the latin letters receptivity to the math alphabet action for the other characters right quote and the latin letters are concerned here it seems highly unprobable that a latin letter a z A Z will have been made globally active only letters never being used in command names are possible candidates but mathastext has been designed to cope with it should it happen 21 documentclass article usepackage french babel usepackage mathtools mathtoolsset centercolon begin document end document DO NOT DO THIS AT HOME it creates an infinite loop This is due to the fact that the colon is simultan
123. thalpha mst font tbu 21 985 expandafter mst addtodo nonletters string mathclose mst varfam exclam 986 DeclareMathSymbol mathclose mst font tbu 3F 987 DeclareMathSymbol mst varfam question mathalpha mst font tbu 3F 988 expandafter mst addtodo nonletters string mathclose mst varfam question 989 fi MTast 1 12d The ast or is defined in fontmath 1tx as a binary operator from the symbols font Usually the asterisk from the text font is in a raised position Previous versions of mathastext did nothing with ast but strangely defined to be the one from the text font with type mathalpha The package now leaves by default both and ast untouched and if passed option asterisk replaces both of them with a lowered text asterisk or the one from the Symbol font and of type mathbin A trick is used to have optionally and ast also obey the math alphabets The user macro MTlowerast sets the amount of lowering to be applied to the text asterisk 1 12e Somehow there was a big omission in 1 12d the command MTlowerast as described in the manual was missing nota bene it is assumed that is of type other when mathastext is loaded it should neither be active nor of type letter 990 def mst doasterisk let ast mst ast 62 991 expandafter let csname mst ifdone endcsname iffalse 992 mst mathactivate mst ast for the order cf mst do activecase 993 ifmst asterisk typeout asterisk string ast spa
124. the defaults are set to zero Indeed VB AN and f look fine without additional skips If the document decides then to declare in the preamble a math version with an upright font it is thus recommended to use the commands in the preamble before the Mathastext version_name or MTDe clareVersion command defining the version They will be remembered when this math version is entered in the document Or the commands may be used directly in the document Also when the subdued option has been used the normal and bold math versions have by default zero length skips no preamble setting will change that Neverthe less it is possible to use also then the commands in the body of the document 2 8 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 mathastext 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 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
125. the epigrafica and kerkis packages the 7 The mu is a unit length used in math mode math unit 1 18th of the quad value of the symbol font in the current style Its value is relative to the current math style Its use is mandatory in the commands described here the derivative glyph from the txfonts math symbols adapts itself better to an upright letter no skip seems to be needed then 16 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 mathastext math mode you can do the following 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 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 eulergreek the Greek letters will be taken from the Euler font the document does no
126. the package else OT1 1 12b I add LY1 which is quasi like OT1 1791 edef mst tmp enc encodingdefault rather one too many than sorry 1792 ifmst mathaccents typeout math accents 1793 ifx mst ti mst tmp enc 1794 DeclareMathAccent acute mathalpha mtoperatorfont 1 1795 DeclareMathAccent grave mathalpha mtoperatorfont 0 1796 DeclareMathAccent ddot mathalpha mtoperatorfont 4 1797 DeclareMathAccent tilde mathalpha mtoperatorfont 3 82 Math sizes 1798 DeclareMathAccent bar mathalpha mtoperatorfont 9 1799 DeclareMathAccent breve mathalpha mtoperatorfont 8 1800 DeclareMathAccent check mathalpha mtoperatorfont 7 1801 DeclareMathAccent hat mathalpha mtoperatorfont 2 1802 DeclareMathAccent dot mathalpha mtoperatorfont 10 1803 DeclareMathAccent mathring mathalpha mtoperatorfont 6 1804 else 1805 DeclareMathAccent acute mathalpha mtoperatorfont 19 1806 DeclareMathAccent grave mathalpha mtoperatorfont 18 1807 DeclareMathAccent ddot mathalpha mtoperatorfont 127 1808 DeclareMathAccent tilde mathalpha mtoperatorfont 126 1809 DeclareMathAccent bar mathalpha mtoperatorfont 22 1810 DeclareMathAccent breve mathalpha mtoperatorfont 21 1811 DeclareMathAccent check mathalpha mtoperatorfont 20 1812 DeclareMathAccent hat mathalpha mtoperatorfont 94 1813 DeclareMathAccent dot mathalpha mtoperatorfont 95 1814 DeclareM
127. the specified encoding family series and shape for the letters and digits and all other afflicted characters in math mode The optional ar gument tsh specifies a shape for the letters for example itdefault or directly it or sc e MTDeclareVersion ltsh name enc fam ser sh declares that the document will have access to the font with the specified characteristics under the math version name name For example MTDeclareVersion sc palatino T1 ppl b sl declares under the name palatino a version where mathematics will be type set using the Palatino font in Tl encoding bold slanted and the letters will in fact be in caps and small caps and bold When the optional argument is absent and mathastext was loaded with the italic option then the default letter shape will be it else letters will have the same shape as used for digits and operator names e MTboldvariant var when used before Mathastext specifies which bold b sb bx to be used by mathbf and boldmath Default is the bfde fault at the time of loading mathastext When used before the declaration of a version decides the way mathbf will act in this version e MTEulerScale factor scales the Euler font by factor e MTSymbolScale factor scales the Symbol font by factor e MTitgreek MTupgreek MTitGreek MTupGreek optional commands ac tive only in the case of the LGRgreek option to decide the shape of
128. tmp enc encodingdefault 1151 ifx mst tmp enc mst eui xetex and unicode font 1152 XeTeXmathchardef hbar 7 symmtletterfont 0127 relax 1153 else 1154 ifx mst tmp enc mst euii luatex and unicode font 1155 luatexUmathchardef hbar 7 symmtletterfont 0127 relax 4 4 or 210F 1156 else I must leave open the T1 OT1 possibility also for XeTeX or LuaTeX 1157 ifx mst ti mst tmp enc 1158 DeclareMathAccent mst ltbar mathalpha mtletterfont 9 1159 else 4 4 assume OT1 Bad idea Should not provoke an error anyhow 1160 DeclareMathAccent mst ltbar mathalpha mtletterfont 22 1161 fi 1162 def hbar mst mathrlap mst ltbar h 1163 fi fi 1164 ifmst nohbar else typeout string hbar do theG hbarstuff fi As h is from mtletterfont the accent mst ltbar is the 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 knew how to do for accents what I did for the endash I could do it for all encodings Surely easy for a TEXpert Not to mention if he she changes the letter shape one never should give so much freedom to users Well this construction gives an acceptable result for some of the fonts I have tested whether upright or in italics 1 15d Oct 13 2012 The mathcode thing with is belatedly sorry made Unicode com patible 1165 ifmst noplus else typeout string a
129. tobeymathxx MT nonlettersobeymathxx MTnonlettersdonotobeymathxx MTexplicitbra cesobeymathxx MTexplicitbracesdonotobeymathxx MTeasynonletter sobeymathxx MTeasynonlettersdonotobeymathxx these commands with out argument must be used outside of math mode mathastext issues au tomatically MTmathoperatorsobeymathxx MTeasynonlettersobeymathxx and and MTnonlettersdonotobeymathxx at the time of usepackage math astext See the discussion in section ZA The explicit braces activation works only when MTnonlettersobeymathxx has already been used e MTicinmath this command tells mathastext to add italic corrections after all letters in math mode Its effect is cancelled inside math alphabets ex 28 cept mathnormal The command is issued by default in the preamble when the shape of the letters used in math mode is neither italic nor slanted It is reissued each time a math version is entered under the same conditions and except of course for the normal and bold subdued math versions Its effect is local to the group or environment in which it has been issued From inside math mode it will only revert an earlier MTnoicinmath from the same math group and the math mode itself must have been entered with the italic corrections on e MTnoicinmath this command deactivates the package added italic correc tions It can be used inside as well as outside of math mode or in the preamble of the document Its effect remains lo
130. 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 1031 ifmst nopunct else typeout punctuation string string string string string and 1032 DeclareMathSymbol mathpunct mst font tbu 2C 63 relbar 1033 DeclareMathSymbol mst varfam comma mathalpha mst font tbu 2C 1034 expandafter mst addtodo nonletters string mathpunct mst varf am comma 1035 DeclareMathSymbol mathord mst font tbu 2E 1036 DeclareMathSymbol mst varfam dot mathalpha mst font tbu 2E 1037 mst addtodo easynonletters mst varfam dot 1038 DeclareMathSymbol mathrel mst font tbu 3A relation spacing 1039 DeclareMathSymbol mst varfam colon mathalpha mst font tbu 3A 1040 expandaf ter mst addtodo nonletters string mathrel mst varfam colon 1041 ifpackageloaded amsmath 1042 colon defined in amsmath sty in terms of with some enlarged explicit 1043 spacing No need to intervene 1044 no amsmath use standard punctuation spacing 1045 let colon undefined 1046 the rea
131. ts 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 2 3 Main options 2 3 1 The 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 mathastext Nevertheless soon after I posted the initial version of the package to CTAN I was overwhelmed by numerous questions 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 There is also an option frenchmath to make the uppercase letters nevertheless upright because this is the way of traditional French mathematical typography 2 3 2 The defaultmathsizes option The default sizes give for subscripts of subscripts barely legible glyphs author s opinion So mathastext makes more reasonable choices It also redefines Huge and defines a HUGE size copied from the moresize package To cancel all of this use option defaultmathsizes 2 3 3 The subdued option This option was introduced in v1 15 It provide
132. uantity q ayy Pv differential equation dq 1 1 1 1 dq 1 1 1 da c 42 db 219 a 1 g b lab b b 1 g b db ad 1 q b adi Bb y b 1 amp b b 1 b2 b 1 q q 1 q b satisfies as function of b a the with parameters a B 7 5 oa tnt on Notice that the Latin and Greek letters are in upright shape But perhaps we insist on obeying the standardized habits Let X Y be two functions of a variable a If they obey the differential system VIIy n d gt 2na aX Y X vX 1 X n E dy v DY 1 Y 2na X aY en lv Ja l a 1 aXY aX Y Say satisfies as function of b a the Py differ then the quantity g a ential equation dq 1f1 1 1 dq 1 1 1 dq db 2 q q 1 q bf db b b 1 q bf db qq 1 q b ga ON ena b b 1 g 4 1 q b 2 2 with parameters a B y 8 ew i Ltr ey This was typeset using the Times font available in any TRR 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 Let X Y be two functions of a variable a If they obey the differential system Vl d 2na aX Y X vX 1 X 1 aXy Tia v 12214 aXY d gt 2na X aY erna re then the quantity q a wey satisfies as function of b a the Py differential equation dg aifi 1 1 agi YA 1 1 Ya d
133. ue 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 BTRK and PdfATFX there is no such limitation and all 8bit encodings containing these glyphs should be ok fontspec one more note to users of XqIfX LualATRX with fontspec it has to be loaded with the option no math and before mathastext vec accent The default vec accent is not appropriate for upright letters so mathastext provides a fouriervec which takes its glyph in a Fourier font and an Ersatz pmvec which is reasonably good looking on upright letters and works with the rightarrow glyph Contrarily to version 1 0 the de fault vec is not overwritten with fouriervec And contrarily to version 1 1 one now needs to pass the option fouriervec to have the math accent fouriervec defined by the package math alphabets e We define a new math alphabet command mathnormalbold which gives direct access to the bold version of the mathnormal alphabet rather than using either the bm command from the bm package or the boldsymbol command from the amsbsy package As it does not exist in the default ATEX math font set up this alphabet is not subjected to the subdued option action e The other math alphabet changing commands defined by the package are MathEulerBold MathEuler and MathPSymbol 34with the option symbolmisc the asterisk is picked from the Symbol font and the amount of
134. 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 mathbf giving in the normal subdued math version when non letters are declared to obey math alphabets 11 Important the package does MTnonlettersdonotobeymathxx by default The reason is that activating the mechanism adds some constraints to the way things must be input adding usepackage mathastext MTnonlettersobey mathxx to a pre existing document might well create errors All these characters treated by mathastext such as lt now represent in math mode only two tokens and this will utterly confuse TEX if some precautions are not taken x R7 or mathopen lt A mathclose gt must now be coded as x R and mathopen lt A mathclose gt the rule is to do as if lt or gt were each really two characters Even if this rule is respected in the document source it is still a possibility that incompatibilities with other packages will arise because mathastext does a mathematical activation of the characters which could be unexpected and unchecked for by other packages This is precisely the case with the amsmath package and the problem goes away by just making sure that amsmath is loaded before mathastext generally speaking mathastex
135. ve characters dating back to the 1 2 version Also an oversight in the implementation of the italic correction features from 1 2b was corrected Version 1 2d introduced the asterisk option strangely the command MTlow erast was not the one described in the manual this has been corrected and solved a problem of compatibility with amsmath The main new features in versions 1 2 and 1 2b were the and respectively added italic corrections in math mode Both use mathematically active characters and some thorny technical problems related to globally active characters were finally solved to almost complete satisfaction let s hope only in the current 1 2e version These issues are commented upon in the compatibility section in the test file testmathastextalphabets tex and in the commented source code Earlier version 1 15 introduced the concept of the 2 What mathastext does 2 1 Examples mathastext s basic aim is to have the same font for text and mathematics With hundreds of free text fonts packaged for TFX and only a handful of math ones chances are your favorite text font does not mix so well with the available math ones mathastext may then help Here is an example with Latin Modern typewriter proportional Let X Y be two functions of a variable a If they obey the differential system VI n 2na ax Y 1 a 1 aXxY 2na X aY 1 a21 aXY ao x vxK 1 xX2 da d a Y v 1Y 1 Y7 da axX Y then the q
136. would be crazy and also and the left quote 1 2b 2012 12 28 now that we understand the great advantages of 8000 we do it also for all letters a z and A Z to insert automatically the italic corrections See the Miscussionl in the user manual Ironically I wrote the code initially for the italic option only to realize later it was more suitable to using an upright text font in math mode Note 1 2e 2013 01 10 corrects a bad oversight of 1 2b in mst mathactivate which made the reproduction of the user manual illustrations with f_i i impossible As mst mathactivate was used also to get the non letters obey math alphabet while maintaining the TEX spacings I could not use group braces I should have added them later in the case of letters but then forgot Fixed the group braces do not prevent ligatures when the letters are arguments to the math alphabet commands the added macro mst itcorr then expands to nothing MTnoicinmath can be used inside math mode and has its scope limited by the group of course MTicalsoinmathxx is destined to be used inside mathnormalbold as I didn t want to add the complication of extracting the family number used inside mathnormalbold will perhaps come back if I have time to spend on source2e MTicinmath can also be used inside math mode but it can then only revert an earlier MT noicinmath inside the same math group So the math mode had to be entered with italic cor rections on
137. y operator The reason for making it optional is that af ter this R or R ast do not work and have to be written R7 or R7 ast Nothing is changed to the large math symbols except for and gt in inline math which like here will be taken from the Symbol Font if option symbol misc was used 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 3 1 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 Compare f with f the amount of lowering can be customized 2 2 2 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 renewcommand familydefault sfdefault usepackage mathastext renewcommand familydefault rmdefault begin document 2 2 3 always load mathastext last As said already none of the large math symbols is modified in any way by mathastext Only loading some math font packages such as fourier kpfonts mathabx mathdesign txfonts newtxmath etc will change them Think of loading these packages before mathastext else they might undo what mathastext did The more common symbols can be taken fro
138. y the way I always found the iff to be too wide but I follow here the default Also although there is a longmapsto in standard TEX if I am not mistaken there is no longto So I define one here I could not construct in the same manner Longrightarrow etc as the sign from Symbol does not combine easily with the logical arrows well I could have done some box manipulations but well life is finite 1 13b I correct the brutal re definitions of prod and sum from the earlier versions of the package most of the time the Symbol glyphs do appear to be too small in display mode The new redefinitions do have some defects displaystyle prod_1 2 changes the position of limits but not the glyph itself and textstyle prod_172 change the limits but switches to the CM inline math glyph So I tried renewcommand prod mathchoice mst prod prodpsy prodpsy prodpsy but this did not go well with subscripts and exponents Note oct 2012 maybe I should re examine what I did 1318 ifmst symbolmisc typeout symbolmisc miscellaneous math symbols from Symbol font 1319 let mst prod prod 1320 let defaultprod prod 1321 DeclareMathSymbol prodpsy mathop mtpsymbol 213 1322 renewcommand prod ifinner prodpsy else mst prod fi 1323 let mst sum sum 1324 let defaultsum sum 1325 DeclareMathSymbol sumpsy mathop mtpsymbol 229 1326 renewcommand sum ifinner sumpsy else mst sum fi 1327 DeclareMathSymbol mst im
139. ymbol mst psi mathalpha mtlgrfontlower 121 1746 DeclareMathSymbol mst omega mathalpha mtlgrfontlower 119 1747 DeclareMathSymbol mst digamma mathalpha mtlgrfontlower 147 1748 DeclareMathSymbol mst Digamma mathalpha mtlgrfontlower 195 1749 cf http milde users sourceforge net LGR lgrxenc def html 1750 et greek ldf du package babel 1751 ifmst subdued else mst setuplgrgreek fi 1752 fi In 1 0 I had them of type mathord here I choose mathalpha If I used i and j from the text font the problem would be with the fontsize if in scriptstyle The amsmath text would do the trick 1 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 1753 edef mst Qtmp enc encodingdefault 1754 mst goaheadtrue 1755 ifx mst tmp enc mst eui xetex and unicode font 81 1756 XeTeXmathchardef inodot 7 symmtletterfont 0131 relax 1757 XeTeXmathchardef jnodot 7 symmtletterfont 0237 relax 1758 else 1759 ifx mst tmp enc mst euii luatex and unicode font 1760 luatexUmathchardef inodot 7 symmtletterfont 0131 relax 1761 luatexUmathchardef jnodot 7 symmtletterfont 0237 relax 1762 else 1763 ifx mst tmp enc mst ti T1 1764 DeclareMathSymbol inodot mathalpha mtletterfont 25 1765 DeclareMathSymbol jnodot mathalpha mtletterfont 26 1766 else 1767 ifx mst tmp enc mst oti OT1 1768 DeclareMathSymbol inodot matha
140. ymbolre Greek letters 1352 DeclareMathSymbol clubsuit mathord mtpsymbol 167 1353 DeclareMathSymbol diamondsuit mathord mtpsymbol 168 1354 DeclareMathSymbol heartsuit mathord mtpsymbol 169 1355 DeclareMathSymbol spadesuit mathord mtpsymbol 170 1356 DeclareMathSymbol smallint mathop mtpsymbol 242 1357 DeclareMathSymbol wedge mathbin mtpsymbol 217 1358 DeclareMathSymbol vee mathbin mtpsymbol 218 1359 DeclareMathSymbol cap mathbin mtpsymbol 199 1360 DeclareMathSymbol cup mathbin mtpsymbol 200 1361 DeclareMathSymbol bullet mathbin mtpsymbol 183 1362 DeclareMathSymbol div mathbin mtpsymbol 184 1363 DeclareMathSymbol otimes mathbin mtpsymbol 196 1364 DeclareMathSymbol oplus mathbin mtpsymbol 197 1365 DeclareMathSymbol pm mathbin mtpsymbol 177 1366 DeclareMathSymbol times mathbin mtpsymbol 180 1367 DeclareMathSymbol proptopsy mathrel mtpsymbol 181 1368 DeclareMathSymbol mid mathrel mtpsymbol 124 1369 DeclareMathSymbol leg mathrel mtpsymbol 163 1370 DeclareMathSymbol geg mathrel mtpsymbol 179 1371 DeclareMathSymbol approx mathrel mtpsymbol 187 1372 DeclareMathSymbol supset mathrel mtpsymbol 201 1373 DeclareMathSymbol subset mathrel mtpsymbol 204 1374 DeclareMathSymbol supseteg mathrel mtpsymbol 202 1375 DeclareMathSymbol subseteg mathrel mtpsymbol 205 1376 DeclareMathSymbol in m
141. ymmtoperatorfont 2014 re lax 1110 else 1111 ifx mst tmp enc mst euii luatextfontspec 65 1112 AtBeginDocument luatexUmathcode 2 symmtoperatorfont 2014 relax 1113 AtBeginDocument luatexUmathchardef mst varfam minus 7 symmtoperatorfont 2014 re lax 1114 else 1115 ifx mst tmpOenc mst ti T1 1116 DeclareMathSymbol mathbin mtoperatorfont 22 1117 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 22 1118 else 1119 ifx mst tmp enc mst oti OT1 1120 DeclareMathSymbol mathbin mtoperatorfont 124 1121 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 124 1122 else 1123 ifx mst tmp enc mst lyi LY1 1124 DeclareMathSymbol mathbin mtoperatorfont 151 1125 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 151 1126 else make sure we have neither xetex nor luatex 1127 ifmst XeTeX mst aborttrue else ifmst LuaTeX mst aborttrue else 1128 DeclareMathSymbol mathbin mtoperatorfont 1129 DeclareMathSymbol mst varfam minus mathalpha mtoperatorfont 1130 expandafter the expandaf ter csname mst tmp enc string textemdash endcsname 131 fi fi 1132 fi fi fi fi fi 1133 ifmst nominus else typeout minus as endash 1134 mst abort false 1135 ifmst endash do the endashstuff else 1136 ifmst emdash do the emdashstuff else 1137 DeclareMathSymbol mathbin mst font tbu 2D 1138 DeclareMathSymbol mst varfamOm

Download Pdf Manuals

image

Related Search

Related Contents

ExacTime 6000  13 sept - Diocèse de Verdun  SR 12 163 1 1003 notice STERILOR Sel Version 04  DELL Latitude E5450  Design mode d`emploi  

Copyright © All rights reserved.
Failed to retrieve file