<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%%
%% This is file 'pxjahyper-ajm.def'.
%% 
%% Copyright (c) 2012-2024 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}[2024/08/25 v1.5]

%% 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@macro@name@list
% The \do-list of the name of macros to be redefined.
\let\pxhy@macro@name@list\@empty

%% \pxhy@ : the prefix
\def\pxhy@{pxhy@aj@@}

%% \pxhy@cond@both\ifXXX...\fi\ifYYY...\fi{&lt;yes&gt;}{&lt;no&gt;}
% Checks whether \ifXXX and \ifYYY both hold.
\@gobbletwo\if\if\@gobbletwo\if\if \def\pxhy@cond@both#1\fi#2\fi{%
  \pxhy@cond{\if #1#2T\else F\fi\else F\fi T}\fi
}

%% \pxhy@if@plus{&lt;varient&gt;}{&lt;normal&gt;}
% Expands to &lt;varient&gt; if followed by +, otherwise to &lt;normal&gt;.
\def\pxhy@if@plus#1#2#3{% #3=next-arg
  \expandafter\pxhy@if@plus@a\detokenize{#3}@{#1}+@{#2{#3}}\pxhy@mk
}
\def\pxhy@if@plus@a#1+@#2#3\pxhy@mk{#2}

%% \pxhy@shift{&lt;x&gt;}{&lt;y&gt;}
% Expands to \pxhy@fast@CID with the value of x+y.
\def\pxhy@shift#1#2{%
  \expandafter\pxhy@shift@a\the\numexpr(#1)+(#2)\pxhy@mk
}
\def\pxhy@shift@a#1\pxhy@mk{%
  \pxhy@fast@CID{#1}%
}

%% \pxhy@numeral{&lt;number&gt;}
% Expands to the Western numeral.
\def\pxhy@numeral#1{%
  \expandafter\pxhy@numeral@a\number#1\pxhy@mk
}% \pxhy@mk ensures termination 
\def\pxhy@numeral@a#1\pxhy@mk{#1}

%% \pxhy@two@digits{&lt;number&gt;}
% Expands to the Western numeral.
\def\pxhy@two@digits#1{%
  \expandafter\pxhy@two@digits@a\number#1\pxhy@mk
}% \pxhy@mk ensures termination 
\def\pxhy@two@digits@a#1\pxhy@mk{%
  \ifnum#1&lt;10 0\fi #1%
}

%--------------------------------------- kanji numerals

%% \pxhy@kdigit{&lt;digit&gt;}
\def\pxhy@kdigit#1{%
  \ifcase#1縲Ⅸor 荳\or 莠圭or 荳噂or 蝗媾or 莠能or 蜈ｭ\or 荳ソor 蜈ｫ\or 荵拿fi
}

%% \pxhy@each@digit{&lt;number&gt;}\CScont
% Expands to \CScont{&lt;ten-digit&gt;}{&lt;one-digit&gt;}.
\def\pxhy@each@digit#1#2{%
  \ifnum#1&gt;\m@ne \ifnum#1&lt;100
    \expandafter\pxhy@each@digit@a\number#1..\pxhy@mk{#2}%
  \fi\fi
}
\def\pxhy@each@digit@a#1#2#3\pxhy@mk#4{%
  \if.#2#40#1\else#4#1#2\fi
}

%% \pxhy@knumeral{&lt;number&gt;}
% Expands to the kanji numeral according to Japanese reading.
\def\pxhy@knumeral#1{%
  \pxhy@each@digit{#1}\pxhy@knumeral@a
}
\def\pxhy@knumeral@a#1#2{%
  \ifnum#1#2=\z@ \pxhy@kdigit0%
  \else
    \ifcase#1 \or 蜊―else \pxhy@kdigit#1蜊―fi
    \ifcase#2 \else \pxhy@kdigit#2\fi
  \fi
}

%% \pxhy@cc@anchor@string{&lt;macro-name&gt;}{&lt;number&gt;}
% Expands to "anchor-string form" of a CC macro.
\def\pxhy@cc@anchor@string#1#2{%
  \pxjahyperBadCharacter{aj#1+\number#2}%
}

%--------------------------------------- \pdfstringdef hook

\pdfstringdefDisableCommands{%
  % invoke the redefinitions
  \def\do#1{\expandafter\let\csname aj#1\expandafter\endcsname
      \csname \pxhy@#1\endcsname}%
  \pxhy@macro@name@list
}

%=======================================
% Macro Definitions
\begingroup % entering a big group
%--------------------------------------- helpers

%% prepare
\pxhy@forcecjktoken{0}

%% shorthands
\catcode`\`=\active \let`\noexpand
\def\@{\unexpanded}
\def\@@{\expandonce}
\def\CID{\pxhy@CID}

%% \#{&lt;number-expr&gt;}
% Expands to the value of the expression.
\def\##1{\the\numexpr#1\relax\space}

%% \pxhy@def{&lt;macro-name&gt;}...
\def\pxhy@def#1{\csxdef{\pxhy@#1}}

