texlive[52899] Master/texmf-dist: pxjahyper (23nov19)
commits+karl at tug.org
commits+karl at tug.org
Sat Nov 23 22:21:20 CET 2019
Revision: 52899
http://tug.org/svn/texlive?view=revision&revision=52899
Author: karl
Date: 2019-11-23 22:21:19 +0100 (Sat, 23 Nov 2019)
Log Message:
-----------
pxjahyper (23nov19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
Added Paths:
-----------
trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md 2019-11-23 00:54:01 UTC (rev 52898)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md 2019-11-23 21:21:19 UTC (rev 52899)
@@ -35,11 +35,13 @@
更新履歴
--------
- * Version 0.4 〈2019/10/25〉
- - PDF 文字列中で `\CID` をサポート(`otfcid` オプション)
+ * Version 0.4a 〈2019/11/23〉
- (試験的) PDF 文字列中で japanese-otf の文字入力マクロをサポート
(`otfmacros` オプション)
+ * Version 0.4 〈2019/10/25〉
+ - PDF 文字列中で `\CID` をサポート(`otfcid` オプション)
+
* Version 0.3e 〈2019/06/20〉
- hyperref の `unicode` 指定が後から変更された場合はエラーを出す。
Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md 2019-11-23 00:54:01 UTC (rev 52898)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md 2019-11-23 21:21:19 UTC (rev 52899)
@@ -16,11 +16,12 @@
* TeX engine: pTeX, upTeX, pTeX-ng.
* DVI-ware: dvipdfmx.
* Dependent packages:
+ - atbegshi
- hyperref
### Installation
- - `*.sty` → $TEXMF/tex/platex/PXjahyper
+ - `*.sty`, `*.def` → $TEXMF/tex/platex/PXjahyper
### License
@@ -36,6 +37,7 @@
Revision History
----------------
+ * Version 0.4a 〈2019/11/23〉
* Version 0.4 〈2019/10/25〉
* Version 0.3e 〈2019/06/20〉
* Version 0.3d 〈2018/07/15〉
Added: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def (rev 0)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def 2019-11-23 21:21:19 UTC (rev 52899)
@@ -0,0 +1,793 @@
+%%
+%% This is file 'pxjahyper-ajm.def'.
+%%
+%% Copyright (c) 2019 Takayuki YATO (aka. "ZR")
+%% GitHub: https://github.com/zr-tex8r
+%% Twitter: @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+%% このファイルは日本語文字を含みます.
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesFile{pxjahyper-ajm.def}[2019/11/23 v0.4a]
+
+%% avoid multiple loading
+\csname pxjahyperajmLoaded\endcsname
+\def\pxjahyperajmLoaded{\endinput}
+%% force UTF-8
+\ifx\epTeXinputencoding\@undefined\else
+ \epTeXinputencoding utf8
+\fi
+
+%--------------------------------------- general
+
+% Note: Here 'etoolbox' is already loaded.
+
+%% check engine
+\ifx\numexpr\@undefined \endinput \fi
+
+%% \pxhy at macro@name at list
+% The \do-list of the name of macros to be redefined.
+\let\pxhy at macro@name at list\@empty
+
+%% \pxhy@ : the prefix
+\def\pxhy@{pxhy at aj@@}
+
+%% \pxhy at cond\ifXXX...\fi{<yes>}{<no>}
+\@gobbletwo\if\if \def\pxhy at cond#1\fi{%
+ #1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+
+%% \pxhy at cond@both\ifXXX...\fi\ifYYY...\fi{<yes>}{<no>}
+% Checks whether \ifXXX and \ifYYY both hold.
+\@gobbletwo\if\if\@gobbletwo\if\if \def\pxhy at cond@both#1\fi#2\fi{%
+ \bxju at cond{\if #1#2T\else F\fi\else F\fi T}\fi
+}
+
+%% \pxhy at if@star{<varient>}{<normal>}
+% Expands to <varient> if followed by *, otherwise to <normal>.
+\def\pxhy at if@star#1#2#3{% #3=next-arg
+ \expandafter\pxhy at if@star at a\detokenize{#3}@{#1}*@{#2{#3}}\pxhy at mk
+}
+\def\pxhy at if@star at a#1*@#2#3\pxhy at mk{#2}
+
+%% \pxhy at if@plus{<varient>}{<normal>}
+% Expands to <varient> if followed by +, otherwise to <normal>.
+\def\pxhy at if@plus#1#2#3{% #3=next-arg
+ \expandafter\pxhy at if@plus at a\detokenize{#3}@{#1}+@{#2{#3}}\pxhy at mk
+}
+\def\pxhy at if@plus at a#1+@#2#3\pxhy at mk{#2}
+
+%% \pxhy at shift{<x>}{<y>}
+% Expands to \pxhy at fast@CID with the value of x+y.
+\def\pxhy at shift#1#2{%
+ \expandafter\pxhy at shift@a\the\numexpr(#1)+(#2)\pxhy at mk
+}
+\def\pxhy at shift@a#1\pxhy at mk{%
+ \pxhy at fast@CID{#1}%
+}
+
+%% \pxhy at numeral{<number>}
+% Expands to the Western numeral.
+\def\pxhy at numeral#1{%
+ \expandafter\pxhy at numeral@a\number#1\pxhy at mk
+}% \pxhy at mk ensures termination
+\def\pxhy at numeral@a#1\pxhy at mk{#1}
+
+%% \pxhy at two@digits{<number>}
+% Expands to the Western numeral.
+\def\pxhy at two@digits#1{%
+ \expandafter\pxhy at two@digits at a\number#1\pxhy at mk
+}% \pxhy at mk ensures termination
+\def\pxhy at two@digits at a#1\pxhy at mk{%
+ \ifnum#1<10 0\fi #1%
+}
+
+%--------------------------------------- kanji numerals
+
+%% \pxhy at kdigit{<digit>}
+\def\pxhy at kdigit#1{%
+ \ifcase#1〇\or 一\or 二\or 三\or 四\or 五\or 六\or 七\or 八\or 九\fi
+}
+
+%% \pxhy at each@digit{<number>}\CScont
+% Expands to \CScont{<ten-digit>}{<one-digit>}.
+\def\pxhy at each@digit#1#2{%
+ \ifnum#1>\m at ne \ifnum#1<100
+ \expandafter\pxhy at each@digit at a\number#1..\pxhy at mk{#2}%
+ \fi\fi
+}
+\def\pxhy at each@digit at a#1#2#3\pxhy at mk#4{%
+ \if.#2#40#1\else#4#1#2\fi
+}
+
+%% \pxhy at knumeral{<number>}
+% Expands to the kanji numeral according to Japanese reading.
+\def\pxhy at knumeral#1{%
+ \pxhy at each@digit{#1}\pxhy at knumeral@a
+}
+\def\pxhy at knumeral@a#1#2{%
+ \ifnum#1#2=\z@ \pxhy at kdigit0%
+ \else
+ \ifcase#1 \or 十\else \pxhy at kdigit#1十\fi
+ \ifcase#2 \else \pxhy at kdigit#2\fi
+ \fi
+}
+
+%--------------------------------------- \pdfstringdef hook
+
+\pdfstringdefDisableCommands{%
+ % invoke the redefinitions
+ \def\do#1{\expandafter\let\csname aj#1\expandafter\endcsname
+ \csname \pxhy@#1\endcsname}%
+ \pxhy at macro@name at list
+}
+
+%=======================================
+% Macro Definitions
+\begingroup % entering a big group
+%--------------------------------------- helpers
+
+%% prepare
+\csuse{forcecjktoken}
+
+%% shorthands
+\catcode`\`=\active \let`\noexpand
+\def\@{\unexpanded}
+\def\@@{\expandonce}
+\def\CID{\pxhy at CID}
+
+%% \#{<number-expr>}
+% Expands to the value of the expression.
+\def\##1{\the\numexpr#1\relax\space}
+
+%% \pxhy at def{<macro-name>}...
+\def\pxhy at def#1{\csxdef{\pxhy@#1}}
+
+%% \pxhy at DeclareMacro{<macro-name>}...{<body>}
+% Declares (with \xdef) the pdfstring version of the aj-macro
+% \[aj<macro-name>].
+\def\pxhy at DeclareMacro#1{%
+ \xappto\pxhy at macro@name at list{`\do{#1}}%
+ \pxhy at def{#1}%
+}
+
+%% \pxhy at DeclareMacroVar{<macro-name>}...{<body-n>}{<body-v>}
+% Variant of \pxhy at DeclareMacro, where the *-variant of the macro
+% is declared. The parameter '...' will be shared with both forms.
+\def\pxhy at DeclareMacroVar#1{%
+ \xappto\pxhy at macro@name at list{`\do{#1}}%
+ \edef\pxhy at next{{\@nameuse{\pxhy@#1}}%
+ {\@nameuse{\pxhy@#1 at N}}{\@nameuse{\pxhy@#1 at V}}}%
+ \expandafter\pxhy at decl@macro at var@a\pxhy at next
+}
+\def\pxhy at decl@macro at var@a#1#2#3#4#{%
+ \gdef#1{\pxhy at if@star#3#2}%
+ \toks@{\xdef#3#4}\def\pxhy at next{\the\toks@}%
+ \afterassignment\pxhy at next \xdef#2#4%
+}
+
+%% \pxhy at DeclareAlias{<name1>}{<name2>}
+% Defines an alies.
+\def\pxhy at DeclareAlias#1#2{%
+ \xappto\pxhy at macro@name at list{`\do{#1}}%
+ \global\csletcs{\pxhy@#1}{\pxhy@#2}%
+}
+
+%% \pxhy at range{<ob-value>}{<limit>/<value>,...}
+% Expands to the code of a range switch.
+\def\pxhy at range#1#2{%
+ \pxhy at range@a{#1}#2/#1,*/*,\pxhy at mk
+}
+\def\pxhy at range@a#1#2/#3,#4\pxhy at mk{%
+ \ifstrempty{#4}{#1}{%else
+ `\ifnum##1<\#{#2}#1%
+ `\else\pxhy at range@a{#3}#4\pxhy at mk`\fi}%
+}
+
+%% \pxhy at rshift{<limit>/<shift>,...}
+% \pxhy at shift with a range switch.
+\def\pxhy at rshift#1{%
+ \pxhy at shift{##1}{\pxhy at range{-1000}{#1}}%
+}
+
+%% \pxhy at twirange{<shift1>}{<shift2>}
+% Special kind of range switch, used in \ajKaku etc.
+\def\pxhy at twirange#1#2{%
+ `\ifnum##1<\#{0}`\else`\ifnum##1<\#{10}\pxhy at shift{##1*2}{#1}%
+ `\else`\ifnum##1<\#{101}\pxhy at shift{##1}{#2}%
+ `\fi`\fi`\fi
+}
+
+%% \pxhy at fallback{<lbound>}{<fb-lbound>}{<ubound>}{<normal>}{<fallback>}
+\def\pxhy at fallback#1#2#3#4#5{%
+ `\ifnum##1<\#{#1}`\else`\ifnum##1>\#{#3}`\else
+ \ifnum\#{#1}=\#{#2}#5%
+ \else `\ifnum##1<\#{#2}#4`\else#5`\fi
+ \fi
+ `\fi`\fi
+}
+
+%% freeze 'em
+\let\UTF\relax
+\let\pxhy at CID\relax
+\let\pxhy at fast@CID\relax
+\let\pxhy at if@star\relax
+\let\pxhy at if@plus\relax
+\let\pxhy at shift\relax
+\let\pxhy at numeral\relax
+\let\pxhy at two@digits\relax
+\let\pxhy at knumeral\relax
+
+%--------------------------------------- the redefinitions
+
+% A text command invoked in PDF-sttings must be "string-OK".
+% Here a text command is "string-OK" if both:
+% - fully expandable, and
+% - comprised only of "Unicode-OK" glyphs.
+% Here a glyph is "unicode-OK" if either:
+% - representable as a single Unicode character, or
+% - well-substituted with a single Unicode character.
+% When the original definition of an aj-macro command is not string-OK
+% (marked as <!>), then the command must be redefeind.
+
+%%<!> \ajTsumesuji<var>{<string>}
+%%<!> \ajTsumesuji*{<string>}
+% Simply expands to the string.
+\pxhy at DeclareMacroVar{Tsumesuji}#1#2{#2}{}
+% \ajTsumesuji* takes only one argument.
+\pxhy at def{Tsumesuji at V}#1{#1}
+
+%-----------------------
+% Enclosed letters
+
+% None of the aj-macros for enclosed letters are fully expandable,
+% so they all must be redefined.
+% The glyphs for enclosed alphabet and kana letters are Unicode-OK
+% (\ajMaruKata{1} is U+32d0(㋐), and \ajMaruHira{1} fallbacks to plain
+% あ letter), but some of those for enclosed numbers are not Unicode-OK
+% (\ajMaru{51} does not have a good fallback), and thus should give an
+% alternative fallback string (\ajMaru{51}→“51”).
+% Note: for some enclosed numbers, glyphs with different enclosure are
+% used as fallback (e.g. \ajKuroMaru{21}→“㉑)”.
+
+%%<!> \ajMaru[*]{<number>}
+\pxhy at DeclareMacroVar{Maru}#1{%N
+ \pxhy at fallback{0}{51}{100}{%
+ \pxhy at rshift{0/8224,1/7554,21/8070,22/8080,32/10212,101}%
+ }{\pxhy at numeral{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at rshift{0/10234,10/7554,21/8070,22/8080,32/10212,101}%
+ }{`\ajMaru{#1}}%
+}
+%%<!> \ajKuroMaru[*]{<number>}
+\pxhy at DeclareMacroVar{KuroMaru}#1{%N
+ \pxhy at fallback{0}{21}{100}{%
+ \pxhy at rshift{0/10503,1/8285,10/10504,101}%
+ }{`\ajMaru{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at rshift{0/10504,101}%
+ }{`\ajKuroMaru{#1}}%
+}
+%%<!> \ajKaku[*]{<number>}
+\pxhy at DeclareMacroVar{Kaku}#1{%N
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{10764}{10774}%
+ }{`\ajMaru{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{10765}{10774}%
+ }{`\ajMaru{#1}}%
+}
+%%<!> \ajKuroKaku[*]{<number>}
+\pxhy at DeclareMacroVar{KuroKaku}#1{%N
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{11037}{11047}%
+ }{`\ajMaru{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{11038}{11047}%
+ }{`\ajMaru{#1}}%
+}
+%%<!> \ajMaruKaku[*]{<number>}
+\pxhy at DeclareMacroVar{MaruKaku}#1{%N
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{11307}{11317}%
+ }{`\ajMaru{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ `\ajMaru{#1}%fallback
+ \pxhy at twirange{11308}{11317}%
+ }{`\ajMaru{#1}}%
+}
+%%<!> \ajKuroMaruKaku[*]{<number>}
+\pxhy at DeclareMacroVar{KuroMaruKaku}#1{%N
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{11576}{11586}%
+ }{`\ajMaru{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at twirange{11577}{11586}%
+ }{`\ajMaru{#1}}%
+}
+%%<!> \ajKakko[*]{<number>}
+\pxhy at DeclareMacroVar{Kakko}#1{%N
+ \pxhy at fallback{0}{21}{100}{%
+ \pxhy at rshift{0/8227,1/8070,21/9873,101}%
+ }{(\pxhy at numeral{#1})}%
+}{%V
+ \pxhy at fallback{0}{0}{100}{%
+ \pxhy at rshift{0/9884,10/8070,21/9873,101}%
+ }{`\ajKakko{#1}}%
+}
+%%<!> \ajRoman[*]{<number>}
+\pxhy at DeclareMacroVar{Roman}#1{%N
+ \pxhy at fallback{1}{13}{15}{%
+ \pxhy at rshift{1/7574,11/8214,13/8282,16}%
+ }{`\@Roman{#1}}%
+}{%V
+ \pxhy at fallback{1}{1}{15}{%
+ \pxhy at rshift{1/7574,4/9879,5/7574,11/8214,13/8282,16}%
+ }{`\ifnum#1=\#{4}IIII`\else`\ajRoman{#1}`\fi}%
+}
+%%<!> \ajroman{<number>}
+\pxhy at DeclareMacro{roman}#1{%
+ \pxhy at fallback{1}{13}{15}{%
+ \pxhy at rshift{1/8091,11/8287,16}%
+ }{`\@roman{#1}}%
+}
+%%<!> \ajPeriod{<number>}
+\pxhy at DeclareMacro{Period}#1{%
+ \pxhy at fallback{0}{1}{11}{%
+ 0.%
+ }{\pxhy at rshift{0/8061,10/20577,12}}%
+}
+%%<!> \ajKakkoYobi{<number>}
+\pxhy at DeclareMacro{KakkoYobi}#1{\pxhy at rshift{1/8196,10}}
+%%<!> \ajKakkoroman{<number>}
+\pxhy at DeclareMacro{Kakkoroman}#1{%
+ \pxhy at fallback{1}{1}{15}{%
+ \pxhy at rshift{1/9973,16}%
+ }{(`\ajroman{#1})}%
+}
+%%<!> \ajKakkoRoman{<number>}
+\pxhy at DeclareMacro{KakkoRoman}#1{%
+ \pxhy at fallback{1}{1}{15}{%
+ \pxhy at rshift{1/9988,16}%
+ }{(`\ajRoman{#1})}%
+}
+%%<!> \ajKakkoalph{<number>}
+\pxhy at DeclareMacro{Kakkoalph}#1{\pxhy at rshift{1/8111,27}}
+%%<!> \ajKakkoAlph{<number>}
+\pxhy at DeclareMacro{KakkoAlph}#1{\pxhy at rshift{1/10003,27}}
+%%<!> \ajKakkoHira{<number>}
+\pxhy at DeclareMacro{KakkoHira}#1{%
+ \pxhy at fallback{1}{1}{48}{%
+ \pxhy at rshift{1/10029,49}%
+ }{(\pxhy at rshift{1/10029,49})}% with parens
+}
+%%<!> \ajKakkoKata{<number>}
+\pxhy at DeclareMacro{KakkoKata}#1{%
+ \pxhy at fallback{1}{1}{48}{%
+ \pxhy at rshift{1/10077,49}%
+ }{(\pxhy at rshift{1/10077,49})}% with parens
+}
+%%<!> \ajKakkoKansuji{<number>}
+\pxhy at DeclareMacro{KakkoKansuji}#1{%
+ \pxhy at fallback{1}{11}{20}{%
+ \pxhy at rshift{1/10125,21}%
+ }{(\pxhy at knumeral{#1})}%
+}
+%%<!> \ajMaruKansuji{<number>}
+\pxhy at DeclareMacro{MaruKansuji}#1{\pxhy at rshift{1/10460,11}}
+%%<!> \ajMarualph{<number>}
+\pxhy at DeclareMacro{Marualph}#1{\pxhy at rshift{1/10312,27}}
+%%<!> \ajMaruAlph{<number>}
+\pxhy at DeclareMacro{MaruAlph}#1{\pxhy at rshift{1/10338,27}}
+%%<!> \ajMaruHira{<number>}
+\pxhy at DeclareMacro{MaruHira}#1{\pxhy at rshift{1/10364,49}}
+%%<!> \ajMaruKata{<number>}
+\pxhy at DeclareMacro{MaruKata}#1{\pxhy at rshift{1/10412,49}}
+%%<!> \ajMaruYobi{<number>}
+\pxhy at DeclareMacro{MaruYobi}#1{%
+ \pxhy at rshift{1/10470,8/10484,9/10478,10}%
+}
+%%<!> \ajKuroMarualph{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMarualph}#1{`\ajMarualph{#1}}
+%%<!> \ajKuroMaruAlph{<number>}
+\pxhy at DeclareMacro{KuroMaruAlph}#1{\pxhy at rshift{1/10630,27}}
+%%<!> \ajKuroMaruHira{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMaruHira}#1{`\ajMaruHira{#1}}
+%%<!> \ajKuroMaruKata{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMaruKata}#1{`\ajMaruKata{#1}}
+%%<!> \ajKuroMaruYobi{<number>} : Fallback.
+% fallback to \ajKakuYobi, which is simpler.
+\pxhy at DeclareMacro{KuroMaruYobi}#1{`\ajKakuYobi{#1}}
+%%<!> \ajKakualph{<number>} : Fallback.
+\pxhy at DeclareMacro{Kakualph}#1{`\ajMarualph{#1}}
+%%<!> \ajKakuAlph{<number>}
+\pxhy at DeclareMacro{KakuAlph}#1{\pxhy at rshift{1/10900,27}}
+%%<!> \ajKakuHira{<number>} : Fallback.
+\pxhy at DeclareMacro{KakuHira}#1{`\ajMaruHira{#1}}
+%%<!> \ajKakuKata{<number>} : Fallback.
+\pxhy at DeclareMacro{KakuKata}#1{`\ajMaruKata{#1}}
+%%<!> \ajKakuYobi{<number>}
+\pxhy at DeclareMacro{KakuYobi}#1{\pxhy at rshift{1/11022,8}}
+%%<!> \ajKuroKakualph{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroKakualph}#1{`\ajMarualph{#1}}
+%%<!> \ajKuroKakuAlph{<number>}
+\pxhy at DeclareMacro{KuroKakuAlph}#1{\pxhy at rshift{1/11173,27}}
+%%<!> \ajKuroKakuHira{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroKakuHira}#1{`\ajMaruHira{#1}}
+%%<!> \ajKuroKakuKata{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroKakuKata}#1{`\ajMaruKata{#1}}
+%%<!> \ajKuroKakuYobi{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroKakuYobi}#1{`\ajKakuYobi{#1}}
+%%<!> \ajMaruKakualph{<number>} : Fallback.
+\pxhy at DeclareMacro{MaruKakualph}#1{`\ajMarualph{#1}}
+%%<!> \ajMaruKakuAlph{<number>}
+\pxhy at DeclareMacro{MaruKakuAlph}#1{\pxhy at rshift{1/11443,27}}
+%%<!> \ajMaruKakuHira{<number>} : Fallback.
+\pxhy at DeclareMacro{MaruKakuHira}#1{`\ajMaruHira{#1}}
+%%<!> \ajMaruKakuKata{<number>} : Fallback.
+\pxhy at DeclareMacro{MaruKakuKata}#1{`\ajMaruKata{#1}}
+%%<!> \ajMaruKakuYobi{<number>} : Fallback.
+\pxhy at DeclareMacro{MaruKakuYobi}#1{`\ajKakuYobi{#1}}
+%%<!> \ajKuroMaruKakualph{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMaruKakualph}#1{`\ajMarualph{#1}}
+%%<!> \ajKuroMaruKakuAlph{<number>}
+\pxhy at DeclareMacro{KuroMaruKakuAlph}#1{\pxhy at rshift{1/11712,27}}
+%%<!> \ajKuroMaruKakuHira{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMaruKakuHira}#1{`\ajMaruHira{#1}}
+%%<!> \ajKuroMaruKakuKata{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMaruKakuKata}#1{`\ajMaruKata{#1}}
+%%<!> \ajKuroMaruKakuYobi{<number>} : Fallback.
+\pxhy at DeclareMacro{KuroMaruKakuYobi}#1{`\ajKakuYobi{#1}}
+%%<!> \ajNijuMaru{<number>}
+\pxhy at DeclareMacro{NijuMaru}#1{\pxhy at rshift{1/16222,11}}
+%%<!> \ajRecycle{<number>}
+\pxhy at DeclareMacro{Recycle}#1{\pxhy at rshift{0/16314,12}}
+%%<!> \ajHasenKakuAlph{<number>}
+\pxhy at DeclareMacro{HasenKakuAlph}#1{\pxhy at rshift{1/20496,7}}
+%%<!> \ajCross{<number>}
+\pxhy at DeclareMacro{Cross}#1{%
+ \pxhy at fallback{0}{0}{9}{%
+ \pxhy at rshift{0/20523,10}%
+ }{\pxhy at numeral{#1}\UTF{00D7}}%
+}
+%%<!> \ajSlanted[*]{<number>}
+\pxhy at DeclareMacroVar{Slanted}#1{%N
+ \pxhy at fallback{0}{0}{59}{%
+ \pxhy at rshift{0/9460,10/20589,60}%
+ }{\pxhy at numeral{#1}}%
+}{%V
+ \pxhy at fallback{0}{0}{59}{%
+ \pxhy at rshift{0/20589,60}%
+ }{\pxhy at two@digits{#1}}%
+}
+%%<!> \ajApostrophe{<number>}
+%%<!> \ajYear{<number>} (alias)
+\pxhy at DeclareMacro{Apostrophe}#1{%
+ \pxhy at fallback{0}{0}{99}{%
+ \pxhy at rshift{0/20649,100}%
+ }{\UTF{2019}\pxhy at two@digits{#1}}%
+}
+\pxhy at DeclareAlias{Year}{Apostrophe}
+%%<!> \ajSquareMark[*]{<number>}
+% Note: +-variant is unsupported.
+\pxhy at DeclareMacroVar{SquareMark}#1{%N
+ \pxhy at rshift{1/12229,13}%
+}{%V
+ \pxhy at rshift{1/12241,10}%
+}
+%%<!> \ajHishi{<number>}
+\pxhy at DeclareMacro{Hishi}#1{\pxhy at rshift{1/12256,5}}
+
+%-----------------------
+
+% The choice of numerals (Western or kanji) depends on the rendering
+% of the original definition in yoko direction.
+
+%%<!> \ajTsumekakko{<number>}
+%%<!> \ajTumekakko{<number>} (alias)
+% Expands to "(number)".
+\pxhy at DeclareMacro{Tsumekakko}#1{%
+ (\pxhy at numeral{#1})%
+}
+\pxhy at DeclareAlias{Tumekakko}{Tsumekakko}
+
+%%<!> \ajNenrei<var>{<number>}
+\pxhy at DeclareMacro{Nenrei}#1{%
+ `\csname pxhy at ajNenrei/`\number#1`\endcsname
+}
+\csgdef{pxhy at ajNenrei/1}#1{%
+ (\pxhy at numeral{#1}\ifnum#1<10 つ\fi)%
+}
+\csgdef{pxhy at ajNenrei/2}#1{%
+ (\pxhy at numeral{#1}才)%
+}
+\csgdef{pxhy at ajNenrei/3}#1{% FIXME: the original is right?
+ (\pxhy at each@digit{#1}{\pxhy at knumeral@varA つ})%
+}
+\csgdef{pxhy at ajNenrei/4}#1{%
+ (\pxhy at knumeral{#1}才)%
+}
+
+%%<!> \ajnenrei<var>{<number>}
+\pxhy at DeclareMacro{nenrei}#1{%
+ `\csname pxhy at ajnenrei/`\number#1`\endcsname
+}
+\csgdef{pxhy at ajnenrei/1}#1{%
+ (\pxhy at each@digit{#1}{\pxhy at knumeral@varA つ})%
+}
+\csgdef{pxhy at ajnenrei/2}#1{%
+ (\pxhy at each@digit{#1}{\pxhy at knumeral@varB 才})%
+}
+\csgdef{pxhy at ajnenrei/3}#1{% FIXME: the original is right?
+ (\pxhy at each@digit{#1}{\pxhy at knumeral@varA ツ})%
+}
+\csgdef{pxhy at ajnenrei/4}#1{%
+ (\pxhy at each@digit{#1}{\pxhy at knumeral@varB コ})%
+}
+
+%%<!> \ajKosu{<number>}
+\pxhy at DeclareMacro{Kosu}#1{%
+ `\ajnenrei4{#1}%
+}
+
+%% some special kanji numeral forms
+\gdef\pxhy at knumeral@varA#1#2#3{%<tsu><ten><one>
+ % 8→八つ, 10→一〇, 16→一六, 20→二〇, 32→三二
+ \if0#2\pxhy at kdigit#3#1\else\pxhy at kdigit#2\pxhy at kdigit#3\fi
+}
+\gdef\pxhy at knumeral@varB#1#2#3{%<counter><ten><one>
+ % 8→八才, 10→十才, 16→十六, 20→二十, 32→三二
+ \ifcase#2 #2#1%
+ \or 十\ifcase#3 #1\else \pxhy at kdigit#3\fi
+ \else \pxhy at kdigit#2\ifcase#3 十\else \pxhy at kdigit#3\fi
+ \fi
+}
+
+%%<!> \ajFrac[*]{<numerator>}{<denominator>}
+\pxhy at DeclareMacroVar{Frac}#1#2{%N
+ `\pxhy at ajFrac{\pxhy at numeral{#1}}{\pxhy at numeral{#2}}%
+}{%V
+ `\pxhy at ajFrac{\pxhy at numeral{#1}}{\pxhy at numeral{#2}}%
+}
+\gdef\pxhy at ajFrac#1#2{%
+ \ifcsdef{pxhy at ucs@frac/#1/#2}{%
+ \csuse{pxhy at ucs@frac/#1/#2}%
+ }{#1/#2}%
+}
+%% \[pxhy at ucs@frac/<n>/<d>]
+% Alternative definitions for fractions.
+\def\do#1#2{\csgdef{pxhy at ucs@frac/#1}{\UTF{#2}}}
+\do{1/4}{00BC}
+\do{1/2}{00BD}
+\do{3/4}{00BE}
+\do{1/7}{2150}
+\do{1/9}{2151}
+\do{1/10}{2152}
+\do{1/3}{2153}
+\do{2/3}{2154}
+\do{1/5}{2155}
+\do{2/5}{2156}
+\do{3/5}{2157}
+\do{4/5}{2158}
+\do{1/6}{2159}
+\do{5/6}{215A}
+\do{1/8}{215B}
+\do{3/8}{215C}
+\do{5/8}{215D}
+\do{7/8}{215E}
+\do{0/3}{2189}
+
+%%<!> \aj半角{<string>}
+% Simply expands to the string.
+\pxhy at DeclareMacro{半角}#1{#1}{}
+
+%%<OK> \○ / \● / \□ / \■ / \◇ / \◆
+% Expands to \ajLig{} or \@ajNumber.
+% \@ajNumber{CMD}{<n>} seems to expand to \ajCMD{<n>}.
+
+%%<OK> \△ / \▽ / \゛ / \゜ / \!
+% Expands to \ajLig{}.
+
+%%<OK> \ajPICT{<name>}
+% Expands to \CID{}.
+
+%%<OK> \ajArrow{<name>}
+% Expands to \CID{}.
+
+%%<!> \ajKunten{<name>}
+% \ajKunten{?} (for single letters) expands to \CID{} and is string-OK.
+% \ajKunten{?|}, \ajKunten{|?}a and \ajKunten{?レ} need to be
+% redefined.
+\@tfor\x:={一}{上}{甲}{天}\do{% ?レ
+ \pxhy at DeclareMacro{訓点\x レ}{`\ajKunten{\x}`\ajKunten{レ}}%
+}
+\@tfor\x:={二}{三}{四}{中}{下}{乙}{丙}{丁}{地}{人}\do{% ?| |?
+ \pxhy at DeclareMacro{訓点\x |}{`\ajKunten{\x}\UTF{2013}}%
+ \pxhy at DeclareMacro{訓点|\x }{`\ajKunten{\x}\UTF{2013}}%
+}
+\pxhy at DeclareMacro{訓点 |}{\UTF{2013}}%
+\pxhy at DeclareMacro{訓点| }{\UTF{2013}}%
+
+%%<OK> \ajVar{<name>}
+% Expands to \CID{} or \UTF{}.
+
+%%<!> \ajLeader
+% Redefined to expand to two instances of the leader character.
+\pxhy at DeclareMacro{Leader}{%
+ `\pxhy at ajLeader
+}
+\gdef\pxhy at ajLeader#1{%
+ \pxhy at cond\ifx[#1\fi{\pxhy at ajLeader@a}{\pxhy at ajLeader@a]{#1}}%
+}
+\gdef\pxhy at ajLeader@a#1]#2{%
+ \pxhy at shift{12214}{#2*2}\pxhy at shift{12214}{#2*2}%
+}
+
+%%<!> \ajQuote
+% Redefined to be fully-expandable.
+\pxhy at DeclareMacro{Quote}{%
+ `\pxhy at ajQuote
+}
+\gdef\pxhy at ajQuote#1#2{%
+ \CID{\ifcase#1\or670\or672\or674\or676\or678\or680\or682\or
+ 684\or686\or688\or690\or7608\or12125\or12127\or12129\or
+ 12131\or12171\or16197\fi}%
+ #2%
+ \CID{\ifcase#1\or671\or673\or675\or677\or679\or681\or683\or
+ 685\or687\or689\or691\or7609\or12126\or12128\or12130\or
+ 12132\or12172\or16198\fi}%
+}
+
+%%<OK> Miscenallneous \ajXxx symbols
+% Most of them are string-OK; The exceptions are below.
+
+%% ad-hoc redefinitions
+\pxhy at DeclareMacro{DKunoji}{\UTF{3032}}
+\pxhy at DeclareMacro{KunojiwithBou}{\UTF{3032}}
+\pxhy at DeclareMacro{Kunoji}{\UTF{3031}}
+\pxhy at DeclareMacro{KunojiwithBou}{\UTF{3031}}
+\pxhy at DeclareMacro{Yusuriten}{\CID{16193}}
+\pxhy at DeclareMacro{varNinoji}{\CID{12107}}
+
+%----------------------
+% The \ajLig command
+
+%% \[pxhy at uok/<lig>]
+% If defined, then \ajLig{<lig>} is Unicode-OK.
+% Note: Baware of unification. For example, \ajLig{No.} and \ajLig{No}
+% can both be kind of U+2116(№), but probably \ajLig{AM} cannot be
+% kind of U+33C2(㏂).
+\@tfor\x:=%
+ {!!}{!!*}{!*}{!?}{!?*}{'S}{?!}{??}{F}{FAX}{GB}{HP}{Hz}{JIS}{K.K.}{KB}%
+ {MB}{No.}{No}{PR}{TEL}{Tel}{a.m.}{a/c}{c/o}{cal}{cc}{cm}{cm2}{cm3}{dB}%
+ {dl}{dl*}{euro}{g}{hPa}{in}{kcal}{kg}{kl}{kl*}{km}{km2}{km3}{l}{l*}{m}%
+ {m2}{m3}{mb}{mg}{mho}{microg}{microm}{micros}{ml}{ml*}{mm}{mm2}{mm3}{ms}%
+ {ns}{p.m.}{pH}{ppm}{ps}{tel}{tm}{◇HV}{◇MV}{◇News}{◇SS}{より}%
+ {アパート}{アルファ}{アンペア}{アール*}{アール}{イニング}{インチ}%
+ {インチ*}{ウォン}{エスクード}{エーカー}{オンス}{オーム}{カイリ}%
+ {カラット}{カロリー}{ガロン}{ガンマ}{キュリー}{キロ}{キログラム}%
+ {キロメートル}{キロワット}{ギガ}{ギニー}{ギルダー}{クルゼイロ}{クローネ}%
+ {グラム}{グラム*}{グラムトン}{ケース}{コト}{コルナ}{コーポ}{コーポ*}%
+ {サイクル}{サンチーム}{シリング}{センチ}{センチ*}{セント}{セント*}%
+ {ダース}{デシ}{トン}{ドル}{ナノ}{ノット}{ハイツ}{ハイツ*}{バーレル}%
+ {パーセント}{ビル}{ピアストル}{ピクル}{ピコ}{ファラッド}{フィート}%
+ {フラン}{ブッシェル}{ヘクタール}{ヘルツ}{ヘルツ*}{ベータ}{ペソ}{ペニヒ}%
+ {ペンス}{ページ}{ページ*}{ホン}{ホール}{ホーン}{ホーン*}{ボルト}%
+ {ポイント}{ポンド}{マイクロ}{マイル}{マッハ}{マルク}{マンション}%
+ {ミクロン}{ミリ}{ミリバール}{メガ}{メガトン}{メートル}{ヤード}{ヤード*}%
+ {ヤール}{ユアン}{リットル}{リラ}{ルピー}{ルーブル}{レム}{レントゲン}%
+ {ワット}{ワット*}{令和}{升}{大正}{平成}{明治}{昭和}{株式会社}%
+\do{\global\cslet{pxhy at uok/\x}{t}}
+
+% Note: Ligatures no*, euro*, mho*, ohm* are bad (proportional).
+
+%% \[pxhy at uokh/<char>]
+% If defined, then \ajLig{<char>?} is Unicode-OK, where '?' is
+% an arbitrary single character.
+\@tfor\x:=%
+ {■}{□}{△}{▽}{◆}{◇}{○}{●}
+\do{\global\cslet{pxhy at uokh/\x}{t}}
+
+%% ad-hoc redefinitions
+\def\do#1#2{\pxhy at DeclareMacro{Lig#1}{#2}%
+ \global\cslet{pxhy at uok/#1}{t}}
+\do{う゛}{\UTF{3094}}
+\do{か゜}{か\UTF{309A}}
+\do{き゜}{き\UTF{309A}}
+\do{く゜}{く\UTF{309A}}
+\do{け゜}{け\UTF{309A}}
+\do{こ゜}{こ\UTF{309A}}
+\do{カ゜}{カ\UTF{309A}}
+\do{キ゜}{キ\UTF{309A}}
+\do{ク゜}{ク\UTF{309A}}
+\do{ケ゜}{ケ\UTF{309A}}
+\do{コ゜}{コ\UTF{309A}}
+\do{セ゜}{セ\UTF{309A}}
+\do{ツ゜}{ツ\UTF{309A}}
+\do{ト゜}{ト\UTF{309A}}
+\do{ワ゛}{\UTF{30F7}}
+\do{ヰ゛}{\UTF{30F8}}
+\do{ヱ゛}{\UTF{30F9}}
+\do{ヲ゛}{\UTF{30FA}}
+\do{小か}{\UTF{3095}}
+\do{小け}{\UTF{3096}}
+\do{小こ}{こ}% fallback
+\do{小ク}{\UTF{31F0}}
+\do{小コ}{コ}% fallback
+\do{小シ}{\UTF{31F1}}
+\do{小ス}{\UTF{31F2}}
+\do{小ト}{\UTF{31F3}}
+\do{小ヌ}{\UTF{31F4}}
+\do{小ハ}{\UTF{31F5}}
+\do{小ヒ}{\UTF{31F6}}
+\do{小フ}{\UTF{31F7}}
+\do{小プ}{\UTF{31F7}\UTF{309A}}
+\do{小ヘ}{\UTF{31F8}}
+\do{小ホ}{\UTF{31F9}}
+\do{小ム}{\UTF{31FA}}
+\do{小ラ}{\UTF{31FB}}
+\do{小リ}{\UTF{31FC}}
+\do{小ル}{\UTF{31FD}}
+\do{小レ}{\UTF{31FE}}
+\do{小ロ}{\UTF{31FF}}
+
+%% redefine \ajLig
+\pxhy at DeclareMacro{Lig}#1{%
+ % use \csname, to full-expand the argument
+ \@{\expandafter\pxhy at uok@ajlig\csname}ajLig#1\@{\endcsname}%
+}
+\gdef\pxhy at uok@ajlig#1{%
+ \expandafter\pxhy at uok@ajlig at a\string#1\pxhy at mk#1%
+}
+\begingroup\catcode96=12 \lccode`\?=`\g \lowercase{\endgroup
+ \gdef\pxhy at uok@ajlig at a#1?#2\pxhy at mk}{%
+ \pxhy at uok@ajlig at b{#2}%
+}
+\gdef\pxhy at uok@ajlig at b#1#2{%{NAME}\ajNAME
+ % undefined name comes empty
+ \ifundef{#2}{}{%else
+ % if Unicode-OK then do it
+ \ifcsdef{pxhy at uok/#1}{#2}{%else
+ \pxhy at if@uok at head{#1}{#2}{%else
+ \pxhy at drop@trail at star{#1}%
+ }%
+ }%
+ }%
+}
+
+%% \pxhy at if@uok at head{<string>}{<yes>}{<no>}
+\gdef\pxhy at if@uok at head#1{%
+ \pxhy at if@uok at head@a#1 at ...\pxhy at mk
+}
+\gdef\pxhy at if@uok at head@a#1#2#3#4#5\pxhy at mk{%
+ \pxhy at cond\ifx#3@\fi{% two-letter
+ \ifcsdef{pxhy at uokh/#1}%
+ }{\pxhy at cond\ifx#4@\fi{% three-letter
+ \pxhy at cond@both\ifx#1(\fi\ifx#3)\fi{\@firstoftwo}{%else
+ \pxhy at cond@both\ifx#1□\fi\ifx#2:\fi
+ }%
+ }{\@secondoftwo}}%
+}
+
+%% \pxhy at drop@trail at star{<string>}
+\gdef\pxhy at drop@trail at star#1{%
+ \pxhy at drop@trail at star@a#1\pxhy at mk*\pxhy at mk\pxhy at end{#1}%
+}
+\gdef\pxhy at drop@trail at star@a#1*\pxhy at mk#2\pxhy at end#3{%
+ \ifstrempty{#2}{#3}{#1}%
+}
+
+%--------------------------------------- done
+\endgroup
+%=======================================
+\endinput
+%% EOF
Property changes on: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty 2019-11-23 00:54:01 UTC (rev 52898)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty 2019-11-23 21:21:19 UTC (rev 52899)
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjahyper}[2019/10/25 v0.4]
+\ProvidesPackage{pxjahyper}[2019/11/23 v0.4a]
%% error messages
\def\pxhy at pkgname{pxjahyper}
@@ -149,7 +149,8 @@
\edef\pxhy at tmpb{\meaning#1}%
\ifx\pxhy at tmpa\pxhy at tmpb #2\fi
}
-\pxhy at check\eTeXversion{\pxhy at etextrue}
+\pxhy at check\eTeXversion{%
+ \IfFileExists{etoolbox.sty}{\pxhy at etextrue}{}}
\pxhy at check\kanjiskip{\pxhy at ptextrue}
\pxhy at check\forcecjktoken{\pxhy at uptextrue}
\ifpxhy at ptex\else
@@ -458,7 +459,7 @@
}{}
\else
\def\pxhy at otfcid@disabled{%
- e-TeX extension is unavailable%
+ e-TeX extension (or 'etoolbox') is unavailable%
}
\fi
%% annihilate the ajmacros's own pdfstring process
@@ -634,11 +635,22 @@
% Some ad-hoc redefinitions.
\DeclareTextCommand{\textfi}{PD1}{fi}
\DeclareTextCommand{\textfl}{PD1}{fl}
-\DeclareTextCommand{\IJ}{PD1}{IJ}
-\DeclareTextCommand{\ij}{PD1}{ij}
+\DeclareTextCommand{\IJ}{PD1}{IJ}% needed?
+\DeclareTextCommand{\ij}{PD1}{ij}% needed?
\DeclareTextCommand{\textspace}{PD1}{\040}
\DeclareTextCommand{\textquotesingle}{PD1}{\047}
+%% Some adjustments on accents.
+\DeclareTextAccent{\H}{PD1}{\texthungarumlaut}
+\DeclareTextCompositeCommand{\H}{PD1}{\@empty}{\texthungarumlaut}
+\DeclareTextCompositeCommand{\H}{PD1}{\ }{\texthungarumlaut}
+\DeclareTextAccent{\u}{PD1}{\textasciibreve}
+\DeclareTextCompositeCommand{\u}{PD1}{\@empty}{\textasciibreve}
+\DeclareTextCompositeCommand{\u}{PD1}{\ }{\textasciibreve}
+\DeclareTextAccent{\k}{PD1}{\textogonek}
+\DeclareTextCompositeCommand{\k}{PD1}{\@empty}{\textogonek}
+\DeclareTextCompositeCommand{\k}{PD1}{\ }{\textogonek}
+
%%[A] The characters in PdfDocEncoding (except ASCII).
\pxDeclarePdfTextCommand{\textasciibreve}{}{02D8}
\pxDeclarePdfTextCommand{\textasciicaron}{}{02C7}
@@ -802,6 +814,8 @@
\pxDeclarePdfTextCommand{\textflq}{}{2039}
\pxDeclarePdfTextCommand{\textfrq}{}{203A}
\pxDeclarePdfTextCommand{\textEuro}{}{20AC}
+\pxDeclarePdfTextCommand{\guillemetleft}{}{00AB}
+\pxDeclarePdfTextCommand{\guillemetright}{}{00BB}
%%
%%[C] The characters that are included both in JIS X 0213
@@ -951,6 +965,7 @@
\pxDeclarePdfTextComposite{\=}{O}{}{014C}
\pxDeclarePdfTextComposite{\=}{a}{}{0101}
\pxDeclarePdfTextComposite{\=}{i}{}{012B}
+\pxDeclarePdfTextComposite{\=}{\i}{}{012B}
\pxDeclarePdfTextComposite{\=}{u}{}{016B}
\pxDeclarePdfTextComposite{\=}{e}{}{0113}
\pxDeclarePdfTextComposite{\=}{o}{}{014D}
More information about the tex-live-commits
mailing list