<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%
% This file is part of the `japanese' package,
% providing Japanese language support for Babel.
%
% Copyright (C) 1999--2007 by ING (Toru INAGAKI)
%               2016--2021 by Japanese TeX Development Community
%
% \fi
%
% ^^A  Ensure UTF-8 input encoding for pLaTeX
% ^^A  (effective since e-pTeX 20160201, thus TeX Live 2016)
\ifx\epTeXinputencoding\undefined\else
  \epTeXinputencoding utf8
\fi
%
%\iffalse
%    Tell the \LaTeX\ system who we are and write an entry on the
%    transcript.
%&lt;*dtx&gt;
\ProvidesFile{babel-japanese.dtx}
%&lt;/dtx&gt;
%&lt;code&gt;\ProvidesLanguage{japanese}
%&lt;*!sample&gt;
%\ProvidesFile{babel-japanese.dtx}
        [2021/02/13 v3.1 Japanese support for babel (texjporg)]
%&lt;/!sample&gt;
%\fi
%
%\iffalse
%
%&lt;*filedriver&gt;
\ifx\directlua\undefined
  \documentclass{jltxdoc}
  \usepackage{minijs}
\else
  \documentclass{ltjltxdoc}
\fi
\usepackage[japanese]{babel}% load it
\GetFileInfo{babel-japanese.dtx}
\setcounter{StandardModuleDepth}{1}
\CodelineNumbered
\MakeShortVerb{\|}
\OnlyDescription
\newcommand*\babel{\textsf{babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
\usepackage{hologo}% for XeLaTeX logo
\def\pTeX{p\kern-.15em\TeX}
\def\pdfTeX{\hologo{pdfTeX}}
\def\XeTeX{\hologo{XeTeX}}
\def\LuaTeX{\hologo{LuaTeX}}
\def\pdfLaTeX{\hologo{pdfLaTeX}}
\def\XeLaTeX{\hologo{XeLaTeX}}
\def\LuaLaTeX{\hologo{LuaLaTeX}}
\def\pLaTeX{p\hologo{LaTeX}}
\def\upLaTeX{up\hologo{LaTeX}}
\begin{document}
  \DocInput{babel-japanese.dtx}
\end{document}
%&lt;/filedriver&gt;
%
%\fi
%
% \title{Babel-Option {\sffamily japanese} version \fileversion}
% \author{\copyright\ 1999--2007 ING\\
%                     2016--2021 Japanese \TeX\ Development Community}
% \date{\filedate}
% \maketitle
% \baselineskip=14pt
%
% \section*{The Japanese language definition file}
%
% The package ``babel-japanese'' provides ``\texttt{japanese}''
% option for Babel package.
%
% \begin{itemize}
%  \def\textbf#1{{\fontseries{b}\selectfont #1}}
%  \def\repl#1{``\nobreak#1\nobreak''}
%  \item \textbf{This package provides only translated
%     replacement texts for caption keywords and date}
%     (e.g. \repl{Table of contents} $\rightarrow$ \repl{ç›®æ¬¡},
%           \verb+\today+ $\rightarrow$ \repl{\å’Œæš¦\today}).
%     \textbf{To display such Japanese terms correctly,
%     you will need to select a proper Japanese font
%     and set up Japanese typesetting rules beforehand.}
%     This is because typesetting requirements of Japanese
%     (including line breaking and spacing) are completely
%     different from those of Western languages, so setting
%     parameter values and additional hyphenation patterns
%     are not enough. You may need to enable some engine
%     extensions (\pTeX\ family) or use extensive package
%     with Japanese support (Lua\TeX-ja).
%     Please refer to \file{japanese.pdf} for detail.
%  \item Moreover, \textbf{the translations provided by
%     this package are \emph{incomplete} either}:
%     to make full use of this package, you will need some
%     common Japanese classes.\footnote{e.g.
%       (u)jclasses or jsclasses for (u)\pLaTeX,
%       ltj(s)classes for \LuaLaTeX\ with Lua\TeX-ja package.}
%     This is due to the following reasons:
%   \begin{itemize}
%    \item The word order in Japanese is sometimes different
%     from that in most Western languages
%     (e.g. ``Part 1'' $\rightarrow$ ``ç¬¬1éƒ¨'').
%    \item Common Western classes (article.cls etc)
%     provide placeholders in front of the numbering
%     (e.g. \cs{chaptername}), but lack any placeholders
%     behind the numbering.\footnote{Update: starting from
%     Babel v3.53 (2021-01-26), a new feature to adjust
%     e.g. chapter format to have placeholders like
%     \cs{prechaptername} ... \cs{postchaptername} is
%     available, which seems to work with standard classes.}
%     Therefore, the keywords like ``Part'' or ``Chapter''
%     cannot be simply replaced with Japanese counterpart.
%   \end{itemize}
% \end{itemize}
%
% The importance of this package is to ``restore'' Japanese
% keywords which have been defined by Japanese classes
% but (partially) redefined by other languages while
% the main text is in Japanese. Example usage:
%\begin{verbatim}
% \documentclass{jbook}
% \usepackage[german,english,japanese]{babel}
%\end{verbatim}
%
% \section*{Babelæ—¥æœ¬èªžå®šç¾©ãƒ•ã‚¡ã‚¤ãƒ«}
%
% \file{japanese}ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã¯ï¼Œ
% æ—¥æœ¬èªžã«ã‚ˆã‚‹è¦‹å‡ºã—èªžã¨æ—¥ä»˜ã‚’å‡ºåŠ›ã™ã‚‹ãŸã‚ã®ãƒžã‚¯ãƒ­ã‚’
% å®šç¾©ã—ã¦ã„ã¾ã™ã€‚\babel ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã§æ—¥æœ¬èªžã‚’æŒ‡å®šã—ã¾ã™ã€‚
% \begin{quote}
% |\usepackage[...,japanese]{babel}|
% \end{quote}
%
% ãƒãƒ¼ã‚¸ãƒ§ãƒ³v2.0ä»¥é™ã§ã¯ï¼Œ\pTeX{}ç³»ï¼ˆ\pLaTeX{}ï¼Œ\upLaTeX{}ï¼‰ã«åŠ&nbsp;ãˆã¦ï¼Œ
% ãƒã‚¤ãƒ†ã‚£ãƒ–Unicodeãªã‚¨ãƒ³ã‚¸ãƒ³ï¼ˆ\XeTeX{}ï¼Œ\LuaTeX{}ï¼‰ã‚‚ã‚µãƒãƒ¼ãƒˆã—ã¾ã—ãŸã€‚
% ã¾ãŸï¼Œãƒãƒ¼ã‚¸ãƒ§ãƒ³v3.0ä»¥é™ã§ã¯\pdfLaTeX{}ã§ã‚‚å‹•ä½œã—ã¾ã™ã€‚
% ã“ã®ãŸã‚ï¼Œãƒ•ã‚¡ã‚¤ãƒ«ã¯UTF-8ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§ä¿å­˜ã™ã‚‹ã‚ˆã†ã«ã—ã¦ãã&nbsp;ã•ã„ã€‚
%
% 2016å¹´ä»¥é™ï¼Œæœ¬ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã®ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã¯æ—¥æœ¬èªž\TeX{}é–‹ç™ºã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£
% (Japanese \TeX\ Development Community)ã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã¦ã„ã¾ã™ã€‚é–‹ç™ºç‰ˆã¯
% GitHubãƒªãƒã‚¸ãƒˆãƒª
%\begin{verbatim}
%      https://github.com/texjporg/babel-japanese
%\end{verbatim}
% ã«ã‚ã‚Šã¾ã™ã€‚ãƒã‚°å&nbsp;±å‘Šã¯ä¸Šè¨˜ã®ãƒªãƒã‚¸ãƒˆãƒªï¼Œã¾ãŸã¯Issue Mailing List
%\begin{verbatim}
%      issue@texjp.org
%\end{verbatim}
% ã¾ã§ãŠé¡˜ã„ã—ã¾ã™ã€‚
%
%
% \section{ã“ã®æ–‡æ›¸ã«ã¤ã„ã¦}
%
% ã“ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰èª¬æ˜Žæ›¸(\jobname.pdf)è‡ªä½“ã¯
% \pLaTeX{}ï¼Œ\upLaTeX{}ï¼Œ\LuaLaTeX{}ã§å‡¦ç†ã§ãã‚‹ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ã€‚
%
%
% \section{ã‚³ãƒ¼ãƒ‰}
%
% [2020-11-27] ã‚¨ãƒ³ã‚¸ãƒ³æ¤œæŸ»ã¯å‰Šé™¤ã—ã¾ã—ãŸã€‚
% ^^A \pTeX{}ç³»ï¼ˆ\pLaTeX{}ï¼Œ\upLaTeX{}ï¼‰ã§ãªãï¼Œ
% ^^A ã‹ã¤Unicodeãª\TeX{}ï¼ˆ\XeLaTeX{}ï¼Œ
% ^^A \LuaLaTeX{}ï¼‰ã§ã‚‚ãªã„å&nbsp;´åˆã¯ï¼Œæœ€åˆã«ã‚¨ãƒ©ãƒ¼ã‚’å‡ºã—ã¾ã™ã€‚
%
%    \begin{macrocode}
%&lt;*code&gt;
%\ifx\kanjiskip\@undefined\ifx\Umathcode\@undefined
%  \@latex@error{Option '\CurrentOption' requires
%                one of the followings:\MessageBreak
%                pTeX, upTeX, XeTeX, LuaTeX\MessageBreak
%                It seems you are running unsupported engine!}\@ehc
%\fi\fi
%    \end{macrocode}
%
%    \begin{macrocode}
\LdfInit\CurrentOption{captions\CurrentOption}
%    \end{macrocode}
%
% \DescribeMacro{\l@japanese}
% ã“ã“ã§ã¯|\l@japanese|ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹ã‹å¦ã‹ã‚’åˆ¤æ–­ã—ï¼Œå®šç¾©ã•ã‚Œã¦ã„ã‚Œã°
% æ—¥æœ¬èªžç”¨ãƒã‚¤ãƒ•ãƒãƒ¼ã‚·ãƒ§ãƒ³ãƒ‘ã‚¿ãƒ¼ãƒ³ã‚’èª­ã¿è¾¼ã¿ã¾ã™ã€‚
% \DescribeMacro{\adddialect}
% ã—ã‹ã—ï¼Œæ—¥æœ¬èªžã«ã¯ãƒã‚¤ãƒ•ãƒãƒ¼ã‚·ãƒ§ãƒ³ãƒ‘ã‚¿ãƒ³ãŒå­˜åœ¨ã—ãªã„ã®ã§
% |\adddialect|ã«|\l@japanese|ã‚’ä»£å…¥ã—ï¼Œ\file{language.dat}
% ã§æœ€åˆã«æŒ‡å®šã—ãŸè¨€èªžï¼ˆè¨€èªžç•ªå·0ï¼Œé€šå¸¸ã¯è‹±èªžï¼‰ã®ãƒã‚¤ãƒ•ãƒãƒ¼ã‚·ãƒ§ãƒ³ãƒ‘ã‚¿ãƒ¼ãƒ³ã‚’
% ä½¿ç”¨ã—ã¾ã™ã€‚
%
% [2016-12-16] æ—§ãƒãƒ¼ã‚¸ãƒ§ãƒ³(v1.3)ã§ã¯
%\begin{quote}\small\begin{verbatim}
% Package babel Warning: No hyphenation patterns were loaded for
% (babel)                the language `Japanese'
% (babel)                I will use the patterns loaded for \language=0
%                        instead.
%\end{verbatim}\end{quote}
% ã¨ã„ã†è­¦å‘ŠãŒå‡ºã‚‹ã®ã‚’ç„¡è¦–ã™ã‚‹æ–¹é‡ã§ã—ãŸãŒï¼Œæ–°ã—ã„\babel ã§ã¯è­¦å‘ŠãŒ
% ã‚ˆã‚Šã†ã‚‹ã•ããªã£ã¦ã„ã¾ã—ãŸã€‚
%\begin{quote}\small\begin{verbatim}
% Package babel Warning: No hyphenation patterns were preloaded for
% (babel)                the language `Japanese' into the format.
% (babel)                Please, configure your TeX system to add them and
% (babel)                rebuild the format. Now I will use the patterns
% (babel)                preloaded for english instead on input line 47.
%\end{verbatim}\end{quote}
% ãã“ã§ï¼Œæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³(v2.0)ã‹ã‚‰ã¯è­¦å‘Šã‚’å‡ºã•ãªã„ã“ã¨ã«ã—ã¦ï¼Œä»£ã‚ã‚Šã«
% ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã«ã®ã¿Infoã‚’å‡ºåŠ›ã—ã¾ã™ã€‚
%
%    \begin{macrocode}
\ifx\l@japanese\@undefined
%  \@nopatterns{Japanese}% comment out (2016-12-16)
  \PackageInfo{babel}{%
    No hyphenation patterns are available for Japanese,\MessageBreak
    so I will use the patterns preloaded for \bbl@nulllanguage\MessageBreak
    instead}
  \adddialect\l@japanese0\fi
%    \end{macrocode}
%
% \DescribeMacro{\captionsjapanese}
% |\captionsjapanese|ãƒžã‚¯ãƒ­ã¯\pLaTeX{}ã®æ¨™æº–ã®ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã§ä½¿ã‚ã‚Œã‚‹
% è¦‹å‡ºã—èªžã‚’æ—¥æœ¬èªžã§å‡ºåŠ›ã—ã¾ã™ã€‚\LaTeX{}ã®æ¨™æº–ã®ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ãªã©ï¼Œ
% è¥¿æ¬§ã§é–‹ç™ºã•ã‚ŒãŸã‚‚ã®ã§ã‚‚ä¸€éƒ¨ã—ã¾ã™ãŒï¼Œ
% èªžé&nbsp;†ã®é–¢ä¿‚ä¸Šã™ã¹ã¦ãŒæ—¥æœ¬èªžåŒ–ã•ã‚Œãªã„å&nbsp;´åˆãŒã‚ã‚Šã¾ã™
% ï¼ˆãŸã¨ãˆã°ï¼ŒPart 1â†’ç¬¬1éƒ¨ã¨ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ï¼‰ã€‚
%
% [2016-12-15] ã€Œè¨¼æ˜Žã€ã¨ã€Œç”¨èªžé›†ã€ã‚‚æ—¥æœ¬èªžåŒ–ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã—ãŸã€‚
% |\postpartname| ãŒã‚¿ã‚¤ãƒã§ |\postpartnam| ã«ãªã£ã¦ã„ãŸã®ã‚’ç›´ã—ã¾ã—ãŸã€‚
%
% [2021-02-06] Babel v3.53ã§è¿½åŠ&nbsp;ã•ã‚ŒãŸæ–°æ©Ÿèƒ½ã«ã‚ˆã‚Šï¼Œè¥¿æ¬§ã§é–‹ç™ºã•ã‚ŒãŸ
% ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚‚è¦‹å‡ºã—ã®æ—¥æœ¬èªžåŒ–ã‚µãƒãƒ¼ãƒˆãŒæ”¹å–„ã•ã‚Œã¾ã—ãŸã€‚
% å°‘ãªãã¨ã‚‚\LaTeX{}ã®æ¨™æº–ã®ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã§ã¯å‹•ä½œã™ã‚‹ã‚ˆã†ã§ã™ã€‚
% å¾Œã® |\setlocalecaption| ã®ã‚³ãƒ¼ãƒ‰ã‚’å‚ç…§ã—ã¦ãã&nbsp;ã•ã„ã€‚
%
% UTF-8ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§ç›´æŽ¥å’Œæ–‡æ–‡å­—ã‚’è¨˜è¿°ã—ã¾ã™ã€‚
%    \begin{macrocode}
\def\bbl@jpn@prefacename{å‰æ›¸ã}%
\def\bbl@jpn@refname{å‚è€ƒæ–‡çŒ®}%
\def\bbl@jpn@abstractname{æ¦‚è¦}%
\def\bbl@jpn@bibname{å‚è€ƒæ–‡çŒ®}%
%\def\bbl@jpn@chaptername{Chapter}%
\def\bbl@jpn@prechaptername{ç¬¬}%    -- added
\def\bbl@jpn@postchaptername{ç«&nbsp;}%   -- added
\def\bbl@jpn@presectionname{}%  ç¬¬  -- added
\def\bbl@jpn@postsectionname{}% ç¯€  -- added
\def\bbl@jpn@appendixname{ä»˜éŒ²}%
\def\bbl@jpn@contentsname{ç›®æ¬¡}%
\def\bbl@jpn@listfigurename{å›³ç›®æ¬¡}%
\def\bbl@jpn@listtablename{è¡¨ç›®æ¬¡}%
\def\bbl@jpn@indexname{ç´¢å¼•}%
\def\bbl@jpn@figurename{å›³}%
\def\bbl@jpn@tablename{è¡¨}%
%\def\bbl@jpn@partname{Part}%
\def\bbl@jpn@prepartname{ç¬¬}%       -- added
\def\bbl@jpn@postpartname{éƒ¨}%      -- added
%\def\bbl@jpn@enclname{encl}%     åŒå°ç‰©
%\def\bbl@jpn@ccname{cc}%         Cc
%\def\bbl@jpn@headtoname{To}%     Toï¼ˆå®›å…ˆï¼‰
%\def\bbl@jpn@pagename{Page}%     ãƒšãƒ¼ã‚¸
%\def\bbl@jpn@seename{see}%       å‚ç…§
%\def\bbl@jpn@alsoname{see also}% ã‚‚å‚ç…§
\def\bbl@jpn@proofname{è¨¼æ˜Ž}%
\def\bbl@jpn@glossaryname{ç”¨èªžé›†}%
%    \end{macrocode}
%
% å®Ÿéš›ã®å‘½ä»¤ã«ã“ã‚Œã‚‰ã‚’ã‚³ãƒ”ãƒ¼ã—ã¾ã™ã€‚
%    \begin{macrocode}
\@namedef{captions\CurrentOption}{%
  \let\prefacename\bbl@jpn@prefacename
  \let\refname\bbl@jpn@refname
  \let\abstractname\bbl@jpn@abstractname
  \let\bibname\bbl@jpn@bibname
  %\def\chaptername{Chapter}%
  \let\prechaptername\bbl@jpn@prechaptername   % -- added
  \let\postchaptername\bbl@jpn@postchaptername % -- added
  \let\presectionname\bbl@jpn@presectionname   % -- added
  \let\postsectionname\bbl@jpn@postsectionname % -- added
  \let\appendixname\bbl@jpn@appendixname
  \let\contentsname\bbl@jpn@contentsname
  \let\listfigurename\bbl@jpn@listfigurename
  \let\listtablename\bbl@jpn@listtablename
  \let\indexname\bbl@jpn@indexname
  \let\figurename\bbl@jpn@figurename
  \let\tablename\bbl@jpn@tablename
  %\def\partname{Part}%
  \let\prepartname\bbl@jpn@prepartname   % -- added
  \let\postpartname\bbl@jpn@postpartname % -- added
  %\def\enclname{encl}%     åŒå°ç‰©
  %\def\ccname{cc}%         Cc
  %\def\headtoname{To}%     Toï¼ˆå®›å…ˆï¼‰
  %\def\pagename{Page}%     ãƒšãƒ¼ã‚¸
  %\def\seename{see}%       å‚ç…§
  %\def\alsoname{see also}% ã‚‚å‚ç…§
  \let\proofname\bbl@jpn@proofname
  \let\glossaryname\bbl@jpn@glossaryname
  }
%    \end{macrocode}
%
% \DescribeMacro{\datejapanese}
% |\datejapanese|ãƒžã‚¯ãƒ­ã¯æ—¥æœ¬èªžã§æ—¥ä»˜ã‚’å‡ºåŠ›ã™ã‚‹ã‚ˆã†ã« |\today|ã‚³ãƒžãƒ³ãƒ‰ã‚’
% å†å®šç¾©ã—ã¾ã™ã€‚ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‡ºåŠ›ã¯è¥¿æš¦ã§ã™ã€‚å’Œæš¦ã‚’ä½¿ç”¨ã™ã‚‹éš›ã¯ï¼Œãƒ—ãƒªã‚¢ãƒ³ãƒ–ãƒ«ã§ 
% |\å’Œæš¦| ã‚’æŒ‡å®šã™ã‚‹ã‹ï¼Œæœ¬æ–‡ã§ |\å’Œæš¦\today| ã®ã‚ˆã†ã«æŒ‡å®šã—ã¾ã™ã€‚
%
% ãƒ•ãƒ©ã‚°ã®æº–å‚™ã€‚
%    \begin{macrocode}
\newif\ifbbl@jpn@Seireki \bbl@jpn@Seirekitrue
%    \end{macrocode}
%
% UTF-8ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§ç›´æŽ¥å’Œæ–‡æ–‡å­—ã‚’è¨˜è¿°ã—ã¾ã™ã€‚
% \pdfLaTeX{}ã‚„\XeLaTeX{}ã®å&nbsp;´åˆã¯
% |\bbl@jpn@Tate...| ã®2ã¤ã¯å®Ÿéš›ã«ã¯ä½¿ã„ã¾ã›ã‚“ã€‚
%    \begin{macrocode}
\def\è¥¿æš¦{\bbl@jpn@Seirekitrue}%
\def\å’Œæš¦{\bbl@jpn@Seirekifalse}%
\def\bbl@jpn@kanjishowa{æ˜­å’Œ}
\def\bbl@jpn@kanjiheisei{å¹³æˆ}
\def\bbl@jpn@kanjireiwa{ä»¤å’Œ}
\def\bbl@jpn@kanjigan{å…ƒ}%
\def\bbl@jpn@TateSeirekiToday{%
    \bbl@jpn@maybekansuji\year å¹´%
    \bbl@jpn@maybekansuji\month æœˆ%
    \bbl@jpn@maybekansuji\day æ—¥}
\def\bbl@jpn@TateWarekiToday{%
    \bbl@jpn@gengo\bbl@jpn@maybekansuji\bbl@jpn@gengoyear å¹´%
    \bbl@jpn@maybekansuji\month æœˆ%
    \bbl@jpn@maybekansuji\day æ—¥}
\def\bbl@jpn@SeirekiToday{%
    \number\year å¹´%
    \number\month æœˆ%
    \number\day æ—¥}
\def\bbl@jpn@WarekiToday{%
    \bbl@jpn@gengo\number\bbl@jpn@gengoyear å¹´%
    \number\month æœˆ%
    \number\day æ—¥}
%    \end{macrocode}
%
% |\bbl@jpn@gengo| ã®å†…éƒ¨ã§ï¼Œå…ƒå·ã‚’è¨ˆç®—ã—ã¾ã™ã€‚
%
% [2019-04-03] 2019å¹´5æœˆ1æ—¥ã‹ã‚‰å§‹ã¾ã‚‹äºˆå®šã®æ–°å…ƒå·ã€Œä»¤å’Œã€ã«å¯¾å¿œã—ã¾ã—ãŸã€‚
%    \begin{macrocode}
\def\bbl@jpn@gengo#1\bbl@jpn@gengoyear{%
  \@tempcnta\year\relax
  \multiply\@tempcnta100
  \advance\@tempcnta\month
  \multiply\@tempcnta100
  \advance\@tempcnta\day
  \@tempcntb\year\relax
  \ifnum\@tempcnta&lt;19890108
    \bbl@jpn@kanjishowa
    \advance\@tempcntb-1925
  \else\ifnum\@tempcnta&lt;20190501
    \bbl@jpn@kanjiheisei
    \advance\@tempcntb-1988
  \else
    \bbl@jpn@kanjireiwa
    \advance\@tempcntb-2018
  \fi\fi
  \ifnum\@tempcntb=1
    \bbl@jpn@kanjigan   % å…ƒå¹´ã¯ \number ã‚‚ \kansuji ã‚‚é–¢ä¿‚ãªã„
  \else
    #1\@tempcntb % ã“ã® #1 ã¯ \number ã¾ãŸã¯ \bbl@jpn@maybekansuji
  \fi
}
%    \end{macrocode}
%
% (u)\pLaTeX{}ã¨Lua\TeX-jaã§çµ„æ–¹å‘åˆ¤å®šæ–¹æ³•ãŒç•°ãªã‚‹ãŸã‚ï¼Œ
% |\catcode| ã®ãƒˆãƒªãƒƒã‚¯ã§åˆ¥ã€…ã®ã‚³ãƒ¼ãƒ‰ã‚’ä½¿ã„åˆ†ã‘ã¾ã™ã€‚
% \pdfLaTeX{}ã‚„\XeLaTeX{}ã®å&nbsp;´åˆï¼ŒãŠã‚ˆã³\LuaLaTeX{}ã§
% Lua\TeX-jaä¸ä½¿ç”¨ã®å&nbsp;´åˆã¯ï¼Œç¸¦çµ„ã‚’ã‚µãƒãƒ¼ãƒˆã—ã¾ã›ã‚“ã€‚
%    \begin{macrocode}
\chardef\bbl@jpn@l@catcode=\catcode`\L\relax
\chardef\bbl@jpn@p@catcode=\catcode`\P\relax
\chardef\bbl@jpn@x@catcode=\catcode`\X\relax
\ifx\directlua\@undefined
  \ifx\kanjiskip\@undefined       % pdftex/xetex
    \catcode`\L=14\relax
    \catcode`\P=14\relax
    \catcode`\X=14\relax
  \else                           % ptex/uptex
    \catcode`\L=14\relax
    \catcode`\P=9\relax
    \catcode`\X=9\relax
  \fi
