-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunimath-fixes.sty
49 lines (40 loc) · 1.67 KB
/
unimath-fixes.sty
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
% Copyright (C) 2010 by Philipp Stephani <[email protected]>
%
% This file may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX version
% 2009/09/24 or later.
\RequirePackage{expl3}
\ProvidesExplPackage{unimath-fixes}{2010/10/04}{0.1}%
{Fixes several packages for use with OpenType math}
% LuaTeX doesn't use fontdimens
\RequirePackage{ifxetex}
\RequireXeTeX
\RequirePackage{etoolbox}
\RequirePackage{unicode-math}
\msg_new:nnn { unimath-fixes } { patch-fail } { Could~ not~ patch~ command~ #1 }
\cs_new_protected_nopar:Nn \umfix_patch:Nnn {
\patchcmd { #1 } { #2 } { #3 } { } {
\msg_error:nnx { unimath-fixes } { patch-fail } { \token_to_str:N #1 }
}
}
\cs_new_nopar:Nn \umfix_fontdimen:n {
\tex_fontdimen:D \intexpr_eval:n { #1 } \tex_scriptfont:D \c_two
}
% \@ifpackageloaded {blkarray} {
% \umfix_patch:Nnn \BA@place { \fontdimen 22 } { \fontdimen 15 }
% \umfix_patch:Nnn \BA@place { \fontdimen 22 } { \fontdimen 15 }
% } {}
% \@ifpackageloaded {bytefield} {
% \umfix_patch:Nnn \store@rcurly { \fontdimen 22 } { \fontdimen 15 }
% \umfix_patch:Nnn \store@rcurly { \fontdimen 22 } { \fontdimen 15 }
% \umfix_patch:Nnn \store@rcurly { \fontdimen 22 } { \fontdimen 15 }
% \umfix_patch:Nnn \store@lcurly { \fontdimen 22 } { \fontdimen 15 }
% \umfix_patch:Nnn \store@lcurly { \fontdimen 22 } { \fontdimen 15 }
% \umfix_patch:Nnn \store@lcurly { \fontdimen 22 } { \fontdimen 15 }
% }
\endinput