% txi-ja.tex -- Japanese translations and font definitions for texinfo.tex.
%
% Copyright 1999, 2007, 2008, 2016, 2020 Free Software Foundation, Inc.
% 
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 3 of the license, or (at
% your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
%
% Written by Masamichi Hosoda, 22 Apr 2020, <trueroad@trueroad.jp>

\txisetlanguage{USenglish}{2}{3}

\plainnonfrenchspacing

\gdef\putwordAppendix{付録}
\gdef\putwordChapter{Chapter}
\gdef\putworderror{エラー}
\gdef\putwordfile{ファイル}
\gdef\putwordin{in}
\gdef\putwordIndexIsEmpty{（インデックスが空です）}
\gdef\putwordIndexNonexistent{（インデックスがありません）}
\gdef\putwordInfo{Info}
\gdef\putwordInstanceVariableof{Instance Variable of}
\gdef\putwordMethodon{Method on}
\gdef\putwordNoTitle{無題}
\gdef\putwordof{of}
\gdef\putwordon{on}
\gdef\putwordpage{p.}
\gdef\putwordsection{section}
\gdef\putwordSection{Section}
\gdef\putwordsee{see}
\gdef\putwordSee{See}
\gdef\putwordShortTOC{簡単な目次}
\gdef\putwordTOC{目次}
%
\gdef\putwordMJan{1月}
\gdef\putwordMFeb{2月}
\gdef\putwordMMar{3月}
\gdef\putwordMApr{4月}
\gdef\putwordMMay{5月}
\gdef\putwordMJun{6月}
\gdef\putwordMJul{7月}
\gdef\putwordMAug{8月}
\gdef\putwordMSep{9月}
\gdef\putwordMOct{10月}
\gdef\putwordMNov{11月}
\gdef\putwordMDec{12月}
%
\gdef\putwordDefmac{マクロ}
\gdef\putwordDefspec{特殊フォーム}
\gdef\putwordDefvar{変数}
\gdef\putwordDefopt{ユーザオプション}
\gdef\putwordDeffunc{関数}

% Produces Year Month Day style of output.
\def\today{%
  \number\year 年\space
  \ifcase\month
  \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
  \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
  \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
  \fi
  \space\number\day 日}


%
% Japanese font definitions
%

\ifx\txijapackage\thisisundefined
  \errmessage{Required CJK package is not found.
  Use `texinfo-ja.tex' instead of `texinfo.tex'}
\else

  %
  % For LuaTeX
  %
  \ifx\luatexversion\thisisundefined
  \else
    % Definitions for a main text size of 11pt.  (The default in Texinfo.)
    % Japanese font size is muliplied by 0.962216.
    \let\definealphabetictextfontsizexi\definetextfontsizexi
    \gdef\definetextfontsizexi{%
      % Search Japanese Mincho (serif) font
      \ifx\txijamcfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (11.2pt, magstep1).
        \jfont\textmc{file:HaranoAjiMincho-Regular.otf:jfm=ujis} at 10.78pt
        \suppressfontnotfounderror=0 % workaround for LuaTeX < 1.10
        \ifx\textmc\nullfont
          \suppressfontnotfounderror=1
          % Text font (11.2pt, magstep1).
          \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 10.78pt
          \suppressfontnotfounderror=0
          \ifx\textmc\nullfont
            \errmessage{Could not find Japanese Mincho (serif) font}
          \else
            \gdef\txijamcfont{file:ipaexm.ttf:jfm=ujis}
          \fi
        \else
          \gdef\txijamcfont{file:HaranoAjiMincho-Regular.otf:jfm=ujis}
        \fi
      \else
        % Text font (11.2pt, magstep1).
        \jfont\textmc{\txijamcfont} at 10.78pt
      \fi

      % Search Japanese Gothic (sans-serif) font
      \ifx\txijagtfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (11.2pt, magstep1).
        \jfont\textgt{file:HaranoAjiGothic-Medium.otf:jfm=ujis} at 10.78pt
        \suppressfontnotfounderror=0 % workaround for LuaTeX < 1.10
        \ifx\textgt\nullfont
          \suppressfontnotfounderror=1
          % Text font (11.2pt, magstep1).
          \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 10.78pt
          \suppressfontnotfounderror=0
          \ifx\textgt\nullfont
            \errmessage{Could not find Japanese Gothic (sans-serif) font}
          \else
            \gdef\txijagtfont{file:ipaexg.ttf:jfm=ujis}
          \fi
        \else
          \gdef\txijagtfont{file:HaranoAjiGothic-Medium.otf:jfm=ujis}
        \fi
      \else
        % Text font (11.2pt, magstep1).
        \jfont\textgt{\txijagtfont} at 10.78pt
      \fi

      % Fonts for indices, footnotes, small examples (9pt).
      \jfont\smallmc{\txijamcfont} at 8.66pt
      \jfont\smallgt{\txijagtfont} at 8.66pt

      % Fonts for small examples (8pt).
      \jfont\smallermc{\txijamcfont} at 7.70pt
      \jfont\smallergt{\txijagtfont} at 7.70pt

      % Fonts for title page (20.4pt):
      \jfont\titlemc{\txijamcfont} at 19.63pt
      \jfont\titlegt{\txijagtfont} at 19.63pt

      % Chapter (and unnumbered) fonts (17.28pt).
      \jfont\chapmc{\txijamcfont} at 16.63pt
      \jfont\chapgt{\txijagtfont} at 16.63pt

      % Section fonts (14.4pt).
      \jfont\secmc{\txijamcfont} at 13.86pt
      \jfont\secgt{\txijagtfont} at 13.86pt

      % Subsection fonts (13.15pt).
      \jfont\ssecmc{\txijamcfont} at 12.65pt
      \jfont\ssecgt{\txijagtfont} at 12.65pt

      % Reduced fonts for @acronym in text (10pt).
      \jfont\reducedmc{\txijamcfont} at 9.62pt
      \jfont\reducedgt{\txijagtfont} at 9.62pt

      % Fonts for short table of contents.
      \jfont\shortcontmc{\txijamcfont} at 11.55pt
      \jfont\shortcontgt{\txijagtfont} at 11.55pt

      \definealphabetictextfontsizexi
    }

    % Definitions for a main text size of 10pt.
    % Japanese font size is muliplied by 0.962216.
    \let\definealphabetictextfontsizex\definetextfontsizex
    \gdef\definetextfontsizex{%
      % Search Japanese Mincho (serif) font
      \ifx\txijamcfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (10pt).
        \jfont\textmc{file:HaranoAjiMincho-Regular.otf:jfm=ujis} at 9.62pt
        \suppressfontnotfounderror=0 % workaround for LuaTeX < 1.10
        \ifx\textmc\nullfont
          \suppressfontnotfounderror=1
          % Text font (10pt).
          \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
          \suppressfontnotfounderror=0
          \ifx\textmc\nullfont
            \errmessage{Could not find Japanese Mincho (serif) font}
          \else
            \gdef\txijamcfont{file:ipaexm.ttf:jfm=ujis}
          \fi
        \else
          \gdef\txijamcfont{file:HaranoAjiMincho-Regular.otf:jfm=ujis}
        \fi
      \else
        % Text font (10pt).
        \jfont\textmc{\txijamcfont} at 9.62pt
      \fi

      % Search Japanese Gothic (sans-serif) font
      \ifx\txijagtfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (10pt).
        \jfont\textgt{file:HaranoAjiGothic-Medium.otf:jfm=ujis} at 9.62pt
        \suppressfontnotfounderror=0 % workaround for LuaTeX < 1.10
        \ifx\textgt\nullfont
          \suppressfontnotfounderror=1
          % Text font (10pt).
          \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
          \suppressfontnotfounderror=0
          \ifx\textgt\nullfont
            \errmessage{Could not find Japanese Gothic (sans-serif) font}
          \else
            \gdef\txijagtfont{file:ipaexg.ttf:jfm=ujis}
          \fi
        \else
          \gdef\txijagtfont{file:HaranoAjiGothic-Medium.otf:jfm=ujis}
        \fi
      \else
        % Text font (10pt).
        \jfont\textgt{\txijagtfont} at 9.62pt
      \fi

      % Fonts for indices, footnotes, small examples (9pt).
      \jfont\smallmc{\txijamcfont} at 8.66pt
      \jfont\smallgt{\txijagtfont} at 8.66pt

      % Fonts for small examples (8pt).
      \jfont\smallermc{\txijamcfont} at 7.70pt
      \jfont\smallergt{\txijagtfont} at 7.70pt

      % Fonts for title page (20.4pt):
      \jfont\titlemc{\txijamcfont} at 19.63pt
      \jfont\titlegt{\txijagtfont} at 19.63pt

      % Chapter fonts (14.4pt).
      \jfont\chapmc{\txijamcfont} at 13.86pt
      \jfont\chapgt{\txijagtfont} at 13.86pt

      % Section fonts (12pt).
      \jfont\secmc{\txijamcfont} at 11.55pt
      \jfont\secgt{\txijagtfont} at 11.55pt

      % Subsection fonts (10pt).
      \jfont\ssecmc{\txijamcfont} at 9.62pt
      \jfont\ssecgt{\txijagtfont} at 9.62pt

      % Reduced fonts for @acronym in text (9pt).
      \jfont\reducedmc{\txijamcfont} at 8.66pt
      \jfont\reducedgt{\txijagtfont} at 8.66pt

      % Fonts for short table of contents.
      \jfont\shortcontmc{\txijamcfont} at 11.55pt
      \jfont\shortcontgt{\txijagtfont} at 11.55pt

      \definealphabetictextfontsizex
    }

    % Ignore LuaTeX-ja added line end comment
    % https://osdn.jp/ticket/browse.php?group_id=5593&tid=36096
    %
    % Re-define texinfo.tex's \parseargusing
    \def\parseargusing#1#2{%
      \def\argtorun{#2}%
      \begingroup
        \ifx\ltjlineendcomment\thisisundefined
          % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
          \catcode"FFFFF=9
        \else
          % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
          \catcode\ltjlineendcomment=9
        \fi
        \obeylines
        \spaceisspace
        #1%
        \parseargline\empty% Insert the \empty token, see \finishparsearg below.
    }
    % Re-define texinfo.tex's \c
    \def\c{\begingroup \catcode`\^^M=\active%
      \ifx\ltjlineendcomment\thisisundefined
        % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
        \catcode"FFFFF=9%
      \else
        % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
        \catcode\ltjlineendcomment=9%
      \fi
    \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
    \cxxx}
    % Re-let \c related macro
    \let\comment=\c
    % Re-let \comment related macros
    \let\setfilename=\comment
    \let\dircategory=\comment
    \let\definfoenclose=\comment
    \let\footnotestyle=\comment
  \fi % LuaTeX

  %
  % For XeTeX
  %
  \ifx\XeTeXrevision\thisisundefined
  \else
    % Fix some Japanese character class
    % (unicode-letters.tex is wrong.)
    \def\do#1{\XeTeXcharclass"#1=1 }
    \do{3041}\do{3043}\do{3045}\do{3047}\do{3049}\do{3063}
    \do{3083}\do{3085}\do{3087}\do{308E}\do{3095}\do{3096}
    \do{30A1}\do{30A3}\do{30A5}\do{30A7}\do{30A9}\do{30C3}
    \do{30E3}\do{30E5}\do{30E7}\do{30EE}\do{30F5}\do{30F6}
    \do{30FC}\do{31F0}\do{31F1}\do{31F2}\do{31F3}\do{31F4}
    \do{31F5}\do{31F6}\do{31F7}\do{31F8}\do{31F9}\do{31FA}
    \do{31FB}\do{31FC}\do{31FD}\do{31FE}\do{31FF}

    % Add some character class
    \do{2015}\do{2016}\do{2025}\do{2030}\do{2032}\do{2033}
    \do{203B}\do{2103}\do{212B}

    \do{2500}\do{2501}\do{2502}\do{2503}\do{250C}\do{250F}
    \do{2510}\do{2513}\do{2514}\do{2517}\do{2518}\do{251B}
    \do{251C}\do{251D}\do{2520}\do{2523}\do{2524}\do{2525}
    \do{2528}\do{252B}\do{252C}\do{252F}\do{2530}\do{2533}
    \do{2534}\do{2537}\do{2538}\do{253B}\do{253C}\do{253F}
    \do{2542}\do{254B}

    \do{25A0}\do{25A1}\do{25B2}\do{25B3}\do{25BC}\do{25BD}
    \do{25C6}\do{25C7}\do{25CB}\do{25CE}\do{25CF}\do{25EF}
    \do{2605}\do{2606}\do{2640}\do{2642}

    \do{3000}

    % Setting Japanese font instead of Chinese font
    \def\setjafont#1{%
      \let\zhfont#1\let\zhpunctfont#1%
      \let\zhextafont#1\let\zhextbfont#1%
    }

    % Definitions for a main text size of 11pt.  (The default in Texinfo.)
    % Japanese font size is muliplied by 0.962216.
    \let\definealphabetictextfontsizexi\definetextfontsizexi
    \gdef\definetextfontsizexi{%
      % Search Japanese Mincho (serif) font
      \ifx\txijamcfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (11.2pt, magstep1).
        \font\textmczzz"[HaranoAjiMincho-Regular.otf]:mapping=tex-text"
          at 10.78pt
        \ifx\textmczzz\nullfont
          % Text font (11.2pt, magstep1).
          \font\textmczzz"[ipaexm.ttf]:mapping=tex-text" at 10.78pt
          \ifx\textmczzz\nullfont
            \errmessage{Could not find Japanese Mincho (serif) font}
          \else
            \gdef\txijamcfont{[ipaexm.ttf]:mapping=tex-text}
          \fi
        \else
          \gdef\txijamcfont{[HaranoAjiMincho-Regular.otf]:mapping=tex-text}
        \fi
        \suppressfontnotfounderror=0
      \else
        % Text font (11.2pt, magstep1).
        \font\textmczzz"\txijamcfont" at 10.78pt
      \fi

      % Search Japanese Gothic (sans-serif) font
      \ifx\txijagtfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (11.2pt, magstep1).
        \font\textgtzzz"[HaranoAjiGothic-Medium.otf]:mapping=tex-text"
          at 10.78pt
        \ifx\textgtzzz\nullfont
          % Text font (11.2pt, magstep1).
          \font\textgtzzz"[ipaexg.ttf]:mapping=tex-text" at 10.78pt
          \ifx\textgtzzz\nullfont
            \errmessage{Could not find Japanese Gothic (sans-serif) font}
          \else
            \gdef\txijagtfont{[ipaexg.ttf]:mapping=tex-text}
          \fi
        \else
          \gdef\txijagtfont{[HaranoAjiGothic-Medium.otf]:mapping=tex-text}
        \fi
        \suppressfontnotfounderror=0
      \else
        % Text font (11.2pt, magstep1).
        \font\textgtzzz"\txijagtfont" at 10.78pt
      \fi

      % Text fonts (11.2pt, magstep1).
      \def\textmc{\setjafont\textmczzz}
      \def\textgt{\setjafont\textgtzzz}

      % Fonts for indices, footnotes, small examples (9pt).
      \font\smallmczzz"\txijamcfont" at 8.66pt
      \font\smallgtzzz"\txijagtfont" at 8.66pt
      \def\smallmc{\setjafont\smallmczzz}
      \def\smallgt{\setjafont\smallgtzzz}

      % Fonts for small examples (8pt).
      \font\smallermczzz"\txijamcfont" at 7.70pt
      \font\smallergtzzz"\txijagtfont" at 7.70pt
      \def\smallermc{\setjafont\smallermczzz}
      \def\smallergt{\setjafont\smallergtzzz}

      % Fonts for title page (20.4pt):
      \font\titlemczzz"\txijamcfont" at 19.63pt
      \font\titlegtzzz"\txijagtfont" at 19.63pt
      \def\titlemc{\setjafont\titlemczzz}
      \def\titlegt{\setjafont\titlegtzzz}

      % Chapter (and unnumbered) fonts (17.28pt).
      \font\chapmczzz"\txijamcfont" at 16.63pt
      \font\chapgtzzz"\txijagtfont" at 16.63pt
      \def\chapmc{\setjafont\chapmczzz}
      \def\chapgt{\setjafont\chapgtzzz}

      % Section fonts (14.4pt).
      \font\secmczzz"\txijamcfont" at 13.86pt
      \font\secgtzzz"\txijagtfont" at 13.86pt
      \def\secmc{\setjafont\secmczzz}
      \def\secgt{\setjafont\secgtzzz}

      % Subsection fonts (13.15pt).
      \font\ssecmczzz"\txijamcfont" at 12.65pt
      \font\ssecgtzzz"\txijagtfont" at 12.65pt
      \def\ssecmc{\setjafont\ssecmczzz}
      \def\ssecgt{\setjafont\ssecgtzzz}

      % Reduced fonts for @acronym in text (10pt).
      \font\reducedmczzz"\txijamcfont" at 9.62pt
      \font\reducedgtzzz"\txijagtfont" at 9.62pt
      \def\reducedmc{\setjafont\reducedmczzz}
      \def\reducedgt{\setjafont\reducedgtzzz}

      % Fonts for short table of contents.
      \font\shortcontmczzz"\txijamcfont" at 11.55pt
      \font\shortcontgtzzz"\txijagtfont" at 11.55pt
      \def\shortcontmc{\setjafont\shortcontmczzz}
      \def\shortcontgt{\setjafont\shortcontgtzzz}

      \definealphabetictextfontsizexi
    }

    % Definitions for a main text size of 10pt.
    % Japanese font size is muliplied by 0.962216.
    \let\definealphabetictextfontsizex\definetextfontsizex
    \gdef\definetextfontsizex{%
      % Search Japanese Mincho (serif) font
      \ifx\txijamcfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (10pt).
        \font\textmczzz"[HaranoAjiMincho-Regular.otf]:mapping=tex-text"
          at 9.62pt
        \ifx\textmczzz\nullfont
          % Text font (10pt).
          \font\textmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
          \ifx\textmczzz\nullfont
            \errmessage{Could not find Japanese Mincho (serif) font}
          \else
            \gdef\txijamcffont{[ipaexm.ttf]:mapping=tex-text}
          \fi
        \else
          \gdef\txijamcfont{[HaranoAjiMincho-Regular.otf]:mapping=tex-text}
        \fi
        \suppressfontnotfounderror=0
      \else
        % Text font (10pt).
        \font\textmczzz"\txijamcfont" at 9.62pt
      \fi

      % Search Japanese Gothic (sans-serif) font
      \ifx\txijagtfont\thisisundefined
        \suppressfontnotfounderror=1
        % Text font (10pt).
        \font\textgtzzz"[HaranoAjiGothic-Medium.otf]:mapping=tex-text"
          at 9.62pt
        \ifx\textgtzzz\nullfont
          % Text font (10pt).
          \font\textgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
          \ifx\textgtzzz\nullfont
            \errmessage{Could not find Japanese Gothic (sans-serif) font}
          \else
            \gdef\txijagtffont{[ipaexg.ttf]:mapping=tex-text}
          \fi
        \else
          \gdef\txijagtfont{[HaranoAjiGothic-Medium.otf]:mapping=tex-text}
        \fi
        \suppressfontnotfounderror=0
      \else
        % Text font (10pt).
        \font\textgtzzz"\txijagtfont" at 9.62pt
      \fi

      % Text fonts (10pt).
      \def\textmc{\setjafont\textmczzz}
      \def\textgt{\setjafont\textgtzzz}

      % Fonts for indices, footnotes, small examples (9pt).
      \font\smallmczzz"\txijamcfont" at 8.66pt
      \font\smallgtzzz"\txijagtfont" at 8.66pt
      \def\smallmc{\setjafont\smallmczzz}
      \def\smallgt{\setjafont\smallgtzzz}

      % Fonts for small examples (8pt).
      \font\smallermczzz"\txijamcfont" at 7.70pt
      \font\smallergtzzz"\txijagtfont" at 7.70pt
      \def\smallermc{\setjafont\smallermczzz}
      \def\smallergt{\setjafont\smallergtzzz}

      % Fonts for title page (20.4pt):
      \font\titlemczzz"\txijamcfont" at 19.63pt
      \font\titlegtzzz"\txijagtfont" at 19.63pt
      \def\titlemc{\setjafont\titlemczzz}
      \def\titlegt{\setjafont\titlegtzzz}

      % Chapter fonts (14.4pt).
      \font\chapmczzz"\txijamcfont" at 13.86pt
      \font\chapgtzzz"\txijagtfont" at 13.86pt
      \def\chapmc{\setjafont\chapmczzz}
      \def\chapgt{\setjafont\chapgtzzz}

      % Section fonts (12pt).
      \font\secmczzz"\txijamcfont" at 11.55pt
      \font\secgtzzz"\txijagtfont" at 11.55pt
      \def\secmc{\setjafont\secmczzz}
      \def\secgt{\setjafont\secgtzzz}

      % Subsection fonts (10pt).
      \font\ssecmczzz"\txijamcfont" at 9.62pt
      \font\ssecgtzzz"\txijagtfont" at 9.62pt
      \def\ssecmc{\setjafont\ssecmczzz}
      \def\ssecgt{\setjafont\ssecgtzzz}

      % Reduced fonts for @acronym in text (9pt).
      \font\reducedmczzz"\txijamcfont" at 8.66pt
      \font\reducedgtzzz"\txijagtfont" at 8.66pt
      \def\reducedmc{\setjafont\reducedmczzz}
      \def\reducedgt{\setjafont\reducedgtzzz}

      % Fonts for short table of contents.
      \font\shortcontmczzz"\txijamcfont" at 11.55pt
      \font\shortcontgtzzz"\txijagtfont" at 11.55pt
      \def\shortcontmc{\setjafont\shortcontmczzz}
      \def\shortcontgt{\setjafont\shortcontgtzzz}

      \definealphabetictextfontsizex
    }

    % Japanese line break settings
    \XeTeXlinebreaklocale "ja_JP"
    \XeTeXlinebreakskip=0em plus 0.1em minus 0.01em
    \XeTeXlinebreakpenalty=0

    % For copy & paste Unicode characters (XeTeX 0.99995 - 0.99998)
    \ifx\XeTeXgenerateactualtext\thisisundefined
    \else
      % XeTeX 0.99999+ doesn't need this workaround.
      \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99999}<0
        \XeTeXgenerateactualtext=1
      \fi
    \fi

  \fi % XeTeX

  \iftxinativeunicodecapable

    % Sync fonts

    \let\alphabeticrm\rm
    \gdef\rm{\alphabeticrm\tenmc}

    \let\alphabeticit\it
    \gdef\it{\alphabeticit\tenmc}

    \let\alphabeticsl\sl
    \gdef\sl{\alphabeticsl\tengt}

    \let\alphabeticbf\bf
    \gdef\bf{\alphabeticbf\tengt}

    \let\alphabetictt\tt
    \gdef\tt{\alphabetictt\tengt}

    % Add fonts

    \let\alphabetictextfonts\textfonts
    \gdef\textfonts{%
      \alphabetictextfonts
      \let\tenmc\textmc
      \let\tengt\textgt
    }

    \let\alphabetictitlefonts\titlefonts
    \gdef\titlefonts{%
      \alphabetictitlefonts
      \let\tenmc\titlemc
      \let\tengt\titlegt
    }

    \let\alphabeticchapfonts\chapfonts
    \gdef\chapfonts{%
      \alphabeticchapfonts
      \let\tenmc\chapmc
      \let\tengt\chapgt
    }

    \let\alphabeticsecfonts\secfonts
    \gdef\secfonts{%
      \alphabeticsecfonts
      \let\tenmc\secmc
      \let\tengt\secgt
    }

    \let\alphabeticsubsecfonts\subsecfonts
    \gdef\subsecfonts{%
      \alphabeticsubsecfonts
      \let\tenmc\ssecmc
      \let\tengt\ssecgt
    }

    \global\let\subsubsecfonts\subsecfonts

    \let\alphabeticreducedfonts\reducedfonts
    \gdef\reducedfonts{%
      \alphabeticreducedfonts
      \let\tenmc\reducedmc
      \let\tengt\reducedgt
    }

    \let\alphabeticsmallfonts\smallfonts
    \gdef\smallfonts{%
      \alphabeticsmallfonts
      \let\tenmc\smallmc
      \let\tengt\smallgt
    }

    \let\alphabeticsmallerfonts\smallerfonts
    \gdef\smallerfonts{%
      \alphabeticsmallerfonts
      \let\tenmc\smallermc
      \let\tengt\smallergt
    }

    \let\smallexamplefonts\smallfonts

    % Reset fonts

    \globaldefs = 1
    \definetextfontsizexi
    \globaldefs = 0

  \fi % \iftxinativeunicodecapable

  % add for fonts in \initial --ak
  \global\let\alphabeticsecrm\secrm
  \gdef\secrm{\alphabeticsecrm\secgt}

\fi % \ifx\txijapackage\thisisundefined