%% \pxhy@DeclareMacro{&lt;macro-name&gt;}...{&lt;body&gt;}
% Declares (with \xdef) the pdfstring version of the aj-macro
% \[aj&lt;macro-name&gt;].
\def\pxhy@DeclareMacro#1{%
  \xappto\pxhy@macro@name@list{`\do{#1}}%
  \pxhy@def{#1}%
}

%% \pxhy@DeclareMacroVar{&lt;macro-name&gt;}...{&lt;body-n&gt;}{&lt;body-v&gt;}
% Variant of \pxhy@DeclareMacro, where the *-variant of the macro
% is declared. The parameter '...' will be shared with both forms.
\def\pxhy@DeclareMacroVar#1{%
  \xappto\pxhy@macro@name@list{`\do{#1}}%
  \edef\pxhy@next{{\@nameuse{\pxhy@#1}}%
      {\@nameuse{\pxhy@#1@N}}{\@nameuse{\pxhy@#1@V}}}%
  \expandafter\pxhy@decl@macro@var@a\pxhy@next
}
\def\pxhy@decl@macro@var@a#1#2#3#4#{%
  \gdef#1{\pxhy@if@star#3#2}%
  \toks@{\xdef#3#4}\def\pxhy@next{\the\toks@}%
  \afterassignment\pxhy@next \xdef#2#4%
}

%% \pxhy@DeclareAlias{&lt;name1&gt;}{&lt;name2&gt;}
% Defines an alies.
\def\pxhy@DeclareAlias#1#2{%
  \xappto\pxhy@macro@name@list{`\do{#1}}%
  \global\csletcs{\pxhy@#1}{\pxhy@#2}%
}

%% \pxhy@range{&lt;ob-value&gt;}{&lt;limit&gt;/&lt;value&gt;,...}
% Expands to the code of a range switch.
\def\pxhy@range#1#2{%
  \pxhy@range@a{#1}#2/#1,*/*,\pxhy@mk
}
\def\pxhy@range@a#1#2/#3,#4\pxhy@mk{%
  \ifstrempty{#4}{#1}{%else
    `\ifnum##1&lt;\#{#2}#1%
    `\else\pxhy@range@a{#3}#4\pxhy@mk`\fi}%
}

%% \pxhy@rshift{&lt;limit&gt;/&lt;shift&gt;,...}
% \pxhy@shift with a range switch.
\def\pxhy@rshift#1{%
  \pxhy@shift{##1}{\pxhy@range{-1000}{#1}}%
}

%% \pxhy@twirange{&lt;shift1&gt;}{&lt;shift2&gt;}
% Special kind of range switch, used in \ajKaku etc.
\def\pxhy@twirange#1#2{%
  `\ifnum##1&lt;\#{0}`\else`\ifnum##1&lt;\#{10}\pxhy@shift{##1*2}{#1}%
  `\else`\ifnum##1&lt;\#{101}\pxhy@shift{##1}{#2}%
  `\fi`\fi`\fi
}

%% \pxhy@fallback{&lt;lbound&gt;}{&lt;fb-lbound&gt;}{&lt;ubound&gt;}{&lt;normal&gt;}{&lt;fallback&gt;}
\def\pxhy@fallback#1#2#3#4#5{%
  `\ifnum##1&lt;\#{#1}`\else`\ifnum##1&gt;\#{#3}`\else
    \ifnum\#{#1}=\#{#2}#5%
    \else `\ifnum##1&lt;\#{#2}#4`\else#5`\fi
    \fi
  `\fi`\fi
}

%% freeze 'em
\let\UTF\relax
\let\pxhy@CID\relax
\let\pxhy@fast@CID\relax
\let\pxhy@if@star\relax
\let\pxhy@if@plus\relax
\let\pxhy@shift\relax
\let\pxhy@numeral\relax
\let\pxhy@two@digits\relax
\let\pxhy@knumeral\relax

%--------------------------------------- for counter commands

%% \pxhy@cc@macro@name@list
\let\pxhy@cc@macro@name@list\@empty

%% \pxhy@DeclareCCMacro{&lt;macro-name&gt;}...{&lt;body&gt;}
\def\pxhy@DeclareCCMacro#1{%
  \eappto\pxhy@cc@macro@name@list{`\do{#1}}%
  \pxhy@DeclareMacro{#1}%
}

%% \pxhy@DeclareCCMacroVar{&lt;macro-name&gt;}...{&lt;body-n&gt;}{&lt;body-v&gt;}
% Variant of \pxhy@DeclareMacro, where the *-variant of the macro
% is declared. The parameter '...' will be shared with both forms.
\def\pxhy@DeclareCCMacroVar#1{%
  \eappto\pxhy@cc@macro@name@list{`\do{#1@N}`\do{#1@V}}%
  \pxhy@DeclareMacroVar{#1}%
}

%% \pxhy@finish@declare@cc@macros
% Must be invoked after all CC macros are defined.
\def\pxhy@finish@declare@cc@macros{%
  \let\do\pxhy@amend@cc@macro
  \pxhy@cc@macro@name@list
  \let\pxhy@cc@macro@name@list\@empty
}

%% \pxhy@amend@cc@macro{&lt;macro-name&gt;}
\def\pxhy@amend@cc@macro#1{%
  \expandafter\pxhy@amend@cc@macro@a
      \csname\pxhy@#1\expandafter\endcsname
      \csname\pxhy@#1@A\expandafter\endcsname
      \csname\pxhy@#1@D\endcsname{#1}%
}
\def\pxhy@amend@cc@macro@a#1#2#3#4{%
  \gdef#2{\pxhy@cc@anchor@string{#4}}%
  \global\let#3#1%
  \gdef#1{\pxhy@if@in@anchor#2#3}%
}
%--------------------------------------- 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 &lt;!&gt;), then the command must be redefeind.

%%&lt;!&gt; \ajTsumesuji&lt;var&gt;{&lt;string&gt;}
%%&lt;!&gt; \ajTsumesuji*{&lt;string&gt;}
% Simply expands to the string.
\pxhy@DeclareMacroVar{Tsumesuji}#1#2{#2}{}
% \ajTsumesuji* takes only one argument.
\pxhy@def{Tsumesuji@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}竊停懊苑)窶�.

%%&lt;!&gt; \ajMaru[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{Maru}#1{%N
  \pxhy@fallback{0}{51}{100}{%
    \pxhy@rshift{0/8224,1/7554,21/8070,22/8080,32/10212,101}%
  }{\pxhy@numeral{#1}}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@rshift{0/10234,10/7554,21/8070,22/8080,32/10212,101}%
  }{`\ajMaru{#1}}%
}
%%&lt;!&gt; \ajKuroMaru[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{KuroMaru}#1{%N
  \pxhy@fallback{0}{21}{100}{%
    \pxhy@rshift{0/10503,1/8285,10/10504,101}%
  }{`\ajMaru{#1}}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@rshift{0/10504,101}%
  }{`\ajKuroMaru{#1}}%
}
%%&lt;!&gt; \ajKaku[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{Kaku}#1{%N
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{10764}{10774}%
  }{`\ajMaru{#1}}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{10765}{10774}%
  }{`\ajMaru{#1}}%
}
%%&lt;!&gt; \ajKuroKaku[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{KuroKaku}#1{%N
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{11037}{11047}%
  }{`\ajMaru{#1}}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{11038}{11047}%
  }{`\ajMaru{#1}}%
}
%%&lt;!&gt; \ajMaruKaku[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{MaruKaku}#1{%N
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{11307}{11317}%
  }{`\ajMaru{#1}}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
  `\ajMaru{#1}%fallback
    \pxhy@twirange{11308}{11317}%
  }{`\ajMaru{#1}}%
}
%%&lt;!&gt; \ajKuroMaruKaku[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{KuroMaruKaku}#1{%N
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{11576}{11586}%
  }{`\ajMaru{#1}}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@twirange{11577}{11586}%
  }{`\ajMaru{#1}}%
}
%%&lt;!&gt; \ajKakko[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{Kakko}#1{%N
  \pxhy@fallback{0}{21}{100}{%
    \pxhy@rshift{0/8227,1/8070,21/9873,101}%
  }{(\pxhy@numeral{#1})}%
}{%V
  \pxhy@fallback{0}{0}{100}{%
    \pxhy@rshift{0/9884,10/8070,21/9873,101}%
  }{`\ajKakko{#1}}%
}
%%&lt;!&gt; \ajRoman[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{Roman}#1{%N
  \pxhy@fallback{1}{13}{15}{%
    \pxhy@rshift{1/7574,11/8214,13/8282,16}%
  }{`\@Roman{#1}}%
}{%V
  \pxhy@fallback{1}{1}{15}{%
    \pxhy@rshift{1/7574,4/9879,5/7574,11/8214,13/8282,16}%
  }{`\ifnum#1=\#{4}IIII`\else`\ajRoman{#1}`\fi}%
}
%%&lt;!&gt; \ajroman{&lt;number&gt;}
\pxhy@DeclareCCMacro{roman}#1{%
  \pxhy@fallback{1}{13}{15}{%
    \pxhy@rshift{1/8091,11/8287,16}%
  }{`\@roman{#1}}%
}
%%&lt;!&gt; \ajPeriod{&lt;number&gt;}
\pxhy@DeclareCCMacro{Period}#1{%
  \pxhy@fallback{0}{1}{11}{%
    0.%
  }{\pxhy@rshift{0/8061,10/20577,12}}%
}
%%&lt;!&gt; \ajKakkoYobi{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakkoYobi}#1{\pxhy@rshift{1/8196,10}}
%%&lt;!&gt; \ajKakkoroman{&lt;number&gt;}
\pxhy@DeclareCCMacro{Kakkoroman}#1{%
  \pxhy@fallback{1}{1}{15}{%
    \pxhy@rshift{1/9973,16}%
  }{(`\ajroman{#1})}%
}
%%&lt;!&gt; \ajKakkoRoman{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakkoRoman}#1{%
  \pxhy@fallback{1}{1}{15}{%
    \pxhy@rshift{1/9988,16}%
  }{(`\ajRoman{#1})}%
}
%%&lt;!&gt; \ajKakkoalph{&lt;number&gt;}
\pxhy@DeclareCCMacro{Kakkoalph}#1{\pxhy@rshift{1/8111,27}}
%%&lt;!&gt; \ajKakkoAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakkoAlph}#1{\pxhy@rshift{1/10003,27}}
%%&lt;!&gt; \ajKakkoHira{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakkoHira}#1{%
  \pxhy@fallback{1}{1}{48}{%
    \pxhy@rshift{1/10029,49}%
  }{(\pxhy@rshift{1/10029,49})}% with parens
}
%%&lt;!&gt; \ajKakkoKata{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakkoKata}#1{%
  \pxhy@fallback{1}{1}{48}{%
    \pxhy@rshift{1/10077,49}%
  }{(\pxhy@rshift{1/10077,49})}% with parens
}
%%&lt;!&gt; \ajKakkoKansuji{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakkoKansuji}#1{%
  \pxhy@fallback{1}{11}{20}{%
    \pxhy@rshift{1/10125,21}%
  }{(\pxhy@knumeral{#1})}%
}
%%&lt;!&gt; \ajMaruKansuji{&lt;number&gt;}
\pxhy@DeclareCCMacro{MaruKansuji}#1{\pxhy@rshift{1/10460,11}}
%%&lt;!&gt; \ajMarualph{&lt;number&gt;}
\pxhy@DeclareCCMacro{Marualph}#1{\pxhy@rshift{1/10312,27}}
%%&lt;!&gt; \ajMaruAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{MaruAlph}#1{\pxhy@rshift{1/10338,27}}
%%&lt;!&gt; \ajMaruHira{&lt;number&gt;}
\pxhy@DeclareCCMacro{MaruHira}#1{\pxhy@rshift{1/10364,49}}
%%&lt;!&gt; \ajMaruKata{&lt;number&gt;}
\pxhy@DeclareCCMacro{MaruKata}#1{\pxhy@rshift{1/10412,49}}
%%&lt;!&gt; \ajMaruYobi{&lt;number&gt;}
\pxhy@DeclareCCMacro{MaruYobi}#1{%
  \pxhy@rshift{1/10470,8/10484,9/10478,10}%
}
%%&lt;!&gt; \ajKuroMarualph{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMarualph}#1{`\ajMarualph{#1}}
%%&lt;!&gt; \ajKuroMaruAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{KuroMaruAlph}#1{\pxhy@rshift{1/10630,27}}
%%&lt;!&gt; \ajKuroMaruHira{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMaruHira}#1{`\ajMaruHira{#1}}
%%&lt;!&gt; \ajKuroMaruKata{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMaruKata}#1{`\ajMaruKata{#1}}
%%&lt;!&gt; \ajKuroMaruYobi{&lt;number&gt;} : Fallback.
% fallback to \ajKakuYobi, which is simpler.
\pxhy@DeclareCCMacro{KuroMaruYobi}#1{`\ajKakuYobi{#1}}
%%&lt;!&gt; \ajKakualph{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{Kakualph}#1{`\ajMarualph{#1}}
%%&lt;!&gt; \ajKakuAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakuAlph}#1{\pxhy@rshift{1/10900,27}}
%%&lt;!&gt; \ajKakuHira{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KakuHira}#1{`\ajMaruHira{#1}}
%%&lt;!&gt; \ajKakuKata{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KakuKata}#1{`\ajMaruKata{#1}}
%%&lt;!&gt; \ajKakuYobi{&lt;number&gt;}
\pxhy@DeclareCCMacro{KakuYobi}#1{\pxhy@rshift{1/11022,8}}
%%&lt;!&gt; \ajKuroKakualph{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroKakualph}#1{`\ajMarualph{#1}}
%%&lt;!&gt; \ajKuroKakuAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{KuroKakuAlph}#1{\pxhy@rshift{1/11173,27}}
%%&lt;!&gt; \ajKuroKakuHira{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroKakuHira}#1{`\ajMaruHira{#1}}
%%&lt;!&gt; \ajKuroKakuKata{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroKakuKata}#1{`\ajMaruKata{#1}}
%%&lt;!&gt; \ajKuroKakuYobi{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroKakuYobi}#1{`\ajKakuYobi{#1}}
%%&lt;!&gt; \ajMaruKakualph{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{MaruKakualph}#1{`\ajMarualph{#1}}
%%&lt;!&gt; \ajMaruKakuAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{MaruKakuAlph}#1{\pxhy@rshift{1/11443,27}}
%%&lt;!&gt; \ajMaruKakuHira{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{MaruKakuHira}#1{`\ajMaruHira{#1}}
%%&lt;!&gt; \ajMaruKakuKata{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{MaruKakuKata}#1{`\ajMaruKata{#1}}
%%&lt;!&gt; \ajMaruKakuYobi{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{MaruKakuYobi}#1{`\ajKakuYobi{#1}}
%%&lt;!&gt; \ajKuroMaruKakualph{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMaruKakualph}#1{`\ajMarualph{#1}}
%%&lt;!&gt; \ajKuroMaruKakuAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{KuroMaruKakuAlph}#1{\pxhy@rshift{1/11712,27}}
%%&lt;!&gt; \ajKuroMaruKakuHira{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMaruKakuHira}#1{`\ajMaruHira{#1}}
%%&lt;!&gt; \ajKuroMaruKakuKata{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMaruKakuKata}#1{`\ajMaruKata{#1}}
%%&lt;!&gt; \ajKuroMaruKakuYobi{&lt;number&gt;} : Fallback.
\pxhy@DeclareCCMacro{KuroMaruKakuYobi}#1{`\ajKakuYobi{#1}}
%%&lt;!&gt; \ajNijuMaru{&lt;number&gt;}
\pxhy@DeclareCCMacro{NijuMaru}#1{\pxhy@rshift{1/16222,11}}
%%&lt;!&gt; \ajRecycle{&lt;number&gt;}
\pxhy@DeclareCCMacro{Recycle}#1{\pxhy@rshift{0/16314,12}}
%%&lt;!&gt; \ajHasenKakuAlph{&lt;number&gt;}
\pxhy@DeclareCCMacro{HasenKakuAlph}#1{\pxhy@rshift{1/20496,7}}
%%&lt;!&gt; \ajCross{&lt;number&gt;}
\pxhy@DeclareCCMacro{Cross}#1{%
  \pxhy@fallback{0}{0}{9}{%
    \pxhy@rshift{0/20523,10}%
  }{\pxhy@numeral{#1}\UTF{00D7}}%
}
%%&lt;!&gt; \ajSlanted[*]{&lt;number&gt;}
\pxhy@DeclareCCMacroVar{Slanted}#1{%N
  \pxhy@fallback{0}{0}{59}{%
    \pxhy@rshift{0/9460,10/20589,60}%
  }{\pxhy@numeral{#1}}%
}{%V
  \pxhy@fallback{0}{0}{59}{%
    \pxhy@rshift{0/20589,60}%
  }{\pxhy@two@digits{#1}}%
}
%%&lt;!&gt; \ajApostrophe{&lt;number&gt;}
%%&lt;!&gt; \ajYear{&lt;number&gt;} (alias)
\pxhy@DeclareCCMacro{Apostrophe}#1{%
  \pxhy@fallback{0}{0}{99}{%
    \pxhy@rshift{0/20649,100}%
  }{\UTF{2019}\pxhy@two@digits{#1}}%
}
\pxhy@DeclareAlias{Year}{Apostrophe}
%%&lt;!&gt; \ajSquareMark[*]{&lt;number&gt;}
% Note: +-variant is unsupported.
\pxhy@DeclareCCMacroVar{SquareMark}#1{%N
  \pxhy@rshift{1/12229,13}%
}{%V
  \pxhy@rshift{1/12241,10}%
}
%%&lt;!&gt; \ajHishi{&lt;number&gt;}
\pxhy@DeclareCCMacro{Hishi}#1{\pxhy@rshift{1/12256,5}}

\pxhy@finish@declare@cc@macros

%-----------------------

% The choice of numerals (Western or kanji) depends on the rendering
% of the original definition in yoko direction.

%%&lt;!&gt; \ajTsumekakko{&lt;number&gt;}
%%&lt;!&gt; \ajTumekakko{&lt;number&gt;} (alias)
% Expands to "(number)".
\pxhy@DeclareMacro{Tsumekakko}#1{%
  (\pxhy@numeral{#1})%
}
\pxhy@DeclareAlias{Tumekakko}{Tsumekakko}

%%&lt;!&gt; \ajNenrei&lt;var&gt;{&lt;number&gt;}
\pxhy@DeclareMacro{Nenrei}#1{%
  `\csname pxhy@ajNenrei/`\number#1`\endcsname
}
\csgdef{pxhy@ajNenrei/1}#1{%
  (\pxhy@numeral{#1}\ifnum#1&lt;10 縺､\fi)%
}
\csgdef{pxhy@ajNenrei/2}#1{%
  (\pxhy@numeral{#1}謇�)%
}
\csgdef{pxhy@ajNenrei/3}#1{% FIXME: the original is right?
  (\pxhy@each@digit{#1}{\pxhy@knumeral@varA 縺､})%
}
\csgdef{pxhy@ajNenrei/4}#1{%
  (\pxhy@knumeral{#1}謇�)%
}

%%&lt;!&gt; \ajnenrei&lt;var&gt;{&lt;number&gt;}
\pxhy@DeclareMacro{nenrei}#1{%
  `\csname pxhy@ajnenrei/`\number#1`\endcsname
}
\csgdef{pxhy@ajnenrei/1}#1{%
  (\pxhy@each@digit{#1}{\pxhy@knumeral@varA 縺､})%
}
\csgdef{pxhy@ajnenrei/2}#1{%
  (\pxhy@each@digit{#1}{\pxhy@knumeral@varB 謇閤)%
}
\csgdef{pxhy@ajnenrei/3}#1{% FIXME: the original is right?
  (\pxhy@each@digit{#1}{\pxhy@knumeral@varA 繝м)%
}
\csgdef{pxhy@ajnenrei/4}#1{%
  (\pxhy@each@digit{#1}{\pxhy@knumeral@varB 繧ｳ})%
}

%%&lt;!&gt; \ajKosu{&lt;number&gt;}
\pxhy@DeclareMacro{Kosu}#1{%
  `\ajnenrei4{#1}%
}

%% some special kanji numeral forms
\gdef\pxhy@knumeral@varA#1#2#3{%&lt;tsu&gt;&lt;ten&gt;&lt;one&gt;
  % 8竊貞�縺､, 10竊剃ｸ縲�, 16竊剃ｸ蜈ｭ, 20竊剃ｺ後�, 32竊剃ｸ我ｺ�
  \if0#2\pxhy@kdigit#3#1\else\pxhy@kdigit#2\pxhy@kdigit#3\fi
}
\gdef\pxhy@knumeral@varB#1#2#3{%&lt;counter&gt;&lt;ten&gt;&lt;one&gt;
  % 8竊貞�謇�, 10竊貞香謇�, 16竊貞香蜈ｭ, 20竊剃ｺ悟香, 32竊剃ｸ我ｺ�
  \ifcase#2 #2#1%
  \or 蜊―ifcase#3 #1\else \pxhy@kdigit#3\fi
  \else \pxhy@kdigit#2\ifcase#3 蜊―else \pxhy@kdigit#3\fi
  \fi
}

%%&lt;!&gt; \ajFrac[*]{&lt;numerator&gt;}{&lt;denominator&gt;}
\pxhy@DeclareMacroVar{Frac}#1#2{%N
  `\pxhy@ajFrac{\pxhy@numeral{#1}}{\pxhy@numeral{#2}}%
}{%V
  `\pxhy@ajFrac{\pxhy@numeral{#1}}{\pxhy@numeral{#2}}%
}
\gdef\pxhy@ajFrac#1#2{%
  \ifcsdef{pxhy@ucs@frac/#1/#2}{%
    \csuse{pxhy@ucs@frac/#1/#2}%
  }{#1/#2}%
}
%% \[pxhy@ucs@frac/&lt;n&gt;/&lt;d&gt;]
% Alternative definitions for fractions.
\def\do#1#2{\csgdef{pxhy@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}

%%&lt;!&gt; \aj蜊願ｧ畜&lt;string&gt;}
% Simply expands to the string.
\pxhy@DeclareMacro{蜊願ｧ筑#1{%
  `\ifpxhy@ajhankaku@chars
    `\pxhy@ajHankaku{#1}%
  `\else #1%
  `\fi
}
\gdef\pxhy@ajHankaku#1{%
  \pxhy@ajHankaku@a#1\pxhy@end
}
\gdef\pxhy@ajHankaku@a#1{%
  \pxhy@cond\ifx#1\pxhy@end\fi{}{%else
    \ifcsdef{pxhy@ucs@hw/#1}{\csuse{pxhy@ucs@hw/#1}}{#1}%
    \pxhy@ajHankaku@a}%
}
\def\pxhy@next#1{%
  \pxhy@cond\ifx#1\pxhy@end\fi{}{%else
    \csxdef{pxhy@ucs@hw/#1}{\UTF{\expandafter\pxhy@FFhex\meaning\x;}}%
    \chardef\y=\numexpr\x+1\relax \let\x\y
    \pxhy@next}%
}
\def\pxhy@FFhex#1"#2;{FF#2}
\chardef\x="61
\pxhy@next
  縲ゅ後阪√�繝ｲ繧｡繧｣繧･繧ｧ繧ｩ繝｣繝･繝ｧ繝��繧｢繧､繧ｦ繧ｨ繧ｪ繧ｫ繧ｭ繧ｯ繧ｱ%
  繧ｳ繧ｵ繧ｷ繧ｹ繧ｻ繧ｽ繧ｿ繝√ヤ繝�ヨ繝翫ル繝後ロ繝弱ワ繝偵ヵ繝倥�繝槭Α繝�繝｡%
  繝｢繝､繝ｦ繝ｨ繝ｩ繝ｪ繝ｫ繝ｬ繝ｭ繝ｯ繝ｳ繧帙�\pxhy@end
\csgdef{pxhy@ucs@hw/縲}{\space}

%%&lt;OK&gt; \笳� / \笳� / \笆｡ / \笆� / \笳� / \笳�
% Expands to \ajLig{} or \@ajNumber.
% \@ajNumber{CMD}{&lt;n&gt;} seems to expand to \ajCMD{&lt;n&gt;}.

%%&lt;OK&gt; \笆ｳ / \笆ｽ / \繧� / \繧� / \��
% Expands to \ajLig{}.

%%&lt;OK&gt; \ajPICT{&lt;name&gt;}
% Expands to \CID{}.

%%&lt;OK&gt; \ajArrow{&lt;name&gt;}
% Expands to \CID{}.

%%&lt;!&gt; \ajKunten{&lt;name&gt;}
% \ajKunten{?} (for single letters) expands to \CID{} and is string-OK.
% \ajKunten{?�怡, \ajKunten{��?}a and \ajKunten{?繝ｬ} need to be
% redefined.
\@tfor\x:={荳}{荳笠{逕ｲ}{螟ｩ}\do{% ?繝ｬ
  \pxhy@DeclareMacro{險鍋せ\x 繝ｬ}{`\ajKunten{\x}`\ajKunten{繝ｬ}}%
}
\@tfor\x:={莠迎{荳厭{蝗孺{荳ｭ}{荳急{荵凩{荳凩{荳±{蝨ｰ}{莠ｺ}\do{% ?�� ��?
  \pxhy@DeclareMacro{險鍋せ\x �怡{`\ajKunten{\x}\UTF{2013}}%
  \pxhy@DeclareMacro{險鍋せ�彌x }{`\ajKunten{\x}\UTF{2013}}%
}
\pxhy@DeclareMacro{險鍋せ縲�怡{\UTF{2013}}%
\pxhy@DeclareMacro{險鍋せ�懊}{\UTF{2013}}%

%%&lt;OK&gt; \ajVar{&lt;name&gt;}
% Expands to \CID{} or \UTF{}.

%%&lt;!&gt; \ajLeader
% Redefined to expand to two instances of the leader character.
\pxhy@DeclareMacro{Leader}{%
  `\pxhy@ajLeader
}
\gdef\pxhy@ajLeader#1{%
  \pxhy@cond\ifx[#1\fi{\pxhy@ajLeader@a}{\pxhy@ajLeader@a]{#1}}%
}
\gdef\pxhy@ajLeader@a#1]#2{%
  \pxhy@shift{12214}{#2*2}\pxhy@shift{12214}{#2*2}%
}

%%&lt;!&gt; \ajQuote
% Redefined to be fully-expandable.
\pxhy@DeclareMacro{Quote}{%
  `\pxhy@ajQuote
}
\gdef\pxhy@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}%
}

%%&lt;OK&gt; Miscenallneous \ajXxx symbols
% Most of them are string-OK; The exceptions are below.

%% ad-hoc redefinitions
\pxhy@DeclareMacro{DKunoji}{\UTF{3032}}
\pxhy@DeclareMacro{DKunojiwithBou}{\UTF{3032}}
\pxhy@DeclareMacro{Kunoji}{\UTF{3031}}
\pxhy@DeclareMacro{KunojiwithBou}{\UTF{3031}}
\pxhy@DeclareMacro{Yusuriten}{\CID{16193}}
\pxhy@DeclareMacro{varNinoji}{\CID{12107}}

%----------------------
% The \ajLig command

%% \[pxhy@uok/&lt;lig&gt;]
% If defined, then \ajLig{&lt;lig&gt;} 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}{笳⑨V}{笳⑭V}{笳⑮ews}{笳⑳S}{繧医ｊ}%
  {繧｢繝代�繝�}{繧｢繝ｫ繝輔ぃ}{繧｢繝ｳ繝壹い}{繧｢繝ｼ繝ｫ*}{繧｢繝ｼ繝ｫ}{繧､繝九Φ繧ｰ}{繧､繝ｳ繝±%
  {繧､繝ｳ繝�*}{繧ｦ繧ｩ繝ｳ}{繧ｨ繧ｹ繧ｯ繝ｼ繝厭{繧ｨ繝ｼ繧ｫ繝ｼ}{繧ｪ繝ｳ繧ｹ}{繧ｪ繝ｼ繝�}{繧ｫ繧､繝ｪ}%
  {繧ｫ繝ｩ繝�ヨ}{繧ｫ繝ｭ繝ｪ繝ｼ}{繧ｬ繝ｭ繝ｳ}{繧ｬ繝ｳ繝栲{繧ｭ繝･繝ｪ繝ｼ}{繧ｭ繝ｭ}{繧ｭ繝ｭ繧ｰ繝ｩ繝�}%
  {繧ｭ繝ｭ繝｡繝ｼ繝医Ν}{繧ｭ繝ｭ繝ｯ繝�ヨ}{繧ｮ繧ｬ}{繧ｮ繝九�}{繧ｮ繝ｫ繝繝ｼ}{繧ｯ繝ｫ繧ｼ繧､繝ｭ}{繧ｯ繝ｭ繝ｼ繝閤%
  {繧ｰ繝ｩ繝�}{繧ｰ繝ｩ繝�*}{繧ｰ繝ｩ繝�繝医Φ}{繧ｱ繝ｼ繧ｹ}{繧ｳ繝�}{繧ｳ繝ｫ繝笠{繧ｳ繝ｼ繝掵{繧ｳ繝ｼ繝�*}%
  {繧ｵ繧､繧ｯ繝ｫ}{繧ｵ繝ｳ繝√�繝�}{繧ｷ繝ｪ繝ｳ繧ｰ}{繧ｻ繝ｳ繝±{繧ｻ繝ｳ繝�*}{繧ｻ繝ｳ繝�}{繧ｻ繝ｳ繝�*}%
  {繝繝ｼ繧ｹ}{繝�す}{繝医Φ}{繝峨Ν}{繝翫ヮ}{繝弱ャ繝�}{繝上う繝м{繝上う繝�*}{繝舌�繝ｬ繝ｫ}%
  {繝代�繧ｻ繝ｳ繝�}{繝薙Ν}{繝斐い繧ｹ繝医Ν}{繝斐け繝ｫ}{繝斐さ}{繝輔ぃ繝ｩ繝�ラ}{繝輔ぅ繝ｼ繝�}%
  {繝輔Λ繝ｳ}{繝悶ャ繧ｷ繧ｧ繝ｫ}{繝倥け繧ｿ繝ｼ繝ｫ}{繝倥Ν繝м{繝倥Ν繝�*}{繝吶�繧ｿ}{繝壹た}{繝壹ル繝筑%
  {繝壹Φ繧ｹ}{繝壹�繧ｸ}{繝壹�繧ｸ*}{繝帙Φ}{繝帙�繝ｫ}{繝帙�繝ｳ}{繝帙�繝ｳ*}{繝懊Ν繝�}%
  {繝昴う繝ｳ繝�}{繝昴Φ繝厭{繝槭う繧ｯ繝ｭ}{繝槭う繝ｫ}{繝槭ャ繝殉{繝槭Ν繧ｯ}{繝槭Φ繧ｷ繝ｧ繝ｳ}%
  {繝溘け繝ｭ繝ｳ}{繝溘Μ}{繝溘Μ繝舌�繝ｫ}{繝｡繧ｬ}{繝｡繧ｬ繝医Φ}{繝｡繝ｼ繝医Ν}{繝､繝ｼ繝厭{繝､繝ｼ繝�*}%
  {繝､繝ｼ繝ｫ}{繝ｦ繧｢繝ｳ}{繝ｪ繝�ヨ繝ｫ}{繝ｪ繝ｩ}{繝ｫ繝斐�}{繝ｫ繝ｼ繝悶Ν}{繝ｬ繝�}{繝ｬ繝ｳ繝医ご繝ｳ}%
  {繝ｯ繝�ヨ}{繝ｯ繝�ヨ*}{莉､蜥迎{蜊�}{螟ｧ豁｣}{蟷ｳ謌図{譏取ｲｻ}{譏ｭ蜥迎{譬ｪ蠑丈ｼ夂､ｾ}%
\do{\global\cslet{pxhy@uok/\x}{t}}

% Note: Ligatures no*, euro*, mho*, ohm* are bad (proportional).

%% \[pxhy@uokh/&lt;char&gt;]
% If defined, then \ajLig{&lt;char&gt;?} is Unicode-OK, where '?' is
% an arbitrary single character.
\@tfor\x:=%
  {笆�}{笆｡}{笆ｳ}{笆ｽ}{笳�}{笳�}{笳急{笳殉
\do{\global\cslet{pxhy@uokh/\x}{t}}

%% ad-hoc redefinitions
\def\do#1#2{\pxhy@DeclareMacro{Lig#1}{#2}%
  \global\cslet{pxhy@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@DeclareMacro{Lig}#1{%
  % use \csname, to full-expand the argument
  \@{\expandafter\pxhy@uok@ajlig\csname}ajLig#1\@{\endcsname}%
}
\gdef\pxhy@uok@ajlig#1{%
  \expandafter\pxhy@uok@ajlig@a\string#1\pxhy@mk#1%
}
\begingroup\catcode96=12 \lccode`\?=`\g \lowercase{\endgroup
  \gdef\pxhy@uok@ajlig@a#1?#2\pxhy@mk}{%
  \pxhy@uok@ajlig@b{#2}%
}
\gdef\pxhy@uok@ajlig@b#1#2{%{NAME}\ajNAME
  % undefined name comes empty
  \ifundef{#2}{}{%else
    % if Unicode-OK then do it
    \ifcsdef{pxhy@uok/#1}{#2}{%else
      \pxhy@if@uok@head{#1}{#2}{%else
        \pxhy@drop@trail@star{#1}%
      }%
    }%
  }%
}

%% \pxhy@if@uok@head{&lt;string&gt;}{&lt;yes&gt;}{&lt;no&gt;}
\gdef\pxhy@if@uok@head#1{%
  \pxhy@if@uok@head@a#1@...\pxhy@mk
}
\gdef\pxhy@if@uok@head@a#1#2#3#4#5\pxhy@mk{%
  \pxhy@cond\ifx#3@\fi{% two-letter
    \ifcsdef{pxhy@uokh/#1}%
  }{\pxhy@cond\ifx#4@\fi{% three-letter
    \pxhy@cond@both\ifx#1(\fi\ifx#3)\fi{\@firstoftwo}{%else
      \pxhy@cond@both\ifx#1笆｡\fi\ifx#2:\fi
    }%
  }{\@secondoftwo}}%
}

%% \pxhy@drop@trail@star{&lt;string&gt;}
\gdef\pxhy@drop@trail@star#1{%
  \pxhy@drop@trail@star@a#1\pxhy@mk*\pxhy@mk\pxhy@end{#1}%
}
\gdef\pxhy@drop@trail@star@a#1*\pxhy@mk#2\pxhy@end#3{%
  \ifstrempty{#2}{#3}{#1}%
}

%--------------------------------------- done
\endgroup
%=======================================
\endinput
%% EOF
</pre></body></html>