Babel 3.7 の日本語対応化
8
0
0
全文
(2) 3.2. japanese.ins ファイルの作成. 3.5. リスト A.2 にある japanese.ins ファイルを作成 し、Babel 3.7 のディレクトリに置く。. Babel は、ldf ファイルと呼ばれる実効ファイル を ロー ド す る こ と に よって 、各 言 語 を サ ポ ー ト す. babel.ins は、最終的に docstrip によって生成さ れるべき Babel の実効ファイル群を定義しているファ イルである。このファイルにも日本語モジュールに関 する記述を追加する必要がある。 リスト A.5 にある babel_ins.diff ファイルを、. る 構造 に なって い る 。japanese.ins ファイ ル は 、. japanese.dtx ファイルをもとに、Babel が日本語モ ジュールとしてロードする japanese.ldf ファイルを. babel.ins ファイルの修正. Babel 3.7 のディレクトリに置き、コマンドプロンプ トから、次のコマンドを実行する。. 生成するために必要とされるものである。. C:> cd C:Y =ptexY =shareY =texmfY =texY =genericY =babel C:> patch babel.ins babel_ins.diff. 3.3. babel.dtx ファイルの修正. babel.dtx は、Babel 本体の機能を定義するファイ ルである。Babel に日本語をサポートさせるためには、 このファイルに日本語サポートに関する記述を追加す る必要がある。リスト A.3 は、この追加記述に関する 情報である。 リスト A.3 にある babel_dtx.diff ファイルを、. Babel 3.7 のディレクトリに置き、Windows のコマ ンドプロンプトから、次のように patch コマンドを. 3.6. Babel 3.7 のインストール. Babel 3.7 に関する以上の修正が終了したら、最後 に次のコマンドを実行して、日本語モジュールに対応 した Babel 3.7 の実効ファイル群を生成する。この際 に環境によっては、既に存在する babel.sty 等の実 効ファイルを上書きしてもよいかどうかを尋ねられる 場合があるが、全てに「y」を入力して全実効ファイル を生成しなおす。. 実行する5 。. C:> cd C:Y =ptexY =shareY =texmfY =texY =genericY =babel C:> cd C:Y =ptexY =shareY =texmfY =texY =genericY =babel C:> patch babel.dtx babel_dtx.diff. C:> platex babel.ins なお Babel の具体的な使用法については、拙稿 [1] に詳しく解説したので、これを参照されたい。さらに. 3.4. base.ins ファイルの修正. 本稿で使用したプログラムリストは、下記の URL で. base.ins は、babel.dtx ファイル等の記述をもと に、一連の実効ファイルが生成される際、参照される ファイルである。Babel がロードするべき日本語モジ ュールが、実際に生成されるために、このファイルも. も公開する。. http://ccre.soken.ac.jp/~shibasaki/papers/ jbabel37/. 修正する必要がある。 リスト A.4 にある base_ins.diff ファイルを、Ba-. bel 3.7 のディレクトリに置き、コマンドプロンプトか ら、次のコマンドを実行する。 C:> cd C:Y =ptexY =shareY =texmfY =texY =genericY =babel C:> patch base.ins base_ins.diff. 参考文献 [1] 柴崎文一, pLATEX2e と Babel による日本語・古 典ギリシア語混在環境の構築, 『情報処理学会研 究報告,2001-CH-49』, pp. 41-48. (2001). 5 Windows. 版の patch コマンドは、http://www.vector.co. jp/soft/win95/prog/se015025.html から入手可能である。ファ イルをダウンロード後、解凍して、 「patch.exe」ファイルを検索パ =ptexY =bin)にコピーすれば スの通っているディレクトリ(例:C:Y 使用可能になる。. 2 −26−.
(3) Appendix: プログラムリスト A.1. japanese.dtx. % = Yiffalse meta-comment % % Copyleft 2002 F. Shibasaki. % This is a code-file to support Japanese in the babel system. % % This file is applicable to the Babel system release 3.7. % -------------------------------------------------% % It may be distributed under the terms of the = YLaTeXe Project Public % License, as described in lppl.txt in the base = YLaTeXe distribution. % Either version 1.2 or, at your option, any later version. % = Yfi % = YCheckSum{120} % = Yiffalse % Tell the = Y= YLaTeXeY = system who we are and write an entry on the % transcript. %<*dtx> =ProvidesFile{japanese.dtx} Y %</dtx> %<code>Y =ProvidesLanguage{japanese} %Y =fi %Y =ProvidesFile{japanese.dtx} [2002/07/04 v.0.2 Japanese support from the babel system] %Y =iffalse %% File ‘japanese.dtx’ %% Babel package for pY =LaTeXe version 2e %% Copyleft 2002 F. Shibasaki % %% Please report errors to: F. Shibasaki %% [email protected] % % This file is not part of the babel system, but it provides the % source code for the Japanese language definition file. %<*filedriver> =documentclass{ltxdoc} Y =newcommand*Y Y =TeXhax{Y =TeX hax} =newcommand*Y Y =babel{Y =textsf{babel}} =newcommand*Y Y =langvar{$Y =langle = Ymathit lang = Yrangle$} =newcommand*Y Y =note[1]{} =newcommand*Y Y =Lopt[1]{Y =textsf{#1}} =newcommand*Y Y =file[1]{Y =texttt{#1}} =begin{document} Y =DocInput{japanese.dtx} Y =end{document} Y %</filedriver> %Y =fi % = YGetFileInfo{japanese.dtx} % % = Ysection{The Japanese language} % % The file = Yfile{Y =filename}Y =footnote{The file described in this % section has version number = YfileversionY = and was last revised on % = Yfiledate.} defines all the language definition macros for % the Japanese language. % % = YStopEventually{} % % The macro |Y =LdfInit| takes care of preventing that this file is % loaded more than once, checking the category code of the 3 −27−.
(4) % = Ytexttt{@} sign, etc. % = Ybegin{macrocode} %<*code> =LdfInit{japanese}Y Y =captionsjapanese % = Yend{macrocode} % % When this file is read as an option, i.e. by the |Y =usepackage| % command, = Ytexttt{japanese} could be an ‘unknown’ language in which % case we have to make it known. So we check for the existence of % |Y =l@japanese| to see whether we have to do something here. % % = Ybegin{macrocode} =ifxY Y =l@japaneseY =@undefined =@nopatterns{Japanese} Y =adddialectY Y =l@japanese0 =fi Y % = Yend{macrocode} % % The next step consists of defining commands to switch to (and % from) the Japanese language. % % = Ybegin{macro}{Y =captionjapanese} % The macro |Y =captionjapanese| defines all strings used % in the standard document classes provided with p{Y == YLaTeXee}. % = Ybegin{macrocode} =@namedef{captionsY Y =CurrentOption}{% =defY Y =prepartname{第}% =defY Y =postpartname{部}% =defY Y =prechaptername{第}% =defY Y =postchaptername{章}% =defY Y =contentsname{目 次}% =defY Y =listfigurename{図 目 次}% =defY Y =listtablename{表 目 次}% =defY Y =refname{参考文献}% =defY Y =bibname{関連文献}% =defY Y =indexname{索 引}% =defY Y =figurename{図}% =defY Y =tablename{表}% =defY Y =appendixname{付 録}% =defY Y =abstractname{概 要}% } % = Yend{macrocode} % = Yend{macro} % % = Ybegin{macro}{Y =datejapanese} % In order to define |Y =today| correctly we need to know whether it % should be default Japanese or ‘西暦’ or ‘american’. We can find % this out by checking the value of |Y =CurrentOption|. % = Ybegin{macrocode} =@namedef{dateY Y =CurrentOption}{% =defY Y =today{{% =iftdir Y =if 西暦 Y =kansujiY Y =numberY =year 年 =kansujiY Y =numberY =month 月 =kansujiY Y =numberY =day 日 =else Y 平成 Y =ifnumY =heisei=1 元年 Y =elseY =kansujiY =numberY =heisei 年 Y =fi =kansujiY Y =numberY =month 月 =kansujiY Y =numberY =day 日 =fi Y =else Y =if 西暦 Y =numberY Y =year~年 4 −28−.
(5) YnumberY = =month~月 =numberY Y =day~日 =else Y 平成 Y =ifnumY =heisei=1 元年 Y =elseY =numberY =heisei~年 Y =fi =numberY Y =month~月 =numberY Y =day~日 =fi Y =fi}}} Y % = Yend{macrocode} % = Yend{macro} % % = Ybegin{macro}{Y =dateamerican} % The macro |Y =dateamerican| redefines the command |Y =today| to % produce American dates. % = Ybegin{macrocode} =defY Y =dateamerican{% =defY Y =today{Y =ifcaseY =monthY =or JanuaryY =or FebruaryY =or MarchY =or AprilY =or MayY =or JuneY =or JulyY =or AugustY =or SeptemberY =or OctoberY =or NovemberY =or DecemberY =fi =spaceY Y =numberY =day, = YnumberY =year}} % = Yend{macrocode} % = Yend{macro} % % = Ybegin{macro}{Y =extrasjapanese} % = Ybegin{macro}{Y =noextrasjapanese} % The macro |Y =extrasjapanese| will perform all the extra definitions % needed for the Japanese language. The macro |Y =noextrasjapanese| is % used to cancel the actions of |Y =extrasjapanese|. For the moment % these macros are empty but they are defined for compatibility % with the other language definition files. % % = Ybegin{macrocode} =@namedef{extrasY Y =CurrentOption}{} =@namedef{noextrasY Y =CurrentOption}{} % = Yend{macrocode} % = Yend{macro} % = Yend{macro} % % The macro |Y =ldf@finish| takes care of looking for a % configuration file, setting the main language to be switched on % at |Y =begin{document}| and resetting the category code of % = Ytexttt{@} to its original value. % = Ybegin{macrocode} =ldf@finishY Y =CurrentOption %</code> % = Yend{macrocode} % % = YFinale %% %% = YCharacterTable %% {Upper-case = YAY =BY =CY =DY =EY =FY =GY =HY =IY =JY =KY =LY =MY =NY =OY =PY =QY =RY =SY =TY =UY =VY =WY =XY =YY =Z %% Lower-case = YaY =bY =cY =dY =eY =fY =gY =hY =iY =jY =kY =lY =mY =nY =oY =pY =qY =rY =sY =tY =uY =vY =wY =xY =yY =z %% Digits = Y0Y =1Y =2Y =3Y =4Y =5Y =6Y =7Y =8Y =9 %% Exclamation = Y! Double quote = Y" Hash (number) = Y# %% Dollar = Y$ Percent = Y% Ampersand = Y& %% Acute accent = Y’ Left paren = Y( Right paren = Y) %% Asterisk = Y* Plus = Y+ Comma = Y, %% Minus = YPoint = Y. Solidus = Y/ %% Colon = Y: Semicolon = Y; Less than = Y< %% Equals = Y= Greater than = Y> Question mark = Y? %% Commercial at = Y@ Left bracket = Y[ Backslash = Y= Y %% Right bracket = Y] Circumflex = Y^ Underscore = Y_ %% Grave accent = Y‘ Left brace = Y{ Vertical bar = Y| %% Right brace = Y} Tilde = Y~} 5 −29−.
(6) %% =endinput Y. A.2. japanese.ins. %% %% This is an unauthorized modification of the english.ins, %% originally distributed as a part of Babel 3.7. %% %% This file will generate fast loadable files and documentation %% driver files from the doc files in this package when run through %% = YLaTeXe or TeX. %% %% Copyleft 2002, F. Shibasaki %% %% This file is an unauthorized part of the Babel, release 3.7. %% --------------------------------------------------%% %% It may be distributed under the terms of the = YLaTeXe Project Public %% License, as described in lppl.txt in the base = YLaTeXe distribution. %% Either version 1.2 or, at your option, any later version. %% %% --------------- start of docstrip commands -----------------%% =defY Y =filedate{2002/07/04} =defY Y =batchfile{japanese.ins} =input docstrip.tex Y {Y =ifxY =generateY =undefined YMsg{**********************************************} = =Msg{*} Y =Msg{* This installation requires docstrip} Y =Msg{* version 2.3c or later.} Y =Msg{*} Y =Msg{* An older version of docstrip has been input} Y =Msg{*} Y =Msg{**********************************************} Y =errhelp{Move or rename old docstrip.tex.} Y =errmessage{Old docstrip in input path} Y =batchmode Y =csname @@endY Y =endcsname =fi} Y =declarepreambleY Y =mainpreamble This is a generated file. Copyleft 2002 F. Shibasaki This file is an unauthorized part of the Babel, release 3.7. -------------------------------------------------It may be distributed under the terms of the = YLaTeXe Project Public License, as described in lppl.txt in the base = YLaTeXe distribution. Either version 1.2 or, at your option, any later version. =endpreamble Y YdeclarepreambleY = =fdpreamble This is a generated file. Copyleft 2002 F. Shibasaki. 6 −30−.
(7) This file is an unauthorized part of the Babel, release 3.7. --------------------------------------------------It may be distributed under the terms of the = YLaTeXe Project Public License, as described in lppl.txt in the base = YLaTeXe distribution. Either version 1.2 or, at your option, any later version. =endpreamble Y =keepsilent Y =usedir{tex/generic/babel} Y YusepreambleY = =mainpreamble =generate{Y Y =file{japanese.ldf}{Y =from{japanese.dtx}{code}} } =usepreambleY Y =fdpreamble YifToplevel{ = =Msg{***********************************************************} Y =Msg{*} Y =Msg{* To finish the installation you have to move the following} Y =Msg{* files into a directory searched by TeX:} Y =Msg{*} Y =Msg{* = Y YspaceY =space All *.def, *.fd, *.ldf, *.sty} =Msg{*} Y =Msg{* To produce the documentation run the files ending with} Y =Msg{* ’.dtx’ and ‘.fdd’ through = Y YLaTeXe.} =Msg{*} Y =Msg{* Happy TeXing} Y =Msg{***********************************************************} Y } =endinput Y. A.3. babel dtx.diff. *** babel.dtx.org Wed Feb 28 11:00:00 2001 --- babel.dtx Thu Jul 25 21:16:20 2002 *************** *** 10,16 **** % License, as described in lppl.txt in the base = YLaTeXe distribution. % Either version 1.2 or, at your option, any later version. % = Yfi ! % = YCheckSum{3559} %% % = YdefY =filename{babel.dtx} % = YletY =thisfilenameY =filename --- 10,16 ---% License, as described in lppl.txt in the base = YLaTeXe distribution. % Either version 1.2 or, at your option, any later version. % = Yfi ! % = YCheckSum{3562} %% % = YdefY =filename{babel.dtx} % = YletY =thisfilenameY =filename *************** *** 295,300 **** --- 295,301 ---% Icelandic & icelandic = Y= Y % Irish Gaelic & irishY == Y % Italian & italianY == Y 7 −31−.
(8) + % Japanese & japaneseY == Y %^^A Kannada & kannada = Y= Y % Latin & latin = Y= Y % Lower Sorbian & lowersorbianY == Y *************** *** 1096,1101 **** --- 1097,1103 ---=DeclareOption{icelandic}{Y Y =input{icelandic.ldf}} =DeclareOption{irish}{Y Y =input{irish.ldf}} =DeclareOption{italian}{Y Y =input{italian.ldf}} + = YDeclareOption{japanese}{Y =input{japanese.ldf}} =DeclareOption{latin}{Y Y =input{latin.ldf}} =DeclareOption{lowersorbian}{Y Y =input{lsorbian.ldf}} %^^AY =DeclareOption{kannada}{Y =input{kannada.ldf}} *************** *** 5362,5367 **** --- 5364,5370 ---% =langdeffile{frenchb.dtx} Y =langdeffile{italian.dtx} Y + = Ylangdeffile{japanese.dtx} =langdeffile{latin.dtx} Y =langdeffile{portuges.dtx} Y =langdeffile{spanish.dtx} Y. A.4. base ins.diff. *** base.ins.org Wed Feb 21 11:00:00 2001 --- base.ins Wed Jul 24 17:02:52 2002 *************** *** 195,200 **** --- 195,201 ---=compatfile{serbian} Y =compatfile{bulgarian} Y =compatfile{samin} Y + = Ycompatfile{japanese} } % driver files. A.5. babel ins.diff. *** babel.ins.org Wed Feb 21 11:00:00 2001 --- babel.ins Fri Jul 19 16:46:08 2002 *************** *** 150,155 **** --- 150,156 ---=BblInstall{icelandic}{icelandic} Y =BblInstall{irish}{irish} Y =BblInstall{italian}{italian} Y + = YBblInstall{japanese}{japanese} %Y =BblInstall{kannada}{kannada} =BblInstall{latin}{latin} Y =BblInstall{magyar}{magyar} Y. 8 −32−.
(9)
関連したドキュメント
日本の生活習慣・伝統文化に触れ,日本語の理解を深める
第四。政治上の民本主義。自己が自己を統治することは、すべての人の権利である
また、JR東日本パス (本券) を駅の指定席券売機に
ここで, C ijkl は弾性定数テンソルと呼ばれるものであり,以下の対称性を持つ.... (20)
まず本稿で述べるバンドリング化とアンバンドリング化についての定義を行う。一般的
高等教育機関の日本語教育に関しては、まず、その代表となる「ドイツ語圏大学日本語 教育研究会( Japanisch an Hochschulen :以下 JaH ) 」 2 を紹介する。
その結果、 「ことばの力」の付く場とは、実は外(日本語教室外)の世界なのではないだろ
さて,日本語として定着しつつある「ポスト真実」の原語は,英語の 'post- truth' である。この語が英語で市民権を得ることになったのは,2016年