\else
  \ifx\luatexjaLoaded\@undefined  % luatex
    \catcode`\L=14\relax
    \catcode`\P=14\relax
    \catcode`\X=14\relax
  \else                           % luatex + luatexja
    \catcode`\L=9\relax
    \catcode`\P=14\relax
    \catcode`\X=9\relax
  \fi
\fi
%    \end{macrocode}
%
% å®Ÿéš›ã«ä½¿ç”¨ã™ã‚‹å‘½ä»¤ã«ã‚³ãƒ”ãƒ¼ã—ã¾ã™ã€‚
%
% [2019-04-03] ç¸¦æ•°å¼ãƒ‡ã‚£ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯æ¨ªçµ„ã¨åŒã˜å‡ºåŠ›ã¨ã—ã¾ã™ã€‚
%    \begin{macrocode}
\@namedef{date\CurrentOption}{%
  \def\today{{%
P   \ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi % tate
L   \ifnum\ltjgetparameter{direction}=3 % tate
X     \ifbbl@jpn@Seireki
X       \bbl@jpn@TateSeirekiToday
X     \else
X       \bbl@jpn@TateWarekiToday
X     \fi
X   \else
      \ifbbl@jpn@Seireki
        \bbl@jpn@SeirekiToday
      \else
        \bbl@jpn@WarekiToday
      \fi
X   \fi
  }}%
}
%    \end{macrocode}
%
% [2017-02-05] æ–°æ©Ÿèƒ½ï¼š|\languageattribute{japanese}{kansujitoday}|ã‚’æŒ‡å®šã™ã‚‹ã¨ï¼Œ
% ç¸¦æ›¸ãã§ã¯ |\today| ã®è¡¨è¨˜ãŒæ¼¢æ•°å­—ï¼ˆä¾‹ï¼šäºŒã€‡ä¸€å…­å¹´ä¸€äºŒæœˆäºŒå…«æ—¥ï¼‰ã«ãªã‚Šã¾ã™ã€‚
%    \begin{macrocode}
\let\bbl@jpn@maybekansuji\number
\bbl@declare@ttribute{japanese}{kansujitoday}{\let\bbl@jpn@maybekansuji\kansuji}
%    \end{macrocode}
%
% ãƒˆãƒªãƒƒã‚¯ã«ä½¿ç”¨ã—ãŸæ–‡å­—ã® |\catcode| ã‚’å…ƒã«æˆ»ã—ã¾ã™ã€‚
%    \begin{macrocode}
\catcode`\L=\bbl@jpn@l@catcode\relax
\catcode`\P=\bbl@jpn@p@catcode\relax
\catcode`\X=\bbl@jpn@x@catcode\relax
%    \end{macrocode}
%
% \DescribeMacro{\setlocalecaption}
% [2021-02-06] Babel v3.53ã®æ–°æ©Ÿèƒ½ã‚’ä½¿ã„ï¼Œ
% è¥¿æ¬§ã®ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã® |\part| ã¨ |\chapter| ã®å½¢å¼ã‚’
% |\pre...name| ã¨ |\post...name| ã§æŒŸã‚€å½¢å¼ã«å¤‰æ›´ã—ã¾ã™ã€‚
%
% å‚è€ƒï¼š|\xkanjiskip| ã®è‡ªå‹•æŒ¿å…¥ãŒä¸å¯èƒ½ãªã‚¨ãƒ³ã‚¸ãƒ³ã§ã¯
%\begin{verbatim}
%   [[prepart]][part][[postpart]]
%   [[prechapter]][chapter][[postchapter]]
%\end{verbatim}
% ã§ã¯ãªã
%\begin{verbatim}
%   [[prepart]] [part] [[postpart]]
%   [[prechapter]] [chapter] [[postchapter]]
%\end{verbatim}
% ã®ã»ã†ãŒè¦‹æ&nbsp;„ãˆãŒè‰¯ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ã€‚
%    \begin{macrocode}
\ifx\setlocalecaption\@undefined \else
\setlocalecaption{\CurrentOption}{part.template}%
  {[[prepart]][part][[postpart]]}
\setlocalecaption{\CurrentOption}{chapter.template}%
  {[[prechapter]][chapter][[postchapter]]}
\fi
%    \end{macrocode}
%
%    \begin{macrocode}
\@namedef{extras\CurrentOption}{}
\@namedef{noextras\CurrentOption}{}
\ldf@finish\CurrentOption
%&lt;/code&gt;
%    \end{macrocode}
%
% \section*{è¬è¾ž}
%
% Babel-Option \Lopt{japanese}ã®ä½œæˆã«å½“ã£ã¦ï¼Œãƒã‚°ãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‚„æ”¹è‰¯æ¡ˆã‚’
% ã”ææ¡ˆã„ãŸã&nbsp;ã„ãŸæ–¹ã«æ„Ÿè¬ã—ã¾ã™ã€‚
% bookworm $&lt;$BYV01204$&gt;$ã•ã‚“ã‹ã‚‰ï¼Œæ–°ã—ã„è¨€èªžã‚’å®šç¾©ã—ï¼Œãã‚Œã«å›ºæœ‰ã®
% è¨€èªžç•ªå·ã‚’ä»˜ã‘ã‚‹ãƒžã‚¯ãƒ­ \verb+\addlanguage+ã®æ©Ÿèƒ½ã«ã¤ã„ã¦ï¼Œè©³ã—ã„
% è§£èª¬ã‚’ã„ãŸã&nbsp;ãã¾ã—ãŸã€‚æœ¬ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã§ã¯æŽ¡ç”¨ã—ã¦ã„ã¾ã›ã‚“ãŒï¼Œ\babel
% ã®è¨€èªžåˆ‡ã‚Šæ›¿ãˆæ©Ÿèƒ½ã‚’ç†è§£ã™ã‚‹ä¸Šã§ãŸã„ã¸ã‚“å‚è€ƒã«ãªã‚Šã¾ã—ãŸã€‚
% Tony $&lt;$PAG01322$&gt;$ã•ã‚“ã‹ã‚‰ï¼Œã‚­ãƒ£ãƒ—ã‚·ãƒ§ãƒ³ã¨æ—¥ä»˜ã®å®šç¾©ã«ã¤ã„ã¦
% ã”ææ¡ˆã‚’ã„ãŸã&nbsp;ãã¾ã—ãŸã€‚
% å¤§çŸ³å‹ $&lt;$DZH00446$&gt;$ã•ã‚“ã‹ã‚‰ï¼Œåˆç‰ˆã«å«ã¾ã‚Œã¦ã„ãŸ \verb+\ifx\undefined+
% ã®ãƒã‚°ã‚’ã”æŒ‡æ‘˜ã„ãŸã&nbsp;ãã¾ã—ãŸã€‚
%
% \section*{å¤‰æ›´å±¥æ­´}
% \begin{itemize}
% \item 2005å¹´2æœˆï¼šæ—¥ä»˜ã®å®šç¾©ã‚’ä¿®æ­£ã—ã¾ã—ãŸã€‚
% \item 2007å¹´10æœˆï¼šZRã•ã‚“ã‹ã‚‰ã„ãŸã&nbsp;ã„ãŸè©³ç´°ãªã”æŒ‡æ‘˜ã‚’ã‚‚ã¨ã«ä¿®æ­£ã—ã¾ã—ãŸã€‚\\
% \verb|http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/48625.html|
% \item 2007å¹´12æœˆï¼šZRã•ã‚“ï¼Œttkã•ã‚“ã‹ã‚‰ã„ãŸã&nbsp;ã„ãŸã”æŒ‡æ‘˜ã‚’åæ˜&nbsp;ã—ã¾ã—ãŸã€‚
% \item 2016å¹´12æœˆï¼šæ—¥æœ¬èªž\TeX{}é–‹ç™ºã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ãŒé–‹ç™ºã‚’å¼•ãç¶™ãŽã¾ã—ãŸã€‚
%   ä»¥é™ã®å¤‰æ›´å±¥æ­´ã¯æœ¬æ–‡ä¸­ã«ç›´æŽ¥æ›¸ã„ã¦ã‚ã‚Šã¾ã™ã€‚
% \item 2020å¹´12æœˆï¼šå†’é&nbsp;­ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’è‹±èªžã«ã—ã¾ã—ãŸã€‚
%   ã¾ãŸï¼Œã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’\file{japanese.pdf}ã‹ã‚‰
%   \file{babel-japanese.pdf}ã«ãƒªãƒãƒ¼ãƒ&nbsp;ã—ï¼Œæ–°ãŸã«ã€Œã¡ã‚ƒã‚“ã¨æ—¥æœ¬èªž
%   ã™ã‚‹æ–¹æ³•ã€ã‚’æ¦‚èª¬ã™ã‚‹æ–°ç‰ˆ\file{japanese.pdf}ã‚’è¿½åŠ&nbsp;ã—ã¾ã—ãŸã€‚
% \item 2021å¹´2æœˆï¼šBabel v3.53ã®æ–°æ©Ÿèƒ½ã‚’æ´»ç”¨ã—ã¾ã—ãŸã€‚
% \end{itemize}
%
% \StopEventually{}
%
%    \begin{macrocode}
%&lt;*sample&gt;
\ifx\directlua\undefined
 \ifx\kanjiskip\undefined
  \ifx\XeTeXversion\undefined
    % pdfLaTeX: not beautiful
    \documentclass{book}
    \usepackage[whole]{bxcjkjatype}
  \else
    % XeLaTeX: not beautiful
    \documentclass{book}
    \usepackage{zxjatype}
    \setCJKmainfont{ipaexm.ttf}
  \fi
 \else
  \ifx\ucs\undefined
    % pLaTeX: OK
    \documentclass{jbook}
    \usepackage{minijs}
  \else
    % upLaTeX: OK
    \documentclass{ujbook}
  \fi
 \fi
\else
    % LuaLaTeX: OK
    \documentclass{ltjbook}
\fi
\usepackage[german,english,japanese]{babel}
\makeatletter
\def\tbcaption{\def\@captype{table}\caption{ã‚­ãƒ£ãƒ—ã‚·ãƒ§ãƒ³ã®ä¾‹}}
\def\fgcaption{\def\@captype{figure}\caption{ã‚­ãƒ£ãƒ—ã‚·ãƒ§ãƒ³ã®ä¾‹}}
\makeatother
\def\yes{--- ã¯ã„ã€‚}
\def\no{--- ã„ã„ãˆã€‚}
\def\TEXT{Textverarbeitung mit einem Rechner kann in vielf\"altiger Weise
erfolgen. Eigenschaften und Leistungsf\"ahigkeit sind hierbei weniger
vom jeweiligen Rechnertype, sondern vielmehr vom verwendeten
\textit{Textverarbeitungsprogramm} bestimmt.}
\def\se{\selectlanguage{english}}
\def\sj{\selectlanguage{japanese}}
\def\sg{\selectlanguage{german}}
\setlength{\hoffset}{-13mm}
\setlength{\textwidth}{16cm}
\begin{document}

\chapter{babel}
\section{japaneseãƒ‘ãƒƒã‚±ãƒ¼ã‚¸}
japaneseãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã¯æ—¥æœ¬èªžã«ã‚ˆã‚‹è¦‹å‡ºã—èªžã¨æ—¥ä»˜ã‚’å‡ºåŠ›ã™ã‚‹ãŸã‚ã®ãƒžã‚¯ãƒ­ã‚’
å®šç¾©ã—ã¦ã„ã¾ã™ã€‚

\fgcaption

\begin{itemize}
\se
\item ã“ã“ã§è‹±èªžï¼ˆ\texttt{english}ï¼‰ã«å¤‰æ›´ã—ã¾ã™ã€‚
ï¼ˆlanguageã®å€¤ã¯\the\languageï¼‰

\TEXT

ã“ã“ã¯è‹±èªžï¼Ÿ \iflanguage{english}{\yes}{\no}\par
ã“ã“ã¯ãƒ‰ã‚¤ãƒ„èªžï¼Ÿ \iflanguage{german}{\yes}{\no}\par
ã“ã“ã¯æ—¥æœ¬èªžï¼Ÿ \iflanguage{japanese}{\yes}{\no}

â€» \verb:\adddialect\l@japanese0: ã¨è¨­å®šã—ã¦ã„ã‚‹ãŸã‚ï¼Œ
æ—¥æœ¬èªžï¼Ÿã‚‚ã€Œã¯ã„ã€ã¨ãªã‚Šã¾ã™ã€‚

\sg
\item ã“ã“ã§ãƒ‰ã‚¤ãƒ„èªžï¼ˆ\texttt{german}ï¼‰ã«å¤‰æ›´ã—ã¾ã™ã€‚
ï¼ˆlanguageã®å€¤ã¯\the\languageï¼‰

\TEXT

ã“ã“ã¯è‹±èªžï¼Ÿ \iflanguage{english}{\yes}{\no}\par
ã“ã“ã¯ãƒ‰ã‚¤ãƒ„èªžï¼Ÿ \iflanguage{german}{\yes}{\no}\par
ã“ã“ã¯æ—¥æœ¬èªžï¼Ÿ \iflanguage{japanese}{\yes}{\no}

â€» ãƒã‚¤ãƒ•ãƒãƒ¼ã‚·ãƒ§ãƒ³ãŒãƒ‰ã‚¤ãƒ„èªžâ€•æ—§æ­£æ›¸æ³•â€•ã«åˆ‡ã‚Šæ›¿ã‚ã£ã¦ã„ã‚‹ç‚¹ã«æ³¨ç›®ã€‚
ãªãŠï¼Œæ–°æ­£æ›¸æ³•ï¼ˆ\texttt{ngerman}ï¼‰ã§ã¯
\texttt{Leis-tungs-f\"a-hig-keit}ã®ã‚ˆã†ã«åˆ†ç¶´ã—ã¾ã™ã€‚

\sj
\item ã“ã“ã§æ—¥æœ¬èªžï¼ˆ\texttt{japanese}ï¼‰ã«å¤‰æ›´ã—ã¾ã™ã€‚
ï¼ˆlanguageã®å€¤ã¯\the\languageï¼‰
\tbcaption
\item \verb:\å’Œæš¦: ã¯æ—¥ä»˜ã®è¡¨ç¤ºã‚’ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®è¥¿æš¦ã€Œ\today ã€ã‹ã‚‰
å’Œæš¦ã€Œ\å’Œæš¦\today ã€ã«å¤‰æ›´ã—ã¾ã™ã€‚
\end{itemize}
\end{document}
%&lt;/sample&gt;
%    \end{macrocode&gt;
%
% \Finale
%
\endinput
</pre></body></html>