-
Notifications
You must be signed in to change notification settings - Fork 29
/
um-code-ui.dtx
101 lines (98 loc) · 2.77 KB
/
um-code-ui.dtx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
%%^^A%% um-code-ui.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
%%^^A%% The xparse user interface top-level definitions.
% \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_gset: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-2019 Will Robertson, LPPL "maintainer"
% Copyright 2010-2017 Philipp Stephani
% Copyright 2011-2017 Joseph Wright
% Copyright 2012-2015 Khaled Hosny
% ------------------------------------------------
%
% ©/