diff options
author | Karl Berry <karl@freefriends.org> | 2017-09-19 23:23:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-09-19 23:23:43 +0000 |
commit | d14af0460bc03d1c741ddb6f01a14e8428a47664 (patch) | |
tree | 9952713ebd1fe5fd4ad71ee3bf1f2aff23d5262d /Master/texmf-dist/tex/generic/ifptex | |
parent | 562c23a85a90c442a2b6fe5dde23b3a33e8c4acd (diff) |
ifptex (18sep17)
git-svn-id: svn://tug.org/texlive/trunk@45348 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/ifptex')
-rw-r--r-- | Master/texmf-dist/tex/generic/ifptex/ifptex.sty | 74 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/ifptex/ifuptex.sty | 4 |
2 files changed, 74 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/generic/ifptex/ifptex.sty b/Master/texmf-dist/tex/generic/ifptex/ifptex.sty index de4b68fb4e2..005dedec4b7 100644 --- a/Master/texmf-dist/tex/generic/ifptex/ifptex.sty +++ b/Master/texmf-dist/tex/generic/ifptex/ifptex.sty @@ -1,6 +1,6 @@ %% %% This is file 'ifptex.sty'. -%% +%% %% Copyright (c) 2017 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r @@ -47,7 +47,8 @@ %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ifptex}[2017/09/09 v1.2 pTeX checker] +\ProvidesPackage{ifptex}[2017/09/15 v1.2a pTeX checker] +\def\bxip@pkgname{ifptex} %% enter the big group \begingroup @@ -212,6 +213,75 @@ \gdef\RequireStrictpTeXng{% \ifstrictpTeXng\else \bxip@err@required{pTeX-ng}\fi} +%--------------------------------------- KanjiKoodo declaration + +%% \bxip@def@str\CS{<strcode>} +\def\bxip@def@str#1#2{% + \let\bxip@str\@empty#2\let#1\bxip@str} +\def\bxip@def@str@j#1{% + \kansujichar1=#1\relax\edef\bxip@str{\bxip@str\kansuji1}} +\def\bxip@def@str@a#1{% + \uccode`\?=#1\relax\uppercase{\edef\bxip@str{\bxip@str?}}} +\def\U/#1#2#3#4{\bxip@def@str@j{\ucs"#1#2#3#4}} +\ifx\ucs\@undefined \def\U/#1#2#3#4{}\fi +\def\J/#1#2#3#4{\bxip@def@str@j{\jis"#1#2#3#4}} +\def\X/#1#2{\bxip@def@str@a{"#1#2}} + +%% KanjiKoodo strings +% This is the correct "KanjiKoodo=". +\bxip@def@str\bxip@@knjcde@u@u +{\J/3441\J/3B7A\J/2533\J/213C\J/2549\X/3D} +% This is the token list that results when upTeX with settings +% "kanji=sjis, kanji-internal=uptex" reads the string "KanjiKoodo=" +% written in UTF-8. Note that mojibake will ocuur unless "kanji=utf8". +\bxip@def@str\bxip@@knjcde@s@u +{\U/8C8D\X/A2\U/87C4\U/52B1\U/3055\U/7E5D\X/BC\U/7E5D\X/89\X/3D} +% Ditto, with settings "kanji=sjis, kanji-internal=sjis", and so on.... +\bxip@def@str\bxip@@knjcde@s@s +{\J/6C3E\X/A2\J/6A2F\J/4E65\J/2435\J/6563\X/BC\J/6563\X/89\X/3D} +\bxip@def@str\bxip@@knjcde@s@e +{\J/6C3E\J/226A\J/2F4E\J/6524\J/3565\J/633C\J/6563\X/89\X/3D} +\bxip@def@str\bxip@@knjcde@e@u +{\U/7FB2\U/221A\X/AD\X/97\X/E3\X/82\U/6F5F\X/83\U/82E5\X/83\X/89\X/3D} +\bxip@def@str\bxip@@knjcde@e@s +{\J/663C\J/2265\X/AD\J/4E65\J/236A\J/2563\J/3C63\J/2569\X/3D} +\bxip@def@str\bxip@@knjcde@e@e +{\J/663C\J/2265\X/AD\X/97\X/E3\X/82\J/3363\X/83\J/3C63\X/83\X/89\X/3D} + +%% KanjiKoodo control sequences +% The correct \[KanjiKoodo=UTF-8], meaning input kanji code is right. +\global\@namedef{\bxip@@knjcde@u@u UTF-8}{\bxip@ensure@utf{}} +% The mojibake \[XXXXX=UTf-8], meaning input kanji code is wrong. +\global\@namedef{\bxip@@knjcde@s@u UTF-8}{\bxip@ensure@utf{sjis}} +\global\@namedef{\bxip@@knjcde@s@s UTF-8}{\bxip@ensure@utf{sjis}} +\global\@namedef{\bxip@@knjcde@s@e UTF-8}{\bxip@ensure@utf{sjis}} +\global\@namedef{\bxip@@knjcde@e@u UTF-8}{\bxip@ensure@utf{euc}} +\global\@namedef{\bxip@@knjcde@e@s UTF-8}{\bxip@ensure@utf{euc}} +\global\@namedef{\bxip@@knjcde@e@e UTF-8}{\bxip@ensure@utf{euc}} + +%% \bxip@ensure@utf{<enc>} +\gdef\bxip@ensure@utf#1{% + \ifx @#1@\expandafter\@gobble + \else \expandafter\@firstofone + \fi{\bxip@ensure@utf@a{#1}}} +\ifx\epTeXinputencoding\@undefined + \gdef\bxip@ensure@utf@a#1{% + \PackageWarning\bxip@pkgname + {The input kanji code for file '\@currname.\@currext'\MessageBreak + is set to #1, but should be utf8\@gobble}% +\else + \gdef\bxip@ensure@utf@a#1{% + \PackageInfo\bxip@pkgname + {The input kanji code for file '\@currname.\@currext'\MessageBreak + was changed from #1 to utf8\@gobble}% + \ifnum\currentgrouplevel>\z@ + \aftergroup\bxip@ensure@utf@b + \else \expandafter\bxip@ensure@utf@b + \fi} + \gdef\bxip@ensure@utf@b{% + \epTeXinputencoding utf8}% unterminated +\fi + %--------------------------------------- deprecated stuffs %%<+>D \ifNativeupTeX == \ifnativeupTeX diff --git a/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty b/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty index 0872dba1e80..5639834f91f 100644 --- a/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty +++ b/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty @@ -43,10 +43,10 @@ %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ifuptex}[2017/09/09 v1.2 upTeX checker] +\ProvidesPackage{ifuptex}[2017/09/15 v1.2a upTeX checker] %% load ifptex -\x\RequirePackage{ifptex}[2017/09/09] +\x\RequirePackage{ifptex}[2017/09/15] %% all done \bxip@up@restore@codes |