X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjp-fontspec.sty;h=b679d5a436e3bfd80e95f6514fcbdd00001cb84a;hb=4dd468350bc30a54bac2b7f533c7d1e1233b8653;hp=2c93a06e170ccc3578a3e6e560fd220237ae85b0;hpb=6bdcab1c23b47915bb0a69771860ca05a61fec42;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjp-fontspec.sty b/src/patches/lltjp-fontspec.sty index 2c93a06..b679d5a 100644 --- a/src/patches/lltjp-fontspec.sty +++ b/src/patches/lltjp-fontspec.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-fontspec}[2013/04/02 Patch to fontspec for LuaLaTeX-ja] +\ProvidesPackage{lltjp-fontspec}[2016/03/31 Patch to fontspec for LuaTeX-ja] \RequirePackage{fontspec,luatexja} \ExplSyntaxOn @@ -23,5 +23,52 @@ \@ifstar\__fontspecsverb\@verb } + +\cs_set_eq:NN \ltj_orig_fontspec_setup_maths: \fontspec_setup_maths: +\cs_set:Nn \fontspec_setup_maths: + { + \group_begin: + \cs_set:Npn \DeclareMathSymbol##1##2##3##4{% + \expandafter\in@\csname sym##3\expandafter\endcsname + \expandafter{\group@list}% + \ifin@ + \begingroup + \count\z@=##4\relax + \count\tw@\count\z@ + \divide\count\z@\sixt@@n + \count@\count\z@ + \multiply\count@\sixt@@n + \advance\count\tw@-\count@ + \if\relax\noexpand##1% is command? + \edef\reserved@a{\noexpand\in@{\string\mathchar}{\meaning##1}}% + \reserved@a + \ifin@ + \expandafter\set@mathsymbol + \csname sym##3\endcsname##1##2% + {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% + \@font@info{Redeclaring math symbol \string##1}% + \else + \expandafter\set@mathsymbol + \csname sym##3\endcsname##1##2% + {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% + \fi + \else + \expandafter\set@mathchar + \csname sym##3\endcsname##1##2 + {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% + \fi + \endgroup + \else + \@latex@error{Symbol font `##3' is not defined}\@eha + \fi + } + \ltj_orig_fontspec_setup_maths: + \group_end: + } + +%%%%%%%% shapes in \em +\cs_set:Npn \emshape { \gtfamily \itshape } +\cs_set:Npn \eminnershape { \mcfamily \upshape } + \ExplSyntaxOff \endinput