diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-18 21:45:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-18 21:45:46 +0000 |
commit | 9746eec6f52784c17ea0fdd0c1d47e8deb9ca0f8 (patch) | |
tree | 093bb019d314b4b6e27f3f9dca5f69308ac68fb8 | |
parent | ff1a4fd0b6a85c7280ae498ad531d5397bedea87 (diff) |
unicode-math (18nov17)
git-svn-id: svn://tug.org/texlive/trunk@45845 c570f23f-e606-0410-a88d-b1316a301751
49 files changed, 3770 insertions, 2513 deletions
diff --git a/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md b/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md index 3048e71c6f6..0353ce95694 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md +++ b/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md @@ -1,6 +1,13 @@ CHANGE HISTORY -------------- +- v0.8i (2017/11/18) + + * Many internal changes to support future work. + * Improved documentation describing the `\mathXX` and `\symXX` commands. + * Documentation is now split into `unicode-math.pdf` (for the user) + and `unicode-math-code.pdf` (for the typeset source code). + - v0.8h (2017/10/09) * Some bugs crept in in the last update due to some code rearrangement: diff --git a/Master/texmf-dist/doc/latex/unicode-math/CONTRIBUTING.md b/Master/texmf-dist/doc/latex/unicode-math/CONTRIBUTING.md deleted file mode 100644 index 860883abd29..00000000000 --- a/Master/texmf-dist/doc/latex/unicode-math/CONTRIBUTING.md +++ /dev/null @@ -1,41 +0,0 @@ -# Guidelines for issues and pull requests - -## Issues - -Thanks for taking the time to report an issue! -Any apologies that I take longer, sometimes *way longer*, than I should to address them. - -There are two important key points for submitting an issue: - -* When submitting an issue, please include a *complete* minimal example. -* When loading maths fonts, please do so by *filename* only. -* If you are using a proprietary/unusual font, please try a maths font in TeX Live to see - if it exhibits the same behaviour; it's obviously much harder for me to test with fonts - I don't yet have or can't access. - -For example, this is a good minimal example: - - \documentclass{article} - \usepackage{unicode-math} - \setmathfont{texgyrepagella-math.otf} - \begin{document} - \[ - x^2 + y^2 = z^2 - \] - \end{document} - -This is an example of a *bad* example: - - \usepackage{unicode-math} - \setmathfont{TeX Gyre Pagella Math} - - % later: - \[ - x^2 + y^2 = z^2 - \] - -## Pull Requests - -I'm usually not fussy! Generally I'll just be impressed you've taken the effort. - -If you are changing documentation only (i.e., no code changes), you can add `[ci skip]` to the commit message and the test suite won't be run to check that the changes haven't broken anything. diff --git a/Master/texmf-dist/doc/latex/unicode-math/LICENSE b/Master/texmf-dist/doc/latex/unicode-math/LICENSE new file mode 100644 index 00000000000..22443139013 --- /dev/null +++ b/Master/texmf-dist/doc/latex/unicode-math/LICENSE @@ -0,0 +1,416 @@ +The LaTeX Project Public License +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +LPPL Version 1.3c 2008-05-04 + +Copyright 1999 2002-2008 LaTeX3 Project + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + + +PREAMBLE +======== + +The LaTeX Project Public License (LPPL) is the primary license under +which the LaTeX kernel and the base LaTeX packages are distributed. + +You may use this license for any work of which you hold the copyright +and which you wish to distribute. This license may be particularly +suitable if your work is TeX-related (such as a LaTeX package), but +it is written in such a way that you can use it even if your work is +unrelated to TeX. + +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', +below, gives instructions, examples, and recommendations for authors +who are considering distributing their works under this license. + +This license gives conditions under which a work may be distributed +and modified, as well as conditions under which modified versions of +that work may be distributed. + +We, the LaTeX3 Project, believe that the conditions below give you +the freedom to make and distribute modified versions of your work +that conform with whatever technical specifications you wish while +maintaining the availability, integrity, and reliability of +that work. If you do not see how to achieve your goal while +meeting these conditions, then read the document `cfgguide.tex' +and `modguide.tex' in the base LaTeX distribution for suggestions. + + +DEFINITIONS +=========== + +In this license document the following terms are used: + + `Work' + Any work being distributed under this License. + + `Derived Work' + Any work that under any applicable law is derived from the Work. + + `Modification' + Any procedure that produces a Derived Work under any applicable + law -- for example, the production of a file containing an + original file associated with the Work or a significant portion of + such a file, either verbatim or with modifications and/or + translated into another language. + + `Modify' + To apply any procedure that produces a Derived Work under any + applicable law. + + `Distribution' + Making copies of the Work available from one person to another, in + whole or in part. Distribution includes (but is not limited to) + making any electronic components of the Work accessible by + file transfer protocols such as FTP or HTTP or by shared file + systems such as Sun's Network File System (NFS). + + `Compiled Work' + A version of the Work that has been processed into a form where it + is directly usable on a computer system. This processing may + include using installation facilities provided by the Work, + transformations of the Work, copying of components of the Work, or + other activities. Note that modification of any installation + facilities provided by the Work constitutes modification of the Work. + + `Current Maintainer' + A person or persons nominated as such within the Work. If there is + no such explicit nomination then it is the `Copyright Holder' under + any applicable law. + + `Base Interpreter' + A program or process that is normally needed for running or + interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these + are not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `LaTeX-Format' or in the case of files belonging to the + `LaTeX-format' a program implementing the `TeX language'. + + + +CONDITIONS ON DISTRIBUTION AND MODIFICATION +=========================================== + +1. Activities other than distribution and/or modification of the Work +are not covered by this license; they are outside its scope. In +particular, the act of running the Work is not restricted and no +requirements are made concerning any offers of support for the Work. + +2. You may distribute a complete, unmodified copy of the Work as you +received it. Distribution of only part of the Work is considered +modification of the Work, and no right to distribute such a Derived +Work may be assumed under the terms of this clause. + +3. You may distribute a Compiled Work that has been generated from a +complete, unmodified copy of the Work as distributed under Clause 2 +above, as long as that Compiled Work is distributed in such a way that +the recipients may install the Compiled Work on their system exactly +as it would have been installed if they generated a Compiled Work +directly from the Work. + +4. If you are the Current Maintainer of the Work, you may, without +restriction, modify the Work, thus creating a Derived Work. You may +also distribute the Derived Work without restriction, including +Compiled Works generated from the Derived Work. Derived Works +distributed in this manner by the Current Maintainer are considered to +be updated versions of the Work. + +5. If you are not the Current Maintainer of the Work, you may modify +your copy of the Work, thus creating a Derived Work based on the Work, +and compile this Derived Work, thus creating a Compiled Work based on +the Derived Work. + +6. If you are not the Current Maintainer of the Work, you may +distribute a Derived Work provided the following conditions are met +for every component of the Work unless that component clearly states +in the copyright notice that it is exempt from that condition. Only +the Current Maintainer is allowed to add such statements of exemption +to a component of the Work. + + a. If a component of this Derived Work can be a direct replacement + for a component of the Work when that component is used with the + Base Interpreter, then, wherever this component of the Work + identifies itself to the user when used interactively with that + Base Interpreter, the replacement component of this Derived Work + clearly and unambiguously identifies itself as a modified version + of this component to the user when used interactively with that + Base Interpreter. + + b. Every component of the Derived Work contains prominent notices + detailing the nature of the changes to that component, or a + prominent reference to another file that is distributed as part + of the Derived Work and that contains a complete and accurate log + of the changes. + + c. No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original version + of the Work, provide any support, including (but not limited to) + the reporting and handling of errors, to recipients of the + Derived Work unless those persons have stated explicitly that + they do provide such support for the Derived Work. + + d. You distribute at least one of the following with the Derived Work: + + 1. A complete, unmodified copy of the Work; + if your distribution of a modified component is made by + offering access to copy the modified component from a + designated place, then offering equivalent access to copy + the Work from the same or some similar place meets this + condition, even though third parties are not compelled to + copy the Work along with the modified component; + + 2. Information that is sufficient to obtain a complete, + unmodified copy of the Work. + +7. If you are not the Current Maintainer of the Work, you may +distribute a Compiled Work generated from a Derived Work, as long as +the Derived Work is distributed to all recipients of the Compiled +Work, and as long as the conditions of Clause 6, above, are met with +regard to the Derived Work. + +8. The conditions above are not intended to prohibit, and hence do not +apply to, the modification, by any method, of any component so that it +becomes identical to an updated version of that component of the Work as +it is distributed by the Current Maintainer under Clause 4, above. + +9. Distribution of the Work or any Derived Work in an alternative +format, where the Work or that Derived Work (in whole or in part) is +then produced by applying some process to that format, does not relax or +nullify any sections of this license as they pertain to the results of +applying that process. + +10. a. A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause 6 above, in regard to the Work, though it does not have + to honor the rest of the conditions in this license. + + b. If a Derived Work is distributed under a different license, that + Derived Work must provide sufficient documentation as part of + itself to allow each recipient of that Derived Work to honor the + restrictions in Clause 6 above, concerning changes from the Work. + +11. This license places no restrictions on works that are unrelated to +the Work, nor does this license place any restrictions on aggregating +such works with the Work by any means. + +12. Nothing in this license is intended to, or may be used to, prevent +complete compliance by all parties with all applicable laws. + + +NO WARRANTY +=========== + +There is no warranty for the Work. Except when otherwise stated in +writing, the Copyright Holder provides the Work `as is', without +warranty of any kind, either expressed or implied, including, but not +limited to, the implied warranties of merchantability and fitness for a +particular purpose. The entire risk as to the quality and performance +of the Work is with you. Should the Work prove defective, you assume +the cost of all necessary servicing, repair, or correction. + +In no event unless required by applicable law or agreed to in writing +will The Copyright Holder, or any author named in the components of the +Work, or any other party who may distribute and/or modify the Work as +permitted above, be liable to you for damages, including any general, +special, incidental or consequential damages arising out of any use of +the Work or out of inability to use the Work (including, but not limited +to, loss of data, data being rendered inaccurate, or losses sustained by +anyone as a result of any failure of the Work to operate with any other +programs), even if the Copyright Holder or said author or said other +party has been advised of the possibility of such damages. + + +MAINTENANCE OF THE WORK +======================= + +The Work has the status `author-maintained' if the Copyright Holder +explicitly and prominently states near the primary copyright notice in +the Work that the Work can only be maintained by the Copyright Holder +or simply that it is `author-maintained'. + +The Work has the status `maintained' if there is a Current Maintainer +who has indicated in the Work that they are willing to receive error +reports for the Work (for example, by supplying a valid e-mail +address). It is not required for the Current Maintainer to acknowledge +or act upon these error reports. + +The Work changes from status `maintained' to `unmaintained' if there +is no Current Maintainer, or the person stated to be Current +Maintainer of the work cannot be reached through the indicated means +of communication for a period of six months, and there are no other +significant signs of active maintenance. + +You can become the Current Maintainer of the Work by agreement with +any existing Current Maintainer to take over this role. + +If the Work is unmaintained, you can become the Current Maintainer of +the Work through the following steps: + + 1. Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of + an Internet or similar search. + + 2. If this search is successful, then enquire whether the Work + is still maintained. + + a. If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + b. If the search is unsuccessful or no action to resume active + maintenance is taken by the Current Maintainer, then announce + within the pertinent community your intention to take over + maintenance. (If the Work is a LaTeX work, this could be + done, for example, by posting to comp.text.tex.) + + 3a. If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + b. If the Current Maintainer is not reachable and the Copyright + Holder agrees that maintenance of the Work be passed to you, + then this takes effect immediately upon announcement. + + 4. If you make an `intention announcement' as described in 2b. above + and after three months your intention is challenged neither by + the Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as + to name you as the (new) Current Maintainer. + + 5. If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of 3b) or 4), then that Current Maintainer must + become or remain the Current Maintainer upon request provided + they then update their communication data within one month. + +A change in the Current Maintainer does not, of itself, alter the fact +that the Work is distributed under the LPPL license. + +If you become the Current Maintainer of the Work, you should +immediately provide, within the Work, a prominent and unambiguous +statement of your status as Current Maintainer. You should also +announce your new status to the same pertinent community as +in 2b) above. + + +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE +====================================================== + +This section contains important instructions, examples, and +recommendations for authors who are considering distributing their +works under this license. These authors are addressed as `you' in +this section. + +Choosing This License or Another License +---------------------------------------- + +If for any part of your work you want or need to use *distribution* +conditions that differ significantly from those in this license, then +do not refer to this license anywhere in your work but, instead, +distribute your work under a different license. You may use the text +of this license as a model for your own license, but your license +should not refer to the LPPL or otherwise give the impression that +your work is distributed under the LPPL. + +The document `modguide.tex' in the base LaTeX distribution explains +the motivation behind the conditions of this license. It explains, +for example, why distributing LaTeX under the GNU General Public +License (GPL) was considered inappropriate. Even if your work is +unrelated to LaTeX, the discussion in `modguide.tex' may still be +relevant, and authors intending to distribute their works under any +license are encouraged to read it. + +A Recommendation on Modification Without Distribution +----------------------------------------------------- + +It is wise never to modify a component of the Work, even for your own +personal use, without also meeting the above conditions for +distributing the modified component. While you might intend that such +modifications will never be distributed, often this will happen by +accident -- you may forget that you have modified that component; or +it may not occur to you when allowing others to access the modified +version that you are thus distributing it and violating the conditions +of this license in ways that could have legal implications and, worse, +cause problems for the community. It is therefore usually in your +best interest to keep your copy of the Work identical with the public +one. Many works provide ways to control the behavior of that work +without altering any of its licensed components. + +How to Use This License +----------------------- + +To use this license, place in each of the components of your work both +an explicit copyright notice including your name and the year the work +was authored and/or last substantially modified. Include also a +statement that the distribution and/or modification of that +component is constrained by the conditions in this license. + +Here is an example of such a notice and statement: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +Given such a notice and statement in a file, the conditions +given in this license document would apply, with the `Work' referring +to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being +generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' +referring to any `LaTeX-Format', and both `Copyright Holder' and +`Current Maintainer' referring to the person `M. Y. Name'. + +If you do not want the Maintenance section of LPPL to apply to your +Work, change `maintained' above into `author-maintained'. +However, we recommend that you use `maintained', as the Maintenance +section was added in order to ensure that your Work remains useful to +the community even when you can no longer maintain and support it +yourself. + +Derived Works That Are Not Replacements +--------------------------------------- + +Several clauses of the LPPL specify means to provide reliability and +stability for the user community. They therefore concern themselves +with the case that a Derived Work is intended to be used as a +(compatible or incompatible) replacement of the original Work. If +this is not the case (e.g., if a few lines of code are reused for a +completely different task), then clauses 6b and 6d shall not apply. + + +Important Recommendations +------------------------- + + Defining What Constitutes the Work + + The LPPL requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a + way for the licensee to determine which files constitute the Work. + This could, for example, be achieved by explicitly listing all the + files of the Work near the copyright notice of each file or by + using a line such as: + + % This work consists of all files listed in manifest.txt. + + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + diff --git a/Master/texmf-dist/doc/latex/unicode-math/MANIFEST.md b/Master/texmf-dist/doc/latex/unicode-math/MANIFEST.md new file mode 100644 index 00000000000..df005e9990f --- /dev/null +++ b/Master/texmf-dist/doc/latex/unicode-math/MANIFEST.md @@ -0,0 +1,77 @@ +# Manifest for unicode-math + +This file is automatically generated with `texlua build.lua manifest`. +Only ‘source’ files in the repository and derived files are included in this list; +it does not include ‘generated’ files such as PDF. + +## Source files + +* unimath-example.ltx +* um-code-pkgopt.dtx +* um-code-opening.dtx +* unicode-math-code.ltx +* um-code-usv.dtx +* unicode-math.ltx +* unimath-symbols.ltx +* um-code-epilogue.dtx +* unicode-math-table.tex +* um-doc-style.tex +* um-code-api.dtx +* um-code-msg.dtx +* um-doc.tex +* um-doc-nfsssummary.tex +* um-code-sscript.dtx +* um-code-base.dtx +* um-code-fontopt.dtx +* um-code-fontparam.dtx +* um-doc-mathfontdimen.tex +* um-code-ui.dtx +* um-code-mathmap.dtx +* um-code-mathtext.dtx +* um-doc-legacyfontdimen.tex +* unicode-math.dtx +* unicode-math.ins +* um-code-primes.dtx +* um-code-compat.dtx +* um-code-alphabets.dtx +* um-code-main.dtx +* um-code-variables.dtx +* um-doc-stixextract.tex +* um-code-setchar.dtx + +## Text and Documentation files + +* README.md +* CHANGES.md + +## Derived files + +* unicode-math-luatex.sty +* unicode-math-xetex.sty +* unicode-math.sty + +## Typeset documents + +* unicode-math.pdf +* unimath-example.pdf +* unicode-math-code.pdf +* unimath-symbols.pdf + +## Checking-specific support files + +* umtest-preamble.tex + +## Test files + +* mathit-symit.luatex.tlg +* mathit-symit.xetex.tlg +* fontname-log.luatex.tlg +* mathit-symit-var.lvt +* fontname-log.lvt +* fontname-log.xetex.tlg +* aaa-loading.luatex.tlg +* mathit-symit.lvt +* aaa-loading.lvt +* mathit-symit-var.luatex.tlg +* mathit-symit-var.xetex.tlg +* aaa-loading.xetex.tlg diff --git a/Master/texmf-dist/doc/latex/unicode-math/README.md b/Master/texmf-dist/doc/latex/unicode-math/README.md index 48d7a839831..5c72db9b573 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/README.md +++ b/Master/texmf-dist/doc/latex/unicode-math/README.md @@ -95,34 +95,36 @@ greater. [LPPL]: http://www.latex-project.org/lppl/ -This work is author-maintained and consists of the files +This work is author-maintained and consists of the code files: - unicode-math.dtx, -- unicode-math-*.dtx, -- unicode-math-table.tex, +- unicode-math.ins, +- um-code-*.dtx, +- unicode-math-table.tex; + +the documentation files: + +- unicode-math.ltx, +- unicode-math-code.ltx, +- um-doc*.tex, - unimath-example.ltx, -- unimath-symbols.ltx, -- unicode-math-testsuite.ltx; +- unimath-symbols.ltx; -the derived files +the derived files: - unicode-math.lua, - unicode-math-xetex.sty, - unicode-math-luatex.sty, - unicode-math.sty; -the compiled documentation files +the compiled documentation files: - unicode-math.pdf, +- unicode-math-code.pdf, - unimath-example.pdf, - unimath-symbols.pdf; -and the test suite for this package +and the test suite: -- testfiles/umtest-preamble.tex, +- testfiles/support/umtest-preamble.tex, - testfiles/*.(lvt|tlg). - -____________________________________ -Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> -Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> -Copyright 2012-2015 Khaled Hosny <khaledhosny@eglug.org> diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf b/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf Binary files differnew file mode 100644 index 00000000000..25edd19f389 --- /dev/null +++ b/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf b/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf Binary files differindex 0a60202eff9..d6f01362c18 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf +++ b/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf b/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf Binary files differnew file mode 100644 index 00000000000..89d173fbeaf --- /dev/null +++ b/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf Binary files differindex de512a5d0e2..037f7586e5c 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf +++ b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-alphabets.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-alphabets.dtx index c309019dbc5..348a5a22eb1 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-alphabets.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-alphabets.dtx @@ -1,12 +1,14 @@ -% \section{\DTXCURR --- Setting up alphabets} +%%^^A%% um-code-alphabets.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{Setting up alphabets} % \label{sec:setupalphabets} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % -% \subsubsection{Upright: up} +% \subsection{Upright: up} % % \begin{macrocode} \@@_new_alphabet_config:nnn {up} {num} @@ -97,7 +99,7 @@ } % \end{macrocode} % -% \subsubsection{Italic: it} +% \subsection{Italic: it} % % \begin{macrocode} \@@_new_alphabet_config:nnn {it} {Latin} @@ -181,7 +183,7 @@ } % \end{macrocode} % -% \subsubsection{Blackboard or double-struck: bb and bbit} +% \subsection{Blackboard or double-struck: bb and bbit} % % \begin{macrocode} \@@_new_alphabet_config:nnn {bb} {latin} @@ -225,7 +227,7 @@ } % \end{macrocode} % -% \subsubsection{Script and caligraphic: scr and cal} +% \subsection{Script and caligraphic: scr and cal} % % \begin{macrocode} \@@_new_alphabet_config:nnn {scr} {Latin} @@ -266,7 +268,7 @@ } % \end{macrocode} % -% \subsubsection{Fractur or fraktur or blackletter: frak} +% \subsection{Fractur or fraktur or blackletter: frak} % % \begin{macrocode} \@@_new_alphabet_config:nnn {frak} {Latin} @@ -284,7 +286,7 @@ } % \end{macrocode} % -% \subsubsection{Sans serif upright: sfup} +% \subsection{Sans serif upright: sfup} % \begin{macrocode} \@@_new_alphabet_config:nnn {sfup} {num} { @@ -325,7 +327,7 @@ } % \end{macrocode} % -% \subsubsection{Sans serif italic: sfit} +% \subsection{Sans serif italic: sfit} % % \begin{macrocode} \@@_new_alphabet_config:nnn {sfit} {Latin} @@ -362,7 +364,7 @@ } % \end{macrocode} % -% \subsubsection{Typewriter or monospaced: tt} +% \subsection{Typewriter or monospaced: tt} % \begin{macrocode} \@@_new_alphabet_config:nnn {tt} {num} { @@ -379,7 +381,7 @@ % \end{macrocode} % % -% \subsubsection{Bold Italic: bfit} +% \subsection{Bold Italic: bfit} % \begin{macrocode} \@@_new_alphabet_config:nnn {bfit} {Latin} { @@ -497,7 +499,7 @@ % \end{macrocode} % % -% \subsubsection{Bold Upright: bfup} +% \subsection{Bold Upright: bfup} % \begin{macrocode} \@@_new_alphabet_config:nnn {bfup} {num} { @@ -631,7 +633,7 @@ } % \end{macrocode} % -% \subsubsection{Bold fractur or fraktur or blackletter: bffrak} +% \subsection{Bold fractur or fraktur or blackletter: bffrak} % \begin{macrocode} \@@_new_alphabet_config:nnn {bffrak} {Latin} { @@ -644,7 +646,7 @@ } % \end{macrocode} % -% \subsubsection{Bold script or calligraphic: bfscr} +% \subsection{Bold script or calligraphic: bfscr} % \begin{macrocode} \@@_new_alphabet_config:nnn {bfscr} {Latin} { @@ -660,7 +662,7 @@ } % \end{macrocode} % -% \subsubsection{Bold upright sans serif: bfsfup} +% \subsection{Bold upright sans serif: bfsfup} % \begin{macrocode} \@@_new_alphabet_config:nnn {bfsfup} {num} { @@ -782,7 +784,7 @@ % \end{macrocode} % % -% \subsubsection{Bold italic sans serif: bfsfit} +% \subsection{Bold italic sans serif: bfsfit} % \begin{macrocode} \@@_new_alphabet_config:nnn {bfsfit} {Latin} { @@ -900,5 +902,24 @@ % \end{macrocode} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-api.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-api.dtx new file mode 100644 index 00000000000..434625df65b --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-api.dtx @@ -0,0 +1,42 @@ +%%^^A%% um-code-api.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{Programmers' interface} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% +% \begin{macro}{\unimath_get_mathstyle:} +% This command expands to the currently math style. +% \begin{macrocode} +\cs_new:Nn \unimath_get_mathstyle: + { + \tl_use:N \l_@@_mathstyle_tl + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macrocode} +%</package> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-base.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-base.dtx new file mode 100644 index 00000000000..0fbdc55c1ee --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-base.dtx @@ -0,0 +1,73 @@ +%%^^A%% um-code-base.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{The \texttt{unicode-math.sty} loading file} +% +% The \texttt{unicode-math.sty} file is a stub which loads necessary packages +% and then bifurcates into a XeTeX- or LuaTeX-specific version of the package. +% +% \begin{macrocode} +%<*base> +% \end{macrocode} +% Bail early if necessary. +% \begin{macrocode} +\ifdefined\XeTeXversion + \ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in% + \PackageError{unicode-math}{% + Cannot run with this version of XeTeX!\MessageBreak + You need XeTeX 0.9998 or newer.% + }\@ehd + \fi +\else\ifdefined\luatexversion + \ifnum\luatexversion<64% + \PackageError{unicode-math}{% + Cannot run with this version of LuaTeX!\MessageBreak + You need LuaTeX 0.64 or newer.% + }\@ehd + \fi +\else + \PackageError{unicode-math}{% + Cannot be run with pdfLaTeX!\MessageBreak + Use XeLaTeX or LuaLaTeX instead.% + }\@ehd +\fi\fi +% \end{macrocode} +% +% \paragraph{Packages} +% Assuming people are running up-to-date packages. +% \begin{macrocode} +\RequirePackage{expl3,xparse,l3keys2e} +\RequirePackage{fontspec} +\RequirePackage{ucharcat} +\RequirePackage{fix-cm} % avoid some warnings (still necessary? check...) +\RequirePackage{filehook} +% \end{macrocode} +% \paragraph{Bifurcate} +% \begin{macrocode} +\ExplSyntaxOn +\sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } +\sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } +\ExplSyntaxOff +% \end{macrocode} +% +% \begin{macrocode} +%</base> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-compat.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx index 884d20242b4..84f6f600e62 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-compat.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx @@ -1,7 +1,9 @@ -% \section{\DTXCURR --- Compatibility} +%%^^A%% um-code-compat.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{Compatibility} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % \begin{macro}{\@@_check_and_fix:NNnnnn} @@ -505,5 +507,24 @@ % \end{macro} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-epilogue.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx index 53e4d244e09..0a7f386eda6 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-epilogue.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx @@ -1,8 +1,9 @@ +%%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Epilogue} +% \section{Epilogue} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % Lots of little things to tidy up. @@ -328,9 +329,24 @@ % % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% -\endinput +\endinput +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-fontopt.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-fontopt.dtx index e60df7604a6..59805971ee7 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-fontopt.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-fontopt.dtx @@ -1,8 +1,9 @@ +%%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Font loading options} +% \section{Font loading options} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % \subsection{Math version} @@ -43,7 +44,7 @@ % for the individual definitions % \begin{macrocode} \int_incr:N \g_@@_fam_int - \tl_set:Nx \@@_symfont_tl {@@_fam\int_use:N\g_@@_fam_int} + \tl_set:Nx \l_@@_symfont_label_tl {@@_fam\int_use:N\g_@@_fam_int} \cs_set_eq:NN \_@@_sym:nnn \@@_process_symbol_parse:nnn \cs_set_eq:NN \@@_set_mathalphabet_char:Nnn \@@_mathmap_parse:Nnn \cs_set_eq:NN \@@_remap_symbol:nnn \@@_remap_symbol_parse:nnn @@ -241,7 +242,24 @@ % \end{macro} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% + \endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-fontparam.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx index 894e720824e..54021c48f36 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-fontparam.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx @@ -1,8 +1,9 @@ +%%^^A%% um-code-fontparam.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Common interface for font parameters} +% \section{Common interface for font parameters} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % \XeTeX\ and \LuaTeX\ have different interfaces for math font parameters. @@ -321,7 +322,24 @@ % \end{macro} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% + \endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx new file mode 100644 index 00000000000..942ea4771fa --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx @@ -0,0 +1,562 @@ +%%^^A%% um-code-main.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{The main \cs{setmathfont} macro} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% Using a |range| including large character sets such as \cmd\mathrel, +% \cmd\mathalpha, \etc, is \emph{very slow}! +% I hope to improve the performance somehow. +% +% \begin{macro}{\@@_setmathfont:nn} +% \begin{macrocode} +\cs_set:Nn \@@_setmathfont:nn + { + \tl_set:Nn \l_@@_fontname_tl {#2} +% \end{macrocode} +% Erase any conception \LaTeX\ has of previously defined math symbol fonts; +% this allows \cmd\DeclareSymbolFont\ at any point in the document. +% \begin{macrocode} + \cs_set_eq:NN \glb@currsize \scan_stop: +% \end{macrocode} +% Initialise all local variabes: +% \begin{macrocode} + \@@_init: +% \end{macrocode} +% Grab the current size information: +% (is this robust enough? Maybe it should be preceded by \cmd\normalsize). +% The macro \cmd\S@\meta{size} +% contains the definitions of the sizes used for maths letters, subscripts and subsubscripts in +% \cmd\tf@size, \cmd\sf@size, and \cmd\ssf@size, respectively. +% \begin{macrocode} + \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } + \csname S@\f@size\endcsname +% \end{macrocode} +% Parse options and tell people what's going on: +% \begin{macrocode} + \keys_set_known:nnN {unicode-math} {#1} \l_@@_unknown_keys_clist + \bool_if:NT \l_@@_init_bool { \@@_log:n {default-math-font} } +% \end{macrocode} +% Use \pkg{fontspec} to select a font to use. +% After loading the font, we detect what sizes it recommends for scriptsize and scriptscriptsize, so after setting those values appropriately, we reload the font to take these into account. +% \begin{macrocode} +%<debug> \csname TIC\endcsname + \@@_fontspec_select_font: +%<debug> \csname TOC\endcsname + \bool_if:nT { \l_@@_ot_math_bool && !\g_@@_mainfont_already_set_bool } + { + \@@_declare_math_sizes: + \@@_fontspec_select_font: + } +% \end{macrocode} +% Now define |\l_@@_symfont_label_tl| as the \LaTeX\ math font to access everything: +% \begin{macrocode} + \cs_if_exist:cF { sym \l_@@_symfont_label_tl } + { + \DeclareSymbolFont{\l_@@_symfont_label_tl} + {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} + } + \SetSymbolFont{\l_@@_symfont_label_tl}{\l_@@_mversion_tl} + {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} +% \end{macrocode} +% Set the bold math version. +% \begin{macrocode} + \str_if_eq_x:nnT {\l_@@_mversion_tl} {normal} + { + \SetSymbolFont{\l_@@_symfont_label_tl}{bold} + {\encodingdefault}{\l_@@_family_tl}{\bfdefault}{\updefault} + } +% \end{macrocode} +% Declare the math sizes (i.e., scaling of superscripts) for the specific +% values for this font, +% and set defaults for math fams two and three for legacy compatibility: +% \begin{macrocode} + \bool_if:nT { \l_@@_ot_math_bool && !\g_@@_mainfont_already_set_bool } + { + \bool_set_true:N \g_@@_mainfont_already_set_bool + \@@_setup_legacy_fam_two: + \@@_setup_legacy_fam_three: + } +% \end{macrocode} +% And now we input every single maths char. +% \begin{macrocode} +%<debug> \csname TIC\endcsname + \@@_input_math_symbol_table: +%<debug> \csname TOC\endcsname +% \end{macrocode} +% Finally, +% \begin{itemize} +% \item remap symbols that don't take their natural mathcode; +% \item activate any symbols that need to be math-active; +% \item assign delimiter codes for symbols that need to grow; +% \item setup the maths alphabets (\cs{symbf} etc.) --- +% this is an extensive part of the code; see Section~\ref{sec:mathmap}; +% \item setup negations, which are handled on an ad hoc basis; see Section~\ref{sec:negations}. +% \end{itemize} +% \begin{macrocode} + \@@_remap_symbols: + \@@_setup_mathactives: + \@@_setup_delcodes: +%<debug> \csname TIC\endcsname + \@@_setup_alphabets: +%<debug> \csname TOC\endcsname + \@@_setup_negations: + } +% \end{macrocode} +% \end{macro} +% +% \paragraph{Fall-back font} +% +% Want to load Latin Modern Math if nothing else. +% This needs to happen early so that all of the font-loading machinery executes before +% the other `AtBeginDocument' code. +% \begin{macrocode} +\AtBeginDocument { \@@_load_lm_if_necessary: } +\cs_new:Nn \@@_load_lm_if_necessary: + { + \cs_if_exist:NF \l_@@_fontname_tl + { + % TODO: update this when lmmath-bold.otf is released + \setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] + \bool_set_false:N \g_@@_mainfont_already_set_bool + } + } +% \end{macrocode} +% Note that here we reset the `font already loaded' boolean so that a new font being set +% will do the right thing in terms of setting up defaults. +% +% TODO: need a better way to do this for the general case. (Maybe a `reset' command option?) +% +% \begin{macro}{\@@_init:} +% \begin{macrocode} +\cs_new:Nn \@@_init: + { + \bool_set_true:N \l_@@_ot_math_bool + \tl_set:Nn \l_@@_mversion_tl {normal} + \tl_set:Nn \l_@@_symfont_label_tl {operators} +% \end{macrocode} +% Defaults for the script and scriptscript font. +% \begin{macrocode} + \tl_set:Nn \l_@@_script_features_tl {Style=MathScript} + \tl_set:Nn \l_@@_sscript_features_tl {Style=MathScriptScript} + \tl_set_eq:NN \l_@@_script_font_tl \l_@@_fontname_tl + \tl_set_eq:NN \l_@@_sscript_font_tl \l_@@_fontname_tl +% \end{macrocode} +% Default to defining the font for every math symbol character. +% \begin{macrocode} + \bool_set_true:N \l_@@_init_bool + \seq_clear:N \l_@@_char_range_seq + \clist_clear:N \l_@@_char_nrange_clist + \seq_clear:N \l_@@_mathalph_seq + \seq_clear:N \l_@@_missing_alph_seq +% \end{macrocode} +% Other range initialisations. +% \begin{macrocode} + \cs_set_eq:NN \_@@_sym:nnn \@@_process_symbol_noparse:nnn + \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn + \cs_set_eq:NN \@@_remap_symbol:nnn \@@_remap_symbol_noparse:nnn + \cs_set_eq:NN \@@_maybe_init_alphabet:n \@@_init_alphabet:n + \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn + \cs_set_eq:NN \@@_assign_delcode:nn \@@_assign_delcode_noparse:nn + \cs_set_eq:NN \@@_make_mathactive:nNN \@@_make_mathactive_noparse:nNN + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_declare_math_sizes:} +% Set the math sizes according to the recommended font parameters. +% TODO: this shouldn't need to be per-engine; check out why the wrappers aren't used. +% \begin{macrocode} +\cs_new:Nn \@@_declare_math_sizes: + { +%<*LU> + \fp_compare:nF { \@@_script_style_size:n {ScriptPercentScaleDown} == 0 } + { + \DeclareMathSizes { \f@size } { \f@size } + { \@@_script_style_size:n {ScriptPercentScaleDown} } + { \@@_script_style_size:n {ScriptScriptPercentScaleDown} } + } +%</LU> +%<*XE> + \dim_compare:nF { \fontdimen 10 \l_@@_font == 0pt } + { + \DeclareMathSizes { \f@size } { \f@size } + { \@@_fontdimen_to_scale:nn {10} {\l_@@_font} } + { \@@_fontdimen_to_scale:nn {11} {\l_@@_font} } + } +%</XE> + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_script_style_size:n} +% Determine script- and scriptscriptstyle sizes using luaotfload: +% \begin{macrocode} +%<*LU> +\cs_new:Nn \@@_script_style_size:n + { + \fp_eval:n {\directlua{tex.sprint(luaotfload.aux.get_math_dimension("l_@@_font","#1"))} * \f@size / 100 } + } +%</LU> +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_setup_legacy_fam_two:} +% \TeX\ won't load the same font twice at the same scale, so we need to magnify this one by an imperceptable amount. +% \begin{macrocode} +\cs_new:Nn \@@_setup_legacy_fam_two: + { + \fontspec_set_family:Nxn \l_@@_family_tl + { + \l_@@_font_keyval_tl, + Scale=1.00001, + FontAdjustment = + { + \@@_copy_fontparam:nnn { 8} {43} {FractionNumeratorDisplayStyleShiftUp}\relax + \@@_copy_fontparam:nnn { 9} {42} {FractionNumeratorShiftUp}\relax + \@@_copy_fontparam:nnn {10} {32} {StackTopShiftUp}\relax + \@@_copy_fontparam:nnn {11} {45} {FractionDenominatorDisplayStyleShiftDown}\relax + \@@_copy_fontparam:nnn {12} {44} {FractionDenominatorShiftDown}\relax + \@@_copy_fontparam:nnn {13} {21} {SuperscriptShiftUp}\relax + \@@_copy_fontparam:nnn {14} {21} {SuperscriptShiftUp}\relax + \@@_copy_fontparam:nnn {15} {22} {SuperscriptShiftUpCramped}\relax + \@@_copy_fontparam:nnn {16} {18} {SubscriptShiftDown}\relax + \@@_copy_fontparam:nnn {17} {18} {SubscriptShiftDownWithSuperscript}\relax + \@@_copy_fontparam:nnn {18} {24} {SuperscriptBaselineDropMax}\relax + \@@_copy_fontparam:nnn {19} {20} {SubscriptBaselineDropMin}\relax + \@@_zero_fontparam:n {20} % delim1 = FractionDelimiterDisplaySize + \@@_zero_fontparam:n {21} % delim2 = FractionDelimiterSize + \@@_copy_fontparam:nnn {22} {15} {AxisHeight}\relax + } + } {\l_@@_fontname_tl} + + \SetSymbolFont{symbols}{\l_@@_mversion_tl} + {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} + + \str_if_eq_x:nnT {\l_@@_mversion_tl} {normal} + { + \SetSymbolFont{symbols}{bold} + {\encodingdefault}{\l_@@_family_tl}{\bfdefault}{\updefault} + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_setup_legacy_fam_three:} +% Similarly, this font is shrunk by an imperceptable amount for \TeX\ to load it again. +% \begin{macrocode} +\cs_new:Nn \@@_setup_legacy_fam_three: + { + \fontspec_set_family:Nxn \l_@@_family_tl + { + \l_@@_font_keyval_tl, + Scale=0.99999, + FontAdjustment = { + \@@_copy_fontparam:nnn { 8} {48} {FractionRuleThickness}\relax + \@@_copy_fontparam:nnn { 9} {28} {UpperLimitGapMin}\relax + \@@_copy_fontparam:nnn {10} {30} {LowerLimitGapMin}\relax + \@@_copy_fontparam:nnn {11} {29} {UpperLimitBaselineRiseMin}\relax + \@@_copy_fontparam:nnn {12} {31} {LowerLimitBaselineDropMin}\relax + \@@_zero_fontparam:n {13} + } + } {\l_@@_fontname_tl} + + \SetSymbolFont{largesymbols}{\l_@@_mversion_tl} + {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} + + \str_if_eq_x:nnT {\l_@@_mversion_tl} {normal} + { + \SetSymbolFont{largesymbols}{bold} + {\encodingdefault}{\l_@@_family_tl}{\bfdefault}{\updefault} + } + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\@@_fontspec_select_font:} +% Select the font with \cs{fontspec} and define \cs{l_@@_font} from it. +% \begin{macrocode} +\cs_new:Nn \@@_fontspec_select_font: + { + \tl_set:Nx \l_@@_font_keyval_tl { +%<LU> Renderer = Basic, + BoldItalicFont = {}, ItalicFont = {}, + Script = Math, + SizeFeatures = + { + { + Size = \tf@size- + } , + { + Size = \sf@size-\tf@size , + Font = \l_@@_script_font_tl , + \l_@@_script_features_tl + } , + { + Size = -\sf@size , + Font = \l_@@_sscript_font_tl , + \l_@@_sscript_features_tl + } + } , + \l_@@_unknown_keys_clist + } + + \fontspec_set_fontface:NNxn \l_@@_font \l_@@_family_tl + {\l_@@_font_keyval_tl} {\l_@@_fontname_tl} +% \end{macrocode} +% Check whether we're using a real maths font: +% \begin{macrocode} + \group_begin: + \fontfamily{\l_@@_family_tl}\selectfont + \fontspec_if_script:nF {math} {\bool_gset_false:N \l_@@_ot_math_bool} + \group_end: + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Functions for setting up symbols with mathcodes} +% \seclabel{mathsymbol} +% +% \begin{macro}{\@@_process_symbol_noparse:nnn} +% \begin{macro}{\@@_process_symbol_parse:nnn} +% If the \feat{range} font feature has been used, then only +% a subset of the Unicode glyphs are to be defined. +% See \secref{rangeproc} for the code that enables this. +% \begin{macrocode} +\cs_set:Nn \@@_process_symbol_noparse:nnn + { + \@@_set_mathsymbol:nNNn {\l_@@_symfont_label_tl} #2 #3 {#1} + } +% \end{macrocode} +% \begin{macrocode} +\cs_set:Nn \@@_process_symbol_parse:nnn + { + \@@_if_char_spec:nNNT {#1} {#2} {#3} + { + \@@_process_symbol_noparse:nnn {#1} {#2} {#3} + } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@@_remap_symbols:} +% \begin{macro}{\@@_remap_symbol_noparse:nnn} +% \begin{macro}{\@@_remap_symbol_parse:nnn} +% This function is used to define the mathcodes for those chars which should +% be mapped to a different glyph than themselves. +% \begin{macrocode} +\cs_new:Npn \@@_remap_symbols: + { + \@@_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus + \@@_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk" + \bool_if:NF \g_@@_literal_colon_bool + { + \@@_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel) + } + } +% \end{macrocode} +% \end{macro} +% Where |\@@_remap_symbol:nnn| is defined to be one of these two, depending +% on the range setup: +% \begin{macrocode} +\cs_new:Nn \@@_remap_symbol_parse:nnn + { + \@@_if_char_spec:nNNT {#3} {\@nil} {#2} + { \@@_remap_symbol_noparse:nnn {#1} {#2} {#3} } + } +\cs_new:Nn \@@_remap_symbol_noparse:nnn + { + \clist_map_inline:nn {#1} + { \@@_set_mathcode:nnnn {##1} {#2} {\l_@@_symfont_label_tl} {#3} } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Active math characters} +% +% There are more math active chars later in the subscript/superscript section. +% But they don't need to be able to be typeset directly. +% +% \begin{macro}{\@@_setup_mathactives:} +% \begin{macrocode} +\cs_new:Npn \@@_setup_mathactives: + { + \@@_make_mathactive:nNN {"2032} \@@_prime_single_mchar \mathord + \@@_make_mathactive:nNN {"2033} \@@_prime_double_mchar \mathord + \@@_make_mathactive:nNN {"2034} \@@_prime_triple_mchar \mathord + \@@_make_mathactive:nNN {"2057} \@@_prime_quad_mchar \mathord + \@@_make_mathactive:nNN {"2035} \@@_backprime_single_mchar \mathord + \@@_make_mathactive:nNN {"2036} \@@_backprime_double_mchar \mathord + \@@_make_mathactive:nNN {"2037} \@@_backprime_triple_mchar \mathord + \@@_make_mathactive:nNN {`\'} \mathstraightquote \mathord + \@@_make_mathactive:nNN {`\`} \mathbacktick \mathord + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_make_mathactive:nNN} +% Makes |#1| a mathactive char, and gives cs |#2| the meaning of mathchar |#1| +% with class |#3|. +% You are responsible for giving active |#1| a particular meaning! +% \begin{macrocode} +\cs_new:Nn \@@_make_mathactive_parse:nNN + { + \@@_if_char_spec:nNNT {#1} #2 #3 + { \@@_make_mathactive_noparse:nNN {#1} #2 #3 } + } +% \end{macrocode} +% +% \begin{macrocode} +\cs_new:Nn \@@_make_mathactive_noparse:nNN + { + \@@_set_mathchar:NNnn #2 #3 {\l_@@_symfont_label_tl} {#1} + \@@_char_gmake_mathactive:n {#1} + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Delimiter codes} +% +% \begin{macro}{\@@_assign_delcode:nn} +% \begin{macrocode} +\cs_new:Nn \@@_assign_delcode_noparse:nn + { + \@@_set_delcode:nnn \l_@@_symfont_label_tl {#1} {#2} + } +% \end{macrocode} +% +% \begin{macrocode} +\cs_new:Nn \@@_assign_delcode_parse:nn + { + \@@_if_char_spec:nNNT {#2} {\@nil} {\@nil} + { + \@@_assign_delcode_noparse:nn {#1} {#2} + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_assign_delcode:n} +% Shorthand. +% \begin{macrocode} +\cs_new:Nn \@@_assign_delcode:n { \@@_assign_delcode:nn {#1} {#1} } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_setup_delcodes:} +% Some symbols that aren't mathopen/mathclose still need to have delimiter codes assigned. +% The list of vertical arrows may be incomplete. +% On the other hand, many fonts won't support them all being stretchy. +% And some of them are probably not meant to stretch, either. But adding them here doesn't hurt. +% \begin{macrocode} +\cs_new:Npn \@@_setup_delcodes: + { + % ensure \left. and \right. work: + \@@_set_delcode:nnn \l_@@_symfont_label_tl {`\.} {\c_zero} + % this is forcefully done to fix a bug -- indicates a larger problem! + + \@@_assign_delcode:nn {`\/} {\g_@@_slash_delimiter_usv} + \@@_assign_delcode:nn {"2044} {\g_@@_slash_delimiter_usv} % fracslash + \@@_assign_delcode:nn {"2215} {\g_@@_slash_delimiter_usv} % divslash + \@@_assign_delcode:n {"005C} % backslash + \@@_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation + \@@_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation + \@@_assign_delcode:n {"2191} % up arrow + \@@_assign_delcode:n {"2193} % down arrow + \@@_assign_delcode:n {"2195} % updown arrow + \@@_assign_delcode:n {"219F} % up arrow twohead + \@@_assign_delcode:n {"21A1} % down arrow twohead + \@@_assign_delcode:n {"21A5} % up arrow from bar + \@@_assign_delcode:n {"21A7} % down arrow from bar + \@@_assign_delcode:n {"21A8} % updown arrow from bar + \@@_assign_delcode:n {"21BE} % up harpoon right + \@@_assign_delcode:n {"21BF} % up harpoon left + \@@_assign_delcode:n {"21C2} % down harpoon right + \@@_assign_delcode:n {"21C3} % down harpoon left + \@@_assign_delcode:n {"21C5} % arrows up down + \@@_assign_delcode:n {"21F5} % arrows down up + \@@_assign_delcode:n {"21C8} % arrows up up + \@@_assign_delcode:n {"21CA} % arrows down down + \@@_assign_delcode:n {"21D1} % double up arrow + \@@_assign_delcode:n {"21D3} % double down arrow + \@@_assign_delcode:n {"21D5} % double updown arrow + \@@_assign_delcode:n {"21DE} % up arrow double stroke + \@@_assign_delcode:n {"21DF} % down arrow double stroke + \@@_assign_delcode:n {"21E1} % up arrow dashed + \@@_assign_delcode:n {"21E3} % down arrow dashed + \@@_assign_delcode:n {"21E7} % up white arrow + \@@_assign_delcode:n {"21E9} % down white arrow + \@@_assign_delcode:n {"21EA} % up white arrow from bar + \@@_assign_delcode:n {"21F3} % updown white arrow + } +% \end{macrocode} +% \end{macro} +% +% \subsection{(Big) operators} +% +% The engine does what is necessary to deal with big operators for us +% automatically with \cmd\Umathchardef. +% However, the limits aren't set automatically; that is, we want to define, +% a la Plain \TeX\ \etc, |\def\int{\intop\nolimits}|, so there needs to be a +% transformation from \cmd\int\ to \cmd\intop\ during the expansion of +% \cmd\_@@_sym:nnn\ in the appropriate contexts. +% +% \begin{macro}{\l_@@_nolimits_tl} +% This macro is a sequence containing those maths operators that require a +% \cmd\nolimits\ suffix. +% This list is used when processing |unicode-math-table.tex| to define such +% commands automatically (see the macro \cs{@@_set_mathsymbol:nNNn}). +% I've chosen essentially just the operators that look like integrals; +% hopefully a better mathematician can help me out here. +% I've a feeling that it's more useful \emph{not} to include the multiple +% integrals such as $\iiiint$, but that might be a matter of preference. +% \begin{macrocode} +\tl_set:Nn \l_@@_nolimits_tl + { + \int\iint\iiint\iiiint\oint\oiint\oiiint + \intclockwise\varointclockwise\ointctrclockwise\sumint + \intbar\intBar\fint\cirfnint\awint\rppolint + \scpolint\npolint\pointint\sqint\intlarhk\intx + \intcap\intcup\upint\lowint + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Radicals} +% +% \begin{macro}{\l_@@_radicals_tl} +% The radicals are organised in \cs{@@_set_mathsymbol:nNNn}. +% We organise radicals in the same way as nolimits-operators. +% (\cs{cuberoot} and \cs{fourthroot}, don't seem to behave as proper radicals.) +% \begin{macrocode} +\tl_set:Nn \l_@@_radicals_tl {\sqrt \longdivision} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</package> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-mathmap.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx index f9ae41c69e1..2b843fb29a4 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-mathmap.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx @@ -1,9 +1,10 @@ +%%^^A%% um-code-mathmap.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Mapping in maths alphabets} +% \section{Mapping in maths alphabets} % \label{sec:mathmap} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % Switching to a different style of alphabetic symbols was traditionally performed with @@ -357,7 +358,7 @@ \clist_map_break: } { - \@@_glyph_if_exist:nT { \@@_to_usv:nn {\l_@@_style_tl} {\l_@@_alphabet_tl} } + \@@_glyph_if_exist:NnT \l_@@_font { \@@_to_usv:nn {\l_@@_style_tl} {\l_@@_alphabet_tl} } { \@@_maybe_init_alphabet:n \l_@@_style_tl \clist_map_break: @@ -382,7 +383,7 @@ \@@_alphabet_config:nnn {\l_@@_style_tl} {\l_@@_alphabet_tl} {\l_@@_remap_style_tl} } { - \@@_glyph_if_exist:nTF { \@@_to_usv:nn {\l_@@_remap_style_tl} {\l_@@_alphabet_tl} } + \@@_glyph_if_exist:NnTF \l_@@_font { \@@_to_usv:nn {\l_@@_remap_style_tl} {\l_@@_alphabet_tl} } { \@@_log:nx {setup-alph} {sym \l_@@_style_tl~(\l_@@_alphabet_tl)} \@@_alphabet_config:nnn {\l_@@_style_tl} {\l_@@_alphabet_tl} {\l_@@_remap_style_tl} @@ -425,7 +426,7 @@ % \begin{macro}{\@@_map_char_parse:nn} % \begin{macrocode} \cs_new:Nn \@@_map_char_noparse:nn - { \@@_set_mathcode:nnnn {#1}{\mathalpha}{\@@_symfont_tl}{#2} } + { \@@_set_mathcode:nnnn {#1}{\mathalpha}{\l_@@_symfont_label_tl}{#2} } % \end{macrocode} % % \begin{macrocode} @@ -583,7 +584,7 @@ { \tl_put_right:cx {@@_switchto_#1:} { - \@@_set_mathcode:nnnn {##1} {\mathalpha} {\@@_symfont_tl} {#3} + \@@_set_mathcode:nnnn {##1} {\mathalpha} {\l_@@_symfont_label_tl} {#3} } } } @@ -714,7 +715,24 @@ % \end{macrocode} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% + \endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-mathtext.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-mathtext.dtx index 94761625578..9cdbb3b6add 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-mathtext.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-mathtext.dtx @@ -1,13 +1,14 @@ +%%^^A%% um-code-mathtext.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Maths text commands} +% \section{Maths text commands} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % \subsection{\cs{setmathfontface}} % -% \begin{macro}{\setmathfontface} +% \begin{macro}{\@@_setmathfontface:Nnn} % \begin{macrocode} \keys_define:nn {@@_mathface} { @@ -15,13 +16,14 @@ { \tl_set:Nn \l_@@_mversion_tl {#1} } } % \end{macrocode} -% +% % \begin{macrocode} -\DeclareDocumentCommand \setmathfontface { m O{} m O{} } +\cs_set:Nn \@@_setmathfontface:Nnn { \tl_clear:N \l_@@_mversion_tl - \keys_set_known:nnN {@@_mathface} {#2,#4} \l_@@_keyval_clist + \keys_set_known:nnN {@@_mathface} {#2} \l_@@_keyval_clist + \exp_args:Nnx \fontspec_set_family:Nxn \l_@@_tmpa_tl { ItalicFont={}, BoldFont={}, \exp_not:V \l_@@_keyval_clist } {#3} @@ -30,6 +32,7 @@ \tl_set:Nn \l_@@_mversion_tl {normal} \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l_@@_tmpa_tl} {\mddefault} {\updefault} } + \SetMathAlphabet #1 {\l_@@_mversion_tl} {\g_fontspec_encoding_tl} {\l_@@_tmpa_tl} {\mddefault} {\updefault} % integrate with fontspec's \setmathrm etc: @@ -41,21 +44,8 @@ } } % \end{macrocode} -% -% \begin{macrocode} -\@onlypreamble \setmathfontface -% \end{macrocode} -% Note that \LaTeX's SetMathAlphabet simply doesn't work to "reset" a maths alphabet font after \verb"\begin{document}", so unlike most of the other maths commands around we still restrict this one to the preamble. % \end{macro} % -% \begin{macro}{\setoperatorfont} -% TODO: add check? -% \begin{macrocode} -\DeclareDocumentCommand \setoperatorfont {m} - { \tl_set:Nn \g_@@_operator_mathfont_tl {#1} } -\setoperatorfont{\mathrm} -% \end{macrocode} -% \end{macro} % % \subsection{Hooks into \pkg{fontspec}} % @@ -129,5 +119,24 @@ % \end{macrocode} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-msg.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-msg.dtx index 1b4a2f9fece..d797e09b57d 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-msg.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-msg.dtx @@ -1,9 +1,10 @@ +%%^^A%% um-code-msg.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Error messages} +% \section{Error messages} % \seclabel{codemsg} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % Wrapper functions: @@ -105,5 +106,24 @@ % \end{macrocode} % % \begin{macrocode} -%</package&(XE|LU)> -% \end{macrocode}
\ No newline at end of file +%</package> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx new file mode 100644 index 00000000000..0f681f52dee --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx @@ -0,0 +1,249 @@ +%%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{Start of the package code} +% +% The prefix for \pkg{unicode-math} is \texttt{um}: +% \begin{macrocode} +%<@@=um> +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +%<*LU> +\RequirePackage{lualatex-math} +%</LU> +% \end{macrocode} +% +% \begin{macrocode} +\ExplSyntaxOn +% \end{macrocode} +% +% \subsection{\pkg{expl3} variants} +% +% Variants needed from \pkg{expl3}: +% \begin{macrocode} +\cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } +% \end{macrocode} +% +% For \pkg{fontspec}: +% \begin{macrocode} +\cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx} +\cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx} +% \end{macrocode} +% +% +% \subsection{Primitive font commands} +% +% What might end up being provided by the kernel. +% +% \begin{macro}{\@@_glyph_if_exist:NnTF} +% \begin{macrocode} +\prg_new_conditional:Nnn \@@_glyph_if_exist:Nn {p,TF,T,F} + { + \etex_iffontchar:D #1 #2 \scan_stop: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Mathcode and friends} +% +% \begin{macro}{\@@_set_mathcode:nnnn} +% \begin{macro}{\@@_set_mathcode:nnn} +% These are all wrappers for the primitive commands that take numerical +% input only. +% \begin{macrocode} +\cs_set:Npn \@@_set_mathcode:nnnn #1#2#3#4 + { + \Umathcode \int_eval:n {#1} = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: + } +% \end{macrocode} +% +% \begin{macrocode} +\cs_set:Npn \@@_set_mathcode:nnn #1#2#3 + { + \Umathcode \int_eval:n {#1} = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@@_set_mathchar:NNnn} +% \begin{macro}{\@@_set_mathchar:cNnn} +% \begin{macrocode} +\cs_set:Npn \@@_set_mathchar:NNnn #1#2#3#4 + { + \Umathchardef #1 = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} +\cs_generate_variant:Nn \@@_set_mathchar:NNnn {c} +% \end{macrocode} +% +% \begin{macro}{\@@_set_delcode:nnn} +% \begin{macrocode} +\cs_new:Nn \@@_set_delcode:nnn + { + \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_radical:nn} +% \begin{macrocode} +\cs_new:Nn \@@_radical:nn + { + \Uradical \csname sym#1\endcsname #2 \scan_stop: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_delimiter:Nnn} +% \begin{macrocode} +\cs_new:Nn \@@_delimiter:Nnn + { + \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_accent:nnn} +% \begin{macrocode} +\cs_new:Nn \@@_accent:nnn + { + \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_char_gmake_mathactive:N} +% \begin{macro}{\@@_char_gmake_mathactive:n} +% \begin{macrocode} +\cs_new:Nn \@@_char_gmake_mathactive:N + { + \global\mathcode `#1 = "8000 \scan_stop: + } +\cs_new:Nn \@@_char_gmake_mathactive:n + { + \global\mathcode #1 = "8000 \scan_stop: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{Font parameters} +% +% \begin{macro}{\@@_copy_fontparam:nnn} +% \begin{macrocode} +\cs_new:Nn \@@_copy_fontparam:nnn + { + \fontdimen #1 \font = \@@_get_fontparam:nn {#2} {#3} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_zero_fontparam:n} +% \begin{macrocode} +\cs_new:Nn \@@_zero_fontparam:n + { + \fontdimen #1 \font = 0pt\relax + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_get_fontparam:nn} +% \begin{macrocode} +\cs_new:Nn \@@_get_fontparam:nn + { +%<XE> \the\fontdimen#1\l_@@_font\relax +%<LU> \directlua{fontspec.mathfontdimen("l_@@_font","#2")} + } +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Alphabet Unicode positions (USVs)} +% +% Before we begin, let's define the positions of the various Unicode +% alphabets so that our code is a little more readable.\footnote{`\textsc{u.s.v.}' stands +% for `Unicode scalar value'.} +% +% \begin{macro}{\usv_set:nnn,\@@_to_usv:nn} +% Rather than `readable', in the end, this makes the code more extensible. +% \begin{macrocode} +\cs_new:Nn \usv_set:nnn { \tl_const:cn { c_@@_#1_#2_usv } {#3} } +\cs_new:Nn \@@_to_usv:nn { \use:c { c_@@_#1_#2_usv } } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[TF]{\@@_usv_if_exist:nn} +% \begin{macrocode} +\prg_new_conditional:Nnn \@@_usv_if_exist:nn {T,F,TF} + { + \cs_if_exist:cTF { c_@@_#1_#2_usv } + \prg_return_true: \prg_return_false: + } +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Overcoming \texorpdfstring{\cmd\@onlypreamble}{\textbackslash @onlypreamble}} +% +% The requirement of only setting up the maths fonts in the preamble is lifted. +% (Perhaps unwisely.) +% \begin{macrocode} +\tl_map_inline:nn + { + \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes + \@DeclareMathSizes\newmathalphabet\newmathalphabet@@\newmathalphabet@@@ + \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion + \version@list\version@elt\alpha@list\alpha@elt + \restore@mathversion\init@restore@version\dorestore@version\process@table + \new@mathversion\DeclareSymbolFont\group@list\group@elt + \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp + \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ + \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar + \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter + \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter + \set@@mathdelimiter\DeclareMathRadical\mathchar@type + \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ + } + { + \tl_remove_once:Nn \@preamblecmds {\do#1} + } +% \end{macrocode} +% +% \begin{macrocode} +%</package> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-pkgopt.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-pkgopt.dtx index 9af437d79e5..625770edbdc 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-pkgopt.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-pkgopt.dtx @@ -1,18 +1,11 @@ +%%^^A%% um-code-pkgopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- setup and package options} +% \section{setup and package options} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % -% \begin{macro}{\unimathsetup} -% This macro can be used in lieu of or later to override -% options declared when the package is loaded. -% \begin{macrocode} -\DeclareDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\@@_keys_choices:nn} % To simplify the creation of option keys, let's iterate in pairs rather than worry about equals signs and commas. % \begin{macrocode} @@ -30,14 +23,14 @@ } \cs_new:Nn \@@_keys_choices_aux:nnn { #1 / #2 .code:n = { \exp_not:n {#3} } , } % \end{macrocode} -% +% % \begin{macrocode} \cs_new:Nn \@@_tl_map_dbl:nN { \__@@_tl_map_dbl:Nnn #2 #1 \q_recursion_tail {}{} \q_recursion_stop } % \end{macrocode} -% +% % \begin{macrocode} \cs_new:Nn \__@@_tl_map_dbl:Nnn { @@ -297,5 +290,24 @@ % \end{macrocode} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-primes.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-primes.dtx index bbd35807c5b..510ecc5f2ff 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-primes.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-primes.dtx @@ -1,8 +1,9 @@ +%%^^A%% um-code-primes.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Primes} +% \section{Primes} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % We need a new `prime' algorithm. Unicode math has four pre-drawn prime glyphs. @@ -71,7 +72,7 @@ } } % \end{macrocode} -% +% % \begin{macrocode} \cs_new:Nn \@@_nprimes_select:nn { @@ -79,17 +80,17 @@ { {1} { \@@_superscript:n {#1} } {2} { - \@@_glyph_if_exist:nTF {"2033} + \@@_glyph_if_exist:NnTF \l_@@_font {"2033} { \@@_superscript:n {\@@_prime_double_mchar} } { \@@_nprimes:Nn #1 {#2} } } {3} { - \@@_glyph_if_exist:nTF {"2034} + \@@_glyph_if_exist:NnTF \l_@@_font {"2034} { \@@_superscript:n {\@@_prime_triple_mchar} } { \@@_nprimes:Nn #1 {#2} } } {4} { - \@@_glyph_if_exist:nTF {"2057} + \@@_glyph_if_exist:NnTF \l_@@_font {"2057} { \@@_superscript:n {\@@_prime_quad_mchar} } { \@@_nprimes:Nn #1 {#2} } } @@ -99,7 +100,7 @@ } } % \end{macrocode} -% +% % \begin{macrocode} \cs_new:Nn \@@_nbackprimes_select:nn { @@ -107,12 +108,12 @@ { {1} { \@@_superscript:n {#1} } {2} { - \@@_glyph_if_exist:nTF {"2036} + \@@_glyph_if_exist:NnTF \l_@@_font {"2036} { \@@_superscript:n {\@@_backprime_double_mchar} } { \@@_nprimes:Nn #1 {#2} } } {3} { - \@@_glyph_if_exist:nTF {"2037} + \@@_glyph_if_exist:NnTF \l_@@_font {"2037} { \@@_superscript:n {\@@_backprime_triple_mchar} } { \@@_nprimes:Nn #1 {#2} } } @@ -230,7 +231,7 @@ } } % \end{macrocode} -% +% % \begin{macrocode} \cs_new:Npn \@@_scan_backprime: { @@ -331,7 +332,7 @@ \cs_set_eq:NN \backtrprime \@@_backprime_triple_mchar } % \end{macrocode} -% +% % \begin{macrocode} \group_begin: \char_set_catcode_active:N \' @@ -360,9 +361,24 @@ % % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% -\endinput +\endinput +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-setchar.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-setchar.dtx index 49911514805..12928baf240 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-setchar.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-setchar.dtx @@ -1,8 +1,9 @@ +%%^^A%% um-code-setchar.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Setting up maths chars} +% \section{Setting up maths chars} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % \subsection{A token list to contain the data of the math table} @@ -263,7 +264,24 @@ % % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% + \endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-sscript.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-sscript.dtx index ceaa2c7f8b1..ed94037f2af 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-sscript.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-sscript.dtx @@ -1,8 +1,9 @@ +%%^^A%% um-code-sscript.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Unicode sub- and super-scripts} +% \section{Unicode sub- and super-scripts} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % The idea here is to enter a scanning state after a superscript or subscript @@ -179,9 +180,24 @@ % % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} -% -\endinput +\endinput +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx new file mode 100644 index 00000000000..8dd1272a9d9 --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx @@ -0,0 +1,100 @@ +%%^^A%% um-code-ui.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{The user interface commands} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macro}{\unimathsetup} +% This macro can be used in lieu of or later to override +% options declared when the package is loaded. +% \begin{macrocode} +\NewDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setmathfont} +% \doarg{font features (first optional argument retained for backwards compatibility)} +% \darg{font name} +% \doarg{font features} +% \begin{macrocode} +\NewDocumentCommand \setmathfont { O{} m O{} } + { + \@@_setmathfont:nn {#1,#3} {#2} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setmathfontface} +% \begin{macrocode} +\NewDocumentCommand \setmathfontface { m O{} m O{} } + { + \@@_setmathfontface:Nnn #1 {#2,#4} {#3} + } +% \end{macrocode} +% +% Note that \LaTeX’s \cs{SetMathAlphabet} simply doesn’t work to “reset” a maths alphabet font after \verb”\begin{document}”, so unlike most of the other maths commands around we still restrict this one to the preamble. +% \begin{macrocode} +\@onlypreamble \setmathfontface +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\setoperatorfont} +% TODO: add check? +% \begin{macrocode} +\NewDocumentCommand \setoperatorfont {m} + { + \tl_set:Nn \g_@@_operator_mathfont_tl {#1} + } +\setoperatorfont{\mathrm} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\addnolimits} +% This macro appends material to the macro containing the list of operators +% that don’t take limits. +% \begin{macrocode} +\NewDocumentCommand \addnolimits {m} + { + \tl_put_right:Nn \l_@@_nolimits_tl {#1} + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\removenolimits} +% Can this macro be given a better name? +% It removes an item from the nolimits list. +% \begin{macrocode} +\NewDocumentCommand \removenolimits {m} + { + \tl_remove_all:Nn \l_@@_nolimits_tl {#1} + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macrocode} +%</package> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-usv.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-usv.dtx index 01fa9a08eb4..694e6b4eae7 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-usv.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-usv.dtx @@ -1,12 +1,13 @@ +%%^^A%% um-code-usv.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -% \section{\DTXCURR --- Alphabet Unicode positions} +% \section{Alphabet Unicode positions} % % Before we begin, let's define the positions of the various Unicode % alphabets so that our code is a little more readable.\footnote{`\textsc{u.s.v.}' stands % for `Unicode scalar value'.} % % \begin{macrocode} -%<*package&(XE|LU)> +%<*package> % \end{macrocode} % % \paragraph{Alphabets} @@ -324,7 +325,7 @@ % \end{macrocode} % % \begin{macrocode} -%</package&(XE|LU)> +%</package> % \end{macrocode} % % \subsection{STIX fonts} @@ -565,3 +566,22 @@ % \begin{macrocode} %</stix> % \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx new file mode 100644 index 00000000000..1f4a5c70fb4 --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx @@ -0,0 +1,185 @@ +%%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +% \section{Variable initialisation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% +% \paragraph{Conditionals} +% +% True if using a proper OpenType font with unicode maths +% \begin{macrocode} +\bool_new:N \l_@@_ot_math_bool +% \end{macrocode} +% +% \begin{macrocode} +\bool_new:N \l_@@_init_bool +\bool_new:N \l_@@_implicit_alph_bool +\bool_new:N \g_@@_mainfont_already_set_bool +% \end{macrocode} +% For \opt{math-style}: +% \begin{macrocode} +\bool_new:N \g_@@_literal_bool +\bool_new:N \g_@@_upLatin_bool +\bool_new:N \g_@@_uplatin_bool +\bool_new:N \g_@@_upGreek_bool +\bool_new:N \g_@@_upgreek_bool +% \end{macrocode} +% For \opt{bold-style}: +% \begin{macrocode} +\bool_new:N \g_@@_bfliteral_bool +\bool_new:N \g_@@_bfupLatin_bool +\bool_new:N \g_@@_bfuplatin_bool +\bool_new:N \g_@@_bfupGreek_bool +\bool_new:N \g_@@_bfupgreek_bool +% \end{macrocode} +% For \opt{sans-style}: +% \begin{macrocode} +\bool_new:N \g_@@_upsans_bool +\bool_new:N \g_@@_sfliteral_bool +% \end{macrocode} +% For assorted package options: +% \begin{macrocode} +\bool_new:N \g_@@_upNabla_bool +\bool_new:N \g_@@_uppartial_bool +\bool_new:N \g_@@_literal_Nabla_bool +\bool_new:N \g_@@_literal_partial_bool +\bool_new:N \l_@@_smallfrac_bool +\bool_new:N \g_@@_literal_colon_bool +\bool_new:N \g_@@_mathrm_text_bool +\bool_new:N \g_@@_mathit_text_bool +\bool_new:N \g_@@_mathbf_text_bool +\bool_new:N \g_@@_mathsf_text_bool +\bool_new:N \g_@@_mathtt_text_bool +% \end{macrocode} +% +% \paragraph{Variables} +% \begin{macrocode} +\int_new:N \g_@@_fam_int +% \end{macrocode} +% +% For displaying in warning messages, etc.: +% \begin{macrocode} +\tl_const:Nn \c_@@_math_alphabet_name_latin_tl {Latin,~lowercase} +\tl_const:Nn \c_@@_math_alphabet_name_Latin_tl {Latin,~uppercase} +\tl_const:Nn \c_@@_math_alphabet_name_greek_tl {Greek,~lowercase} +\tl_const:Nn \c_@@_math_alphabet_name_Greek_tl {Greek,~uppercase} +\tl_const:Nn \c_@@_math_alphabet_name_num_tl {Numerals} +\tl_const:Nn \c_@@_math_alphabet_name_misc_tl {Misc.} +% \end{macrocode} +% +% \begin{macrocode} +\tl_new:N \l_@@_mathstyle_tl +\tl_new:N \l_@@_radicals_tl +\tl_new:N \l_@@_nolimits_tl +% \end{macrocode} +% +% Used to store the font switch for the \cs{operator@font}. +% \begin{macrocode} +\tl_new:N \g_@@_operator_mathfont_tl +% \end{macrocode} +% +% \begin{macrocode} +\seq_new:N \l_@@_missing_alph_seq +\seq_new:N \l_@@_mathalph_seq +\seq_new:N \l_@@_char_range_seq +\seq_new:N \l_@@_mclass_range_seq +\seq_new:N \l_@@_cmd_range_seq +% \end{macrocode} +% +% \begin{macro}{\g_@@_alphabets_seq} +% Each of math `style' (bfup, sfit, etc.) usually contains one or more `alphabets', which are currently |latin|, |Latin|, |greek|, |Greek|, |num|, and |misc|, although there's an implicit potential for more. +% |misc| is not included in the official list to avoid checking code. +% \begin{macrocode} +\clist_new:N \g_@@_alphabets_seq +\clist_set:Nn \g_@@_alphabets_seq { latin, Latin, greek, Greek, num } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\clist_new:N \g_@@_named_ranges_clist +\clist_new:N \g_@@_char_nrange_clist +\clist_new:N \g_@@_unknown_keys_clist +\clist_new:N \g_@@_alphabet_clist +% \end{macrocode} +% +% \begin{macro}{\g_@@_mathclasses_seq} +% Every math class. +% \begin{macrocode} +\seq_new:N \g_@@_mathclasses_seq +\seq_set_from_clist:Nn \g_@@_mathclasses_seq + { + \mathord,\mathalpha,\mathbin,\mathrel,\mathpunct, + \mathop, + \mathopen,\mathclose, + \mathfence,\mathover,\mathunder, + \mathaccent,\mathbotaccent,\mathaccentwide,\mathbotaccentwide + } +% \end{macrocode} +% \end{macro} +% + +% \begin{macro}{\g_@@_default_mathalph_seq} +% This sequence stores the alphabets in each math style. +% \begin{macrocode} +\seq_new:N \g_@@_default_mathalph_seq +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\g_@@_mathstyles_seq} +% This is every `named range' and every `math style' known to \pkg{unicode-math}. +% A named range is such as "bfit" and "sfit", which are also math styles (with \cs{symbfit} and \cs{symsfit}). +% `Mathstyles' are a superset of named ranges and also include commands such as \cs{symbf} and \cs{symsf}. +% +% N.B. for parsing purposes `named ranges' are defined as strings! +% \begin{macrocode} +\seq_new:N \g_@@_named_ranges_seq +\seq_new:N \g_@@_mathstyles_seq +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\muskip_new:N \g_@@_primekern_muskip +\muskip_gset:Nn \g_@@_primekern_muskip { -\thinmuskip/2 }% arbitrary +\int_new:N \l_@@_primecount_int +\prop_new:N \g_@@_supers_prop +\prop_new:N \g_@@_subs_prop +\tl_new:N \l_not_token_name_tl +% \end{macrocode} +% +% \begin{macrocode} +\tl_new:N \g_@@_slash_delimiter_usv +\tl_new:N \g_@@_mathtable_tl +\tl_new:N \g_@@_fontname_tl +\tl_new:N \g_@@_mversion_tl +\tl_new:N \g_@@_symfont_tl +\tl_new:N \g_@@_font_keyval_tl +\tl_new:N \g_@@_family_tl +\tl_new:N \g_@@_style_tl +\tl_new:N \g_@@_remap_style_tl +% \end{macrocode} +% +% \begin{macrocode} +%</package> +% \end{macrocode} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-doc-legacyfontdimen.tex b/Master/texmf-dist/source/latex/unicode-math/um-doc-legacyfontdimen.tex new file mode 100644 index 00000000000..0dbac058d60 --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-doc-legacyfontdimen.tex @@ -0,0 +1,76 @@ +%%^^A%% um-doc-legacyfontdimen.tex -- part of UNICODE-MATH <wspr.io/unicode-math> + +\section{Legacy \TeX\ font dimensions} + +\centerline{% +\begin{tabular}[t]{@{}lp{4cm}@{}} +\toprule +\multicolumn{2}{@{}c@{}}{Text fonts} \\ +\midrule +$\phi_1$ & slant per pt \\ +$\phi_2$ & interword space \\ +$\phi_3$ & interword stretch \\ +$\phi_4$ & interword shrink \\ +$\phi_5$ & x-height \\ +$\phi_6$ & quad width \\ +$\phi_7$ & extra space \\ +$\phi_8$ & cap height (\XeTeX\ only) \\ +\bottomrule +\end{tabular} +\quad +\begin{tabular}[t]{@{}lp{4cm}@{}} +\toprule +\multicolumn{2}{@{}c@{}}{Maths font, \cs{fam}2} \\ +\midrule +$\sigma_5$ & x height \\ +$\sigma_6$ & quad \\ +$\sigma_8$ & num1 \\ +$\sigma_9$ & num2 \\ +$\sigma_{10}$ & num3 \\ +$\sigma_{11}$ & denom1 \\ +$\sigma_{12}$ & denom2 \\ +$\sigma_{13}$ & sup1 \\ +$\sigma_{14}$ & sup2 \\ +$\sigma_{15}$ & sup3 \\ +$\sigma_{16}$ & sub1 \\ +$\sigma_{17}$ & sub2 \\ +$\sigma_{18}$ & sup drop \\ +$\sigma_{19}$ & sub drop \\ +$\sigma_{20}$ & delim1 \\ +$\sigma_{21}$ & delim2 \\ +$\sigma_{22}$ & axis height \\ +\bottomrule +\end{tabular} +\quad +\begin{tabular}[t]{@{}lp{4cm}@{}} +\toprule +\multicolumn{2}{@{}c@{}}{Maths font, \cs{fam}3} \\ +\midrule +$\xi_8$ & default rule thickness \\ +$\xi_9$ & big op spacing1 \\ +$\xi_{10}$ & big op spacing2 \\ +$\xi_{11}$ & big op spacing3 \\ +$\xi_{12}$ & big op spacing4 \\ +$\xi_{13}$ & big op spacing5 \\ +\bottomrule +\end{tabular} +} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-doc-mathfontdimen.tex b/Master/texmf-dist/source/latex/unicode-math/um-doc-mathfontdimen.tex new file mode 100644 index 00000000000..4ef1df29728 --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-doc-mathfontdimen.tex @@ -0,0 +1,151 @@ +%%^^A%% um-doc-mathfontdimen.tex -- part of UNICODE-MATH <wspr.io/unicode-math> + +\section{\Hologo{XeTeX} math font dimensions} + +These are the extended \cmd\fontdimen s available for suitable fonts +in \XeTeX. Note that Lua\TeX\ takes an alternative route, and this package +will eventually provide a wrapper interface to the two (I hope). + +\newcounter{mfdimen} +\setcounter{mfdimen}{9} +\newcommand\mathfontdimen[2]{^^A + \stepcounter{mfdimen}^^A + \themfdimen & {\scshape\small #1} & #2\vspace{0.5ex} \tabularnewline} + +\begin{longtable}{ + @{}c>{\raggedright\parfillskip=0pt}p{4cm}>{\raggedright}p{7cm}@{}} +\toprule \cmd\fontdimen & Dimension name & Description\tabularnewline\midrule \endhead +\bottomrule\endfoot +\mathfontdimen{Script\-Percent\-Scale\-Down} +{Percentage of scaling down for script level 1. Suggested value: 80\%.} +\mathfontdimen{Script\-Script\-Percent\-Scale\-Down} +{Percentage of scaling down for script level 2 (Script\-Script). Suggested value: 60\%.} +\mathfontdimen{Delimited\-Sub\-Formula\-Min\-Height} +{Minimum height required for a delimited expression to be treated as a subformula. Suggested value: normal line height\,×\,1.5.} +\mathfontdimen{Display\-Operator\-Min\-Height} +{Minimum height of n-ary operators (such as integral and summation) for formulas in display mode.} +\mathfontdimen{Math\-Leading} +{White space to be left between math formulas to ensure proper line spacing. For example, for applications that treat line gap as a part of line ascender, formulas with ink going above (os2.sTypoAscender + os2.sTypoLineGap – MathLeading) or with ink going below os2.sTypoDescender will result in increasing line height.} +\mathfontdimen{Axis\-Height} +{Axis height of the font. } +\mathfontdimen{Accent\-Base\-Height} +{Maximum (ink) height of accent base that does not require raising the accents. Suggested: x-height of the font (os2.sxHeight) plus any possible overshots. } +\mathfontdimen{Flattened\-Accent\-Base\-Height} +{Maximum (ink) height of accent base that does not require flattening the accents. Suggested: cap height of the font (os2.sCapHeight).} +\mathfontdimen{Subscript\-Shift\-Down} +{The standard shift down applied to subscript elements. Positive for moving in the downward direction. Suggested: os2.ySubscriptYOffset.} +\mathfontdimen{Subscript\-Top\-Max} +{Maximum allowed height of the (ink) top of subscripts that does not require moving subscripts further down. Suggested: /5 x-height.} +\mathfontdimen{Subscript\-Baseline\-Drop\-Min} +{Minimum allowed drop of the baseline of subscripts relative to the (ink) bottom of the base. Checked for bases that are treated as a box or extended shape. Positive for subscript baseline dropped below the base bottom.} +\mathfontdimen{Superscript\-Shift\-Up} +{Standard shift up applied to superscript elements. Suggested: os2.ySuperscriptYOffset.} +\mathfontdimen{Superscript\-Shift\-Up\-Cramped} +{Standard shift of superscripts relative to the base, in cramped style.} +\mathfontdimen{Superscript\-Bottom\-Min} +{Minimum allowed height of the (ink) bottom of superscripts that does not require moving subscripts further up. Suggested: ¼ x-height.} +\mathfontdimen{Superscript\-Baseline\-Drop\-Max} +{Maximum allowed drop of the baseline of superscripts relative to the (ink) top of the base. Checked for bases that are treated as a box or extended shape. Positive for superscript baseline below the base top.} +\mathfontdimen{Sub\-Superscript\-Gap\-Min} +{Minimum gap between the superscript and subscript ink. Suggested: 4×default rule thickness.} +\mathfontdimen{Superscript\-Bottom\-Max\-With\-Subscript} +{The maximum level to which the (ink) bottom of superscript can be pushed to increase the gap between superscript and subscript, before subscript starts being moved down. +Suggested: /5 x-height.} +\mathfontdimen{Space\-After\-Script} +{Extra white space to be added after each subscript and superscript. Suggested: 0.5pt for a 12 pt font.} +\mathfontdimen{Upper\-Limit\-Gap\-Min} +{Minimum gap between the (ink) bottom of the upper limit, and the (ink) top of the base operator. } +\mathfontdimen{Upper\-Limit\-Baseline\-Rise\-Min} +{Minimum distance between baseline of upper limit and (ink) top of the base operator.} +\mathfontdimen{Lower\-Limit\-Gap\-Min} +{Minimum gap between (ink) top of the lower limit, and (ink) bottom of the base operator.} +\mathfontdimen{Lower\-Limit\-Baseline\-Drop\-Min} +{Minimum distance between baseline of the lower limit and (ink) bottom of the base operator.} +\mathfontdimen{Stack\-Top\-Shift\-Up} +{Standard shift up applied to the top element of a stack.} +\mathfontdimen{Stack\-Top\-Display\-Style\-Shift\-Up} +{Standard shift up applied to the top element of a stack in display style.} +\mathfontdimen{Stack\-Bottom\-Shift\-Down} +{Standard shift down applied to the bottom element of a stack. Positive for moving in the downward direction.} +\mathfontdimen{Stack\-Bottom\-Display\-Style\-Shift\-Down} +{Standard shift down applied to the bottom element of a stack in display style. Positive for moving in the downward direction.} +\mathfontdimen{Stack\-Gap\-Min} +{Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element. Suggested: 3×default rule thickness.} +\mathfontdimen{Stack\-Display\-Style\-Gap\-Min} +{Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element in display style. Suggested: 7×default rule thickness.} +\mathfontdimen{Stretch\-Stack\-Top\-Shift\-Up} +{Standard shift up applied to the top element of the stretch stack.} +\mathfontdimen{Stretch\-Stack\-Bottom\-Shift\-Down} +{Standard shift down applied to the bottom element of the stretch stack. Positive for moving in the downward direction.} +\mathfontdimen{Stretch\-Stack\-Gap\-Above\-Min} +{Minimum gap between the ink of the stretched element, and the (ink) bottom of the element above. Suggested: Upper\-Limit\-Gap\-Min} +\mathfontdimen{Stretch\-Stack\-Gap\-Below\-Min} +{Minimum gap between the ink of the stretched element, and the (ink) top of the element below. Suggested: Lower\-Limit\-Gap\-Min.} +\mathfontdimen{Fraction\-Numerator\-Shift\-Up} +{Standard shift up applied to the numerator. } +\mathfontdimen{Fraction\-Numerator\-Display\-Style\-Shift\-Up} +{Standard shift up applied to the numerator in display style. Suggested: Stack\-Top\-Display\-Style\-Shift\-Up.} +\mathfontdimen{Fraction\-Denominator\-Shift\-Down} +{Standard shift down applied to the denominator. Positive for moving in the downward direction.} +\mathfontdimen{Fraction\-Denominator\-Display\-Style\-Shift\-Down} +{Standard shift down applied to the denominator in display style. Positive for moving in the downward direction. Suggested: Stack\-Bottom\-Display\-Style\-Shift\-Down.} +\mathfontdimen{Fraction\-Numerator\-Gap\-Min} +{Minimum tolerated gap between the (ink) bottom of the numerator and the ink of the fraction bar. Suggested: default rule thickness} +\mathfontdimen{Fraction\-Num\-Display\-Style\-Gap\-Min} +{Minimum tolerated gap between the (ink) bottom of the numerator and the ink of the fraction bar in display style. Suggested: 3×default rule thickness.} +\mathfontdimen{Fraction\-Rule\-Thickness} +{Thickness of the fraction bar. Suggested: default rule thickness.} +\mathfontdimen{Fraction\-Denominator\-Gap\-Min} +{Minimum tolerated gap between the (ink) top of the denominator and the ink of the fraction bar. Suggested: default rule thickness} +\mathfontdimen{Fraction\-Denom\-Display\-Style\-Gap\-Min} +{Minimum tolerated gap between the (ink) top of the denominator and the ink of the fraction bar in display style. Suggested: 3×default rule thickness.} +\mathfontdimen{Skewed\-Fraction\-Horizontal\-Gap} +{Horizontal distance between the top and bottom elements of a skewed fraction.} +\mathfontdimen{Skewed\-Fraction\-Vertical\-Gap} +{Vertical distance between the ink of the top and bottom elements of a skewed fraction.} +\mathfontdimen{Overbar\-Vertical\-Gap} +{Distance between the overbar and the (ink) top of he base. Suggested: 3×default rule thickness.} +\mathfontdimen{Overbar\-Rule\-Thickness} +{Thickness of overbar. Suggested: default rule thickness.} +\mathfontdimen{Overbar\-Extra\-Ascender} +{Extra white space reserved above the overbar. Suggested: default rule thickness.} +\mathfontdimen{Underbar\-Vertical\-Gap} +{Distance between underbar and (ink) bottom of the base. Suggested: 3×default rule thickness.} +\mathfontdimen{Underbar\-Rule\-Thickness} +{Thickness of underbar. Suggested: default rule thickness.} +\mathfontdimen{Underbar\-Extra\-Descender} +{Extra white space reserved below the underbar. Always positive. Suggested: default rule thickness.} +\mathfontdimen{Radical\-Vertical\-Gap} +{Space between the (ink) top of the expression and the bar over it. Suggested: 1¼ default rule thickness.} +\mathfontdimen{Radical\-Display\-Style\-Vertical\-Gap} +{Space between the (ink) top of the expression and the bar over it. Suggested: default rule thickness + ¼ x-height. } +\mathfontdimen{Radical\-Rule\-Thickness} +{Thickness of the radical rule. This is the thickness of the rule in designed or constructed radical signs. Suggested: default rule thickness.} +\mathfontdimen{Radical\-Extra\-Ascender} +{Extra white space reserved above the radical. Suggested: Radical\-Rule\-Thickness.} +\mathfontdimen{Radical\-Kern\-Before\-Degree} +{Extra horizontal kern before the degree of a radical, if such is present. Suggested: 5/18 of em.} +\mathfontdimen{Radical\-Kern\-After\-Degree} +{Negative kern after the degree of a radical, if such is present. Suggested: −10/18 of em.} +\mathfontdimen{Radical\-Degree\-Bottom\-Raise\-Percent} +{Height of the bottom of the radical degree, if such is present, in proportion to the ascender of the radical sign. Suggested: 60\%.} +\end{longtable} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-doc-nfsssummary.tex b/Master/texmf-dist/source/latex/unicode-math/um-doc-nfsssummary.tex new file mode 100644 index 00000000000..645664b4bde --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-doc-nfsssummary.tex @@ -0,0 +1,84 @@ +%%^^A%% um-doc-nfsssummary.tex -- part of UNICODE-MATH <wspr.io/unicode-math> + +\section{Documenting maths support in the NFSS} + +In the following, \meta{NFSS decl.} stands for something like |{T1}{lmr}{m}{n}|. + +\begin{description} +\item[Maths symbol fonts] Fonts for symbols: $\propto$, $\leq$, $\rightarrow$ + +\cmd\DeclareSymbolFont\marg{name}\meta{NFSS decl.}\\ +Declares a named maths font such as |operators| from which symbols are defined with \cmd\DeclareMathSymbol. + +\item[Maths alphabet fonts] Fonts for {\font\1=cmmi10 at 10pt\1 ABC}\,–\,{\font\1=cmmi10 at 10pt\1 xyz}, {\font\1=eufm10 at 10pt\1 ABC}\,–\,{\font\1=cmsy10 at 10pt\1 XYZ}, etc. + +\cmd\DeclareMathAlphabet\marg{cmd}\meta{NFSS decl.} + +For commands such as \cmd\mathbf, accessed +through maths mode that are unaffected by the current text font, and which are used for +alphabetic symbols in the \ascii\ range. + +\cmd\DeclareSymbolFontAlphabet\marg{cmd}\marg{name} + +Alternative (and optimisation) for \cmd\DeclareMathAlphabet\ if a single font is being used +for both alphabetic characters (as above) and symbols. + +\item[Maths `versions'] Different maths weights can be defined with the following, switched +in text with the \cmd\mathversion\marg{maths version} command. + +\cmd\SetSymbolFont\marg{name}\marg{maths version}\meta{NFSS decl.}\\ +\cmd\SetMathAlphabet\marg{cmd}\marg{maths version}\meta{NFSS decl.} + +\item[Maths symbols] Symbol definitions in maths for both characters (=) and macros (\cmd\eqdef): +\cmd\DeclareMathSymbol\marg{symbol}\marg{type}\marg{named font}\marg{slot} +This is the macro that actually defines which font each symbol comes from and how they behave. +\end{description} +Delimiters and radicals use wrappers around \TeX's \cmd\delimiter/\cmd\radical\ primitives, +which are re-designed in \XeTeX. The syntax used in \LaTeX's NFSS is therefore not so relevant here. +\begin{description} +\item[Delimiters] A special class of maths symbol which enlarge themselves in certain contexts. + +\cmd\DeclareMathDelimiter\marg{symbol}\marg{type}\marg{sym.\ font}\marg{slot}\marg{sym.\ font}\marg{slot} + +\item[Radicals] Similar to delimiters (\cmd\DeclareMathRadical\ takes the same syntax) but +behave `weirdly'. +\end{description} +In those cases, glyph slots in \emph{two} symbol fonts are required; one for the small (`regular') case, +the other for situations when the glyph is larger. This is not the case in \XeTeX. + +Accents are not included yet. + +\paragraph{Summary} + +For symbols, something like: +\begin{Verbatim} +\def\DeclareMathSymbol#1#2#3#4{ + \global\mathchardef#1"\mathchar@type#2 + \expandafter\hexnumber@\csname sym#2\endcsname + {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}} +\end{Verbatim} +For characters, something like: +\begin{Verbatim} +\def\DeclareMathSymbol#1#2#3#4{ + \global\mathcode`#1"\mathchar@type#2 + \expandafter\hexnumber@\csname sym#2\endcsname + {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}} +\end{Verbatim} +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-doc-stixextract.tex b/Master/texmf-dist/source/latex/unicode-math/um-doc-stixextract.tex new file mode 100644 index 00000000000..b86ae1e33fd --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-doc-stixextract.tex @@ -0,0 +1,38 @@ +%%^^A%% um-doc-stixextract.tex -- part of UNICODE-MATH <wspr.io/unicode-math> + +\section{\STIX\ table data extraction}\label{part:awk} + +The source for the \TeX\ names for the very large number of mathematical +glyphs are provided via Barbara Beeton's table file for the \STIX\ project +(|ams.org/STIX|). A version is located at +|http://www.ams.org/STIX/bnb/stix-tbl.asc| +but check |http://www.ams.org/STIX/| for more up-to-date info. + +This table is converted into a form suitable for reading by \TeX. +A single file is produced containing all (more than 3298) symbols. +Future optimisations might include generating various (possibly overlapping) subsets +so not all definitions must be read just to redefine a small range of symbols. +Performance for now seems to be acceptable without such measures. + +This file is currently developed outside this DTX file. It will be +incorporated when the final version is ready. (I know this is not how +things are supposed to work!) + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-doc-style.tex b/Master/texmf-dist/source/latex/unicode-math/um-doc-style.tex new file mode 100644 index 00000000000..31a01bd7927 --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/um-doc-style.tex @@ -0,0 +1,129 @@ +%%^^A%% um-doc-style.tex -- part of UNICODE-MATH <wspr.io/unicode-math> + +\makeatletter +\input{unicode-math.dtx} +\GetFileInfo{unicode-math.dtx} +\let\umfiledate\filedate +\let\umfileversion\fileversion + +\CheckSum{0} +\EnableCrossrefs +\CodelineIndex +\setcounter{IndexColumns}{2} + +\usepackage[svgnames]{xcolor} +\usepackage[inline]{enumitem} +\usepackage{array,booktabs,calc,enumitem,fancyvrb,graphicx,ifthen,longtable,refstyle,subfig,topcapt,url,varioref,underscore} +\setcounter{LTchunksize}{100} +\usepackage[slash-delimiter=frac,nabla=literal]{unicode-math} +\usepackage{metalogo,hologo} + +\fvset{fontsize=\small,xleftmargin=2em} +\usepackage[it]{titlesec} + +\setmainfont{texgyrepagella}% + [ + Extension = .otf , + UprightFont = *-regular , + ItalicFont = *-italic , + BoldFont = *-bold , + BoldItalicFont = *-bolditalic , + ] +\setsansfont{Iwona}% + [ + Scale=MatchLowercase, + Extension = .otf, + UprightFont = *-Regular, + ItalicFont = *-Italic, + BoldFont = *-Bold, + BoldItalicFont = *-BoldItalic, + ] +\setmonofont{Inconsolatazi4-Regular.otf}% + [ + Scale=MatchLowercase, + BoldFont=Inconsolatazi4-Bold.otf + ] + +\setmathfont{texgyrepagella-math.otf} +\setmathfont[version=xits]{xits-math.otf} +\newfontface\umfont{xits-math.otf} + +\usepackage{hypdoc} +\hypersetup{linktocpage} + +% work around some issue turning | into "j" inside mathsf in the definition of \Module: +% (also prettify) +\def\Module#1{{\footnotesize\color{red}$\langle$\texttt{#1}$\rangle$}} + +\linespread{1.1} +\frenchspacing + +\definecolor{niceblue}{rgb}{0.2,0.4,0.8} + +\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}} + +\newcommand*\name[1]{{#1}} +\newcommand*\pkg[1]{\textsf{#1}} +\newcommand*\feat[1]{\texttt{#1}} +\newcommand*\opt[1]{\texttt{#1}} + +\newcommand*\note[1]{\unskip\footnote{#1}} + +\let\latin\textit +\def\eg{\latin{e.g.}} +\def\Eg{\latin{E.g.}} +\def\ie{\latin{i.e.}} +\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} + +\def\STIX{\textsc{stix}} +\def\MacOSX{Mac~OS~X} +\def\ascii{\textsc{ascii}} +\def\OMEGA{Omega} + +\newcounter{argument} + +\makeatletter +\g@addto@macro\endmacro{\setcounter{argument}{0}} +\makeatother + +\newcommand*\darg[1]{% + \stepcounter{argument}% + {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces +} +\newcommand*\doarg[1]{% + \stepcounter{argument}% + {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces +} + +\newcommand\codeline[1]{\par{\centering#1\par\noindent}\ignorespaces} + +\newcommand\unichar[1]{\textsc{u}+\texttt{\small#1}} + +\setlength\parindent{2em} + +\def \MakePrivateLetters {% + \catcode`\@=11\relax + \catcode`\_=11\relax + \catcode`\:=11\relax +} + +\makeatother + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-doc.tex b/Master/texmf-dist/source/latex/unicode-math/um-doc.tex index 0d5aaa6a97d..7e28f17c9f4 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-doc.tex +++ b/Master/texmf-dist/source/latex/unicode-math/um-doc.tex @@ -1,146 +1,4 @@ -% !TEX TS-program = XeLaTeX - -\providecommand\DTXFILES{}% if this .tex file is typeset, only include documentation -\documentclass[a4paper]{ltxdoc} - -\makeatletter -\GetFileInfo{unicode-math.dtx} -\let\umfiledate\filedate -\let\umfileversion\fileversion - -\CheckSum{0} -\EnableCrossrefs -\CodelineIndex - -\errorcontextlines=999 - -\def\@dotsep{1000} -\setcounter{tocdepth}{2} -\setlength\columnseprule{0.4pt} -\renewcommand\tableofcontents{\relax - \begin{multicols}{2}[\section*{\contentsname}]\relax - \@starttoc{toc}\relax - \end{multicols}} - -\setcounter{IndexColumns}{2} -\renewenvironment{theglossary} - {\small\list{}{} - \item\relax - \glossary@prologue\GlossaryParms - \let\item\@idxitem \ignorespaces - \def\pfill{\hspace*{\fill}}} - {\endlist} - -\usepackage[svgnames]{xcolor} -\usepackage[inline]{enumitem} -\usepackage{array,booktabs,calc,enumitem,fancyvrb,graphicx,ifthen,longtable,refstyle,subfig,topcapt,url,varioref,underscore} -\setcounter{LTchunksize}{100} -\usepackage[slash-delimiter=frac,nabla=literal]{unicode-math} -\usepackage{metalogo,hologo} - -\fvset{fontsize=\small,xleftmargin=2em} -\usepackage[it]{titlesec} - -\setmainfont{texgyrepagella}% - [ - Extension = .otf , - UprightFont = *-regular , - ItalicFont = *-italic , - BoldFont = *-bold , - BoldItalicFont = *-bolditalic , - ] -\setsansfont{Iwona}% - [ - Scale=MatchLowercase, - Extension = .otf, - UprightFont = *-Regular, - ItalicFont = *-Italic, - BoldFont = *-Bold, - BoldItalicFont = *-BoldItalic, - ] -\setmonofont{Inconsolatazi4-Regular.otf}% - [ - Scale=MatchLowercase, - BoldFont=Inconsolatazi4-Bold.otf - ] - -\setmathfont{texgyrepagella-math.otf} -\setmathfont[version=xits]{xits-math.otf} -\newfontface\umfont{xits-math.otf} - -\usepackage{hypdoc} -\hypersetup{linktocpage} - -% work around some issue turning | into "j" inside mathsf in the definition of \Module: -% (also prettify) -\def\Module#1{{\footnotesize\color{red}$\langle$\texttt{#1}$\rangle$}} - -\usepackage{minitoc} - -\linespread{1.1} -\frenchspacing - -\definecolor{niceblue}{rgb}{0.2,0.4,0.8} - -\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}} - -\newcommand*\name[1]{{#1}} -\newcommand*\pkg[1]{\textsf{#1}} -\newcommand*\feat[1]{\texttt{#1}} -\newcommand*\opt[1]{\texttt{#1}} - -\newcommand*\note[1]{\unskip\footnote{#1}} - -\let\latin\textit -\def\eg{\latin{e.g.}} -\def\Eg{\latin{E.g.}} -\def\ie{\latin{i.e.}} -\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} - -\def\STIX{\textsc{stix}} -\def\MacOSX{Mac~OS~X} -\def\ascii{\textsc{ascii}} -\def\OMEGA{Omega} - -\newcounter{argument} - -\makeatletter -\g@addto@macro\endmacro{\setcounter{argument}{0}} -\makeatother - -\newcommand*\darg[1]{% - \stepcounter{argument}% - {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces -} -\newcommand*\doarg[1]{% - \stepcounter{argument}% - {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces -} - -\newcommand\codeline[1]{\par{\centering#1\par\noindent}\ignorespaces} - -\newcommand\unichar[1]{\textsc{u}+\texttt{\small#1}} - -\setlength\parindent{2em} - -\def \MakePrivateLetters {% - \catcode`\@=11\relax - \catcode`\_=11\relax - \catcode`\:=11\relax -} - -\def\partname{Part} - -\makeatother - -\begin{document} - -\title{Experimental Unicode mathematical typesetting: The \pkg{unicode-math} package} -\author{Will Robertson, Philipp Stephani and Khaled Hosny\\ - \texttt{will.robertson@latex-project.org}} -\date{\umfiledate \qquad \umfileversion} - -\maketitle +%%^^A%% um-doc.tex -- part of UNICODE-MATH <wspr.io/unicode-math> \begin{abstract} \noindent @@ -172,11 +30,8 @@ package after any problems have been ironed out with the initial version. \end{abstract} -\doparttoc\faketableofcontents - \newpage -\part{User documentation} -\parttoc +\tableofcontents \clearpage \section{Introduction} @@ -223,10 +78,56 @@ you can only switch to a different OpenType maths font using the \cs{setmathfont If you do not load an OpenType maths font before |\begin{document}|, Latin Modern Math (see above) will be loaded automatically. \subsection{New commands} -\pkg{unicode-math} provides a number of commands (such as |\symbfsf|) to select specific `symbol alphabets' within the unicode maths font, with usage, e.g., |$\symbfsf{g}$|${}\to\symbfsf{g}$. -The full listing is shown in \Tabref{symvsmath}. -For backwards compatibility, many of these are also defined with `familiar' synonyms such as |\mathbfsf|. -However, where possible the `sym' prefix commands should be preferred, as certain synonyms may become deprecated in time. +\LaTeX, since the first version of \LaTeXe, changed the math group +selection from, say, |{\bf x}| to |\mathbf{x}|. It introduced commands +such as |\mathbf|, |\mathit|, |\mathsf|, |\mathtt| and |\mathcal|, +besides |\mathnormal|. This was not only done to maintain the analogy +with |\textbf|, |\textit| and so on, but with the precise purpose of +loading the needed math groups (or math families) on demand and not +allocating them if not required by the document. + +The introduction of \pkg{unicode-math} posed new problems. For +instance, there is a big difference between say |fit| as an operator +name in boldface type and the product of three boldface variables. +With legacy \TeX{} engines, |\mathbf{fit}| would use a ligature and +the same would happen with the input |\mathbf{f}\mathbf{i}\mathbf{t}|. +For the latter case, the user should probably use |\mathbf{f\/}|. + +However, there is another important point from a \emph{conceptual} +point of view. A boldface variable name should be printed using the +\emph{math font}, whereas a boldface operator name should be printed +using the \emph{text font}. OpenType math fonts make this distinction +feasible, because they contain several math alphabets. Of course a +boldface text~`x' will not differ much (or at all) from a boldface +math~`x', but this is not the point: they \emph{should} be considered +different, because the former is |U+0078| in Unicode, the latter is +|U+1D431|. + +When discussing the matter, it soon appeared clear that \emph{two} +different commands are needed: one for using text boldface in math, +one for using math boldface. Only the document's author can know +whether one or the other is needed. The decision was to split off +the two meanings by using either |\mathbf| (for the boldface text font +in math) or |\symbf| (for the bold math font). + +To be more detailed, most alphabet commands are provided with the +\cs{math...} prefix synonyms, but there are five `legacy' font alphabets +that intentionally behave somewhat different. These are \cs{mathup}, +\cs{mathit}, \cs{mathbf}, \cs{mathsf}, and \cs{mathtt}. (N.B.: +\cs{mathrm} is defined as a synonym for \cs{mathup}, but the latter is +prefered as it is a script-agnostic term.) + +The \cs{symbf} command switches to single-letter mathematical symbols +(generally within the same OpenType font). The \cs{mathbf} command +switches to a text font that is set up to behave correctly in +mathematics, and should be used for multi-letter identifiers. These +could be denoted `text math alphabets'; further details are discussed +in \secref{mathselect}. Additional similar `text math alphabet' +commands can be defined using the \cs{setmathfontface} command +discussed in \secref{mathselect}. To control the behaviour of the +default text math alphabet commands to behave in a +backwards-compatible mode, see the package options described in +\secref{textmathlegacy}. \begin{table}\centering \topcaption{New \pkg{unicode-math} commands.} @@ -262,16 +163,17 @@ However, where possible the `sym' prefix commands should be preferred, as certai \end{tabular} \end{table} -While most alphabet commands are provided with the \cs{math...} prefix synonyms, there are five `legacy' font alphabets that intentionally behave somewhat different. -These are \cs{mathup}, \cs{mathit}, \cs{mathbf}, \cs{mathsf}, and \cs{mathtt}. -(N.B.: \cs{mathrm} is defined as a synonym for \cs{mathup}, but the latter is prefered as it is a script-agnostic term.) +Thus \pkg{unicode-math} provides a number of commands (such as +|\symbfsf|) to select specific `symbol alphabets' within the unicode +maths font, with usage, e.g., |$\symbfsf{g}$|${}\to\symbfsf{g}$. The +full listing is shown in \Tabref{symvsmath}. For backwards +compatibility, many of these are also defined with `familiar' synonyms +such as |\mathbfsf|. However, where possible the `sym' prefix +commands should be preferred, as certain synonyms may become +deprecated in time. The |\symliteral| command is described in +\secref{math-style}. + -These commands have `overloaded' meanings in traditional \LaTeX, and it's important to consider the subtle differences between, e.g., the new \cs{symbf} and \cs{mathbf}. -The \cs{symbf} command switches to single-letter mathematical symbols (generally within the same OpenType font). -The \cs{mathbf} command switches to a text font that is set up to behave correctly in mathematics, and should be used for multi-letter identifiers. -These could be denoted `text math alphabets'; further details are discussed in \secref{mathselect}. -Additional similar `text math alphabet' commands can be defined using the \cs{setmathfontface} command discussed in \secref{mathselect}. -To control the behaviour of the default text math alphabet commands to behave in a backwards-compatible mode, see the package options described in \secref{textmathlegacy}. \subsection{Package options} Package options may be set when the package as loaded or at any later @@ -493,12 +395,12 @@ If the \cs{mathsf} font is set explicitly at any time in the preamble, this `aut \subsubsection{Replacing `text math' fonts by symbols} \seclabel{textmathlegacy} -For certain types of documents that use legacy input syntax (say you're typesetting a new version of a book written in the 1990s), it would be preferable to use |\symbf| rather than |\mathbf| en masse. -For example, if bold maths is used only for vectors and matrices, a dedicated symbol font will produce better spacing and will better match the main math font. - -Alternatively, you may have used an old version of \pkg{unicode-math} (pre-v0.8), when the \cs{symXYZ} commands were not defined and \cs{mathbf} behaved like \cs{symbf} does now. +For certain types of documents that use legacy input syntax, it may be preferable to have |\mathbf| behave as if it were |\symbf| en masse (et cetera respectively). A series of package options (\tabref{legacyfontswitch}) are provided to facilitate switching the definition of \cs{mathXYZ} for the five legacy text math font definitions. +For example, if in a particular document |\mathbf| is used only for choosing symbols of vectors and matrices, a dedicated symbol font (|\symbf|) will produce better spacing and will better match the main math font. +In that case loading |unicode-math| with the |mathbf=sym| will achieve the desired result. + \begin{table} \centering \topcaption{Maths text font configuration options. Note that \cs{mathup} and \cs{mathrm} are aliases of each other and cannot be configured separately.} @@ -1215,287 +1117,21 @@ without the leading `math' string; for example, |\symbf { \show \l_@@_mathstyle_tl }| will produce `bf'. -\StopEventually{\end{document}} - -\clearpage -\appendix - -\section{\STIX\ table data extraction}\label{part:awk} - -The source for the \TeX\ names for the very large number of mathematical -glyphs are provided via Barbara Beeton's table file for the \STIX\ project -(|ams.org/STIX|). A version is located at -|http://www.ams.org/STIX/bnb/stix-tbl.asc| -but check |http://www.ams.org/STIX/| for more up-to-date info. - -This table is converted into a form suitable for reading by \TeX. -A single file is produced containing all (more than 3298) symbols. -Future optimisations might include generating various (possibly overlapping) subsets -so not all definitions must be read just to redefine a small range of symbols. -Performance for now seems to be acceptable without such measures. - -This file is currently developed outside this DTX file. It will be -incorporated when the final version is ready. (I know this is not how -things are supposed to work!) - - -\section{Documenting maths support in the NFSS} - -In the following, \meta{NFSS decl.} stands for something like |{T1}{lmr}{m}{n}|. - -\begin{description} -\item[Maths symbol fonts] Fonts for symbols: $\propto$, $\leq$, $\rightarrow$ - -\cmd\DeclareSymbolFont\marg{name}\meta{NFSS decl.}\\ -Declares a named maths font such as |operators| from which symbols are defined with \cmd\DeclareMathSymbol. - -\item[Maths alphabet fonts] Fonts for {\font\1=cmmi10 at 10pt\1 ABC}\,–\,{\font\1=cmmi10 at 10pt\1 xyz}, {\font\1=eufm10 at 10pt\1 ABC}\,–\,{\font\1=cmsy10 at 10pt\1 XYZ}, etc. - -\cmd\DeclareMathAlphabet\marg{cmd}\meta{NFSS decl.} - -For commands such as \cmd\mathbf, accessed -through maths mode that are unaffected by the current text font, and which are used for -alphabetic symbols in the \ascii\ range. - -\cmd\DeclareSymbolFontAlphabet\marg{cmd}\marg{name} - -Alternative (and optimisation) for \cmd\DeclareMathAlphabet\ if a single font is being used -for both alphabetic characters (as above) and symbols. - -\item[Maths `versions'] Different maths weights can be defined with the following, switched -in text with the \cmd\mathversion\marg{maths version} command. - -\cmd\SetSymbolFont\marg{name}\marg{maths version}\meta{NFSS decl.}\\ -\cmd\SetMathAlphabet\marg{cmd}\marg{maths version}\meta{NFSS decl.} - -\item[Maths symbols] Symbol definitions in maths for both characters (=) and macros (\cmd\eqdef): -\cmd\DeclareMathSymbol\marg{symbol}\marg{type}\marg{named font}\marg{slot} -This is the macro that actually defines which font each symbol comes from and how they behave. -\end{description} -Delimiters and radicals use wrappers around \TeX's \cmd\delimiter/\cmd\radical\ primitives, -which are re-designed in \XeTeX. The syntax used in \LaTeX's NFSS is therefore not so relevant here. -\begin{description} -\item[Delimiters] A special class of maths symbol which enlarge themselves in certain contexts. - -\cmd\DeclareMathDelimiter\marg{symbol}\marg{type}\marg{sym.\ font}\marg{slot}\marg{sym.\ font}\marg{slot} - -\item[Radicals] Similar to delimiters (\cmd\DeclareMathRadical\ takes the same syntax) but -behave `weirdly'. -\end{description} -In those cases, glyph slots in \emph{two} symbol fonts are required; one for the small (`regular') case, -the other for situations when the glyph is larger. This is not the case in \XeTeX. - -Accents are not included yet. - -\paragraph{Summary} - -For symbols, something like: -\begin{Verbatim} -\def\DeclareMathSymbol#1#2#3#4{ - \global\mathchardef#1"\mathchar@type#2 - \expandafter\hexnumber@\csname sym#2\endcsname - {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}} -\end{Verbatim} -For characters, something like: -\begin{Verbatim} -\def\DeclareMathSymbol#1#2#3#4{ - \global\mathcode`#1"\mathchar@type#2 - \expandafter\hexnumber@\csname sym#2\endcsname - {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}} -\end{Verbatim} - -\section{Legacy \TeX\ font dimensions} - -\centerline{% -\begin{tabular}[t]{@{}lp{4cm}@{}} -\toprule -\multicolumn{2}{@{}c@{}}{Text fonts} \\ -\midrule -$\phi_1$ & slant per pt \\ -$\phi_2$ & interword space \\ -$\phi_3$ & interword stretch \\ -$\phi_4$ & interword shrink \\ -$\phi_5$ & x-height \\ -$\phi_6$ & quad width \\ -$\phi_7$ & extra space \\ -$\phi_8$ & cap height (\XeTeX\ only) \\ -\bottomrule -\end{tabular} -\quad -\begin{tabular}[t]{@{}lp{4cm}@{}} -\toprule -\multicolumn{2}{@{}c@{}}{Maths font, \cs{fam}2} \\ -\midrule -$\sigma_5$ & x height \\ -$\sigma_6$ & quad \\ -$\sigma_8$ & num1 \\ -$\sigma_9$ & num2 \\ -$\sigma_{10}$ & num3 \\ -$\sigma_{11}$ & denom1 \\ -$\sigma_{12}$ & denom2 \\ -$\sigma_{13}$ & sup1 \\ -$\sigma_{14}$ & sup2 \\ -$\sigma_{15}$ & sup3 \\ -$\sigma_{16}$ & sub1 \\ -$\sigma_{17}$ & sub2 \\ -$\sigma_{18}$ & sup drop \\ -$\sigma_{19}$ & sub drop \\ -$\sigma_{20}$ & delim1 \\ -$\sigma_{21}$ & delim2 \\ -$\sigma_{22}$ & axis height \\ -\bottomrule -\end{tabular} -\quad -\begin{tabular}[t]{@{}lp{4cm}@{}} -\toprule -\multicolumn{2}{@{}c@{}}{Maths font, \cs{fam}3} \\ -\midrule -$\xi_8$ & default rule thickness \\ -$\xi_9$ & big op spacing1 \\ -$\xi_{10}$ & big op spacing2 \\ -$\xi_{11}$ & big op spacing3 \\ -$\xi_{12}$ & big op spacing4 \\ -$\xi_{13}$ & big op spacing5 \\ -\bottomrule -\end{tabular} -} - - -\section{\Hologo{XeTeX} math font dimensions} - -These are the extended \cmd\fontdimen s available for suitable fonts -in \XeTeX. Note that Lua\TeX\ takes an alternative route, and this package -will eventually provide a wrapper interface to the two (I hope). - -\newcounter{mfdimen} -\setcounter{mfdimen}{9} -\newcommand\mathfontdimen[2]{^^A - \stepcounter{mfdimen}^^A - \themfdimen & {\scshape\small #1} & #2\vspace{0.5ex} \tabularnewline} - -\begin{longtable}{ - @{}c>{\raggedright\parfillskip=0pt}p{4cm}>{\raggedright}p{7cm}@{}} -\toprule \cmd\fontdimen & Dimension name & Description\tabularnewline\midrule \endhead -\bottomrule\endfoot -\mathfontdimen{Script\-Percent\-Scale\-Down} -{Percentage of scaling down for script level 1. Suggested value: 80\%.} -\mathfontdimen{Script\-Script\-Percent\-Scale\-Down} -{Percentage of scaling down for script level 2 (Script\-Script). Suggested value: 60\%.} -\mathfontdimen{Delimited\-Sub\-Formula\-Min\-Height} -{Minimum height required for a delimited expression to be treated as a subformula. Suggested value: normal line height\,×\,1.5.} -\mathfontdimen{Display\-Operator\-Min\-Height} -{Minimum height of n-ary operators (such as integral and summation) for formulas in display mode.} -\mathfontdimen{Math\-Leading} -{White space to be left between math formulas to ensure proper line spacing. For example, for applications that treat line gap as a part of line ascender, formulas with ink going above (os2.sTypoAscender + os2.sTypoLineGap – MathLeading) or with ink going below os2.sTypoDescender will result in increasing line height.} -\mathfontdimen{Axis\-Height} -{Axis height of the font. } -\mathfontdimen{Accent\-Base\-Height} -{Maximum (ink) height of accent base that does not require raising the accents. Suggested: x-height of the font (os2.sxHeight) plus any possible overshots. } -\mathfontdimen{Flattened\-Accent\-Base\-Height} -{Maximum (ink) height of accent base that does not require flattening the accents. Suggested: cap height of the font (os2.sCapHeight).} -\mathfontdimen{Subscript\-Shift\-Down} -{The standard shift down applied to subscript elements. Positive for moving in the downward direction. Suggested: os2.ySubscriptYOffset.} -\mathfontdimen{Subscript\-Top\-Max} -{Maximum allowed height of the (ink) top of subscripts that does not require moving subscripts further down. Suggested: /5 x-height.} -\mathfontdimen{Subscript\-Baseline\-Drop\-Min} -{Minimum allowed drop of the baseline of subscripts relative to the (ink) bottom of the base. Checked for bases that are treated as a box or extended shape. Positive for subscript baseline dropped below the base bottom.} -\mathfontdimen{Superscript\-Shift\-Up} -{Standard shift up applied to superscript elements. Suggested: os2.ySuperscriptYOffset.} -\mathfontdimen{Superscript\-Shift\-Up\-Cramped} -{Standard shift of superscripts relative to the base, in cramped style.} -\mathfontdimen{Superscript\-Bottom\-Min} -{Minimum allowed height of the (ink) bottom of superscripts that does not require moving subscripts further up. Suggested: ¼ x-height.} -\mathfontdimen{Superscript\-Baseline\-Drop\-Max} -{Maximum allowed drop of the baseline of superscripts relative to the (ink) top of the base. Checked for bases that are treated as a box or extended shape. Positive for superscript baseline below the base top.} -\mathfontdimen{Sub\-Superscript\-Gap\-Min} -{Minimum gap between the superscript and subscript ink. Suggested: 4×default rule thickness.} -\mathfontdimen{Superscript\-Bottom\-Max\-With\-Subscript} -{The maximum level to which the (ink) bottom of superscript can be pushed to increase the gap between superscript and subscript, before subscript starts being moved down. -Suggested: /5 x-height.} -\mathfontdimen{Space\-After\-Script} -{Extra white space to be added after each subscript and superscript. Suggested: 0.5pt for a 12 pt font.} -\mathfontdimen{Upper\-Limit\-Gap\-Min} -{Minimum gap between the (ink) bottom of the upper limit, and the (ink) top of the base operator. } -\mathfontdimen{Upper\-Limit\-Baseline\-Rise\-Min} -{Minimum distance between baseline of upper limit and (ink) top of the base operator.} -\mathfontdimen{Lower\-Limit\-Gap\-Min} -{Minimum gap between (ink) top of the lower limit, and (ink) bottom of the base operator.} -\mathfontdimen{Lower\-Limit\-Baseline\-Drop\-Min} -{Minimum distance between baseline of the lower limit and (ink) bottom of the base operator.} -\mathfontdimen{Stack\-Top\-Shift\-Up} -{Standard shift up applied to the top element of a stack.} -\mathfontdimen{Stack\-Top\-Display\-Style\-Shift\-Up} -{Standard shift up applied to the top element of a stack in display style.} -\mathfontdimen{Stack\-Bottom\-Shift\-Down} -{Standard shift down applied to the bottom element of a stack. Positive for moving in the downward direction.} -\mathfontdimen{Stack\-Bottom\-Display\-Style\-Shift\-Down} -{Standard shift down applied to the bottom element of a stack in display style. Positive for moving in the downward direction.} -\mathfontdimen{Stack\-Gap\-Min} -{Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element. Suggested: 3×default rule thickness.} -\mathfontdimen{Stack\-Display\-Style\-Gap\-Min} -{Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element in display style. Suggested: 7×default rule thickness.} -\mathfontdimen{Stretch\-Stack\-Top\-Shift\-Up} -{Standard shift up applied to the top element of the stretch stack.} -\mathfontdimen{Stretch\-Stack\-Bottom\-Shift\-Down} -{Standard shift down applied to the bottom element of the stretch stack. Positive for moving in the downward direction.} -\mathfontdimen{Stretch\-Stack\-Gap\-Above\-Min} -{Minimum gap between the ink of the stretched element, and the (ink) bottom of the element above. Suggested: Upper\-Limit\-Gap\-Min} -\mathfontdimen{Stretch\-Stack\-Gap\-Below\-Min} -{Minimum gap between the ink of the stretched element, and the (ink) top of the element below. Suggested: Lower\-Limit\-Gap\-Min.} -\mathfontdimen{Fraction\-Numerator\-Shift\-Up} -{Standard shift up applied to the numerator. } -\mathfontdimen{Fraction\-Numerator\-Display\-Style\-Shift\-Up} -{Standard shift up applied to the numerator in display style. Suggested: Stack\-Top\-Display\-Style\-Shift\-Up.} -\mathfontdimen{Fraction\-Denominator\-Shift\-Down} -{Standard shift down applied to the denominator. Positive for moving in the downward direction.} -\mathfontdimen{Fraction\-Denominator\-Display\-Style\-Shift\-Down} -{Standard shift down applied to the denominator in display style. Positive for moving in the downward direction. Suggested: Stack\-Bottom\-Display\-Style\-Shift\-Down.} -\mathfontdimen{Fraction\-Numerator\-Gap\-Min} -{Minimum tolerated gap between the (ink) bottom of the numerator and the ink of the fraction bar. Suggested: default rule thickness} -\mathfontdimen{Fraction\-Num\-Display\-Style\-Gap\-Min} -{Minimum tolerated gap between the (ink) bottom of the numerator and the ink of the fraction bar in display style. Suggested: 3×default rule thickness.} -\mathfontdimen{Fraction\-Rule\-Thickness} -{Thickness of the fraction bar. Suggested: default rule thickness.} -\mathfontdimen{Fraction\-Denominator\-Gap\-Min} -{Minimum tolerated gap between the (ink) top of the denominator and the ink of the fraction bar. Suggested: default rule thickness} -\mathfontdimen{Fraction\-Denom\-Display\-Style\-Gap\-Min} -{Minimum tolerated gap between the (ink) top of the denominator and the ink of the fraction bar in display style. Suggested: 3×default rule thickness.} -\mathfontdimen{Skewed\-Fraction\-Horizontal\-Gap} -{Horizontal distance between the top and bottom elements of a skewed fraction.} -\mathfontdimen{Skewed\-Fraction\-Vertical\-Gap} -{Vertical distance between the ink of the top and bottom elements of a skewed fraction.} -\mathfontdimen{Overbar\-Vertical\-Gap} -{Distance between the overbar and the (ink) top of he base. Suggested: 3×default rule thickness.} -\mathfontdimen{Overbar\-Rule\-Thickness} -{Thickness of overbar. Suggested: default rule thickness.} -\mathfontdimen{Overbar\-Extra\-Ascender} -{Extra white space reserved above the overbar. Suggested: default rule thickness.} -\mathfontdimen{Underbar\-Vertical\-Gap} -{Distance between underbar and (ink) bottom of the base. Suggested: 3×default rule thickness.} -\mathfontdimen{Underbar\-Rule\-Thickness} -{Thickness of underbar. Suggested: default rule thickness.} -\mathfontdimen{Underbar\-Extra\-Descender} -{Extra white space reserved below the underbar. Always positive. Suggested: default rule thickness.} -\mathfontdimen{Radical\-Vertical\-Gap} -{Space between the (ink) top of the expression and the bar over it. Suggested: 1¼ default rule thickness.} -\mathfontdimen{Radical\-Display\-Style\-Vertical\-Gap} -{Space between the (ink) top of the expression and the bar over it. Suggested: default rule thickness + ¼ x-height. } -\mathfontdimen{Radical\-Rule\-Thickness} -{Thickness of the radical rule. This is the thickness of the rule in designed or constructed radical signs. Suggested: default rule thickness.} -\mathfontdimen{Radical\-Extra\-Ascender} -{Extra white space reserved above the radical. Suggested: Radical\-Rule\-Thickness.} -\mathfontdimen{Radical\-Kern\-Before\-Degree} -{Extra horizontal kern before the degree of a radical, if such is present. Suggested: 5/18 of em.} -\mathfontdimen{Radical\-Kern\-After\-Degree} -{Negative kern after the degree of a radical, if such is present. Suggested: −10/18 of em.} -\mathfontdimen{Radical\-Degree\-Bottom\-Raise\-Percent} -{Height of the bottom of the radical degree, if such is present, in proportion to the ascender of the radical sign. Suggested: 60\%.} -\end{longtable} - -\def\DTX#1{\gdef\DTXCURR{#1}\DocInput{#1}} -\DTXFILES - -\end{document} - - - +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-code.ltx b/Master/texmf-dist/source/latex/unicode-math/unicode-math-code.ltx new file mode 100644 index 00000000000..29cadd8081e --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math-code.ltx @@ -0,0 +1,39 @@ +%%^^A%% unicode-math-code.ltx -- part of UNICODE-MATH <wspr.io/unicode-math> + +\documentclass[a4paper]{ltxdoc} +\input{um-doc-style.tex} +\begin{document} + +\title{Experimental Unicode mathematical typesetting: The \pkg{unicode-math} package} +\author{\itshape Will Robertson\\\itshape Philipp Stephani, Joseph Wright, Khaled Hosny\\\url{http://github.com/wspr/unicode-math}} +\date{\umfiledate \qquad \umfileversion} + +\maketitle +\tableofcontents + +\def\DTX#1{\clearpage\part{#1}\DocInput{#1}} +\DTXFILES + +\clearpage +\PrintIndex + +\end{document} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-main.dtx b/Master/texmf-dist/source/latex/unicode-math/unicode-math-main.dtx deleted file mode 100644 index 88c9524b18e..00000000000 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-main.dtx +++ /dev/null @@ -1,590 +0,0 @@ - -% \section{\DTXCURR --- The main \cs{setmathfont} macro} -% -% \begin{macrocode} -%<*package&(XE|LU)> -% \end{macrocode} -% -% Using a |range| including large character sets such as \cmd\mathrel, -% \cmd\mathalpha, \etc, is \emph{very slow}! -% I hope to improve the performance somehow. -% -% \begin{macro}{\setmathfont} -% \doarg{font features (first optional argument retained for backwards compatibility)} -% \darg{font name} -% \doarg{font features} -% \begin{macrocode} -\DeclareDocumentCommand \setmathfont { O{} m O{} } - { - \@@_setmathfont:nn {#1,#3} {#2} - } -% \end{macrocode} -% -% \begin{macrocode} -\cs_set:Nn \@@_setmathfont:nn - { - \tl_set:Nn \l_@@_fontname_tl {#2} - \@@_init: -% \end{macrocode} -% Grab the current size information: -% (is this robust enough? Maybe it should be preceded by \cmd\normalsize). -% The macro \cmd\S@\meta{size} -% contains the definitions of the sizes used for maths letters, subscripts and subsubscripts in -% \cmd\tf@size, \cmd\sf@size, and \cmd\ssf@size, respectively. -% \begin{macrocode} - \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } - \csname S@\f@size\endcsname -% \end{macrocode} -% Parse options and tell people what's going on: -% \begin{macrocode} - \keys_set_known:nnN {unicode-math} {#1} \l_@@_unknown_keys_clist - \bool_if:NT \l_@@_init_bool { \@@_log:n {default-math-font} } -% \end{macrocode} -% Use \pkg{fontspec} to select a font to use. -% After loading the font, we detect what sizes it recommends for scriptsize and scriptscriptsize, so after setting those values appropriately, we reload the font to take these into account. -% \begin{macrocode} -%<debug> \csname TIC\endcsname - \@@_fontspec_select_font: -%<debug> \csname TOC\endcsname - \bool_if:nT { \l_@@_ot_math_bool && !\g_@@_mainfont_already_set_bool } - { - \@@_declare_math_sizes: - \@@_fontspec_select_font: - } -% \end{macrocode} -% Now define |\@@_symfont_tl| as the \LaTeX\ math font to access everything: -% \begin{macrocode} - \cs_if_exist:cF { sym \@@_symfont_tl } - { - \DeclareSymbolFont{\@@_symfont_tl} - {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} - } - \SetSymbolFont{\@@_symfont_tl}{\l_@@_mversion_tl} - {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} -% \end{macrocode} -% Set the bold math version. -% \begin{macrocode} - \str_if_eq_x:nnT {\l_@@_mversion_tl} {normal} - { - \SetSymbolFont{\@@_symfont_tl}{bold} - {\encodingdefault}{\l_@@_family_tl}{\bfdefault}{\updefault} - } -% \end{macrocode} -% Declare the math sizes (i.e., scaling of superscripts) for the specific -% values for this font, -% and set defaults for math fams two and three for legacy compatibility: -% \begin{macrocode} - \bool_if:nT { \l_@@_ot_math_bool && !\g_@@_mainfont_already_set_bool } - { - \bool_set_true:N \g_@@_mainfont_already_set_bool - \@@_setup_legacy_fam_two: - \@@_setup_legacy_fam_three: - } -% \end{macrocode} -% And now we input every single maths char. -% \begin{macrocode} -%<debug> \csname TIC\endcsname - \@@_input_math_symbol_table: -%<debug> \csname TOC\endcsname -% \end{macrocode} -% Finally, -% \begin{itemize} -% \item Remap symbols that don't take their natural mathcode -% \item Activate any symbols that need to be math-active -% \item Enable wide/narrow accents -% \item Assign delimiter codes for symbols that need to grow -% \item Setup the maths alphabets (\cs{mathbf} etc.). -% This is an extensive part of the code; see Section~\ref{sec:mathmap}. -% \item Setup negations, which are handled on an ad hoc basis; see Section~\ref{sec:negations}. -% \end{itemize} -% \begin{macrocode} - \@@_remap_symbols: - \@@_setup_mathactives: - \@@_setup_delcodes: -%<debug> \csname TIC\endcsname - \@@_setup_alphabets: -%<debug> \csname TOC\endcsname - \@@_setup_negations: - } -% \end{macrocode} -% \end{macro} -% -% \paragraph{Fall-back font} -% -% Want to load Latin Modern Math if nothing else. -% This needs to happen early so that all of the font-loading machinery executes before -% the other `AtBeginDocument' code. -% \begin{macrocode} -\AtBeginDocument { \@@_load_lm_if_necessary: } -\cs_new:Nn \@@_load_lm_if_necessary: - { - \cs_if_exist:NF \l_@@_fontname_tl - { - % TODO: update this when lmmath-bold.otf is released - \setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] - \bool_set_false:N \g_@@_mainfont_already_set_bool - } - } -% \end{macrocode} -% Note that here we reset the `font already loaded' boolean so that a new font being set -% will do the right thing in terms of setting up defaults. -% -% TODO: need a better way to do this for the general case. (Maybe a `reset' command option?) -% -% \begin{macro}{\@@_init:} -% \begin{macrocode} -\cs_new:Nn \@@_init: - { -% \end{macrocode} -% \begin{itemize} -% \item Initially assume we're using a proper OpenType font with unicode maths. -% \begin{macrocode} - \bool_set_true:N \l_@@_ot_math_bool -% \end{macrocode} -% \item Erase any conception \LaTeX\ has of previously defined math symbol fonts; -% this allows \cmd\DeclareSymbolFont\ at any point in the document. -% \begin{macrocode} - \cs_set_eq:NN \glb@currsize \scan_stop: -% \end{macrocode} -% \item To start with, assume we're defining the font for every math symbol character. -% \begin{macrocode} - \bool_set_true:N \l_@@_init_bool - \seq_clear:N \l_@@_char_range_seq - \clist_clear:N \l_@@_char_nrange_clist - \seq_clear:N \l_@@_mathalph_seq - \seq_clear:N \l_@@_missing_alph_seq -% \end{macrocode} -% \item By default use the `normal' math version. -% \begin{macrocode} - \tl_set:Nn \l_@@_mversion_tl {normal} -% \end{macrocode} -% \item Other range initialisations. -% \begin{macrocode} - \tl_set:Nn \@@_symfont_tl {operators} - \cs_set_eq:NN \_@@_sym:nnn \@@_process_symbol_noparse:nnn - \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn - \cs_set_eq:NN \@@_remap_symbol:nnn \@@_remap_symbol_noparse:nnn - \cs_set_eq:NN \@@_maybe_init_alphabet:n \@@_init_alphabet:n - \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn - \cs_set_eq:NN \@@_assign_delcode:nn \@@_assign_delcode_noparse:nn - \cs_set_eq:NN \@@_make_mathactive:nNN \@@_make_mathactive_noparse:nNN -% \end{macrocode} -% \item Define default font features for the script and scriptscript font. -% \begin{macrocode} - \tl_set:Nn \l_@@_script_features_tl {Style=MathScript} - \tl_set:Nn \l_@@_sscript_features_tl {Style=MathScriptScript} - \tl_set_eq:NN \l_@@_script_font_tl \l_@@_fontname_tl - \tl_set_eq:NN \l_@@_sscript_font_tl \l_@@_fontname_tl -% \end{macrocode} -% \end{itemize} -% \begin{macrocode} - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_declare_math_sizes:} -% Set the math sizes according to the recommended font parameters. -% TODO: this shouldn't need to be per-engine; check out why the wrappers aren't used. -% \begin{macrocode} -\cs_new:Nn \@@_declare_math_sizes: - { -%<*LU> - \fp_compare:nF { \@@_script_style_size:n {ScriptPercentScaleDown} == 0 } - { - \DeclareMathSizes { \f@size } { \f@size } - { \@@_script_style_size:n {ScriptPercentScaleDown} } - { \@@_script_style_size:n {ScriptScriptPercentScaleDown} } - } -%</LU> -%<*XE> - \dim_compare:nF { \fontdimen 10 \l_@@_font == 0pt } - { - \DeclareMathSizes { \f@size } { \f@size } - { \@@_fontdimen_to_scale:nn {10} {\l_@@_font} } - { \@@_fontdimen_to_scale:nn {11} {\l_@@_font} } - } -%</XE> - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_script_style_size:n} -% Determine script- and scriptscriptstyle sizes using luaotfload: -% \begin{macrocode} -%<*LU> -\cs_new:Nn \@@_script_style_size:n - { - \fp_eval:n {\directlua{tex.sprint(luaotfload.aux.get_math_dimension("l_@@_font","#1"))} * \f@size / 100 } - } -%</LU> -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_setup_legacy_fam_two:} -% \TeX\ won't load the same font twice at the same scale, so we need to magnify this one by an imperceptable amount. -% \begin{macrocode} -\cs_new:Nn \@@_setup_legacy_fam_two: - { - \fontspec_set_family:Nxn \l_@@_family_tl - { - \l_@@_font_keyval_tl, - Scale=1.00001, - FontAdjustment = - { - \fontdimen8\font= \@@_get_fontparam:nn {43} {FractionNumeratorDisplayStyleShiftUp}\relax - \fontdimen9\font= \@@_get_fontparam:nn {42} {FractionNumeratorShiftUp}\relax - \fontdimen10\font=\@@_get_fontparam:nn {32} {StackTopShiftUp}\relax - \fontdimen11\font=\@@_get_fontparam:nn {45} {FractionDenominatorDisplayStyleShiftDown}\relax - \fontdimen12\font=\@@_get_fontparam:nn {44} {FractionDenominatorShiftDown}\relax - \fontdimen13\font=\@@_get_fontparam:nn {21} {SuperscriptShiftUp}\relax - \fontdimen14\font=\@@_get_fontparam:nn {21} {SuperscriptShiftUp}\relax - \fontdimen15\font=\@@_get_fontparam:nn {22} {SuperscriptShiftUpCramped}\relax - \fontdimen16\font=\@@_get_fontparam:nn {18} {SubscriptShiftDown}\relax - \fontdimen17\font=\@@_get_fontparam:nn {18} {SubscriptShiftDownWithSuperscript}\relax - \fontdimen18\font=\@@_get_fontparam:nn {24} {SuperscriptBaselineDropMax}\relax - \fontdimen19\font=\@@_get_fontparam:nn {20} {SubscriptBaselineDropMin}\relax - \fontdimen20\font=0pt\relax % delim1 = FractionDelimiterDisplaySize - \fontdimen21\font=0pt\relax % delim2 = FractionDelimiterSize - \fontdimen22\font=\@@_get_fontparam:nn {15} {AxisHeight}\relax - } - } {\l_@@_fontname_tl} - - \SetSymbolFont{symbols}{\l_@@_mversion_tl} - {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} - - \str_if_eq_x:nnT {\l_@@_mversion_tl} {normal} - { - \SetSymbolFont{symbols}{bold} - {\encodingdefault}{\l_@@_family_tl}{\bfdefault}{\updefault} - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_setup_legacy_fam_three:} -% Similarly, this font is shrunk by an imperceptable amount for \TeX\ to load it again. -% \begin{macrocode} -\cs_new:Nn \@@_setup_legacy_fam_three: - { - \fontspec_set_family:Nxn \l_@@_family_tl - { - \l_@@_font_keyval_tl, - Scale=0.99999, - FontAdjustment={ - \fontdimen8\font= \@@_get_fontparam:nn {48} {FractionRuleThickness}\relax - \fontdimen9\font= \@@_get_fontparam:nn {28} {UpperLimitGapMin}\relax - \fontdimen10\font=\@@_get_fontparam:nn {30} {LowerLimitGapMin}\relax - \fontdimen11\font=\@@_get_fontparam:nn {29} {UpperLimitBaselineRiseMin}\relax - \fontdimen12\font=\@@_get_fontparam:nn {31} {LowerLimitBaselineDropMin}\relax - \fontdimen13\font=0pt\relax - } - } {\l_@@_fontname_tl} - - \SetSymbolFont{largesymbols}{\l_@@_mversion_tl} - {\encodingdefault}{\l_@@_family_tl}{\mddefault}{\updefault} - - \str_if_eq_x:nnT {\l_@@_mversion_tl} {normal} - { - \SetSymbolFont{largesymbols}{bold} - {\encodingdefault}{\l_@@_family_tl}{\bfdefault}{\updefault} - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\cs_new:Nn \@@_get_fontparam:nn - { -%<XE> \the\fontdimen#1\l_@@_font\relax -%<LU> \directlua{fontspec.mathfontdimen("l_@@_font","#2")} - } -% \end{macrocode} -% -% \begin{macro}{\@@_fontspec_select_font:} -% Select the font with \cs{fontspec} and define \cs{l_@@_font} from it. -% \begin{macrocode} -\cs_new:Nn \@@_fontspec_select_font: - { - \tl_set:Nx \l_@@_font_keyval_tl { -%<LU> Renderer = Basic, - BoldItalicFont = {}, ItalicFont = {}, - Script = Math, - SizeFeatures = - { - { - Size = \tf@size- - } , - { - Size = \sf@size-\tf@size , - Font = \l_@@_script_font_tl , - \l_@@_script_features_tl - } , - { - Size = -\sf@size , - Font = \l_@@_sscript_font_tl , - \l_@@_sscript_features_tl - } - } , - \l_@@_unknown_keys_clist - } - \fontspec_set_fontface:NNxn \l_@@_font \l_@@_family_tl - {\l_@@_font_keyval_tl} {\l_@@_fontname_tl} -% \end{macrocode} -% Check whether we're using a real maths font: -% \begin{macrocode} - \group_begin: - \fontfamily{\l_@@_family_tl}\selectfont - \fontspec_if_script:nF {math} {\bool_gset_false:N \l_@@_ot_math_bool} - \group_end: - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Functions for setting up symbols with mathcodes} -% \seclabel{mathsymbol} -% -% \begin{macro}{\@@_process_symbol_noparse:nnn} -% \begin{macro}{\@@_process_symbol_parse:nnn} -% If the \feat{range} font feature has been used, then only -% a subset of the Unicode glyphs are to be defined. -% See \secref{rangeproc} for the code that enables this. -% \begin{macrocode} -\cs_set:Nn \@@_process_symbol_noparse:nnn - { - \@@_set_mathsymbol:nNNn {\@@_symfont_tl} #2 #3 {#1} - } -% \end{macrocode} -% \begin{macrocode} -\cs_set:Nn \@@_process_symbol_parse:nnn - { - \@@_if_char_spec:nNNT {#1} {#2} {#3} - { - \@@_process_symbol_noparse:nnn {#1} {#2} {#3} - } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\@@_remap_symbols:} -% \begin{macro}{\@@_remap_symbol_noparse:nnn} -% \begin{macro}{\@@_remap_symbol_parse:nnn} -% This function is used to define the mathcodes for those chars which should -% be mapped to a different glyph than themselves. -% \begin{macrocode} -\cs_new:Npn \@@_remap_symbols: - { - \@@_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus - \@@_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk" - \bool_if:NF \g_@@_literal_colon_bool - { - \@@_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel) - } - } -% \end{macrocode} -% \end{macro} -% Where |\@@_remap_symbol:nnn| is defined to be one of these two, depending -% on the range setup: -% \begin{macrocode} -\cs_new:Nn \@@_remap_symbol_parse:nnn - { - \@@_if_char_spec:nNNT {#3} {\@nil} {#2} - { \@@_remap_symbol_noparse:nnn {#1} {#2} {#3} } - } -\cs_new:Nn \@@_remap_symbol_noparse:nnn - { - \clist_map_inline:nn {#1} - { \@@_set_mathcode:nnnn {##1} {#2} {\@@_symfont_tl} {#3} } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \subsection{Active math characters} -% -% There are more math active chars later in the subscript/superscript section. -% But they don't need to be able to be typeset directly. -% -% \begin{macro}{\@@_setup_mathactives:} -% \begin{macrocode} -\cs_new:Npn \@@_setup_mathactives: - { - \@@_make_mathactive:nNN {"2032} \@@_prime_single_mchar \mathord - \@@_make_mathactive:nNN {"2033} \@@_prime_double_mchar \mathord - \@@_make_mathactive:nNN {"2034} \@@_prime_triple_mchar \mathord - \@@_make_mathactive:nNN {"2057} \@@_prime_quad_mchar \mathord - \@@_make_mathactive:nNN {"2035} \@@_backprime_single_mchar \mathord - \@@_make_mathactive:nNN {"2036} \@@_backprime_double_mchar \mathord - \@@_make_mathactive:nNN {"2037} \@@_backprime_triple_mchar \mathord - \@@_make_mathactive:nNN {`\'} \mathstraightquote \mathord - \@@_make_mathactive:nNN {`\`} \mathbacktick \mathord - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_make_mathactive:nNN} -% Makes |#1| a mathactive char, and gives cs |#2| the meaning of mathchar |#1| -% with class |#3|. -% You are responsible for giving active |#1| a particular meaning! -% \begin{macrocode} -\cs_new:Nn \@@_make_mathactive_parse:nNN - { - \@@_if_char_spec:nNNT {#1} #2 #3 - { \@@_make_mathactive_noparse:nNN {#1} #2 #3 } - } -% \end{macrocode} -% -% \begin{macrocode} -\cs_new:Nn \@@_make_mathactive_noparse:nNN - { - \@@_set_mathchar:NNnn #2 #3 {\@@_symfont_tl} {#1} - \@@_char_gmake_mathactive:n {#1} - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Delimiter codes} -% -% \begin{macro}{\@@_assign_delcode:nn} -% \begin{macrocode} -\cs_new:Nn \@@_assign_delcode_noparse:nn - { - \@@_set_delcode:nnn \@@_symfont_tl {#1} {#2} - } -% \end{macrocode} -% -% \begin{macrocode} -\cs_new:Nn \@@_assign_delcode_parse:nn - { - \@@_if_char_spec:nNNT {#2} {\@nil} {\@nil} - { - \@@_assign_delcode_noparse:nn {#1} {#2} - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_assign_delcode:n} -% Shorthand. -% \begin{macrocode} -\cs_new:Nn \@@_assign_delcode:n { \@@_assign_delcode:nn {#1} {#1} } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_setup_delcodes:} -% Some symbols that aren't mathopen/mathclose still need to have delimiter codes assigned. -% The list of vertical arrows may be incomplete. -% On the other hand, many fonts won't support them all being stretchy. -% And some of them are probably not meant to stretch, either. But adding them here doesn't hurt. -% \begin{macrocode} -\cs_new:Npn \@@_setup_delcodes: - { - % ensure \left. and \right. work: - \@@_set_delcode:nnn \@@_symfont_tl {`\.} {\c_zero} - % this is forcefully done to fix a bug -- indicates a larger problem! - - \@@_assign_delcode:nn {`\/} {\g_@@_slash_delimiter_usv} - \@@_assign_delcode:nn {"2044} {\g_@@_slash_delimiter_usv} % fracslash - \@@_assign_delcode:nn {"2215} {\g_@@_slash_delimiter_usv} % divslash - \@@_assign_delcode:n {"005C} % backslash - \@@_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation - \@@_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation - \@@_assign_delcode:n {"2191} % up arrow - \@@_assign_delcode:n {"2193} % down arrow - \@@_assign_delcode:n {"2195} % updown arrow - \@@_assign_delcode:n {"219F} % up arrow twohead - \@@_assign_delcode:n {"21A1} % down arrow twohead - \@@_assign_delcode:n {"21A5} % up arrow from bar - \@@_assign_delcode:n {"21A7} % down arrow from bar - \@@_assign_delcode:n {"21A8} % updown arrow from bar - \@@_assign_delcode:n {"21BE} % up harpoon right - \@@_assign_delcode:n {"21BF} % up harpoon left - \@@_assign_delcode:n {"21C2} % down harpoon right - \@@_assign_delcode:n {"21C3} % down harpoon left - \@@_assign_delcode:n {"21C5} % arrows up down - \@@_assign_delcode:n {"21F5} % arrows down up - \@@_assign_delcode:n {"21C8} % arrows up up - \@@_assign_delcode:n {"21CA} % arrows down down - \@@_assign_delcode:n {"21D1} % double up arrow - \@@_assign_delcode:n {"21D3} % double down arrow - \@@_assign_delcode:n {"21D5} % double updown arrow - \@@_assign_delcode:n {"21DE} % up arrow double stroke - \@@_assign_delcode:n {"21DF} % down arrow double stroke - \@@_assign_delcode:n {"21E1} % up arrow dashed - \@@_assign_delcode:n {"21E3} % down arrow dashed - \@@_assign_delcode:n {"21E7} % up white arrow - \@@_assign_delcode:n {"21E9} % down white arrow - \@@_assign_delcode:n {"21EA} % up white arrow from bar - \@@_assign_delcode:n {"21F3} % updown white arrow - } -% \end{macrocode} -% \end{macro} -% -% \subsection{(Big) operators} -% -% The engine does what is necessary to deal with big operators for us -% automatically with \cmd\Umathchardef. -% However, the limits aren't set automatically; that is, we want to define, -% a la Plain \TeX\ \etc, |\def\int{\intop\nolimits}|, so there needs to be a -% transformation from \cmd\int\ to \cmd\intop\ during the expansion of -% \cmd\_@@_sym:nnn\ in the appropriate contexts. -% -% \begin{macro}{\l_@@_nolimits_tl} -% This macro is a sequence containing those maths operators that require a -% \cmd\nolimits\ suffix. -% This list is used when processing |unicode-math-table.tex| to define such -% commands automatically (see the macro \cs{@@_set_mathsymbol:nNNn}). -% I've chosen essentially just the operators that look like integrals; -% hopefully a better mathematician can help me out here. -% I've a feeling that it's more useful \emph{not} to include the multiple -% integrals such as $\iiiint$, but that might be a matter of preference. -% \begin{macrocode} -\tl_set:Nn \l_@@_nolimits_tl - { - \int\iint\iiint\iiiint\oint\oiint\oiiint - \intclockwise\varointclockwise\ointctrclockwise\sumint - \intbar\intBar\fint\cirfnint\awint\rppolint - \scpolint\npolint\pointint\sqint\intlarhk\intx - \intcap\intcup\upint\lowint - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\addnolimits} -% This macro appends material to the macro containing the list of operators -% that don't take limits. -% \begin{macrocode} -\DeclareDocumentCommand \addnolimits {m} - { - \tl_put_right:Nn \l_@@_nolimits_tl {#1} - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\removenolimits} -% Can this macro be given a better name? -% It removes an item from the nolimits list. -% \begin{macrocode} -\DeclareDocumentCommand \removenolimits {m} - { - \tl_remove_all:Nn \l_@@_nolimits_tl {#1} - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Radicals} -% -% \begin{macro}{\l_@@_radicals_tl} -% The radicals are organised in \cs{@@_set_mathsymbol:nNNn}. -% We organise radicals in the same way as nolimits-operators. -% (\cs{cuberoot} and \cs{fourthroot}, don't seem to behave as proper radicals.) -% \begin{macrocode} -\tl_set:Nn \l_@@_radicals_tl {\sqrt \longdivision} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -%</package&(XE|LU)> -% \end{macrocode} -% -\endinput diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math-preamble.dtx b/Master/texmf-dist/source/latex/unicode-math/unicode-math-preamble.dtx deleted file mode 100644 index 3c011d7ccab..00000000000 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math-preamble.dtx +++ /dev/null @@ -1,329 +0,0 @@ - -% \section{\DTXCURR --- start of the package code} -% -% \begin{macrocode} -%<*package&(XE|LU)> -% \end{macrocode} -% -% \begin{macrocode} -%<*LU> -\RequirePackage{lualatex-math} -%</LU> -% \end{macrocode} -% -% \begin{macrocode} -\ExplSyntaxOn -% \end{macrocode} -% -% Variants needed from \pkg{expl3}: -% \begin{macrocode} -\cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } -% \end{macrocode} -% -% For \pkg{fontspec}: -% \begin{macrocode} -\cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx} -\cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx} -% \end{macrocode} -% -% \paragraph{Conditionals} -% -% \begin{macrocode} -\bool_new:N \l_@@_ot_math_bool -\bool_new:N \l_@@_init_bool -\bool_new:N \l_@@_implicit_alph_bool -\bool_new:N \g_@@_mainfont_already_set_bool -% \end{macrocode} -% For \opt{math-style}: -% \begin{macrocode} -\bool_new:N \g_@@_literal_bool -\bool_new:N \g_@@_upLatin_bool -\bool_new:N \g_@@_uplatin_bool -\bool_new:N \g_@@_upGreek_bool -\bool_new:N \g_@@_upgreek_bool -% \end{macrocode} -% For \opt{bold-style}: -% \begin{macrocode} -\bool_new:N \g_@@_bfliteral_bool -\bool_new:N \g_@@_bfupLatin_bool -\bool_new:N \g_@@_bfuplatin_bool -\bool_new:N \g_@@_bfupGreek_bool -\bool_new:N \g_@@_bfupgreek_bool -% \end{macrocode} -% For \opt{sans-style}: -% \begin{macrocode} -\bool_new:N \g_@@_upsans_bool -\bool_new:N \g_@@_sfliteral_bool -% \end{macrocode} -% For assorted package options: -% \begin{macrocode} -\bool_new:N \g_@@_upNabla_bool -\bool_new:N \g_@@_uppartial_bool -\bool_new:N \g_@@_literal_Nabla_bool -\bool_new:N \g_@@_literal_partial_bool -\bool_new:N \l_@@_smallfrac_bool -\bool_new:N \g_@@_literal_colon_bool -\bool_new:N \g_@@_mathrm_text_bool -\bool_new:N \g_@@_mathit_text_bool -\bool_new:N \g_@@_mathbf_text_bool -\bool_new:N \g_@@_mathsf_text_bool -\bool_new:N \g_@@_mathtt_text_bool -% \end{macrocode} -% -% \paragraph{Variables} -% \begin{macrocode} -\int_new:N \g_@@_fam_int -% \end{macrocode} -% -% For displaying in warning messages, etc.: -% \begin{macrocode} -\tl_const:Nn \c_@@_math_alphabet_name_latin_tl {Latin,~lowercase} -\tl_const:Nn \c_@@_math_alphabet_name_Latin_tl {Latin,~uppercase} -\tl_const:Nn \c_@@_math_alphabet_name_greek_tl {Greek,~lowercase} -\tl_const:Nn \c_@@_math_alphabet_name_Greek_tl {Greek,~uppercase} -\tl_const:Nn \c_@@_math_alphabet_name_num_tl {Numerals} -\tl_const:Nn \c_@@_math_alphabet_name_misc_tl {Misc.} -% \end{macrocode} -% -% \begin{macrocode} -\tl_new:N \l_@@_mathstyle_tl -\tl_new:N \l_@@_radicals_tl -\tl_new:N \l_@@_nolimits_tl -% \end{macrocode} -% -% Used to store the font switch for the \cs{operator@font}. -% \begin{macrocode} -\tl_new:N \g_@@_operator_mathfont_tl -% \end{macrocode} -% -% Variables: -% \begin{macrocode} -\seq_new:N \l_@@_missing_alph_seq -\seq_new:N \l_@@_mathalph_seq -\seq_new:N \l_@@_char_range_seq -\seq_new:N \l_@@_mclass_range_seq -\seq_new:N \l_@@_cmd_range_seq -% \end{macrocode} -% -% \begin{macro}{\g_@@_alphabets_seq} -% Each of math `style' (bfup, sfit, etc.) usually contains one or more `alphabets', which are currently |latin|, |Latin|, |greek|, |Greek|, |num|, and |misc|, although there's an implicit potential for more. -% |misc| is not included in the official list to avoid checking code. -% \begin{macrocode} -\clist_new:N \g_@@_alphabets_seq -\clist_set:Nn \g_@@_alphabets_seq { latin, Latin, greek, Greek, num } -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\clist_new:N \g_@@_named_ranges_clist -\clist_new:N \g_@@_char_nrange_clist -\clist_new:N \g_@@_unknown_keys_clist -\clist_new:N \g_@@_alphabet_clist -% \end{macrocode} -% -% \begin{macro}{\g_@@_mathclasses_seq} -% Every math class. -% \begin{macrocode} -\seq_new:N \g_@@_mathclasses_seq -\seq_set_from_clist:Nn \g_@@_mathclasses_seq - { - \mathord,\mathalpha,\mathbin,\mathrel,\mathpunct, - \mathop, - \mathopen,\mathclose, - \mathfence,\mathover,\mathunder, - \mathaccent,\mathbotaccent,\mathaccentwide,\mathbotaccentwide - } -% \end{macrocode} -% \end{macro} -% - -% \begin{macro}{\g_@@_default_mathalph_seq} -% This sequence stores the alphabets in each math style. -% \begin{macrocode} -\seq_new:N \g_@@_default_mathalph_seq -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\g_@@_mathstyles_seq} -% This is every `named range' and every `math style' known to \pkg{unicode-math}. -% A named range is such as "bfit" and "sfit", which are also math styles (with \cs{symbfit} and \cs{symsfit}). -% `Mathstyles' are a superset of named ranges and also include commands such as \cs{symbf} and \cs{symsf}. -% -% N.B. for parsing purposes `named ranges' are defined as strings! -% \begin{macrocode} -\seq_new:N \g_@@_named_ranges_seq -\seq_new:N \g_@@_mathstyles_seq -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\muskip_new:N \g_@@_primekern_muskip -\muskip_gset:Nn \g_@@_primekern_muskip { -\thinmuskip/2 }% arbitrary -\int_new:N \l_@@_primecount_int -\prop_new:N \g_@@_supers_prop -\prop_new:N \g_@@_subs_prop -\tl_new:N \l_not_token_name_tl -% \end{macrocode} -% -% \begin{macrocode} -\tl_new:N \g_@@_slash_delimiter_usv -\tl_new:N \g_@@_mathtable_tl -\tl_new:N \g_@@_fontname_tl -\tl_new:N \g_@@_mversion_tl -\tl_new:N \g_@@_symfont_tl -\tl_new:N \g_@@_font_keyval_tl -\tl_new:N \g_@@_family_tl -\tl_new:N \g_@@_style_tl -\tl_new:N \g_@@_remap_style_tl -% \end{macrocode} -% -% \subsection{Extras} -% -% What might end up being provided by the kernel. -% -% \begin{macro}{\@@_glyph_if_exist:nTF} -%: TODO: Generalise for arbitrary fonts! \cs{l_@@_font} is not always the one used for a specific glyph!! -% \begin{macrocode} -\prg_new_conditional:Nnn \@@_glyph_if_exist:n {p,TF,T,F} - { - \etex_iffontchar:D \l_@@_font #1 \scan_stop: - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@@_set_mathcode:nnnn} -% \begin{macro}{\@@_set_mathcode:nnn} -% \begin{macro}{\@@_set_mathchar:NNnn} -% \begin{macro}{\@@_set_mathchar:cNnn} -% \begin{macro}{\@@_set_delcode:nnn} -% \begin{macro}{\@@_radical:nn} -% \begin{macro}{\@@_delimiter:Nnn} -% \begin{macro}{\@@_accent:nnn} -% \begin{macro}{\@@_accent_keyword:} -% These are all wrappers for the primitive commands that take numerical -% input only. -% \begin{macrocode} -\cs_set:Npn \@@_set_mathcode:nnnn #1#2#3#4 { - \Umathcode \int_eval:n {#1} = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: -} -\cs_set:Npn \@@_set_mathcode:nnn #1#2#3 { - \Umathcode \int_eval:n {#1} = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: -} -\cs_set:Npn \@@_set_mathchar:NNnn #1#2#3#4 { - \Umathchardef #1 = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: -} -\cs_new:Nn \@@_set_delcode:nnn { - \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: -} -\cs_new:Nn \@@_radical:nn { - \Uradical \csname sym#1\endcsname #2 \scan_stop: -} -\cs_new:Nn \@@_delimiter:Nnn { - \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: -} -\cs_new:Nn \@@_accent:nnn { - \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: -} -% \end{macrocode} -% -% \begin{macrocode} -\cs_generate_variant:Nn \@@_set_mathchar:NNnn {c} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% -% \begin{macro}{\@@_char_gmake_mathactive:N} -% \begin{macro}{\@@_char_gmake_mathactive:n} -% \begin{macrocode} -\cs_new:Nn \@@_char_gmake_mathactive:N - { - \global\mathcode `#1 = "8000 \scan_stop: - } -\cs_new:Nn \@@_char_gmake_mathactive:n - { - \global\mathcode #1 = "8000 \scan_stop: - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \subsection{Alphabet Unicode positions} -% -% Before we begin, let's define the positions of the various Unicode -% alphabets so that our code is a little more readable.\footnote{`\textsc{u.s.v.}' stands -% for `Unicode scalar value'.} -% -% \begin{macro}{\usv_set:nnn,\@@_to_usv:nn} -% Rather than `readable', in the end, this makes the code more extensible. -% \begin{macrocode} -\cs_new:Nn \usv_set:nnn { \tl_const:cn { c_@@_#1_#2_usv } {#3} } -\cs_new:Nn \@@_to_usv:nn { \use:c { c_@@_#1_#2_usv } } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}[TF]{\@@_usv_if_exist:nn} -% \begin{macrocode} -\prg_new_conditional:Nnn \@@_usv_if_exist:nn {T,F,TF} - { - \cs_if_exist:cTF { c_@@_#1_#2_usv } - \prg_return_true: \prg_return_false: - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Programmers' interface} -% -% \begin{macro}{\unimath_get_mathstyle:} -% This command expands to the currently math style. -% \begin{macrocode} -\cs_new:Nn \unimath_get_mathstyle: - { - \tl_use:N \l_@@_mathstyle_tl - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Overcoming \texorpdfstring{\cmd\@onlypreamble}{\textbackslash @onlypreamble}} -% -% The requirement of only setting up the maths fonts in the preamble is now removed. -% The following list might be overly ambitious. -% \begin{macrocode} -\tl_map_inline:nn - { - \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes - \@DeclareMathSizes\newmathalphabet\newmathalphabet@@\newmathalphabet@@@ - \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion - \version@list\version@elt\alpha@list\alpha@elt - \restore@mathversion\init@restore@version\dorestore@version\process@table - \new@mathversion\DeclareSymbolFont\group@list\group@elt - \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp - \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ - \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar - \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter - \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter - \set@@mathdelimiter\DeclareMathRadical\mathchar@type - \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ - } - { - \tl_remove_once:Nn \@preamblecmds {\do#1} - } -% \end{macrocode} -% -% \begin{macrocode} -%</package&(XE|LU)> -% \end{macrocode} diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx index eae42605dc7..38c525202f3 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx @@ -1,136 +1,76 @@ -% \iffalse -% !TEX TS-program = XeLaTeX -% ^^A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ^^A SELF-EXTRACTION BEGINS HERE -% ^^A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%<*internal> -\begingroup -\input l3docstrip.tex\relax\keepsilent -\declarepreamble\defaultpreamble +%%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> -Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> -Copyright 2012-2015 Khaled Hosny <khaledhosny@eglug.org> - -This package is free software and may be redistributed and/or modified under -the conditions of the LaTeX Project Public License, version 1.3c or higher -(your choice): <http://www.latex-project.org/lppl/>. - -This work is "maintained" by Will Robertson. -\endpreamble -\nopostamble -\askforoverwritefalse -\ifx\UMDEBUG\undefined\def\UMDEBUG{}\else\def\UMDEBUG{,debug}\fi -\gdef\DTXFILES{% - \DTX{unicode-math.dtx}% - \DTX{unicode-math-preamble.dtx}% - \DTX{unicode-math-pkgopt.dtx}% - \DTX{unicode-math-msg.dtx}% - \DTX{unicode-math-usv.dtx}% - \DTX{unicode-math-setchar.dtx}% - \DTX{unicode-math-mathtext.dtx}% - \DTX{unicode-math-main.dtx}% - \DTX{unicode-math-fontopt.dtx}% - \DTX{unicode-math-fontparam.dtx}% - \DTX{unicode-math-mathmap.dtx}% - \DTX{unicode-math-mathtext.dtx}% - \DTX{unicode-math-epilogue.dtx}% - \DTX{unicode-math-primes.dtx}% - \DTX{unicode-math-sscript.dtx}% - \DTX{unicode-math-compat.dtx}% - \DTX{unicode-math-alphabets.dtx}% -} -\generate{\file{unicode-math.sty}{\from{unicode-math.dtx}{preamble,load}}} -\def\DTX#1{\from{#1}{package,XE\UMDEBUG}} -\generate{\file{unicode-math-xetex.sty}{\DTXFILES}} -\def\DTX#1{\from{#1}{package,LU\UMDEBUG}} -\generate{\file{unicode-math-luatex.sty}{\DTXFILES}} -\def\tempa{plain}\ifx\tempa\fmtname\endgroup\expandafter\bye\fi -\endgroup -\ProvidesFile{unicode-math.dtx} -%</internal> -%<package&!XE&!LU>\ProvidesPackage{unicode-math} -%<package&XE>\ProvidesPackage{unicode-math-xetex} -%<package&LU>\ProvidesPackage{unicode-math-luatex} -%<*package> - [2017/10/09 v0.8h Unicode maths in XeLaTeX and LuaLaTeX] -%</package> -%<*internal> -\input{unicode-math-doc} -%</internal> -% \fi -% -% \clearpage -% \part{Package implementation} -% \parttoc +% \section{Package declaration} % -% \section{The \texttt{unicode-math.sty} loading file} -% -% The prefix for \pkg{unicode-math} is \texttt{um}: -% \begin{macrocode} -%<@@=um> -% \end{macrocode} -% -% The plain sty file is a stub which loads necessary packages and then bifurcates into -% a XeTeX- or LuaTeX-specific version of the package. -% -% \begin{macrocode} -%<*load> -% \end{macrocode} -% Bail early if necessary. +% List all \texttt{dtx} files for +% (a) the \texttt{ins} file and~(b) typesetting the code. % \begin{macrocode} -\ifdefined\XeTeXversion - \ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in% - \PackageError{unicode-math}{% - Cannot run with this version of XeTeX!\MessageBreak - You need XeTeX 0.9998 or newer.% - }\@ehd - \fi -\else\ifdefined\luatexversion - \ifnum\luatexversion<64% - \PackageError{unicode-math}{% - Cannot run with this version of LuaTeX!\MessageBreak - You need LuaTeX 0.64 or newer.% - }\@ehd - \fi -\else - \PackageError{unicode-math}{% - Cannot be run with pdfLaTeX!\MessageBreak - Use XeLaTeX or LuaLaTeX instead.% - }\@ehd -\fi\fi +%<*dtx> +\def\DTXFILES{ + \DTX{unicode-math.dtx} + \DTX{um-code-base.dtx} + \DTX{um-code-opening.dtx} + \DTX{um-code-variables.dtx} + \DTX{um-code-api.dtx} + \DTX{um-code-ui.dtx} + \DTX{um-code-pkgopt.dtx} + \DTX{um-code-msg.dtx} + \DTX{um-code-usv.dtx} + \DTX{um-code-setchar.dtx} + \DTX{um-code-mathtext.dtx} + \DTX{um-code-main.dtx} + \DTX{um-code-fontopt.dtx} + \DTX{um-code-fontparam.dtx} + \DTX{um-code-mathmap.dtx} + \DTX{um-code-epilogue.dtx} + \DTX{um-code-primes.dtx} + \DTX{um-code-sscript.dtx} + \DTX{um-code-compat.dtx} + \DTX{um-code-alphabets.dtx} +} +%</dtx> % \end{macrocode} % -% \paragraph{Packages} -% Assuming people are running up-to-date packages. -% \begin{macrocode} -\RequirePackage{expl3,xparse,l3keys2e} -\RequirePackage{fontspec} -\RequirePackage{ucharcat} -\RequirePackage{fix-cm} % avoid some warnings (still necessary? check...) -\RequirePackage{filehook} -% \end{macrocode} -% \paragraph{Bifurcate} +% Now exit if we're using plain \TeX; this would usually be the case when +% loading this file with \texttt{unicode-math.ins}. % \begin{macrocode} -\ExplSyntaxOn -\sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } -\sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } -\ExplSyntaxOff +%<*dtx> +\def\tmpa{plain} +\ifx\tmpa\fmtname\expandafter\endinput\fi +%</dtx> % \end{macrocode} % +% Declare the package version and date. For loading this file directly +% as a \texttt{dtx} file, \cs{fileversion} and \cs{filedate} will be set +% correctly when using \cs{GetFileInfo} without having to load the package +% directly. % \begin{macrocode} -%</load> +%<base>\ProvidesPackage{unicode-math} +%<package&XE>\ProvidesPackage{unicode-math-xetex} +%<package&LU>\ProvidesPackage{unicode-math-luatex} +%<*dtx> +\ProvidesFile{unicode-math.dtx} +%</dtx> +%<*base|package> + [2017/11/18 v0.8i Unicode maths in XeLaTeX and LuaLaTeX] +%</base|package> % \end{macrocode} -% -% That's the end of the base package. The subsequent packages are derived from -% the following ordered list of \texttt{dtx} files: -% \begin{multicols}{3} -% \begin{enumerate} -% \def\DTX#1{\item \texttt{#1}} -% \DTXFILES -% \end{enumerate} -% \end{multicols} -% -\endinput +\endinput +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins b/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins new file mode 100644 index 00000000000..6279c56bd5b --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins @@ -0,0 +1,57 @@ +%%^^A%% unicode-math.ins -- part of UNICODE-MATH <wspr.io/unicode-math> + +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\input unicode-math.dtx\relax +\input l3docstrip.tex\relax +\keepsilent + +\declarepreamble\defaultpreamble +------------------------------------------------ +The UNICODE-MATH package <wspr.io/unicode-math> +------------------------------------------------ +This package is free software and may be redistributed and/or modified under +the conditions of the LaTeX Project Public License, version 1.3c or higher +(your choice): <http://www.latex-project.org/lppl/>. +------------------------------------------------ +Copyright 2006-2017 Will Robertson, LPPL "maintainer" +Copyright 2010-2017 Philipp Stephani +Copyright 2011-2017 Joseph Wright +Copyright 2012-2015 Khaled Hosny +------------------------------------------------ +\endpreamble + +\nopostamble +\askforoverwritefalse + +\generate{\file{unicode-math.sty}{ + \from{unicode-math.dtx}{base} + \from{um-code-base.dtx}{base} + }} + +\ifx\UMDEBUG\undefined\def\UMDEBUG{}\else\def\UMDEBUG{,debug}\fi + +\def\DTX#1{\from{#1}{package,XE\UMDEBUG}} +\generate{\file{unicode-math-xetex.sty}{\DTXFILES}} + +\def\DTX#1{\from{#1}{package,LU\UMDEBUG}} +\generate{\file{unicode-math-luatex.sty}{\DTXFILES}} + +\endbatchfile +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math.ltx b/Master/texmf-dist/source/latex/unicode-math/unicode-math.ltx new file mode 100644 index 00000000000..df10b66e401 --- /dev/null +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.ltx @@ -0,0 +1,42 @@ +%%^^A%% unicode-math.ltx -- part of UNICODE-MATH <wspr.io/unicode-math> + +\documentclass[a4paper]{ltxdoc} +\input{um-doc-style.tex} +\begin{document} + +\title{Experimental Unicode mathematical typesetting: The \pkg{unicode-math} package} +\author{\itshape Will Robertson\\\itshape Philipp Stephani, Joseph Wright, Khaled Hosny\\\url{http://github.com/wspr/unicode-math}} +\date{\umfiledate \qquad \umfileversion} + +\maketitle + +\input{um-doc.tex} + +\clearpage +\appendix + +\input{um-doc-stixextract.tex} +\input{um-doc-nfsssummary.tex} +\input{um-doc-legacyfontdimen.tex} +\input{um-doc-mathfontdimen.tex} + +\end{document} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-example.ltx b/Master/texmf-dist/source/latex/unicode-math/unimath-example.ltx index b8596a06f08..908c74d3125 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unimath-example.ltx +++ b/Master/texmf-dist/source/latex/unicode-math/unimath-example.ltx @@ -1,3 +1,4 @@ +%%^^A%% unimath-example.ltx -- part of UNICODE-MATH <wspr.io/unicode-math> %%%%%%%%%%%%%%%%%%%%%%% % UNICODE-MATH EXAMPLE FILE @@ -7,7 +8,7 @@ % Load fontspec and define a document font: \usepackage{fontspec} -\setmainfont{TeX Gyre Pagella} +\setmainfont{texgyrepagella-regular.otf} % Load unicode-math and define a math font: \usepackage{unicode-math} @@ -15,7 +16,7 @@ \begin{document} \title{An example of \textsf{unicode-math}} -\author{Will Robertson\\\texttt{wspr81@gmail.com}} +\author{Will Robertson} \maketitle This is an example of the \textsf{unicode-math} package. @@ -23,14 +24,14 @@ It allows you to write maths with Unicode input and to use fonts that contain Un After loading the package and selecting a font, you shouldn't need to change much to continue to write maths as always. \[ - F(s)=\mathscr L \{f(t)\}=\int_0^\infty \mathrm e^{-st}f(t)\,\mathrm d t + F(s)=\symscr L \{f(t)\}=\int_0^\infty \symup e^{-st}f(t)\,\symup d t \] The style of Latin and Greek letters is set up by default to match the output of standard \LaTeX: Latin letters and Greek lowercase letters are italic, and Greek uppercase letters are upright. These can be configured with the \texttt{math-style} package option. -One very important feature to recognise is that bold maths now works consistently for both Latin and Greek letters. By default, \verb|\mathbf| will turn a Latin letter bold and upright, and a Greek letter will remain italic and also become bold. For example: +One very important feature to recognise is that bold maths now works consistently for both Latin and Greek letters. By default, \verb|\symbf| will turn a Latin letter bold and upright, and a Greek letter will remain italic and also become bold. For example: \[ - \mathbf{a} = a\,\mathbf{I} \qquad \mathbf{\beta} = \beta\,\mathbf{I} + \symbf{a} = a\,\symbf{I} \qquad \symbf{\beta} = \beta\,\symbf{I} \] This behaviour can be configured with the \texttt{bold-style} package option. @@ -46,3 +47,22 @@ It does not matter if you use upright or italic characters; they will be normali And that's a brief introduction to the package. Please see the documentation for further details. This is a new package; feedback, suggestions, and bug reports are all most welcome. \end{document} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.ltx b/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx index fe6df238c95..e285099899c 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.ltx +++ b/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx @@ -1,3 +1,5 @@ +%%^^A%% unimath-symbols.ltx -- part of UNICODE-MATH <wspr.io/unicode-math> + %!TEX TS-program = LuaLaTeX %%%%%%%%%%%%%%%%%%%%%%% @@ -135,6 +137,23 @@ % \overrightarrow\overleftarrow\overbrace\underbrace\lmoustache\rmoustache\lgroup\rgroup\arrowvert\Arrowvert\bracevert\Vert\vert\uparrow\downarrow\updownarrow\Uparrow\Downarrow\Updownarrow\backslash\rangle\langle\rbrace\lbrace\rceil\lceil\rfloor\lfloor\sqrt} +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ + \def\LTXSYM{ \cong \notin @@ -145,10 +164,26 @@ \def\AMSSYMB{\boxdot\boxplus\boxtimes\square\blacksquare\centerdot\lozenge\blacklozenge\circlearrowright\circlearrowleft\leftrightharpoons\boxminus\Vdash\Vvdash\vDash\twoheadrightarrow\twoheadleftarrow\leftleftarrows\rightrightarrows\upuparrows\downdownarrows\upharpoonright\restriction\downharpoonright\upharpoonleft\downharpoonleft\rightarrowtail\leftarrowtail\leftrightarrows\rightleftarrows\Lsh\Rsh\rightsquigarrow\leftrightsquigarrow\looparrowleft\looparrowright\circeq\succsim\gtrsim\gtrapprox\multimap\therefore\because\doteqdot\Doteq\triangleq\precsim\lesssim\lessapprox\eqslantless\eqslantgtr\curlyeqprec\curlyeqsucc\preccurlyeq\leqq\leqslant\lessgtr\backprime\risingdotseq\fallingdotseq\succcurlyeq\geqq\geqslant\gtrless\vartriangleright\vartriangleleft\trianglerighteq\trianglelefteq\bigstar\between\blacktriangledown\blacktriangleright\blacktriangleleft\vartriangle\blacktriangle\triangledown\eqcirc\lesseqgtr\gtreqless\lesseqqgtr\gtreqqless\Rrightarrow\Lleftarrow\veebar\barwedge\doublebarwedge\measuredangle\sphericalangle\varpropto\smallsmile\smallfrown\Subset\Supset\Cup\doublecup\Cap\doublecap\curlywedge\curlyvee\leftthreetimes\rightthreetimes\subseteqq\supseteqq\bumpeq\Bumpeq\lll\llless\ggg\gggtr\circledS\pitchfork\dotplus\backsim\backsimeq\complement\intercal\circledcirc\circledast\circleddash\lvertneqq\gvertneqq\nleq\ngeq\nless\ngtr\nprec\nsucc\lneqq\gneqq\nleqslant\ngeqslant\lneq\gneq\npreceq\nsucceq\precnsim\succnsim\lnsim\gnsim\nleqq\ngeqq\precneqq\succneqq\precnapprox\succnapprox\lnapprox\gnapprox\nsim\ncong\diagup\diagdown\varsubsetneq\varsupsetneq\nsubseteqq\nsupseteqq\subsetneqq\supsetneqq\varsubsetneqq\varsupsetneqq\subsetneq\supsetneq\nsubseteq\nsupseteq\nparallel\nmid\nshortmid\nshortparallel\nvdash\nVdash\nvDash\nVDash\ntrianglerighteq\ntrianglelefteq\ntriangleleft\ntriangleright\nleftarrow\nrightarrow\nLeftarrow\nRightarrow\nLeftrightarrow\nleftrightarrow\divideontimes\varnothing\nexists\Finv\Game\eth\eqsim\beth\gimel\daleth\lessdot\gtrdot\ltimes\rtimes\shortmid\shortparallel\smallsetminus\thicksim\thickapprox\approxeq\succapprox\precapprox\curvearrowleft\curvearrowright\digamma\varkappa\Bbbk\hslash\backepsilon} +\input{unicode-math.dtx} +\makeatletter +\def\GetFileInfo#1{% + \def\filename{#1}% + \def\@tempb##1 ##2 ##3\relax##4\relax{% + \def\filedate{##1}% + \def\fileversion{##2}% + \def\fileinfo{##3}}% + \edef\@tempa{\csname ver@#1\endcsname}% + \expandafter\@tempb\@tempa\relax? ? \relax\relax} +\makeatother +\GetFileInfo{unicode-math.dtx} +\let\umfiledate\filedate +\let\umfileversion\fileversion + \begin{document} \MakeShortVerb\| \title{Every symbol (most symbols) defined by \textsf{unicode-math}} -\author{Will Robertson\\\texttt{wspr81@gmail.com}} +\author{Will Robertson} +\date{\umfiledate \qquad \umfileversion} \maketitle This document uses the file \texttt{unicode-math-table.tex} @@ -446,3 +481,22 @@ The limits behaviour as specified by \textsf{unicode-math} are shown with grey s \refstepcounter{dejavu}\label{count:dejavu} \end{document} + +\endinput + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty index b0e2343ad09..33373857539 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty @@ -5,40 +5,141 @@ %% The original source files were: %% %% unicode-math.dtx (with options: `package,LU') -%% unicode-math-preamble.dtx (with options: `package,LU') -%% unicode-math-pkgopt.dtx (with options: `package,LU') -%% unicode-math-msg.dtx (with options: `package,LU') -%% unicode-math-usv.dtx (with options: `package,LU') -%% unicode-math-setchar.dtx (with options: `package,LU') -%% unicode-math-mathtext.dtx (with options: `package,LU') -%% unicode-math-main.dtx (with options: `package,LU') -%% unicode-math-fontopt.dtx (with options: `package,LU') -%% unicode-math-fontparam.dtx (with options: `package,LU') -%% unicode-math-mathmap.dtx (with options: `package,LU') -%% unicode-math-mathtext.dtx (with options: `package,LU') -%% unicode-math-epilogue.dtx (with options: `package,LU') -%% unicode-math-primes.dtx (with options: `package,LU') -%% unicode-math-sscript.dtx (with options: `package,LU') -%% unicode-math-compat.dtx (with options: `package,LU') -%% unicode-math-alphabets.dtx (with options: `package,LU') -%% -%% Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> -%% Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> -%% Copyright 2012-2015 Khaled Hosny <khaledhosny@eglug.org> -%% +%% um-code-base.dtx (with options: `package,LU') +%% um-code-opening.dtx (with options: `package,LU') +%% um-code-variables.dtx (with options: `package,LU') +%% um-code-api.dtx (with options: `package,LU') +%% um-code-ui.dtx (with options: `package,LU') +%% um-code-pkgopt.dtx (with options: `package,LU') +%% um-code-msg.dtx (with options: `package,LU') +%% um-code-usv.dtx (with options: `package,LU') +%% um-code-setchar.dtx (with options: `package,LU') +%% um-code-mathtext.dtx (with options: `package,LU') +%% um-code-main.dtx (with options: `package,LU') +%% um-code-fontopt.dtx (with options: `package,LU') +%% um-code-fontparam.dtx (with options: `package,LU') +%% um-code-mathmap.dtx (with options: `package,LU') +%% um-code-epilogue.dtx (with options: `package,LU') +%% um-code-primes.dtx (with options: `package,LU') +%% um-code-sscript.dtx (with options: `package,LU') +%% um-code-compat.dtx (with options: `package,LU') +%% um-code-alphabets.dtx (with options: `package,LU') +%% ------------------------------------------------ +%% The UNICODE-MATH package <wspr.io/unicode-math> +%% ------------------------------------------------ %% This package is free software and may be redistributed and/or modified under %% the conditions of the LaTeX Project Public License, version 1.3c or higher %% (your choice): <http://www.latex-project.org/lppl/>. -%% -%% This work is "maintained" by Will Robertson. +%% ------------------------------------------------ +%% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +%% Copyright 2010-2017 Philipp Stephani +%% Copyright 2011-2017 Joseph Wright +%% Copyright 2012-2015 Khaled Hosny +%% ------------------------------------------------ +%%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \ProvidesPackage{unicode-math-luatex} - [2017/10/09 v0.8h Unicode maths in XeLaTeX and LuaLaTeX] + [2017/11/18 v0.8i Unicode maths in XeLaTeX and LuaLaTeX] + +%%^^A%% um-code-base.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + + +%%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> \RequirePackage{lualatex-math} \ExplSyntaxOn \cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } \cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx} \cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx} +\prg_new_conditional:Nnn \__um_glyph_if_exist:Nn {p,TF,T,F} + { + \etex_iffontchar:D #1 #2 \scan_stop: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_set:Npn \__um_set_mathcode:nnnn #1#2#3#4 + { + \Umathcode \int_eval:n {#1} = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: + } +\cs_set:Npn \__um_set_mathcode:nnn #1#2#3 + { + \Umathcode \int_eval:n {#1} = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: + } +\cs_set:Npn \__um_set_mathchar:NNnn #1#2#3#4 + { + \Umathchardef #1 = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: + } +\cs_generate_variant:Nn \__um_set_mathchar:NNnn {c} +\cs_new:Nn \__um_set_delcode:nnn + { + \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: + } +\cs_new:Nn \__um_radical:nn + { + \Uradical \csname sym#1\endcsname #2 \scan_stop: + } +\cs_new:Nn \__um_delimiter:Nnn + { + \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: + } +\cs_new:Nn \__um_accent:nnn + { + \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: + } +\cs_new:Nn \__um_char_gmake_mathactive:N + { + \global\mathcode `#1 = "8000 \scan_stop: + } +\cs_new:Nn \__um_char_gmake_mathactive:n + { + \global\mathcode #1 = "8000 \scan_stop: + } +\cs_new:Nn \__um_copy_fontparam:nnn + { + \fontdimen #1 \font = \__um_get_fontparam:nn {#2} {#3} + } +\cs_new:Nn \__um_zero_fontparam:n + { + \fontdimen #1 \font = 0pt\relax + } +\cs_new:Nn \__um_get_fontparam:nn + { + \directlua{fontspec.mathfontdimen("l__um_font","#2")} + } +\cs_new:Nn \usv_set:nnn { \tl_const:cn { c__um_#1_#2_usv } {#3} } +\cs_new:Nn \__um_to_usv:nn { \use:c { c__um_#1_#2_usv } } +\prg_new_conditional:Nnn \__um_usv_if_exist:nn {T,F,TF} + { + \cs_if_exist:cTF { c__um_#1_#2_usv } + \prg_return_true: \prg_return_false: + } +\tl_map_inline:nn + { + \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes + \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ + \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion + \version@list\version@elt\alpha@list\alpha@elt + \restore@mathversion\init@restore@version\dorestore@version\process@table + \new@mathversion\DeclareSymbolFont\group@list\group@elt + \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp + \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ + \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar + \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter + \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter + \set__ummathdelimiter\DeclareMathRadical\mathchar@type + \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ + } + { + \tl_remove_once:Nn \@preamblecmds {\do#1} + } + +%%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \bool_new:N \l__um_ot_math_bool \bool_new:N \l__um_init_bool \bool_new:N \l__um_implicit_alph_bool @@ -116,79 +217,42 @@ \tl_new:N \g__um_family_tl \tl_new:N \g__um_style_tl \tl_new:N \g__um_remap_style_tl -\prg_new_conditional:Nnn \__um_glyph_if_exist:n {p,TF,T,F} - { - \etex_iffontchar:D \l__um_font #1 \scan_stop: - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_set:Npn \__um_set_mathcode:nnnn #1#2#3#4 { - \Umathcode \int_eval:n {#1} = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: -} -\cs_set:Npn \__um_set_mathcode:nnn #1#2#3 { - \Umathcode \int_eval:n {#1} = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: -} -\cs_set:Npn \__um_set_mathchar:NNnn #1#2#3#4 { - \Umathchardef #1 = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: -} -\cs_new:Nn \__um_set_delcode:nnn { - \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: -} -\cs_new:Nn \__um_radical:nn { - \Uradical \csname sym#1\endcsname #2 \scan_stop: -} -\cs_new:Nn \__um_delimiter:Nnn { - \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: -} -\cs_new:Nn \__um_accent:nnn { - \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: -} -\cs_generate_variant:Nn \__um_set_mathchar:NNnn {c} -\cs_new:Nn \__um_char_gmake_mathactive:N - { - \global\mathcode `#1 = "8000 \scan_stop: - } -\cs_new:Nn \__um_char_gmake_mathactive:n - { - \global\mathcode #1 = "8000 \scan_stop: - } -\cs_new:Nn \usv_set:nnn { \tl_const:cn { c__um_#1_#2_usv } {#3} } -\cs_new:Nn \__um_to_usv:nn { \use:c { c__um_#1_#2_usv } } -\prg_new_conditional:Nnn \__um_usv_if_exist:nn {T,F,TF} - { - \cs_if_exist:cTF { c__um_#1_#2_usv } - \prg_return_true: \prg_return_false: - } + +%%^^A%% um-code-api.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Nn \unimath_get_mathstyle: { \tl_use:N \l__um_mathstyle_tl } -\tl_map_inline:nn - { - \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes - \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ - \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion - \version@list\version@elt\alpha@list\alpha@elt - \restore@mathversion\init@restore@version\dorestore@version\process@table - \new@mathversion\DeclareSymbolFont\group@list\group@elt - \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp - \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ - \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar - \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter - \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter - \set__ummathdelimiter\DeclareMathRadical\mathchar@type - \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ - } - { - \tl_remove_once:Nn \@preamblecmds {\do#1} - } -\DeclareDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } +%%^^A%% um-code-ui.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +\NewDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } +\NewDocumentCommand \setmathfont { O{} m O{} } + { + \__um_setmathfont:nn {#1,#3} {#2} + } +\NewDocumentCommand \setmathfontface { m O{} m O{} } + { + \__um_setmathfontface:Nnn #1 {#2,#4} {#3} + } +\@onlypreamble \setmathfontface +\NewDocumentCommand \setoperatorfont {m} + { + \tl_set:Nn \g__um_operator_mathfont_tl {#1} + } +\setoperatorfont{\mathrm} +\NewDocumentCommand \addnolimits {m} + { + \tl_put_right:Nn \l__um_nolimits_tl {#1} + } +\NewDocumentCommand \removenolimits {m} + { + \tl_remove_all:Nn \l__um_nolimits_tl {#1} + } + +%%^^A%% um-code-pkgopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Nn \__um_keys_choices:nn { \cs_set:Npn \__um_keys_choices_fn:nn { \__um_keys_choices_aux:nnn {#1} } @@ -408,6 +472,8 @@ \cs_if_exist:NT \tfrac { \unimathsetup {active-frac=small} } \ProcessKeysOptions {unicode-math} +%%^^A%% um-code-msg.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Npn \__um_error:n { \msg_error:nn {unicode-math} } \cs_new:Npn \__um_warning:n { \msg_warning:nn {unicode-math} } \cs_new:Npn \__um_warning:nnn { \msg_warning:nnxx {unicode-math} } @@ -500,6 +566,8 @@ any~ effect~ on~ the~ re-defined~ commands. } +%%^^A%% um-code-usv.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \usv_set:nnn {normal} {num} {48} \usv_set:nnn {normal} {Latin}{"1D434} \usv_set:nnn {normal} {latin}{"1D44E} @@ -746,6 +814,8 @@ \usv_set:nnn {frak}{R}{"211C} \usv_set:nnn {frak}{Z}{"2128} +%%^^A%% um-code-setchar.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Npn \__um_symbol_setup: { \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 @@ -873,16 +943,19 @@ } } +%%^^A%% um-code-mathtext.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \keys_define:nn {__um_mathface} { version .code:n = { \tl_set:Nn \l__um_mversion_tl {#1} } } -\DeclareDocumentCommand \setmathfontface { m O{} m O{} } +\cs_set:Nn \__um_setmathfontface:Nnn { \tl_clear:N \l__um_mversion_tl - \keys_set_known:nnN {__um_mathface} {#2,#4} \l__um_keyval_clist + \keys_set_known:nnN {__um_mathface} {#2} \l__um_keyval_clist + \exp_args:Nnx \fontspec_set_family:Nxn \l__um_tmpa_tl { ItalicFont={}, BoldFont={}, \exp_not:V \l__um_keyval_clist } {#3} @@ -891,6 +964,7 @@ \tl_set:Nn \l__um_mversion_tl {normal} \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} } + \SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} % integrate with fontspec's \setmathrm etc: @@ -901,10 +975,6 @@ \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } } } -\@onlypreamble \setmathfontface -\DeclareDocumentCommand \setoperatorfont {m} - { \tl_set:Nn \g__um_operator_mathfont_tl {#1} } -\setoperatorfont{\mathrm} \cs_generate_variant:Nn \tl_if_eq:nnT {o} \cs_set:Nn \__fontspec_setmainfont_hook:nn { @@ -959,49 +1029,48 @@ \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault } -\DeclareDocumentCommand \setmathfont { O{} m O{} } - { - \__um_setmathfont:nn {#1,#3} {#2} - } +%%^^A%% um-code-main.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_set:Nn \__um_setmathfont:nn - { - \tl_set:Nn \l__um_fontname_tl {#2} - \__um_init: - \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } - \csname S@\f@size\endcsname - \keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist - \bool_if:NT \l__um_init_bool { \__um_log:n {default-math-font} } - \__um_fontspec_select_font: - \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } - { - \__um_declare_math_sizes: + { + \tl_set:Nn \l__um_fontname_tl {#2} + \cs_set_eq:NN \glb@currsize \scan_stop: + \__um_init: + \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } + \csname S@\f@size\endcsname + \keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist + \bool_if:NT \l__um_init_bool { \__um_log:n {default-math-font} } \__um_fontspec_select_font: - } - \cs_if_exist:cF { sym \__um_symfont_tl } - { - \DeclareSymbolFont{\__um_symfont_tl} - {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} - } - \SetSymbolFont{\__um_symfont_tl}{\l__um_mversion_tl} - {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} - \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} - { - \SetSymbolFont{\__um_symfont_tl}{bold} - {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} - } - \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } - { - \bool_set_true:N \g__um_mainfont_already_set_bool - \__um_setup_legacy_fam_two: - \__um_setup_legacy_fam_three: - } - \__um_input_math_symbol_table: - \__um_remap_symbols: - \__um_setup_mathactives: - \__um_setup_delcodes: - \__um_setup_alphabets: - \__um_setup_negations: - } + \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } + { + \__um_declare_math_sizes: + \__um_fontspec_select_font: + } + \cs_if_exist:cF { sym \l__um_symfont_label_tl } + { + \DeclareSymbolFont{\l__um_symfont_label_tl} + {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} + } + \SetSymbolFont{\l__um_symfont_label_tl}{\l__um_mversion_tl} + {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} + \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} + { + \SetSymbolFont{\l__um_symfont_label_tl}{bold} + {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} + } + \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } + { + \bool_set_true:N \g__um_mainfont_already_set_bool + \__um_setup_legacy_fam_two: + \__um_setup_legacy_fam_three: + } + \__um_input_math_symbol_table: + \__um_remap_symbols: + \__um_setup_mathactives: + \__um_setup_delcodes: + \__um_setup_alphabets: + \__um_setup_negations: + } \AtBeginDocument { \__um_load_lm_if_necessary: } \cs_new:Nn \__um_load_lm_if_necessary: { @@ -1013,28 +1082,27 @@ } } \cs_new:Nn \__um_init: - { - \bool_set_true:N \l__um_ot_math_bool - \cs_set_eq:NN \glb@currsize \scan_stop: - \bool_set_true:N \l__um_init_bool - \seq_clear:N \l__um_char_range_seq - \clist_clear:N \l__um_char_nrange_clist - \seq_clear:N \l__um_mathalph_seq - \seq_clear:N \l__um_missing_alph_seq - \tl_set:Nn \l__um_mversion_tl {normal} - \tl_set:Nn \__um_symfont_tl {operators} - \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn - \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn - \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn - \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n - \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn - \cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn - \cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN - \tl_set:Nn \l__um_script_features_tl {Style=MathScript} - \tl_set:Nn \l__um_sscript_features_tl {Style=MathScriptScript} - \tl_set_eq:NN \l__um_script_font_tl \l__um_fontname_tl - \tl_set_eq:NN \l__um_sscript_font_tl \l__um_fontname_tl - } + { + \bool_set_true:N \l__um_ot_math_bool + \tl_set:Nn \l__um_mversion_tl {normal} + \tl_set:Nn \l__um_symfont_label_tl {operators} + \tl_set:Nn \l__um_script_features_tl {Style=MathScript} + \tl_set:Nn \l__um_sscript_features_tl {Style=MathScriptScript} + \tl_set_eq:NN \l__um_script_font_tl \l__um_fontname_tl + \tl_set_eq:NN \l__um_sscript_font_tl \l__um_fontname_tl + \bool_set_true:N \l__um_init_bool + \seq_clear:N \l__um_char_range_seq + \clist_clear:N \l__um_char_nrange_clist + \seq_clear:N \l__um_mathalph_seq + \seq_clear:N \l__um_missing_alph_seq + \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn + \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn + \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn + \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n + \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn + \cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn + \cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN + } \cs_new:Nn \__um_declare_math_sizes: { \fp_compare:nF { \__um_script_style_size:n {ScriptPercentScaleDown} == 0 } @@ -1052,26 +1120,26 @@ { \fontspec_set_family:Nxn \l__um_family_tl { - \l__um_font_keyval_tl, - Scale=1.00001, - FontAdjustment = - { - \fontdimen8\font= \__um_get_fontparam:nn {43} {FractionNumeratorDisplayStyleShiftUp}\relax - \fontdimen9\font= \__um_get_fontparam:nn {42} {FractionNumeratorShiftUp}\relax - \fontdimen10\font=\__um_get_fontparam:nn {32} {StackTopShiftUp}\relax - \fontdimen11\font=\__um_get_fontparam:nn {45} {FractionDenominatorDisplayStyleShiftDown}\relax - \fontdimen12\font=\__um_get_fontparam:nn {44} {FractionDenominatorShiftDown}\relax - \fontdimen13\font=\__um_get_fontparam:nn {21} {SuperscriptShiftUp}\relax - \fontdimen14\font=\__um_get_fontparam:nn {21} {SuperscriptShiftUp}\relax - \fontdimen15\font=\__um_get_fontparam:nn {22} {SuperscriptShiftUpCramped}\relax - \fontdimen16\font=\__um_get_fontparam:nn {18} {SubscriptShiftDown}\relax - \fontdimen17\font=\__um_get_fontparam:nn {18} {SubscriptShiftDownWithSuperscript}\relax - \fontdimen18\font=\__um_get_fontparam:nn {24} {SuperscriptBaselineDropMax}\relax - \fontdimen19\font=\__um_get_fontparam:nn {20} {SubscriptBaselineDropMin}\relax - \fontdimen20\font=0pt\relax % delim1 = FractionDelimiterDisplaySize - \fontdimen21\font=0pt\relax % delim2 = FractionDelimiterSize - \fontdimen22\font=\__um_get_fontparam:nn {15} {AxisHeight}\relax - } + \l__um_font_keyval_tl, + Scale=1.00001, + FontAdjustment = + { + \__um_copy_fontparam:nnn { 8} {43} {FractionNumeratorDisplayStyleShiftUp}\relax + \__um_copy_fontparam:nnn { 9} {42} {FractionNumeratorShiftUp}\relax + \__um_copy_fontparam:nnn {10} {32} {StackTopShiftUp}\relax + \__um_copy_fontparam:nnn {11} {45} {FractionDenominatorDisplayStyleShiftDown}\relax + \__um_copy_fontparam:nnn {12} {44} {FractionDenominatorShiftDown}\relax + \__um_copy_fontparam:nnn {13} {21} {SuperscriptShiftUp}\relax + \__um_copy_fontparam:nnn {14} {21} {SuperscriptShiftUp}\relax + \__um_copy_fontparam:nnn {15} {22} {SuperscriptShiftUpCramped}\relax + \__um_copy_fontparam:nnn {16} {18} {SubscriptShiftDown}\relax + \__um_copy_fontparam:nnn {17} {18} {SubscriptShiftDownWithSuperscript}\relax + \__um_copy_fontparam:nnn {18} {24} {SuperscriptBaselineDropMax}\relax + \__um_copy_fontparam:nnn {19} {20} {SubscriptBaselineDropMin}\relax + \__um_zero_fontparam:n {20} % delim1 = FractionDelimiterDisplaySize + \__um_zero_fontparam:n {21} % delim2 = FractionDelimiterSize + \__um_copy_fontparam:nnn {22} {15} {AxisHeight}\relax + } } {\l__um_fontname_tl} \SetSymbolFont{symbols}{\l__um_mversion_tl} @@ -1079,112 +1147,109 @@ \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} { - \SetSymbolFont{symbols}{bold} - {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} + \SetSymbolFont{symbols}{bold} + {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} } } \cs_new:Nn \__um_setup_legacy_fam_three: { \fontspec_set_family:Nxn \l__um_family_tl { - \l__um_font_keyval_tl, - Scale=0.99999, - FontAdjustment={ - \fontdimen8\font= \__um_get_fontparam:nn {48} {FractionRuleThickness}\relax - \fontdimen9\font= \__um_get_fontparam:nn {28} {UpperLimitGapMin}\relax - \fontdimen10\font=\__um_get_fontparam:nn {30} {LowerLimitGapMin}\relax - \fontdimen11\font=\__um_get_fontparam:nn {29} {UpperLimitBaselineRiseMin}\relax - \fontdimen12\font=\__um_get_fontparam:nn {31} {LowerLimitBaselineDropMin}\relax - \fontdimen13\font=0pt\relax - } - } {\l__um_fontname_tl} + \l__um_font_keyval_tl, + Scale=0.99999, + FontAdjustment = { + \__um_copy_fontparam:nnn { 8} {48} {FractionRuleThickness}\relax + \__um_copy_fontparam:nnn { 9} {28} {UpperLimitGapMin}\relax + \__um_copy_fontparam:nnn {10} {30} {LowerLimitGapMin}\relax + \__um_copy_fontparam:nnn {11} {29} {UpperLimitBaselineRiseMin}\relax + \__um_copy_fontparam:nnn {12} {31} {LowerLimitBaselineDropMin}\relax + \__um_zero_fontparam:n {13} + } + } {\l__um_fontname_tl} \SetSymbolFont{largesymbols}{\l__um_mversion_tl} {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} { - \SetSymbolFont{largesymbols}{bold} - {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} + \SetSymbolFont{largesymbols}{bold} + {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} } } -\cs_new:Nn \__um_get_fontparam:nn - { - \directlua{fontspec.mathfontdimen("l__um_font","#2")} - } \cs_new:Nn \__um_fontspec_select_font: - { - \tl_set:Nx \l__um_font_keyval_tl { + { + \tl_set:Nx \l__um_font_keyval_tl { Renderer = Basic, - BoldItalicFont = {}, ItalicFont = {}, - Script = Math, - SizeFeatures = - { - { - Size = \tf@size- - } , - { - Size = \sf@size-\tf@size , - Font = \l__um_script_font_tl , - \l__um_script_features_tl - } , - { - Size = -\sf@size , - Font = \l__um_sscript_font_tl , - \l__um_sscript_features_tl - } - } , - \l__um_unknown_keys_clist - } + BoldItalicFont = {}, ItalicFont = {}, + Script = Math, + SizeFeatures = + { + { + Size = \tf@size- + } , + { + Size = \sf@size-\tf@size , + Font = \l__um_script_font_tl , + \l__um_script_features_tl + } , + { + Size = -\sf@size , + Font = \l__um_sscript_font_tl , + \l__um_sscript_features_tl + } + } , + \l__um_unknown_keys_clist + } + \fontspec_set_fontface:NNxn \l__um_font \l__um_family_tl {\l__um_font_keyval_tl} {\l__um_fontname_tl} - \group_begin: - \fontfamily{\l__um_family_tl}\selectfont - \fontspec_if_script:nF {math} {\bool_gset_false:N \l__um_ot_math_bool} - \group_end: - } + \group_begin: + \fontfamily{\l__um_family_tl}\selectfont + \fontspec_if_script:nF {math} {\bool_gset_false:N \l__um_ot_math_bool} + \group_end: + } \cs_set:Nn \__um_process_symbol_noparse:nnn - { - \__um_set_mathsymbol:nNNn {\__um_symfont_tl} #2 #3 {#1} - } + { + \__um_set_mathsymbol:nNNn {\l__um_symfont_label_tl} #2 #3 {#1} + } \cs_set:Nn \__um_process_symbol_parse:nnn - { - \__um_if_char_spec:nNNT {#1} {#2} {#3} - { - \__um_process_symbol_noparse:nnn {#1} {#2} {#3} - } - } + { + \__um_if_char_spec:nNNT {#1} {#2} {#3} + { + \__um_process_symbol_noparse:nnn {#1} {#2} {#3} + } + } \cs_new:Npn \__um_remap_symbols: - { - \__um_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus - \__um_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk" - \bool_if:NF \g__um_literal_colon_bool - { - \__um_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel) - } - } + { + \__um_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus + \__um_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk" + \bool_if:NF \g__um_literal_colon_bool + { + \__um_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel) + } + } \cs_new:Nn \__um_remap_symbol_parse:nnn - { - \__um_if_char_spec:nNNT {#3} {\@nil} {#2} - { \__um_remap_symbol_noparse:nnn {#1} {#2} {#3} } - } + { + \__um_if_char_spec:nNNT {#3} {\@nil} {#2} + { \__um_remap_symbol_noparse:nnn {#1} {#2} {#3} } + } \cs_new:Nn \__um_remap_symbol_noparse:nnn - { - \clist_map_inline:nn {#1} - { \__um_set_mathcode:nnnn {##1} {#2} {\__um_symfont_tl} {#3} } - } + { + \clist_map_inline:nn {#1} + { \__um_set_mathcode:nnnn {##1} {#2} {\l__um_symfont_label_tl} {#3} } + } \cs_new:Npn \__um_setup_mathactives: - { - \__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord - \__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord - \__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord - \__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord - \__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord - \__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord - \__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord - \__um_make_mathactive:nNN {`\'} \mathstraightquote \mathord - \__um_make_mathactive:nNN {`\`} \mathbacktick \mathord - } + { + \__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord + \__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord + \__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord + \__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord + \__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord + \__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord + \__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord + \__um_make_mathactive:nNN {`\'} \mathstraightquote \mathord + \__um_make_mathactive:nNN {`\`} \mathbacktick \mathord + } \cs_new:Nn \__um_make_mathactive_parse:nNN { \__um_if_char_spec:nNNT {#1} #2 #3 @@ -1192,79 +1257,73 @@ } \cs_new:Nn \__um_make_mathactive_noparse:nNN { - \__um_set_mathchar:NNnn #2 #3 {\__um_symfont_tl} {#1} + \__um_set_mathchar:NNnn #2 #3 {\l__um_symfont_label_tl} {#1} \__um_char_gmake_mathactive:n {#1} } \cs_new:Nn \__um_assign_delcode_noparse:nn - { - \__um_set_delcode:nnn \__um_symfont_tl {#1} {#2} - } + { + \__um_set_delcode:nnn \l__um_symfont_label_tl {#1} {#2} + } \cs_new:Nn \__um_assign_delcode_parse:nn - { - \__um_if_char_spec:nNNT {#2} {\@nil} {\@nil} - { - \__um_assign_delcode_noparse:nn {#1} {#2} - } - } + { + \__um_if_char_spec:nNNT {#2} {\@nil} {\@nil} + { + \__um_assign_delcode_noparse:nn {#1} {#2} + } + } \cs_new:Nn \__um_assign_delcode:n { \__um_assign_delcode:nn {#1} {#1} } \cs_new:Npn \__um_setup_delcodes: - { - % ensure \left. and \right. work: - \__um_set_delcode:nnn \__um_symfont_tl {`\.} {\c_zero} - % this is forcefully done to fix a bug -- indicates a larger problem! - - \__um_assign_delcode:nn {`\/} {\g__um_slash_delimiter_usv} - \__um_assign_delcode:nn {"2044} {\g__um_slash_delimiter_usv} % fracslash - \__um_assign_delcode:nn {"2215} {\g__um_slash_delimiter_usv} % divslash - \__um_assign_delcode:n {"005C} % backslash - \__um_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation - \__um_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation - \__um_assign_delcode:n {"2191} % up arrow - \__um_assign_delcode:n {"2193} % down arrow - \__um_assign_delcode:n {"2195} % updown arrow - \__um_assign_delcode:n {"219F} % up arrow twohead - \__um_assign_delcode:n {"21A1} % down arrow twohead - \__um_assign_delcode:n {"21A5} % up arrow from bar - \__um_assign_delcode:n {"21A7} % down arrow from bar - \__um_assign_delcode:n {"21A8} % updown arrow from bar - \__um_assign_delcode:n {"21BE} % up harpoon right - \__um_assign_delcode:n {"21BF} % up harpoon left - \__um_assign_delcode:n {"21C2} % down harpoon right - \__um_assign_delcode:n {"21C3} % down harpoon left - \__um_assign_delcode:n {"21C5} % arrows up down - \__um_assign_delcode:n {"21F5} % arrows down up - \__um_assign_delcode:n {"21C8} % arrows up up - \__um_assign_delcode:n {"21CA} % arrows down down - \__um_assign_delcode:n {"21D1} % double up arrow - \__um_assign_delcode:n {"21D3} % double down arrow - \__um_assign_delcode:n {"21D5} % double updown arrow - \__um_assign_delcode:n {"21DE} % up arrow double stroke - \__um_assign_delcode:n {"21DF} % down arrow double stroke - \__um_assign_delcode:n {"21E1} % up arrow dashed - \__um_assign_delcode:n {"21E3} % down arrow dashed - \__um_assign_delcode:n {"21E7} % up white arrow - \__um_assign_delcode:n {"21E9} % down white arrow - \__um_assign_delcode:n {"21EA} % up white arrow from bar - \__um_assign_delcode:n {"21F3} % updown white arrow - } + { + % ensure \left. and \right. work: + \__um_set_delcode:nnn \l__um_symfont_label_tl {`\.} {\c_zero} + % this is forcefully done to fix a bug -- indicates a larger problem! + + \__um_assign_delcode:nn {`\/} {\g__um_slash_delimiter_usv} + \__um_assign_delcode:nn {"2044} {\g__um_slash_delimiter_usv} % fracslash + \__um_assign_delcode:nn {"2215} {\g__um_slash_delimiter_usv} % divslash + \__um_assign_delcode:n {"005C} % backslash + \__um_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation + \__um_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation + \__um_assign_delcode:n {"2191} % up arrow + \__um_assign_delcode:n {"2193} % down arrow + \__um_assign_delcode:n {"2195} % updown arrow + \__um_assign_delcode:n {"219F} % up arrow twohead + \__um_assign_delcode:n {"21A1} % down arrow twohead + \__um_assign_delcode:n {"21A5} % up arrow from bar + \__um_assign_delcode:n {"21A7} % down arrow from bar + \__um_assign_delcode:n {"21A8} % updown arrow from bar + \__um_assign_delcode:n {"21BE} % up harpoon right + \__um_assign_delcode:n {"21BF} % up harpoon left + \__um_assign_delcode:n {"21C2} % down harpoon right + \__um_assign_delcode:n {"21C3} % down harpoon left + \__um_assign_delcode:n {"21C5} % arrows up down + \__um_assign_delcode:n {"21F5} % arrows down up + \__um_assign_delcode:n {"21C8} % arrows up up + \__um_assign_delcode:n {"21CA} % arrows down down + \__um_assign_delcode:n {"21D1} % double up arrow + \__um_assign_delcode:n {"21D3} % double down arrow + \__um_assign_delcode:n {"21D5} % double updown arrow + \__um_assign_delcode:n {"21DE} % up arrow double stroke + \__um_assign_delcode:n {"21DF} % down arrow double stroke + \__um_assign_delcode:n {"21E1} % up arrow dashed + \__um_assign_delcode:n {"21E3} % down arrow dashed + \__um_assign_delcode:n {"21E7} % up white arrow + \__um_assign_delcode:n {"21E9} % down white arrow + \__um_assign_delcode:n {"21EA} % up white arrow from bar + \__um_assign_delcode:n {"21F3} % updown white arrow + } \tl_set:Nn \l__um_nolimits_tl - { - \int\iint\iiint\iiiint\oint\oiint\oiiint - \intclockwise\varointclockwise\ointctrclockwise\sumint - \intbar\intBar\fint\cirfnint\awint\rppolint - \scpolint\npolint\pointint\sqint\intlarhk\intx - \intcap\intcup\upint\lowint - } -\DeclareDocumentCommand \addnolimits {m} - { - \tl_put_right:Nn \l__um_nolimits_tl {#1} - } -\DeclareDocumentCommand \removenolimits {m} - { - \tl_remove_all:Nn \l__um_nolimits_tl {#1} - } + { + \int\iint\iiint\iiiint\oint\oiint\oiiint + \intclockwise\varointclockwise\ointctrclockwise\sumint + \intbar\intBar\fint\cirfnint\awint\rppolint + \scpolint\npolint\pointint\sqint\intlarhk\intx + \intcap\intcup\upint\lowint + } \tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision} +%%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \keys_define:nn {unicode-math} { version .code:n = @@ -1286,7 +1345,7 @@ { \bool_set_false:N \l__um_init_bool \int_incr:N \g__um_fam_int - \tl_set:Nx \__um_symfont_tl {__um_fam\int_use:N\g__um_fam_int} + \tl_set:Nx \l__um_symfont_label_tl {__um_fam\int_use:N\g__um_fam_int} \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_parse:nnn \cs_set_eq:NN \__um_set_mathalphabet_char:Nnn \__um_mathmap_parse:Nnn \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_parse:nnn @@ -1395,6 +1454,8 @@ } } } } +%%^^A%% um-code-fontparam.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new_protected_nopar:Nn \__um_new_cramped_style:N { \cs_if_exist:NF #1 @@ -1499,6 +1560,8 @@ \fi } +%%^^A%% um-code-mathmap.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_set:Npn \use@mathgroup #1 #2 { \mode_if_math:T % <- not sure if this is really necessary since we've just checked for mmode and raised an error if not! @@ -1679,7 +1742,7 @@ \clist_map_break: } { - \__um_glyph_if_exist:nT { \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} } + \__um_glyph_if_exist:NnT \l__um_font { \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} } { \__um_maybe_init_alphabet:n \l__um_style_tl \clist_map_break: @@ -1699,7 +1762,7 @@ \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl} } { - \__um_glyph_if_exist:nTF { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} } + \__um_glyph_if_exist:NnTF \l__um_font { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} } { \__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)} \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl} @@ -1722,7 +1785,7 @@ } } \cs_new:Nn \__um_map_char_noparse:nn - { \__um_set_mathcode:nnnn {#1}{\mathalpha}{\__um_symfont_tl}{#2} } + { \__um_set_mathcode:nnnn {#1}{\mathalpha}{\l__um_symfont_label_tl}{#2} } \cs_new:Nn \__um_map_char_parse:nn { \__um_if_char_spec:nNNT {#1} {\@nil} {\mathalpha} @@ -1811,7 +1874,7 @@ { \tl_put_right:cx {__um_switchto_#1:} { - \__um_set_mathcode:nnnn {##1} {\mathalpha} {\__um_symfont_tl} {#3} + \__um_set_mathcode:nnnn {##1} {\mathalpha} {\l__um_symfont_label_tl} {#3} } } } @@ -1885,91 +1948,7 @@ } } -\keys_define:nn {__um_mathface} - { - version .code:n = - { \tl_set:Nn \l__um_mversion_tl {#1} } - } -\DeclareDocumentCommand \setmathfontface { m O{} m O{} } - { - \tl_clear:N \l__um_mversion_tl - - \keys_set_known:nnN {__um_mathface} {#2,#4} \l__um_keyval_clist - \exp_args:Nnx \fontspec_set_family:Nxn \l__um_tmpa_tl - { ItalicFont={}, BoldFont={}, \exp_not:V \l__um_keyval_clist } {#3} - - \tl_if_empty:NT \l__um_mversion_tl - { - \tl_set:Nn \l__um_mversion_tl {normal} - \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} - } - \SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} - - % integrate with fontspec's \setmathrm etc: - \tl_case:Nn #1 - { - \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } - \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } - \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } - } - } -\@onlypreamble \setmathfontface -\DeclareDocumentCommand \setoperatorfont {m} - { \tl_set:Nn \g__um_operator_mathfont_tl {#1} } -\setoperatorfont{\mathrm} -\cs_generate_variant:Nn \tl_if_eq:nnT {o} -\cs_set:Nn \__fontspec_setmainfont_hook:nn - { - \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault - \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } - } - -\cs_set:Nn \__fontspec_setsansfont_hook:nn - { - \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault - \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } - } - -\cs_set:Nn \__fontspec_setmonofont_hook:nn - { - \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault - \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } - } -\cs_set:Nn \__fontspec_setmathrm_hook:nn - { - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault - \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setboldmathrm_hook:nn - { - \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\updefault - \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\bfdefault\updefault - \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault - } -\cs_set:Nn \__fontspec_setmathsf_hook:nn - { - \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault - \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setmathtt_hook:nn - { - \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault - \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } +%%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> \AtBeginDocument{\__um_resolve_greek:} \cs_new:Npn \__um_resolve_greek: @@ -2132,6 +2111,8 @@ \cs_gset:Npn \nforksnot { \forks } } +%%^^A%% um-code-primes.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Nn \__um_arg_i_before_egroup:n {#1\egroup} \cs_new:Nn \__um_superscript:n { @@ -2152,17 +2133,17 @@ { {1} { \__um_superscript:n {#1} } {2} { - \__um_glyph_if_exist:nTF {"2033} + \__um_glyph_if_exist:NnTF \l__um_font {"2033} { \__um_superscript:n {\__um_prime_double_mchar} } { \__um_nprimes:Nn #1 {#2} } } {3} { - \__um_glyph_if_exist:nTF {"2034} + \__um_glyph_if_exist:NnTF \l__um_font {"2034} { \__um_superscript:n {\__um_prime_triple_mchar} } { \__um_nprimes:Nn #1 {#2} } } {4} { - \__um_glyph_if_exist:nTF {"2057} + \__um_glyph_if_exist:NnTF \l__um_font {"2057} { \__um_superscript:n {\__um_prime_quad_mchar} } { \__um_nprimes:Nn #1 {#2} } } @@ -2177,12 +2158,12 @@ { {1} { \__um_superscript:n {#1} } {2} { - \__um_glyph_if_exist:nTF {"2036} + \__um_glyph_if_exist:NnTF \l__um_font {"2036} { \__um_superscript:n {\__um_backprime_double_mchar} } { \__um_nprimes:Nn #1 {#2} } } {3} { - \__um_glyph_if_exist:nTF {"2037} + \__um_glyph_if_exist:NnTF \l__um_font {"2037} { \__um_superscript:n {\__um_backprime_triple_mchar} } { \__um_nprimes:Nn #1 {#2} } } @@ -2413,6 +2394,8 @@ } \group_end: +%%^^A%% um-code-sscript.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \group_begin: \cs_new:Nn \__um_setup_active_superscript:nn { @@ -2535,6 +2518,9 @@ } { \group_align_safe_end: #2 #3 } } + +%%^^A%% um-code-compat.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnnn { \cs_if_exist:NT #1 @@ -2749,6 +2735,9 @@ \RenewDocumentCommand \equalscolon { } { \eqcolon } \RenewDocumentCommand \coloncolonequals { } { \Coloneq } } + +%%^^A%% um-code-alphabets.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \__um_new_alphabet_config:nnn {up} {num} { \__um_set_normal_numbers:nn {up} {#1} @@ -3573,3 +3562,4 @@ } } } + diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex index aaa8d27b550..481ebcc00ef 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex @@ -1,3 +1,5 @@ +%%^^A%% unicode-math-table.tex -- part of UNICODE-MATH <wspr.io/unicode-math> + \UnicodeMathSymbol{"00021}{\mathexclam }{\mathclose}{exclamation mark}% \UnicodeMathSymbol{"00023}{\mathoctothorpe }{\mathord}{number sign}% \UnicodeMathSymbol{"00024}{\mathdollar }{\mathord}{dollar sign}% @@ -513,8 +515,8 @@ \UnicodeMathSymbol{"022BD}{\barvee }{\mathbin}{bar, vee (large vee)}% \UnicodeMathSymbol{"022BE}{\measuredrightangle }{\mathord}{right angle-measured [with arc]}% \UnicodeMathSymbol{"022BF}{\varlrtriangle }{\mathord}{right triangle}% -\UnicodeMathSymbol{"022C0}{\bigwedge }{\mathop}{logical or operator}% -\UnicodeMathSymbol{"022C1}{\bigvee }{\mathop}{logical and operator}% +\UnicodeMathSymbol{"022C0}{\bigwedge }{\mathop}{logical and operator}% +\UnicodeMathSymbol{"022C1}{\bigvee }{\mathop}{logical or operator}% \UnicodeMathSymbol{"022C2}{\bigcap }{\mathop}{intersection operator}% \UnicodeMathSymbol{"022C3}{\bigcup }{\mathop}{union operator}% \UnicodeMathSymbol{"022C4}{\smwhtdiamond }{\mathbin}{white diamond}% @@ -2443,3 +2445,21 @@ \UnicodeMathSymbol{"1D7FF}{\mttnine }{\mathord}{mathematical monospace digit 9}% \UnicodeMathSymbol{"1EEF0}{\arabicmaj }{\mathop}{arabic mathematical operator meem with hah with tatweel}% \UnicodeMathSymbol{"1EEF1}{\arabichad }{\mathop}{arabic mathematical operator hah with dal}% + +% /© +% +% ------------------------------------------------ +% The UNICODE-MATH package <wspr.io/unicode-math> +% ------------------------------------------------ +% This package is free software and may be redistributed and/or modified under +% the conditions of the LaTeX Project Public License, version 1.3c or higher +% (your choice): <http://www.latex-project.org/lppl/>. +% ------------------------------------------------ +% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +% Copyright 2010-2017 Philipp Stephani +% Copyright 2011-2017 Joseph Wright +% Copyright 2012-2015 Khaled Hosny +% ------------------------------------------------ +% +% ©/ + diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty index 84c3c217745..97ac7035626 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty @@ -5,39 +5,140 @@ %% The original source files were: %% %% unicode-math.dtx (with options: `package,XE') -%% unicode-math-preamble.dtx (with options: `package,XE') -%% unicode-math-pkgopt.dtx (with options: `package,XE') -%% unicode-math-msg.dtx (with options: `package,XE') -%% unicode-math-usv.dtx (with options: `package,XE') -%% unicode-math-setchar.dtx (with options: `package,XE') -%% unicode-math-mathtext.dtx (with options: `package,XE') -%% unicode-math-main.dtx (with options: `package,XE') -%% unicode-math-fontopt.dtx (with options: `package,XE') -%% unicode-math-fontparam.dtx (with options: `package,XE') -%% unicode-math-mathmap.dtx (with options: `package,XE') -%% unicode-math-mathtext.dtx (with options: `package,XE') -%% unicode-math-epilogue.dtx (with options: `package,XE') -%% unicode-math-primes.dtx (with options: `package,XE') -%% unicode-math-sscript.dtx (with options: `package,XE') -%% unicode-math-compat.dtx (with options: `package,XE') -%% unicode-math-alphabets.dtx (with options: `package,XE') -%% -%% Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> -%% Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> -%% Copyright 2012-2015 Khaled Hosny <khaledhosny@eglug.org> -%% +%% um-code-base.dtx (with options: `package,XE') +%% um-code-opening.dtx (with options: `package,XE') +%% um-code-variables.dtx (with options: `package,XE') +%% um-code-api.dtx (with options: `package,XE') +%% um-code-ui.dtx (with options: `package,XE') +%% um-code-pkgopt.dtx (with options: `package,XE') +%% um-code-msg.dtx (with options: `package,XE') +%% um-code-usv.dtx (with options: `package,XE') +%% um-code-setchar.dtx (with options: `package,XE') +%% um-code-mathtext.dtx (with options: `package,XE') +%% um-code-main.dtx (with options: `package,XE') +%% um-code-fontopt.dtx (with options: `package,XE') +%% um-code-fontparam.dtx (with options: `package,XE') +%% um-code-mathmap.dtx (with options: `package,XE') +%% um-code-epilogue.dtx (with options: `package,XE') +%% um-code-primes.dtx (with options: `package,XE') +%% um-code-sscript.dtx (with options: `package,XE') +%% um-code-compat.dtx (with options: `package,XE') +%% um-code-alphabets.dtx (with options: `package,XE') +%% ------------------------------------------------ +%% The UNICODE-MATH package <wspr.io/unicode-math> +%% ------------------------------------------------ %% This package is free software and may be redistributed and/or modified under %% the conditions of the LaTeX Project Public License, version 1.3c or higher %% (your choice): <http://www.latex-project.org/lppl/>. -%% -%% This work is "maintained" by Will Robertson. +%% ------------------------------------------------ +%% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +%% Copyright 2010-2017 Philipp Stephani +%% Copyright 2011-2017 Joseph Wright +%% Copyright 2012-2015 Khaled Hosny +%% ------------------------------------------------ +%%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \ProvidesPackage{unicode-math-xetex} - [2017/10/09 v0.8h Unicode maths in XeLaTeX and LuaLaTeX] + [2017/11/18 v0.8i Unicode maths in XeLaTeX and LuaLaTeX] + +%%^^A%% um-code-base.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + + +%%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> \ExplSyntaxOn \cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } \cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx} \cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx} +\prg_new_conditional:Nnn \__um_glyph_if_exist:Nn {p,TF,T,F} + { + \etex_iffontchar:D #1 #2 \scan_stop: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_set:Npn \__um_set_mathcode:nnnn #1#2#3#4 + { + \Umathcode \int_eval:n {#1} = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: + } +\cs_set:Npn \__um_set_mathcode:nnn #1#2#3 + { + \Umathcode \int_eval:n {#1} = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: + } +\cs_set:Npn \__um_set_mathchar:NNnn #1#2#3#4 + { + \Umathchardef #1 = + \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: + } +\cs_generate_variant:Nn \__um_set_mathchar:NNnn {c} +\cs_new:Nn \__um_set_delcode:nnn + { + \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: + } +\cs_new:Nn \__um_radical:nn + { + \Uradical \csname sym#1\endcsname #2 \scan_stop: + } +\cs_new:Nn \__um_delimiter:Nnn + { + \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: + } +\cs_new:Nn \__um_accent:nnn + { + \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: + } +\cs_new:Nn \__um_char_gmake_mathactive:N + { + \global\mathcode `#1 = "8000 \scan_stop: + } +\cs_new:Nn \__um_char_gmake_mathactive:n + { + \global\mathcode #1 = "8000 \scan_stop: + } +\cs_new:Nn \__um_copy_fontparam:nnn + { + \fontdimen #1 \font = \__um_get_fontparam:nn {#2} {#3} + } +\cs_new:Nn \__um_zero_fontparam:n + { + \fontdimen #1 \font = 0pt\relax + } +\cs_new:Nn \__um_get_fontparam:nn + { + \the\fontdimen#1\l__um_font\relax + } +\cs_new:Nn \usv_set:nnn { \tl_const:cn { c__um_#1_#2_usv } {#3} } +\cs_new:Nn \__um_to_usv:nn { \use:c { c__um_#1_#2_usv } } +\prg_new_conditional:Nnn \__um_usv_if_exist:nn {T,F,TF} + { + \cs_if_exist:cTF { c__um_#1_#2_usv } + \prg_return_true: \prg_return_false: + } +\tl_map_inline:nn + { + \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes + \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ + \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion + \version@list\version@elt\alpha@list\alpha@elt + \restore@mathversion\init@restore@version\dorestore@version\process@table + \new@mathversion\DeclareSymbolFont\group@list\group@elt + \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp + \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ + \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar + \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter + \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter + \set__ummathdelimiter\DeclareMathRadical\mathchar@type + \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ + } + { + \tl_remove_once:Nn \@preamblecmds {\do#1} + } + +%%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \bool_new:N \l__um_ot_math_bool \bool_new:N \l__um_init_bool \bool_new:N \l__um_implicit_alph_bool @@ -115,79 +216,42 @@ \tl_new:N \g__um_family_tl \tl_new:N \g__um_style_tl \tl_new:N \g__um_remap_style_tl -\prg_new_conditional:Nnn \__um_glyph_if_exist:n {p,TF,T,F} - { - \etex_iffontchar:D \l__um_font #1 \scan_stop: - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_set:Npn \__um_set_mathcode:nnnn #1#2#3#4 { - \Umathcode \int_eval:n {#1} = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: -} -\cs_set:Npn \__um_set_mathcode:nnn #1#2#3 { - \Umathcode \int_eval:n {#1} = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: -} -\cs_set:Npn \__um_set_mathchar:NNnn #1#2#3#4 { - \Umathchardef #1 = - \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: -} -\cs_new:Nn \__um_set_delcode:nnn { - \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: -} -\cs_new:Nn \__um_radical:nn { - \Uradical \csname sym#1\endcsname #2 \scan_stop: -} -\cs_new:Nn \__um_delimiter:Nnn { - \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: -} -\cs_new:Nn \__um_accent:nnn { - \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: -} -\cs_generate_variant:Nn \__um_set_mathchar:NNnn {c} -\cs_new:Nn \__um_char_gmake_mathactive:N - { - \global\mathcode `#1 = "8000 \scan_stop: - } -\cs_new:Nn \__um_char_gmake_mathactive:n - { - \global\mathcode #1 = "8000 \scan_stop: - } -\cs_new:Nn \usv_set:nnn { \tl_const:cn { c__um_#1_#2_usv } {#3} } -\cs_new:Nn \__um_to_usv:nn { \use:c { c__um_#1_#2_usv } } -\prg_new_conditional:Nnn \__um_usv_if_exist:nn {T,F,TF} - { - \cs_if_exist:cTF { c__um_#1_#2_usv } - \prg_return_true: \prg_return_false: - } + +%%^^A%% um-code-api.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Nn \unimath_get_mathstyle: { \tl_use:N \l__um_mathstyle_tl } -\tl_map_inline:nn - { - \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes - \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ - \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion - \version@list\version@elt\alpha@list\alpha@elt - \restore@mathversion\init@restore@version\dorestore@version\process@table - \new@mathversion\DeclareSymbolFont\group@list\group@elt - \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp - \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ - \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar - \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter - \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter - \set__ummathdelimiter\DeclareMathRadical\mathchar@type - \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ - } - { - \tl_remove_once:Nn \@preamblecmds {\do#1} - } -\DeclareDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } +%%^^A%% um-code-ui.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +\NewDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } +\NewDocumentCommand \setmathfont { O{} m O{} } + { + \__um_setmathfont:nn {#1,#3} {#2} + } +\NewDocumentCommand \setmathfontface { m O{} m O{} } + { + \__um_setmathfontface:Nnn #1 {#2,#4} {#3} + } +\@onlypreamble \setmathfontface +\NewDocumentCommand \setoperatorfont {m} + { + \tl_set:Nn \g__um_operator_mathfont_tl {#1} + } +\setoperatorfont{\mathrm} +\NewDocumentCommand \addnolimits {m} + { + \tl_put_right:Nn \l__um_nolimits_tl {#1} + } +\NewDocumentCommand \removenolimits {m} + { + \tl_remove_all:Nn \l__um_nolimits_tl {#1} + } + +%%^^A%% um-code-pkgopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Nn \__um_keys_choices:nn { \cs_set:Npn \__um_keys_choices_fn:nn { \__um_keys_choices_aux:nnn {#1} } @@ -407,6 +471,8 @@ \cs_if_exist:NT \tfrac { \unimathsetup {active-frac=small} } \ProcessKeysOptions {unicode-math} +%%^^A%% um-code-msg.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Npn \__um_error:n { \msg_error:nn {unicode-math} } \cs_new:Npn \__um_warning:n { \msg_warning:nn {unicode-math} } \cs_new:Npn \__um_warning:nnn { \msg_warning:nnxx {unicode-math} } @@ -499,6 +565,8 @@ any~ effect~ on~ the~ re-defined~ commands. } +%%^^A%% um-code-usv.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \usv_set:nnn {normal} {num} {48} \usv_set:nnn {normal} {Latin}{"1D434} \usv_set:nnn {normal} {latin}{"1D44E} @@ -745,6 +813,8 @@ \usv_set:nnn {frak}{R}{"211C} \usv_set:nnn {frak}{Z}{"2128} +%%^^A%% um-code-setchar.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Npn \__um_symbol_setup: { \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 @@ -872,16 +942,19 @@ } } +%%^^A%% um-code-mathtext.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \keys_define:nn {__um_mathface} { version .code:n = { \tl_set:Nn \l__um_mversion_tl {#1} } } -\DeclareDocumentCommand \setmathfontface { m O{} m O{} } +\cs_set:Nn \__um_setmathfontface:Nnn { \tl_clear:N \l__um_mversion_tl - \keys_set_known:nnN {__um_mathface} {#2,#4} \l__um_keyval_clist + \keys_set_known:nnN {__um_mathface} {#2} \l__um_keyval_clist + \exp_args:Nnx \fontspec_set_family:Nxn \l__um_tmpa_tl { ItalicFont={}, BoldFont={}, \exp_not:V \l__um_keyval_clist } {#3} @@ -890,6 +963,7 @@ \tl_set:Nn \l__um_mversion_tl {normal} \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} } + \SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} % integrate with fontspec's \setmathrm etc: @@ -900,10 +974,6 @@ \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } } } -\@onlypreamble \setmathfontface -\DeclareDocumentCommand \setoperatorfont {m} - { \tl_set:Nn \g__um_operator_mathfont_tl {#1} } -\setoperatorfont{\mathrm} \cs_generate_variant:Nn \tl_if_eq:nnT {o} \cs_set:Nn \__fontspec_setmainfont_hook:nn { @@ -958,49 +1028,48 @@ \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault } -\DeclareDocumentCommand \setmathfont { O{} m O{} } - { - \__um_setmathfont:nn {#1,#3} {#2} - } +%%^^A%% um-code-main.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_set:Nn \__um_setmathfont:nn - { - \tl_set:Nn \l__um_fontname_tl {#2} - \__um_init: - \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } - \csname S@\f@size\endcsname - \keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist - \bool_if:NT \l__um_init_bool { \__um_log:n {default-math-font} } - \__um_fontspec_select_font: - \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } - { - \__um_declare_math_sizes: + { + \tl_set:Nn \l__um_fontname_tl {#2} + \cs_set_eq:NN \glb@currsize \scan_stop: + \__um_init: + \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } + \csname S@\f@size\endcsname + \keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist + \bool_if:NT \l__um_init_bool { \__um_log:n {default-math-font} } \__um_fontspec_select_font: - } - \cs_if_exist:cF { sym \__um_symfont_tl } - { - \DeclareSymbolFont{\__um_symfont_tl} - {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} - } - \SetSymbolFont{\__um_symfont_tl}{\l__um_mversion_tl} - {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} - \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} - { - \SetSymbolFont{\__um_symfont_tl}{bold} - {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} - } - \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } - { - \bool_set_true:N \g__um_mainfont_already_set_bool - \__um_setup_legacy_fam_two: - \__um_setup_legacy_fam_three: - } - \__um_input_math_symbol_table: - \__um_remap_symbols: - \__um_setup_mathactives: - \__um_setup_delcodes: - \__um_setup_alphabets: - \__um_setup_negations: - } + \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } + { + \__um_declare_math_sizes: + \__um_fontspec_select_font: + } + \cs_if_exist:cF { sym \l__um_symfont_label_tl } + { + \DeclareSymbolFont{\l__um_symfont_label_tl} + {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} + } + \SetSymbolFont{\l__um_symfont_label_tl}{\l__um_mversion_tl} + {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} + \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} + { + \SetSymbolFont{\l__um_symfont_label_tl}{bold} + {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} + } + \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool } + { + \bool_set_true:N \g__um_mainfont_already_set_bool + \__um_setup_legacy_fam_two: + \__um_setup_legacy_fam_three: + } + \__um_input_math_symbol_table: + \__um_remap_symbols: + \__um_setup_mathactives: + \__um_setup_delcodes: + \__um_setup_alphabets: + \__um_setup_negations: + } \AtBeginDocument { \__um_load_lm_if_necessary: } \cs_new:Nn \__um_load_lm_if_necessary: { @@ -1012,28 +1081,27 @@ } } \cs_new:Nn \__um_init: - { - \bool_set_true:N \l__um_ot_math_bool - \cs_set_eq:NN \glb@currsize \scan_stop: - \bool_set_true:N \l__um_init_bool - \seq_clear:N \l__um_char_range_seq - \clist_clear:N \l__um_char_nrange_clist - \seq_clear:N \l__um_mathalph_seq - \seq_clear:N \l__um_missing_alph_seq - \tl_set:Nn \l__um_mversion_tl {normal} - \tl_set:Nn \__um_symfont_tl {operators} - \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn - \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn - \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn - \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n - \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn - \cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn - \cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN - \tl_set:Nn \l__um_script_features_tl {Style=MathScript} - \tl_set:Nn \l__um_sscript_features_tl {Style=MathScriptScript} - \tl_set_eq:NN \l__um_script_font_tl \l__um_fontname_tl - \tl_set_eq:NN \l__um_sscript_font_tl \l__um_fontname_tl - } + { + \bool_set_true:N \l__um_ot_math_bool + \tl_set:Nn \l__um_mversion_tl {normal} + \tl_set:Nn \l__um_symfont_label_tl {operators} + \tl_set:Nn \l__um_script_features_tl {Style=MathScript} + \tl_set:Nn \l__um_sscript_features_tl {Style=MathScriptScript} + \tl_set_eq:NN \l__um_script_font_tl \l__um_fontname_tl + \tl_set_eq:NN \l__um_sscript_font_tl \l__um_fontname_tl + \bool_set_true:N \l__um_init_bool + \seq_clear:N \l__um_char_range_seq + \clist_clear:N \l__um_char_nrange_clist + \seq_clear:N \l__um_mathalph_seq + \seq_clear:N \l__um_missing_alph_seq + \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn + \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn + \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn + \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n + \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn + \cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn + \cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN + } \cs_new:Nn \__um_declare_math_sizes: { \dim_compare:nF { \fontdimen 10 \l__um_font == 0pt } @@ -1047,26 +1115,26 @@ { \fontspec_set_family:Nxn \l__um_family_tl { - \l__um_font_keyval_tl, - Scale=1.00001, - FontAdjustment = - { - \fontdimen8\font= \__um_get_fontparam:nn {43} {FractionNumeratorDisplayStyleShiftUp}\relax - \fontdimen9\font= \__um_get_fontparam:nn {42} {FractionNumeratorShiftUp}\relax - \fontdimen10\font=\__um_get_fontparam:nn {32} {StackTopShiftUp}\relax - \fontdimen11\font=\__um_get_fontparam:nn {45} {FractionDenominatorDisplayStyleShiftDown}\relax - \fontdimen12\font=\__um_get_fontparam:nn {44} {FractionDenominatorShiftDown}\relax - \fontdimen13\font=\__um_get_fontparam:nn {21} {SuperscriptShiftUp}\relax - \fontdimen14\font=\__um_get_fontparam:nn {21} {SuperscriptShiftUp}\relax - \fontdimen15\font=\__um_get_fontparam:nn {22} {SuperscriptShiftUpCramped}\relax - \fontdimen16\font=\__um_get_fontparam:nn {18} {SubscriptShiftDown}\relax - \fontdimen17\font=\__um_get_fontparam:nn {18} {SubscriptShiftDownWithSuperscript}\relax - \fontdimen18\font=\__um_get_fontparam:nn {24} {SuperscriptBaselineDropMax}\relax - \fontdimen19\font=\__um_get_fontparam:nn {20} {SubscriptBaselineDropMin}\relax - \fontdimen20\font=0pt\relax % delim1 = FractionDelimiterDisplaySize - \fontdimen21\font=0pt\relax % delim2 = FractionDelimiterSize - \fontdimen22\font=\__um_get_fontparam:nn {15} {AxisHeight}\relax - } + \l__um_font_keyval_tl, + Scale=1.00001, + FontAdjustment = + { + \__um_copy_fontparam:nnn { 8} {43} {FractionNumeratorDisplayStyleShiftUp}\relax + \__um_copy_fontparam:nnn { 9} {42} {FractionNumeratorShiftUp}\relax + \__um_copy_fontparam:nnn {10} {32} {StackTopShiftUp}\relax + \__um_copy_fontparam:nnn {11} {45} {FractionDenominatorDisplayStyleShiftDown}\relax + \__um_copy_fontparam:nnn {12} {44} {FractionDenominatorShiftDown}\relax + \__um_copy_fontparam:nnn {13} {21} {SuperscriptShiftUp}\relax + \__um_copy_fontparam:nnn {14} {21} {SuperscriptShiftUp}\relax + \__um_copy_fontparam:nnn {15} {22} {SuperscriptShiftUpCramped}\relax + \__um_copy_fontparam:nnn {16} {18} {SubscriptShiftDown}\relax + \__um_copy_fontparam:nnn {17} {18} {SubscriptShiftDownWithSuperscript}\relax + \__um_copy_fontparam:nnn {18} {24} {SuperscriptBaselineDropMax}\relax + \__um_copy_fontparam:nnn {19} {20} {SubscriptBaselineDropMin}\relax + \__um_zero_fontparam:n {20} % delim1 = FractionDelimiterDisplaySize + \__um_zero_fontparam:n {21} % delim2 = FractionDelimiterSize + \__um_copy_fontparam:nnn {22} {15} {AxisHeight}\relax + } } {\l__um_fontname_tl} \SetSymbolFont{symbols}{\l__um_mversion_tl} @@ -1074,111 +1142,108 @@ \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} { - \SetSymbolFont{symbols}{bold} - {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} + \SetSymbolFont{symbols}{bold} + {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} } } \cs_new:Nn \__um_setup_legacy_fam_three: { \fontspec_set_family:Nxn \l__um_family_tl { - \l__um_font_keyval_tl, - Scale=0.99999, - FontAdjustment={ - \fontdimen8\font= \__um_get_fontparam:nn {48} {FractionRuleThickness}\relax - \fontdimen9\font= \__um_get_fontparam:nn {28} {UpperLimitGapMin}\relax - \fontdimen10\font=\__um_get_fontparam:nn {30} {LowerLimitGapMin}\relax - \fontdimen11\font=\__um_get_fontparam:nn {29} {UpperLimitBaselineRiseMin}\relax - \fontdimen12\font=\__um_get_fontparam:nn {31} {LowerLimitBaselineDropMin}\relax - \fontdimen13\font=0pt\relax - } - } {\l__um_fontname_tl} + \l__um_font_keyval_tl, + Scale=0.99999, + FontAdjustment = { + \__um_copy_fontparam:nnn { 8} {48} {FractionRuleThickness}\relax + \__um_copy_fontparam:nnn { 9} {28} {UpperLimitGapMin}\relax + \__um_copy_fontparam:nnn {10} {30} {LowerLimitGapMin}\relax + \__um_copy_fontparam:nnn {11} {29} {UpperLimitBaselineRiseMin}\relax + \__um_copy_fontparam:nnn {12} {31} {LowerLimitBaselineDropMin}\relax + \__um_zero_fontparam:n {13} + } + } {\l__um_fontname_tl} \SetSymbolFont{largesymbols}{\l__um_mversion_tl} {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault} \str_if_eq_x:nnT {\l__um_mversion_tl} {normal} { - \SetSymbolFont{largesymbols}{bold} - {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} + \SetSymbolFont{largesymbols}{bold} + {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault} } } -\cs_new:Nn \__um_get_fontparam:nn - { - \the\fontdimen#1\l__um_font\relax - } \cs_new:Nn \__um_fontspec_select_font: - { - \tl_set:Nx \l__um_font_keyval_tl { - BoldItalicFont = {}, ItalicFont = {}, - Script = Math, - SizeFeatures = - { - { - Size = \tf@size- - } , - { - Size = \sf@size-\tf@size , - Font = \l__um_script_font_tl , - \l__um_script_features_tl - } , - { - Size = -\sf@size , - Font = \l__um_sscript_font_tl , - \l__um_sscript_features_tl - } - } , - \l__um_unknown_keys_clist - } + { + \tl_set:Nx \l__um_font_keyval_tl { + BoldItalicFont = {}, ItalicFont = {}, + Script = Math, + SizeFeatures = + { + { + Size = \tf@size- + } , + { + Size = \sf@size-\tf@size , + Font = \l__um_script_font_tl , + \l__um_script_features_tl + } , + { + Size = -\sf@size , + Font = \l__um_sscript_font_tl , + \l__um_sscript_features_tl + } + } , + \l__um_unknown_keys_clist + } + \fontspec_set_fontface:NNxn \l__um_font \l__um_family_tl {\l__um_font_keyval_tl} {\l__um_fontname_tl} - \group_begin: - \fontfamily{\l__um_family_tl}\selectfont - \fontspec_if_script:nF {math} {\bool_gset_false:N \l__um_ot_math_bool} - \group_end: - } + \group_begin: + \fontfamily{\l__um_family_tl}\selectfont + \fontspec_if_script:nF {math} {\bool_gset_false:N \l__um_ot_math_bool} + \group_end: + } \cs_set:Nn \__um_process_symbol_noparse:nnn - { - \__um_set_mathsymbol:nNNn {\__um_symfont_tl} #2 #3 {#1} - } + { + \__um_set_mathsymbol:nNNn {\l__um_symfont_label_tl} #2 #3 {#1} + } \cs_set:Nn \__um_process_symbol_parse:nnn - { - \__um_if_char_spec:nNNT {#1} {#2} {#3} - { - \__um_process_symbol_noparse:nnn {#1} {#2} {#3} - } - } + { + \__um_if_char_spec:nNNT {#1} {#2} {#3} + { + \__um_process_symbol_noparse:nnn {#1} {#2} {#3} + } + } \cs_new:Npn \__um_remap_symbols: - { - \__um_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus - \__um_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk" - \bool_if:NF \g__um_literal_colon_bool - { - \__um_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel) - } - } + { + \__um_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus + \__um_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk" + \bool_if:NF \g__um_literal_colon_bool + { + \__um_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel) + } + } \cs_new:Nn \__um_remap_symbol_parse:nnn - { - \__um_if_char_spec:nNNT {#3} {\@nil} {#2} - { \__um_remap_symbol_noparse:nnn {#1} {#2} {#3} } - } + { + \__um_if_char_spec:nNNT {#3} {\@nil} {#2} + { \__um_remap_symbol_noparse:nnn {#1} {#2} {#3} } + } \cs_new:Nn \__um_remap_symbol_noparse:nnn - { - \clist_map_inline:nn {#1} - { \__um_set_mathcode:nnnn {##1} {#2} {\__um_symfont_tl} {#3} } - } + { + \clist_map_inline:nn {#1} + { \__um_set_mathcode:nnnn {##1} {#2} {\l__um_symfont_label_tl} {#3} } + } \cs_new:Npn \__um_setup_mathactives: - { - \__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord - \__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord - \__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord - \__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord - \__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord - \__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord - \__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord - \__um_make_mathactive:nNN {`\'} \mathstraightquote \mathord - \__um_make_mathactive:nNN {`\`} \mathbacktick \mathord - } + { + \__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord + \__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord + \__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord + \__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord + \__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord + \__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord + \__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord + \__um_make_mathactive:nNN {`\'} \mathstraightquote \mathord + \__um_make_mathactive:nNN {`\`} \mathbacktick \mathord + } \cs_new:Nn \__um_make_mathactive_parse:nNN { \__um_if_char_spec:nNNT {#1} #2 #3 @@ -1186,79 +1251,73 @@ } \cs_new:Nn \__um_make_mathactive_noparse:nNN { - \__um_set_mathchar:NNnn #2 #3 {\__um_symfont_tl} {#1} + \__um_set_mathchar:NNnn #2 #3 {\l__um_symfont_label_tl} {#1} \__um_char_gmake_mathactive:n {#1} } \cs_new:Nn \__um_assign_delcode_noparse:nn - { - \__um_set_delcode:nnn \__um_symfont_tl {#1} {#2} - } + { + \__um_set_delcode:nnn \l__um_symfont_label_tl {#1} {#2} + } \cs_new:Nn \__um_assign_delcode_parse:nn - { - \__um_if_char_spec:nNNT {#2} {\@nil} {\@nil} - { - \__um_assign_delcode_noparse:nn {#1} {#2} - } - } + { + \__um_if_char_spec:nNNT {#2} {\@nil} {\@nil} + { + \__um_assign_delcode_noparse:nn {#1} {#2} + } + } \cs_new:Nn \__um_assign_delcode:n { \__um_assign_delcode:nn {#1} {#1} } \cs_new:Npn \__um_setup_delcodes: - { - % ensure \left. and \right. work: - \__um_set_delcode:nnn \__um_symfont_tl {`\.} {\c_zero} - % this is forcefully done to fix a bug -- indicates a larger problem! - - \__um_assign_delcode:nn {`\/} {\g__um_slash_delimiter_usv} - \__um_assign_delcode:nn {"2044} {\g__um_slash_delimiter_usv} % fracslash - \__um_assign_delcode:nn {"2215} {\g__um_slash_delimiter_usv} % divslash - \__um_assign_delcode:n {"005C} % backslash - \__um_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation - \__um_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation - \__um_assign_delcode:n {"2191} % up arrow - \__um_assign_delcode:n {"2193} % down arrow - \__um_assign_delcode:n {"2195} % updown arrow - \__um_assign_delcode:n {"219F} % up arrow twohead - \__um_assign_delcode:n {"21A1} % down arrow twohead - \__um_assign_delcode:n {"21A5} % up arrow from bar - \__um_assign_delcode:n {"21A7} % down arrow from bar - \__um_assign_delcode:n {"21A8} % updown arrow from bar - \__um_assign_delcode:n {"21BE} % up harpoon right - \__um_assign_delcode:n {"21BF} % up harpoon left - \__um_assign_delcode:n {"21C2} % down harpoon right - \__um_assign_delcode:n {"21C3} % down harpoon left - \__um_assign_delcode:n {"21C5} % arrows up down - \__um_assign_delcode:n {"21F5} % arrows down up - \__um_assign_delcode:n {"21C8} % arrows up up - \__um_assign_delcode:n {"21CA} % arrows down down - \__um_assign_delcode:n {"21D1} % double up arrow - \__um_assign_delcode:n {"21D3} % double down arrow - \__um_assign_delcode:n {"21D5} % double updown arrow - \__um_assign_delcode:n {"21DE} % up arrow double stroke - \__um_assign_delcode:n {"21DF} % down arrow double stroke - \__um_assign_delcode:n {"21E1} % up arrow dashed - \__um_assign_delcode:n {"21E3} % down arrow dashed - \__um_assign_delcode:n {"21E7} % up white arrow - \__um_assign_delcode:n {"21E9} % down white arrow - \__um_assign_delcode:n {"21EA} % up white arrow from bar - \__um_assign_delcode:n {"21F3} % updown white arrow - } + { + % ensure \left. and \right. work: + \__um_set_delcode:nnn \l__um_symfont_label_tl {`\.} {\c_zero} + % this is forcefully done to fix a bug -- indicates a larger problem! + + \__um_assign_delcode:nn {`\/} {\g__um_slash_delimiter_usv} + \__um_assign_delcode:nn {"2044} {\g__um_slash_delimiter_usv} % fracslash + \__um_assign_delcode:nn {"2215} {\g__um_slash_delimiter_usv} % divslash + \__um_assign_delcode:n {"005C} % backslash + \__um_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation + \__um_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation + \__um_assign_delcode:n {"2191} % up arrow + \__um_assign_delcode:n {"2193} % down arrow + \__um_assign_delcode:n {"2195} % updown arrow + \__um_assign_delcode:n {"219F} % up arrow twohead + \__um_assign_delcode:n {"21A1} % down arrow twohead + \__um_assign_delcode:n {"21A5} % up arrow from bar + \__um_assign_delcode:n {"21A7} % down arrow from bar + \__um_assign_delcode:n {"21A8} % updown arrow from bar + \__um_assign_delcode:n {"21BE} % up harpoon right + \__um_assign_delcode:n {"21BF} % up harpoon left + \__um_assign_delcode:n {"21C2} % down harpoon right + \__um_assign_delcode:n {"21C3} % down harpoon left + \__um_assign_delcode:n {"21C5} % arrows up down + \__um_assign_delcode:n {"21F5} % arrows down up + \__um_assign_delcode:n {"21C8} % arrows up up + \__um_assign_delcode:n {"21CA} % arrows down down + \__um_assign_delcode:n {"21D1} % double up arrow + \__um_assign_delcode:n {"21D3} % double down arrow + \__um_assign_delcode:n {"21D5} % double updown arrow + \__um_assign_delcode:n {"21DE} % up arrow double stroke + \__um_assign_delcode:n {"21DF} % down arrow double stroke + \__um_assign_delcode:n {"21E1} % up arrow dashed + \__um_assign_delcode:n {"21E3} % down arrow dashed + \__um_assign_delcode:n {"21E7} % up white arrow + \__um_assign_delcode:n {"21E9} % down white arrow + \__um_assign_delcode:n {"21EA} % up white arrow from bar + \__um_assign_delcode:n {"21F3} % updown white arrow + } \tl_set:Nn \l__um_nolimits_tl - { - \int\iint\iiint\iiiint\oint\oiint\oiiint - \intclockwise\varointclockwise\ointctrclockwise\sumint - \intbar\intBar\fint\cirfnint\awint\rppolint - \scpolint\npolint\pointint\sqint\intlarhk\intx - \intcap\intcup\upint\lowint - } -\DeclareDocumentCommand \addnolimits {m} - { - \tl_put_right:Nn \l__um_nolimits_tl {#1} - } -\DeclareDocumentCommand \removenolimits {m} - { - \tl_remove_all:Nn \l__um_nolimits_tl {#1} - } + { + \int\iint\iiint\iiiint\oint\oiint\oiiint + \intclockwise\varointclockwise\ointctrclockwise\sumint + \intbar\intBar\fint\cirfnint\awint\rppolint + \scpolint\npolint\pointint\sqint\intlarhk\intx + \intcap\intcup\upint\lowint + } \tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision} +%%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \keys_define:nn {unicode-math} { version .code:n = @@ -1280,7 +1339,7 @@ { \bool_set_false:N \l__um_init_bool \int_incr:N \g__um_fam_int - \tl_set:Nx \__um_symfont_tl {__um_fam\int_use:N\g__um_fam_int} + \tl_set:Nx \l__um_symfont_label_tl {__um_fam\int_use:N\g__um_fam_int} \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_parse:nnn \cs_set_eq:NN \__um_set_mathalphabet_char:Nnn \__um_mathmap_parse:Nnn \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_parse:nnn @@ -1389,6 +1448,8 @@ } } } } +%%^^A%% um-code-fontparam.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new_protected_nopar:Nn \__um_new_cramped_style:N { \quark_new:N #1 } \__um_new_cramped_style:N \crampeddisplaystyle @@ -1521,6 +1582,8 @@ \fi } +%%^^A%% um-code-mathmap.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_set:Npn \use@mathgroup #1 #2 { \mode_if_math:T % <- not sure if this is really necessary since we've just checked for mmode and raised an error if not! @@ -1701,7 +1764,7 @@ \clist_map_break: } { - \__um_glyph_if_exist:nT { \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} } + \__um_glyph_if_exist:NnT \l__um_font { \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} } { \__um_maybe_init_alphabet:n \l__um_style_tl \clist_map_break: @@ -1721,7 +1784,7 @@ \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl} } { - \__um_glyph_if_exist:nTF { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} } + \__um_glyph_if_exist:NnTF \l__um_font { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} } { \__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)} \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl} @@ -1744,7 +1807,7 @@ } } \cs_new:Nn \__um_map_char_noparse:nn - { \__um_set_mathcode:nnnn {#1}{\mathalpha}{\__um_symfont_tl}{#2} } + { \__um_set_mathcode:nnnn {#1}{\mathalpha}{\l__um_symfont_label_tl}{#2} } \cs_new:Nn \__um_map_char_parse:nn { \__um_if_char_spec:nNNT {#1} {\@nil} {\mathalpha} @@ -1833,7 +1896,7 @@ { \tl_put_right:cx {__um_switchto_#1:} { - \__um_set_mathcode:nnnn {##1} {\mathalpha} {\__um_symfont_tl} {#3} + \__um_set_mathcode:nnnn {##1} {\mathalpha} {\l__um_symfont_label_tl} {#3} } } } @@ -1907,91 +1970,7 @@ } } -\keys_define:nn {__um_mathface} - { - version .code:n = - { \tl_set:Nn \l__um_mversion_tl {#1} } - } -\DeclareDocumentCommand \setmathfontface { m O{} m O{} } - { - \tl_clear:N \l__um_mversion_tl - - \keys_set_known:nnN {__um_mathface} {#2,#4} \l__um_keyval_clist - \exp_args:Nnx \fontspec_set_family:Nxn \l__um_tmpa_tl - { ItalicFont={}, BoldFont={}, \exp_not:V \l__um_keyval_clist } {#3} - - \tl_if_empty:NT \l__um_mversion_tl - { - \tl_set:Nn \l__um_mversion_tl {normal} - \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} - } - \SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault} - - % integrate with fontspec's \setmathrm etc: - \tl_case:Nn #1 - { - \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } - \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } - \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } - } - } -\@onlypreamble \setmathfontface -\DeclareDocumentCommand \setoperatorfont {m} - { \tl_set:Nn \g__um_operator_mathfont_tl {#1} } -\setoperatorfont{\mathrm} -\cs_generate_variant:Nn \tl_if_eq:nnT {o} -\cs_set:Nn \__fontspec_setmainfont_hook:nn - { - \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2} - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault - \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } - } - -\cs_set:Nn \__fontspec_setsansfont_hook:nn - { - \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2} - \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault - \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } - } - -\cs_set:Nn \__fontspec_setmonofont_hook:nn - { - \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2} - \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault - \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } - } -\cs_set:Nn \__fontspec_setmathrm_hook:nn - { - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault - \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setboldmathrm_hook:nn - { - \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\updefault - \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\bfdefault\updefault - \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault - } -\cs_set:Nn \__fontspec_setmathsf_hook:nn - { - \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault - \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setmathtt_hook:nn - { - \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault - \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } +%%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> \AtBeginDocument{\__um_resolve_greek:} \cs_new:Npn \__um_resolve_greek: @@ -2170,6 +2149,8 @@ \cs_gset:Npn \nforksnot { \forks } } +%%^^A%% um-code-primes.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new:Nn \__um_arg_i_before_egroup:n {#1\egroup} \cs_new:Nn \__um_superscript:n { @@ -2190,17 +2171,17 @@ { {1} { \__um_superscript:n {#1} } {2} { - \__um_glyph_if_exist:nTF {"2033} + \__um_glyph_if_exist:NnTF \l__um_font {"2033} { \__um_superscript:n {\__um_prime_double_mchar} } { \__um_nprimes:Nn #1 {#2} } } {3} { - \__um_glyph_if_exist:nTF {"2034} + \__um_glyph_if_exist:NnTF \l__um_font {"2034} { \__um_superscript:n {\__um_prime_triple_mchar} } { \__um_nprimes:Nn #1 {#2} } } {4} { - \__um_glyph_if_exist:nTF {"2057} + \__um_glyph_if_exist:NnTF \l__um_font {"2057} { \__um_superscript:n {\__um_prime_quad_mchar} } { \__um_nprimes:Nn #1 {#2} } } @@ -2215,12 +2196,12 @@ { {1} { \__um_superscript:n {#1} } {2} { - \__um_glyph_if_exist:nTF {"2036} + \__um_glyph_if_exist:NnTF \l__um_font {"2036} { \__um_superscript:n {\__um_backprime_double_mchar} } { \__um_nprimes:Nn #1 {#2} } } {3} { - \__um_glyph_if_exist:nTF {"2037} + \__um_glyph_if_exist:NnTF \l__um_font {"2037} { \__um_superscript:n {\__um_backprime_triple_mchar} } { \__um_nprimes:Nn #1 {#2} } } @@ -2451,6 +2432,8 @@ } \group_end: +%%^^A%% um-code-sscript.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \group_begin: \cs_new:Nn \__um_setup_active_superscript:nn { @@ -2573,6 +2556,9 @@ } { \group_align_safe_end: #2 #3 } } + +%%^^A%% um-code-compat.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnnn { \cs_if_exist:NT #1 @@ -2909,6 +2895,9 @@ \RenewDocumentCommand \equalscolon { } { \eqcolon } \RenewDocumentCommand \coloncolonequals { } { \Coloneq } } + +%%^^A%% um-code-alphabets.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \__um_new_alphabet_config:nnn {up} {num} { \__um_set_normal_numbers:nn {up} {#1} @@ -3733,3 +3722,4 @@ } } } + diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty index 16d02e7423c..040e09324d3 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty @@ -4,17 +4,27 @@ %% %% The original source files were: %% -%% unicode-math.dtx (with options: `preamble,load') -%% -%% Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> -%% Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> -%% Copyright 2012-2015 Khaled Hosny <khaledhosny@eglug.org> -%% +%% unicode-math.dtx (with options: `base') +%% um-code-base.dtx (with options: `base') +%% ------------------------------------------------ +%% The UNICODE-MATH package <wspr.io/unicode-math> +%% ------------------------------------------------ %% This package is free software and may be redistributed and/or modified under %% the conditions of the LaTeX Project Public License, version 1.3c or higher %% (your choice): <http://www.latex-project.org/lppl/>. -%% -%% This work is "maintained" by Will Robertson. +%% ------------------------------------------------ +%% Copyright 2006-2017 Will Robertson, LPPL "maintainer" +%% Copyright 2010-2017 Philipp Stephani +%% Copyright 2011-2017 Joseph Wright +%% Copyright 2012-2015 Khaled Hosny +%% ------------------------------------------------ +%%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + +\ProvidesPackage{unicode-math} + [2017/11/18 v0.8i Unicode maths in XeLaTeX and LuaLaTeX] + +%%^^A%% um-code-base.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> + \ifdefined\XeTeXversion \ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in% \PackageError{unicode-math}{% @@ -44,3 +54,4 @@ \sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } \sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } \ExplSyntaxOff + diff --git a/Master/tlpkg/tlpsrc/ttfutils.tlpsrc b/Master/tlpkg/tlpsrc/ttfutils.tlpsrc index d892e21629d..51d07930724 100644 --- a/Master/tlpkg/tlpsrc/ttfutils.tlpsrc +++ b/Master/tlpkg/tlpsrc/ttfutils.tlpsrc @@ -1,4 +1,8 @@ category TLCore +shortdesc convert TrueType to TFM and PK fonts +longdesc Utilities: ttf2afm ttf2pk ttf2tfm ttfdump. FreeType is the +longdesc underlying library. + runpattern d texmf-dist/fonts/enc/ttf2pk/base runpattern d texmf-dist/fonts/sfd/ttf2pk runpattern d texmf-dist/ttf2pk diff --git a/Master/tlpkg/tlpsrc/xetexconfig.tlpsrc b/Master/tlpkg/tlpsrc/xetexconfig.tlpsrc index 3bb1fc054dd..14aea3fc92e 100644 --- a/Master/tlpkg/tlpsrc/xetexconfig.tlpsrc +++ b/Master/tlpkg/tlpsrc/xetexconfig.tlpsrc @@ -1,2 +1 @@ -shortdesc configuration files for XeTeX -longdesc unicode-letters, and special crop.cfg and hyperref.cfg for XeTeX. +shortdesc crop.cfg for XeLaTeX diff --git a/Master/tlpkg/tlpsrc/xmltexconfig.tlpsrc b/Master/tlpkg/tlpsrc/xmltexconfig.tlpsrc index e69de29bb2d..57e13344aed 100644 --- a/Master/tlpkg/tlpsrc/xmltexconfig.tlpsrc +++ b/Master/tlpkg/tlpsrc/xmltexconfig.tlpsrc @@ -0,0 +1 @@ +shortdesc configuration files for xmltex and pdfxmltex |