summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/platex/japanese-otf/mlutf.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/platex/japanese-otf/mlutf.sty')
-rw-r--r--Master/texmf-dist/tex/platex/japanese-otf/mlutf.sty148
1 files changed, 148 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/platex/japanese-otf/mlutf.sty b/Master/texmf-dist/tex/platex/japanese-otf/mlutf.sty
new file mode 100644
index 00000000000..78a6b2353db
--- /dev/null
+++ b/Master/texmf-dist/tex/platex/japanese-otf/mlutf.sty
@@ -0,0 +1,148 @@
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{mlutf}[2004/04/17 v1.1.2 psitau, u0.27 ttk]
+%force catcode of \" be 12
+\count@\catcode`\"
+\catcode`\"=12
+\if@otf@uplatex
+\if@deluxe
+ \DeclareRobustCommand{\UTFK}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\edef\reserved@b{\mgdefault}%
+ \ifx\k@family\reserved@a \kanjifamily{utfkg}\else\ifx\k@family\reserved@b
+ \kanjifamily{utfkmg}\else\kanjifamily{utfk}\fi\fi%
+ \uppercase{\set@character@="#1}%
+ \endgroup%
+ }
+ \DeclareRobustCommand{\UTFC}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\edef\reserved@b{\mgdefault}%
+ \ifx\k@family\reserved@a \kanjifamily{utfcg}\else\ifx\k@family\reserved@b
+ \kanjifamily{utfcmg}\else\kanjifamily{utfc}\fi\fi%
+ \uppercase{\set@character@="#1}%
+ \endgroup%
+ }
+ \DeclareRobustCommand{\UTFT}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\edef\reserved@b{\mgdefault}%
+ \ifx\k@family\reserved@a \kanjifamily{utftg}\else\ifx\k@family\reserved@b
+ \kanjifamily{utftmg}\else\kanjifamily{utft}\fi\fi%
+ \uppercase{\set@character@="#1}%
+ \endgroup%
+ }
+\else
+ \DeclareRobustCommand{\UTFK}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utfk}\uppercase{\set@character@="#1}%
+ \endgroup%
+ }
+ \DeclareRobustCommand{\UTFC}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utfc}\uppercase{\set@character@="#1}%
+ \endgroup%
+ }
+ \DeclareRobustCommand{\UTFT}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utft}\uppercase{\set@character@="#1}%
+ \endgroup%
+ }
+\fi
+\else% for pLaTeX
+ \DeclareRobustCommand{\UTFK}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utfk}\uppercase{\set@character="#1}%
+ \endgroup%
+ }
+ \DeclareRobustCommand{\UTFC}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utfc}\uppercase{\set@character="#1}%
+ \endgroup%
+ }
+ \DeclareRobustCommand{\UTFT}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utft}\uppercase{\set@character="#1}%
+ \endgroup%
+ }
+\fi
+\DeclareRobustCommand{\UTFM}[1]{\begingroup%
+ \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
+ \kanjifamily{utf}\uppercase{\set@character="#1}%
+ \endgroup%
+}
+\catcode`\"=\count@
+%end of changing catcode of \"
+\gdef\Redefine@MLUTF{%
+ \@ifpackageloaded{hyperref}{%
+ \def\hyper@UTFC##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFC \endcsname{##1}\fi}
+ \def\hyper@UTFK##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFK \endcsname{##1}\fi}
+ \def\hyper@UTFT##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFT \endcsname{##1}\fi}
+ \def\hyper@UTFM##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFM \endcsname{##1}\fi}
+ \def\UTFC{\protect\hyper@UTFC}
+ \def\UTFK{\protect\hyper@UTFK}
+ \def\UTFT{\protect\hyper@UTFT}
+ \def\UTFM{\protect\hyper@UTFM}
+ }{}
+}
+\AtBeginDocument{\Redefine@MLUTF}
+
+\DeclareKanjiFamily{\otf@JYn}{utfk}{}
+\DeclareKanjiFamily{\otf@JTn}{utfk}{}
+\DeclareKanjiFamily{\otf@JYn}{utfc}{}
+\DeclareKanjiFamily{\otf@JTn}{utfc}{}
+\DeclareKanjiFamily{\otf@JYn}{utft}{}
+\DeclareKanjiFamily{\otf@JTn}{utft}{}
+\if@otf@uplatex
+ \Declare@FontShape{utfk}{m}{-}{utfkmr}
+ \Declare@FontShape{utfc}{m}{-}{utfcmr}
+ \Declare@FontShape{utft}{m}{-}{utftmr}
+ \if@deluxe
+ \Declare@FontShape{utfk}{bx}{-}{utfkmb}
+ \DeclareKanjiFamily{\otf@JYn}{utfkg}{}
+ \DeclareKanjiFamily{\otf@JTn}{utfkg}{}
+ \Declare@FontShape{utfkg}{m}{-}{utfkgr}
+ \Declare@FontShape{utfkg}{bx}{-}{utfkgb}
+ \Declare@FontShape{utfkg}{eb}{-}{utfkge}
+ \DeclareKanjiFamily{\otf@JYn}{utfkmg}{}
+ \DeclareKanjiFamily{\otf@JTn}{utfkmg}{}
+ \Declare@FontShape{utfkmg}{m}{-}{utfkmgr}
+ \Declare@FontShape{utfk}{l}{-}{utfkml}
+ \Declare@FontShape{utfc}{bx}{-}{utfcmb}
+ \DeclareKanjiFamily{\otf@JYn}{utfcg}{}
+ \DeclareKanjiFamily{\otf@JTn}{utfcg}{}
+ \Declare@FontShape{utfcg}{m}{-}{utfcgr}
+ \Declare@FontShape{utfcg}{bx}{-}{utfcgb}
+ \Declare@FontShape{utfcg}{eb}{-}{utfcge}
+ \DeclareKanjiFamily{\otf@JYn}{utfcmg}{}
+ \DeclareKanjiFamily{\otf@JTn}{utfcmg}{}
+ \Declare@FontShape{utfcmg}{m}{-}{utfcmgr}
+ \Declare@FontShape{utfc}{l}{-}{utfcml}
+ \Declare@FontShape{utft}{bx}{-}{utftmb}
+ \DeclareKanjiFamily{\otf@JYn}{utftg}{}
+ \DeclareKanjiFamily{\otf@JTn}{utftg}{}
+ \Declare@FontShape{utftg}{m}{-}{utftgr}
+ \Declare@FontShape{utftg}{bx}{-}{utftgb}
+ \Declare@FontShape{utftg}{eb}{-}{utftge}
+ \DeclareKanjiFamily{\otf@JYn}{utftmg}{}
+ \DeclareKanjiFamily{\otf@JTn}{utftmg}{}
+ \Declare@FontShape{utftmg}{m}{-}{utftmgr}
+ \Declare@FontShape{utft}{l}{-}{utftml}
+ \else
+ \if@bold
+ \Declare@FontShape{utfk}{bx}{-}{utfkgb}
+ \Declare@FontShape{utfc}{bx}{-}{utfcgb}
+ \Declare@FontShape{utft}{bx}{-}{utftgb}
+ \else
+ \Declare@FontShape{utfk}{bx}{-}{utfkgr}
+ \Declare@FontShape{utfc}{bx}{-}{utfcgr}
+ \Declare@FontShape{utft}{bx}{-}{utftgr}
+ \fi
+ \fi
+\else
+ \Declare@FontShape{utfk}{m}{0123456789abcdef}{utfkmr}
+ \Declare@FontShape{utfk}{bx}{0123456789abcdef}{utfkgr}
+ \Declare@FontShape{utfc}{m}{0123456789abcdefklmo}{utfcmr}
+ \Declare@FontShape{utfc}{bx}{0123456789abcdefklmo}{utfcgr}
+ \Declare@FontShape{utft}{m}{0123456789abcdefklmnopqrstuvwxz}{utftmr}
+ \Declare@FontShape{utft}{bx}{0123456789abcdefklmnopqrstuvwxz}{utftgr}
+\fi
+\DeclareKanjiFamily{\otf@JYn}{utf}{}
+\DeclareKanjiFamily{\otf@JTn}{utf}{}
+\Declare@FontShape{utf}{m}{0123456789abcdefjklmnopqrstuvwxyz}{utfmr}
+\Declare@FontShape{utf}{bx}{0123456789abcdefjklmnopqrstuvwxyz}{utfgr}
+\endinput