summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-16 21:28:44 +0000
committerKarl Berry <karl@freefriends.org>2018-06-16 21:28:44 +0000
commitb0a0f8c8c055e03575e7026041431b1fb5183300 (patch)
tree9e9585386c84a7b7e5bb630d5ab4198920b1042d /Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
parentdd5ac5fd8d23e602e90804dcc41a7c2da9ad92b6 (diff)
luatexja (16jun18)
git-svn-id: svn://tug.org/texlive/trunk@48031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty34
1 files changed, 34 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
new file mode 100644
index 00000000000..738760c1bba
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
@@ -0,0 +1,34 @@
+%
+% lltjp-siunitx.sty
+%
+
+\NeedsTeXFormat{LaTeX2e}
+
+\RequirePackage{luatexja}
+\ExplSyntaxOn
+\cs_generate_variant:Nn \tl_if_in:NnT { coT }
+\cs_new:Nn \__ltj_siunix_patch_inner:n {
+ \cs_if_exist:cT { #1_tl } {
+ \tl_if_in:coT { #1_tl } { \tex_char:D } {
+ \tl_replace_all:cnn { #1_tl } { \tex_char:D } { \ltjalchar }
+ }
+ }
+}
+\cs_new:Nn \__ltj_siunix_patch_inner_math:n {
+ \__ltj_siunix_patch_inner:n { l__siunitx_#1_math }
+ \__ltj_siunix_patch_inner:n { l__siunitx_#1_text }
+}
+\cs_new:Nn \__ltj_siunitx_patch: {
+ \AtBeginDocument {
+ \__ltj_siunix_patch_inner:n { c__siunitx_minus }
+ \__ltj_siunix_patch_inner:n { c__siunitx_mu }
+ \__ltj_siunix_patch_inner_math:n { angstrom }
+ \__ltj_siunix_patch_inner_math:n { arcminute }
+ \__ltj_siunix_patch_inner_math:n { arcsecond }
+ \__ltj_siunix_patch_inner_math:n { ohm }
+ }
+}
+\ifdefined\ltj@patch@siunitx@executed\__ltj_siunitx_patch:\fi
+
+\ExplSyntaxOff
+\endinput