diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-07 23:46:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-07 23:46:58 +0000 |
commit | f15ab98da224024bdcb9d2b70a263c7f6143a91b (patch) | |
tree | 8368ce018ac0869d5d556cc47b29de4770ad3e62 /Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx | |
parent | 6c0d576e1d48613f952b56e99e4dd9d59e41a265 (diff) |
unicode-math (7jan18)
git-svn-id: svn://tug.org/texlive/trunk@46240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx index 54021c48f36..18006feaddb 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx @@ -1,6 +1,7 @@ %%^^A%% um-code-fontparam.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> +%%^^A%% Cross-platform interface for font parameters -% \section{Common interface for font parameters} +% \section{Cross-platform interface for font parameters} % % \begin{macrocode} %<*package> @@ -134,18 +135,18 @@ % \begin{macrocode} \cs_new_protected_nopar:Nn \@@_font_param:nnnnn %<*XE> -{ - \@@_font_param_aux:ccnnnn { @@_ #1 :N } { @@_set_ #1 :Nn } - { #2 } { #3 } { #4 } { #5 } -} + { + \@@_font_param_aux:ccnnnn { @@_ #1 :N } { @@_set_ #1 :Nn } + { #2 } { #3 } { #4 } { #5 } + } %</XE> %<*LU> -{ - \tl_set:Nn \l_@@_tmpa_tl { #1 } - \tl_remove_all:Nn \l_@@_tmpa_tl { _ } - \@@_font_param_aux:ccc { @@_ #1 :N } { @@_set_ #1 :Nn } - { Umath \l_@@_tmpa_tl } -} + { + \tl_set:Nn \l_@@_tmpa_tl { #1 } + \tl_remove_all:Nn \l_@@_tmpa_tl { _ } + \@@_font_param_aux:ccc { @@_ #1 :N } { @@_set_ #1 :Nn } + { Umath \l_@@_tmpa_tl } + } %</LU> % \end{macrocode} % \end{macro} @@ -159,9 +160,9 @@ % The \XeTeX\ font dimension numbers must be integer constants. % \begin{macrocode} \cs_new_protected_nopar:Nn \@@_font_param:nnn - { - \@@_font_param:nnnnn { #1 } { #2 } { #2 } { #3 } { #3 } - } + { + \@@_font_param:nnnnn { #1 } { #2 } { #2 } { #3 } { #3 } + } % \end{macrocode} % \end{macro} % @@ -173,9 +174,9 @@ % The \XeTeX\ font dimension number must be an integer constant. % \begin{macrocode} \cs_new_protected_nopar:Nn \@@_font_param:nn - { - \@@_font_param:nnnnn { #1 } { #2 } { #2 } { #2 } { #2 } - } + { + \@@_font_param:nnnnn { #1 } { #2 } { #2 } { #2 } { #2 } + } % \end{macrocode} % \end{macro} % @@ -198,13 +199,13 @@ \cs_new_protected_nopar:Nn \@@_font_param_aux:NNnnnn { \cs_new_nopar:Npn #1 ##1 - { - \@@_font_dimen:Nnnnn ##1 { #3 } { #4 } { #5 } { #6 } - } + { + \@@_font_dimen:Nnnnn ##1 { #3 } { #4 } { #5 } { #6 } + } \cs_new_protected_nopar:Npn #2 ##1 ##2 - { - #1 ##1 \dim_eval:n { ##2 } - } + { + #1 ##1 \dim_eval:n { ##2 } + } } \cs_generate_variant:Nn \@@_font_param_aux:NNnnnn { cc } %</XE> @@ -212,13 +213,13 @@ \cs_new_protected_nopar:Nn \@@_font_param_aux:NNN { \cs_new_nopar:Npn #1 ##1 - { - #3 ##1 - } + { + #3 ##1 + } \cs_new_protected_nopar:Npn #2 ##1 ##2 - { - #3 ##1 \dim_eval:n { ##2 } - } + { + #3 ##1 \dim_eval:n { ##2 } + } } \cs_generate_variant:Nn \@@_font_param_aux:NNN { ccc } %</LU> @@ -277,10 +278,8 @@ % % \subsection{Historical commands} % -% TODO: maybe no longer necessary? -% -% \begin{macro}{\@@_fontdimen_to_percent:nn} -% \begin{macro}{\@@_fontdimen_to_scale:nn} +% \begin{macro}{\@@_fontdimen_to_percent:nN} +% \begin{macro}{\@@_fontdimen_to_scale:nN} % \darg{Font dimen number} % \darg{Font `variable'} % \cmd\fontdimen s |10|, |11|, and |65| aren't actually dimensions, they're percentage values given in units of |sp|. @@ -288,36 +287,37 @@ % \cs{@@_fontdimen_to_scale:nn} returns a dimension correspond to the current % font size relative proportion based on that percentage. % \begin{macrocode} -\cs_new:Nn \@@_fontdimen_to_percent:nn - { - \fp_eval:n { \dim_to_decimal:n { \fontdimen #1 #2 } * 65536 / 100 } - } -\cs_new:Nn \@@_fontdimen_to_scale:nn - { - \fp_eval:n {\@@_fontdimen_to_percent:nn {#1} {#2} * \f@size } pt - } +\cs_new:Nn \@@_fontdimen_to_percent:nN + { + \fp_eval:n { \dim_to_decimal:n { \fontdimen #1 #2 } * 65536 / 100 } + } +\cs_new:Nn \@@_fontdimen_to_scale:nN + { + \fp_eval:n { \@@_fontdimen_to_percent:nN {#1} #2 * \f@size } pt + } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\@@_mathstyle_scale:Nnn} +% \begin{macro}{\@@_mathstyle_scale:NnnN} % \darg{A math style (\cs{scriptstyle}, say)} % \darg{Macro that takes a non-delimited length argument (like \cmd\kern)} % \darg{Length control sequence to be scaled according to the math style} +% \darg{Math font face to use for the lookups} % This macro is used to scale the lengths reported by \cmd\fontdimen\ according to the scale factor for script- and scriptscript-size objects. % \begin{macrocode} -\cs_new:Nn \@@_mathstyle_scale:Nnn - { - \ifx#1\scriptstyle - #2 \@@_fontdimen_to_percent:nn {10} \l_@@_font #3 - \else - \ifx#1\scriptscriptstyle - #2 \@@_fontdimen_to_percent:nn {11} \l_@@_font #3 +\cs_new:Nn \@@_mathstyle_scale:NnnN + { + \ifx#1\scriptstyle + #2 \@@_fontdimen_to_percent:nN {10} #4 #3 \else - #2 #3 + \ifx#1\scriptscriptstyle + #2 \@@_fontdimen_to_percent:nN {11} #4 #3 + \else + #2 #3 + \fi \fi - \fi - } + } % \end{macrocode} % \end{macro} % @@ -336,7 +336,7 @@ % 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 2006-2018 Will Robertson, LPPL "maintainer" % Copyright 2010-2017 Philipp Stephani % Copyright 2011-2017 Joseph Wright % Copyright 2012-2015 Khaled Hosny |