[Gauche-devel-jp] gauche-refj.pdf

アーカイブの一覧に戻る

Hisashi MORITA hisas****@users*****
2008年 6月 17日 (火) 01:58:03 JST


On 2008/06/16 6:09, toru hisai wrote:
> dvipdfmx で PDF のしおりやハイパーリンクも扱えるようですね。
> http://next1.cc.it-hiroshima.ac.jp/MATHEQN/matheqn/node12.html
> http://next1.cc.it-hiroshima.ac.jp/MATHEQN/matheqn/node13.html
> 
> ただし、Texinfo はたしか LaTeX ベースではないので(ですよね?)
> 上記のページで紹介されている hyperref という LaTeX パッケージはそのままでは使えません。
> なので、hyperref の中身を参考にしつつ、
> 自前で DVI 命令(\special)をいれていく感じでしょうか。

ありがとうございます。
確かにTexinfoがPDF出力に使っているのは(Plain)TeXのようですね。

specialを自前で書き込むのはつらいので、LaTeXを経由させてみようと
思い、texi2latexというのを試してみました。makeinfo --xmlでXMLを
得て、それをLaTeXに変換するというツールです。

  http://www.nongnu.org/texi2latex/

ですが、ちゃんと動作はするものの、出力が英語圏向け(english/babel)
なので、それなりに手を入れる必要がありそうです。

あまり寄り道してはいけない気がしてきたので、今はとりあえずこのへん
でいいことにします。また気になってきたら改めて追ってみます。

参考までに現時点までの変更を転記します。

--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -121,10 +121,10 @@ gauche-refj_toc.html : gauche-refj.texi
        done

 gauche-refj.dvi : gauche-refj.texi
-       texi2dvi gauche-refj.texi
+       TEX=ptex texi2dvi --texinfo='@documentlanguage ja' gauche-refj.texi

-gauche-refj.pdf : gauche-refj.texi
-       pdftex gauche-refj.texi
+gauche-refj.pdf : gauche-refj.dvi
+       dvipdfmx -f jis-cjk gauche-refj.dvi

 gauche-refj.texi : $(TEXIS) extract
        $(GOSH) ./extract -jp -o gauche-refj.texi gauche-ref.texi

--- /dev/null
+++ b/doc/txi-ja.tex
@@ -0,0 +1,33 @@
+% Japanese localization for Texinfo DVI/PDF output
+% 2008 Hisashi Morita, released in public domain
+
+\gdef\putwordAppendix{付録}
+
+\gdef\chapterja#1#2#3{第#2#3章}% #1:\space #2:\the #3:\chapno
+\gdef\putwordChapter{\chapterja}
+\gdef\putwordfile{ファイル}
+\gdef\putwordin{in}
+\gdef\putwordIndexIsEmpty{IndexIsEmpty}
+\gdef\putwordIndexNonexistent{IndexNonexistent}
+\gdef\putwordInfo{Info}
+\gdef\putwordInstanceVariableof{Instance Variable of}% インスタンス変数:
+\gdef\putwordMethodon{Method on}
+\gdef\putwordNoTitle{NoTitle}
+\gdef\putwordof{of}
+\gdef\putwordon{on}
+\gdef\putwordpage{p.}% p.~ causes error
+\gdef\putwordsection{セクション}
+\gdef\putwordSection{セクション}
+\gdef\putwordsee{参照:}
+\gdef\putwordSee{参照:}
+\gdef\putwordShortTOC{章目次}
+\gdef\putwordTOC{目次}
+%
+\gdef\putwordDefmac{Macro}%              マクロ
+\gdef\putwordDefspec{Special Form}%      スペシャルフォーム
+\gdef\putwordDefvar{Variable}%           変数
+\gdef\putwordDefivar{Instance Variable}% インスタンス変数
+\gdef\putwordDefopt{Option}%             オプション
+\gdef\putwordDeffunc{Procedure}%         手続き
+
+\def\today{\number\year 年\number\month 月\number\day 日}

-- 
Hisashi MORITA




Gauche-devel-jp メーリングリストの案内
アーカイブの一覧に戻る