summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-27 23:10:42 +0000
committerKarl Berry <karl@freefriends.org>2012-10-27 23:10:42 +0000
commit3c45700f44de3ee95c3e431a5e8df132b603c55c (patch)
tree806df9c279f42ee2261aed0a5b44f3f80456cdc4 /Master/texmf-dist/tex/lualatex
parent33393e5081185fef341e7905060aa5a2a9ad8bf6 (diff)
lualatex-match (27oct12)
git-svn-id: svn://tug.org/texlive/trunk@28101 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty100
1 files changed, 63 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
index d0312d0a3f0..3620b363986 100644
--- a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
+++ b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
@@ -22,18 +22,18 @@
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\RequirePackage{expl3}[2012/08/14]
-\ProvidesExplPackage{lualatex-math}{2012/08/23}{0.3c}%
+\ProvidesExplPackage{lualatex-math}{2012/10/13}{1.1}%
{Patches for mathematics typesetting with LuaLaTeX}
\RequirePackage { etoolbox } [ 2007/10/08 ]
\RequirePackage { luatexbase } [ 2010/05/27 ]
\RequirePackage { filehook } [ 2011/03/09 ]
\RequireLuaModule { lualatex-math } [ 2011/05/05 ]
-\cs_new_nopar:Npn \lltxmath_restore_catcode:N #1 {
+\cs_new_nopar:Npn \__lltxmath_restore_catcode:N #1 {
\char_set_catcode:nn { \int_eval:n { `#1 } }
{ \char_value_catcode:n { `#1 } }
}
\exp_args:Nx \AtEndOfPackage {
- \lltxmath_restore_catcode:N \$
+ \__lltxmath_restore_catcode:N \$
}
\char_set_catcode_math_toggle:N \$
\msg_new:nnn { lualatex-math } { luatex-required } {
@@ -66,23 +66,23 @@
\msg_error:nn { lualatex-math } { luatex-required }
\endinput
}
-\cs_new_eq:NN \lltxmath_temp:w \prg_do_nothing:
+\cs_new_eq:NN \__lltxmath_temp:w \prg_do_nothing:
\luatexbase@ensure@primitive { Umathcode }
\luatexbase@ensure@primitive { Umathcodenum }
\luatexbase@ensure@primitive { Umathchardef }
-\cs_new_protected_nopar:Npn \lltxmath_assert_eq:NN #1 #2 {
+\cs_new_protected_nopar:Npn \__lltxmath_assert_eq:NN #1 #2 {
\cs_if_eq:NNF #1 #2 {
\msg_error:nnxxxx { lualatex-math } { different-meanings }
{ \token_to_str:N #1 } { \token_to_meaning:N #1 }
{ \token_to_str:N #2 } { \token_to_meaning:N #2 }
}
}
-\cs_new_protected_nopar:Npn \lltxmath_patch:NNnnn #1 #2 #3 #4 #5 {
+\cs_new_protected_nopar:Npn \__lltxmath_patch:NNnnn #1 #2 #3 #4 #5 {
\cs_if_exist:NT #1 {
\token_if_macro:NTF #1 {
\group_begin:
- #2 \lltxmath_temp:w #3 { #4 }
- \cs_if_eq:NNTF #1 \lltxmath_temp:w {
+ #2 \__lltxmath_temp:w #3 { #4 }
+ \cs_if_eq:NNTF #1 \__lltxmath_temp:w {
\msg_info:nnx { lualatex-math } { patch-macro }
{ \token_to_str:N #1 }
\group_end:
@@ -90,7 +90,7 @@
} {
\msg_warning:nnxxx { lualatex-math } { wrong-meaning }
{ \token_to_str:N #1 } { \token_to_meaning:N #1 }
- { \token_to_meaning:N \lltxmath_temp:w }
+ { \token_to_meaning:N \__lltxmath_temp:w }
\group_end:
}
} {
@@ -99,16 +99,16 @@
}
}
}
-\cs_generate_variant:Nn \lltxmath_patch:NNnnn { c }
-\cs_new_protected_nopar:Npn \lltxmath_set_mathchar:NN #1 #2 {
+\cs_generate_variant:Nn \__lltxmath_patch:NNnnn { c }
+\cs_new_protected_nopar:Npn \__lltxmath_set_mathchar:NN #1 #2 {
\luatexUmathchardef #1
\lua_now_x:n {
lualatex.math.print_class_fam_slot( \int_eval:n { `#2 } )
}
\scan_stop:
}
-\lltxmath_assert_eq:NN \newfam \new@mathgroup
-\lltxmath_patch:NNnnn \new@mathgroup \cs_set_nopar:Npn { } {
+\__lltxmath_assert_eq:NN \newfam \new@mathgroup
+\__lltxmath_patch:NNnnn \new@mathgroup \cs_set_nopar:Npn { } {
\alloc@ 8 \mathgroup \chardef \sixt@@n
} {
\alloc@ 8 \mathgroup \chardef \c_two_hundred_fifty_six
@@ -117,7 +117,7 @@
\luatexbase@ensure@primitive { Ustack }
\AtEndPreamble {
\@ifpackageloaded { amsmath } { } {
- \lltxmath_patch:NNnnn \frac \cs_set_nopar:Npn { #1 #2 } {
+ \__lltxmath_patch:NNnnn \frac \cs_set_nopar:Npn { #1 #2 } {
{
\begingroup #1 \endgroup \over #2
}
@@ -134,26 +134,26 @@
\luatexbase@ensure@primitive { Umathstacknumup }
\luatexbase@ensure@primitive { Umathstackdenomdown }
\luatexbase@ensure@primitive { Umathstackvgap }
-\int_const:Nn \c_lltxmath_std_minus_mathcode_int { "2200 }
-\int_const:Nn \c_lltxmath_std_equal_mathcode_int { "303D }
-\cs_new_nopar:Npn \lltxmath_char_dim:NN #1 #2 {
+\int_const:Nn \c__lltxmath_std_minus_mathcode_int { "2200 }
+\int_const:Nn \c__lltxmath_std_equal_mathcode_int { "303D }
+\cs_new_nopar:Npn \__lltxmath_char_dim:NN #1 #2 {
#1 \textfont
\lua_now_x:n {
lualatex.math.print_fam_slot( \int_eval:n { `#2 } )
}
}
-\chk_if_free_cs:N \l_lltxmath_minus_mathchar
-\chk_if_free_cs:N \l_lltxmath_equal_mathchar
+\chk_if_free_cs:N \l__lltxmath_minus_mathchar
+\chk_if_free_cs:N \l__lltxmath_equal_mathchar
\AtBeginOfPackageFile { amsmath } {
- \lltxmath_set_mathchar:NN \l_lltxmath_minus_mathchar \-
- \lltxmath_set_mathchar:NN \l_lltxmath_equal_mathchar \=
- \char_set_mathcode:nn { `\- } { \c_lltxmath_std_minus_mathcode_int }
- \char_set_mathcode:nn { `\= } { \c_lltxmath_std_equal_mathcode_int }
+ \__lltxmath_set_mathchar:NN \l__lltxmath_minus_mathchar \-
+ \__lltxmath_set_mathchar:NN \l__lltxmath_equal_mathchar \=
+ \char_set_mathcode:nn { `\- } { \c__lltxmath_std_minus_mathcode_int }
+ \char_set_mathcode:nn { `\= } { \c__lltxmath_std_equal_mathcode_int }
\AtEndOfPackageFile { amsmath } {
- \cs_set_eq:NN \std@minus \l_lltxmath_minus_mathchar
- \cs_set_eq:NN \std@equal \l_lltxmath_equal_mathchar
- \luatexUmathcodenum `\- \l_lltxmath_minus_mathchar
- \luatexUmathcodenum `\= \l_lltxmath_equal_mathchar
+ \cs_set_eq:NN \std@minus \l__lltxmath_minus_mathchar
+ \cs_set_eq:NN \std@equal \l__lltxmath_equal_mathchar
+ \luatexUmathcodenum `\- \l__lltxmath_minus_mathchar
+ \luatexUmathcodenum `\= \l__lltxmath_equal_mathchar
}
}
\AtEndOfPackageFile * { amsmath } {
@@ -161,10 +161,10 @@
\mathchardef \std@minus \mathcode `\- \relax
\mathchardef \std@equal \mathcode `\= \relax
} {
- \lltxmath_set_mathchar:NN \std@minus \-
- \lltxmath_set_mathchar:NN \std@equal \=
+ \__lltxmath_set_mathchar:NN \std@minus \-
+ \__lltxmath_set_mathchar:NN \std@equal \=
}
- \lltxmath_patch:NNnnn \resetMathstrut@ \cs_set_nopar:Npn { } {
+ \__lltxmath_patch:NNnnn \resetMathstrut@ \cs_set_nopar:Npn { } {
\setbox \z@ \hbox {
\mathchardef \@tempa \mathcode `\( \relax % \)
\def \@tempb ##1 "##2 ##3 { \the \textfont "##3 \char" }
@@ -174,13 +174,13 @@
\dp \Mathstrutbox@ \dp \z@
} {
\box_set_ht:Nn \Mathstrutbox@ {
- \lltxmath_char_dim:NN \fontcharht \( % \)
+ \__lltxmath_char_dim:NN \fontcharht \( % \)
}
\box_set_dp:Nn \Mathstrutbox@ {
- \lltxmath_char_dim:NN \fontchardp \)
+ \__lltxmath_char_dim:NN \fontchardp \)
}
}
- \lltxmath_patch:NNnnn \subarray \cs_set:Npn { #1 } {
+ \__lltxmath_patch:NNnnn \subarray \cs_set:Npn { #1 } {
\vcenter
\bgroup
\Let@
@@ -219,7 +219,7 @@
\hfil
\crcr
}
- \lltxmath_patch:cNnnn { frac~ } \cs_set:Npn { #1 #2 } {
+ \__lltxmath_patch:cNnnn { frac~ } \cs_set:Npn { #1 #2 } {
{
\begingroup #1 \endgroup \@@over #2
}
@@ -228,7 +228,7 @@
\luatexUstack { \group_begin: #1 \group_end: \@@over #2 }
}
}
- \lltxmath_patch:NNnnn \@genfrac \cs_set_nopar:Npn {
+ \__lltxmath_patch:NNnnn \@genfrac \cs_set_nopar:Npn {
#1 #2 #3 #4 #5
} {
{
@@ -244,12 +244,38 @@
}
}
}
+\group_begin:
+\char_set_catcode_other:N \"
+\AtEndOfPackageFile * { amsopn } {
+ \__lltxmath_patch:NNnnn \newmcodes@ \cs_gset_nopar:Npn { } {
+ \mathcode `\' 39
+ \mathcode `\* 42
+ \mathcode `\. "613A
+ \ifnum \mathcode `\- = 45 ~ \else
+ \mathchardef \std@minus \mathcode `\- \relax
+ \fi
+ \mathcode `\- 45
+ \mathcode `\/ 47
+ \mathcode `\: "603A \relax
+ } {
+ \char_set_mathcode:nn { `\' } { 39 }
+ \char_set_mathcode:nn { `\* } { 42 }
+ \char_set_mathcode:nn { `\. } { "613A }
+ \int_compare:nNnF { \luatexUmathcodenum `\- } = { 45 } {
+ \__lltxmath_set_mathchar:NN \std@minus \-
+ }
+ \char_set_mathcode:nn { `\- } { 45 }
+ \char_set_mathcode:nn { `\/ } { 47 }
+ \char_set_mathcode:nn { `\: } { "603A }
+ }
+}
+\group_end:
\luatexbase@ensure@primitive { crampeddisplaystyle }
\luatexbase@ensure@primitive { crampedtextstyle }
\luatexbase@ensure@primitive { crampedscriptstyle }
\luatexbase@ensure@primitive { crampedscriptscriptstyle }
\AtEndOfPackageFile * { mathtools } {
- \lltxmath_patch:NNnnn \MT_cramped_internal:Nn
+ \__lltxmath_patch:NNnnn \MT_cramped_internal:Nn
\cs_set_nopar:Npn { #1 #2 } {
\sbox \z@ {
$
@@ -288,7 +314,7 @@
\tl_replace_once:Nnn \@begindocumenthook {
\mathchardef \mathcomma \mathcode `\,
} {
- \lltxmath_set_mathchar:NN \mathcomma \,
+ \__lltxmath_set_mathchar:NN \mathcomma \,
}
}
\endinput