きりかノート 3冊め

おあそびプログラミング

IdeoType Portfile 人柱版

ブックコンパイラ IdeoType の野良 Portfile を作ってみました。人柱募集中。

userguide.ja.pdf に書かれている依存パッケージでまだ不足しているもの(mendex, okumura-clsfiles などなど)もあるけれど、とりあえず手元では動いた。

(2008/06/22: リンク切れ直しました)

 % tar -xf ideotype-portfile-0.0.15.tar.gz
textproc/
textproc/ideotype/
textproc/ideotype/files/
textproc/ideotype/files/patch-Makefile
textproc/ideotype/Portfile
textproc/xhtml-math11-dtd/
textproc/xhtml-math11-dtd/Portfile

中身についてちょっと説明

Makefile にちょっと手を入れた。変更点は以下のとおり

  • date, mkdir, cp のオプションを調整。Mac のこれらのコマンドは GNU coreutils じゃないので、Makefile のままだとうまくいかない
  • nkf --guess の出力で "UTF-8 (LF)" などのように、(LF) の改行文字部分がいらないので無視するように
  • PREFIX を指定できるように(${prefix} を渡す)
  • doc ターゲットの生成時の xsltproc のオプションに --novalid を追加

最後のは苦肉の策、ってーかあてずっぽう。

 % make doc
xsltproc --nonet --nodtdattr lib/iecompat.xsl doc/customization.xhtml | xsltproc --nonet --nodtdattr --stringparam charset `nkf --guess doc/customization.xhtml | sed 's/(.*)//' ` lib/resetcharset.xsl - > doc/customization.html
xsltproc --nonet --nodtdattr lib/iecompat.xsl doc/format.xhtml | xsltproc --nonet --nodtdattr --stringparam charset `nkf --guess doc/format.xhtml | sed 's/(.*)//' ` lib/resetcharset.xsl - > doc/format.html
-:1: parser error : Content error in the external subset
-force-conventional-resolution</code> option in <code>ideotype.rb</code>.</span>
^
-:353: parser error : Opening and ending tag mismatch: code line 352 and p
</p>
^
-:396: parser error : Opening and ending tag mismatch: span line 352 and body
</body>
^
-:397: parser error : Opening and ending tag mismatch: li line 351 and html
</html>
^
-:398: parser error : Premature end of data in tag ul line 346

^
-:398: parser error : Premature end of data in tag body line 14

^
-:398: parser error : Premature end of data in tag html line 3

^
unable to parse -
make: *** [doc/format.html] Error 6

出力に xmllint かけたりしてもさっぱり。なにがマズイのだろう。