.maven/cache/maven-pdf-plugin-2.2.1/plugin-resources/project2fo.xsltのfo:rootにlanguage=”ja”を加えれば、よいみたい。
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="ja">
これでだいぶすっきりしたかな。
Challange IT For Future
.maven/cache/maven-pdf-plugin-2.2.1/plugin-resources/project2fo.xsltのfo:rootにlanguage=”ja”を加えれば、よいみたい。
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="ja">
これでだいぶすっきりしたかな。
maven pdf すると、普通に # や四角に文字化けするので、見てみる。フォントがダメっぽい。というわけで、以下の手順で、pdfプラグインにフォントを入れる。
$ cd .maven/cache/maven-pdf-plugin-2.2.1/ $ pushd plugin-resources/fonts/ $ cp /usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf . $ cp /usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf . $ java -cp $FOP_PATH/fop-0.20.5.jar org.apache.fop.fonts.apps.TTFReader sazanami-gothic.ttf sazanami-gothic.xml TTF Reader v1.1.1 Reading sazanami-gothic.ttf... Number of glyphs in font: 13584 Creating xml font file... Creating CID encoded metrics Writing xml font file sazanami-gothic.xml... This font contains no embedding license restrictions $ java -cp $FOP_PATH/fop-0.20.5.jar org.apache.fop.fonts.apps.TTFReader sazanami-mincho.ttf sazanami-mincho.xml TTF Reader v1.1.1 Reading sazanami-mincho.ttf... Number of glyphs in font: 14679 Creating xml font file... Creating CID encoded metrics Writing xml font file sazanami-mincho.xml... This font contains no embedding license restrictions $ cd .. $ vi userconfig.xml ...以下を追加する <font metrics-file="fonts/sazanami-gothic.xml" embed-file="fonts/sazanami-gothic.ttf" kerning="yes"> <font-triplet name="Gothic" style="normal" weight="normal"/> <font-triplet name="Gothic" style="normal" weight="bold"/> <font-triplet name="Gothic" style="italic" weight="normal"/> <font-triplet name="Gothic" style="italic" weight="bold"/> </font> <font metrics-file="fonts/sazanami-mincho.xml" embed-file="fonts/sazanami-mincho.ttf" kerning="yes"> <font-triplet name="Mincho" style="normal" weight="normal"/> <font-triplet name="Mincho" style="normal" weight="bold"/> <font-triplet name="Mincho" style="italic" weight="normal"/> <font-triplet name="Mincho" style="italic" weight="bold"/> </font> $ vi fo-styles.xslt ...以下のようにフォントファミリのところにGothicとか追加。 <xsl:attribute name="font-family">Gothic,Mincho,Garamond,serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,monospace</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute> <xsl:attribute name="font-family">Gothic,Mincho,Helvetica,sans-serif</xsl:attribute>
これで、maven pdf とすれば、pdf が出力される。日本語も正しく出ているのだけど、改行がおかしいな・・・。そんなオプションもあるのかな。
TracGanntは、Tracでガントチャートを作るものです。プロジェクトのスケジュール管理などに使えるかと。チケットに日付情報が加わることにより、チケットベースのガントチャートが作られます。http://willbarton.com/code/tracgantt/ からダウンロードできます。いつものように CentOS 4 で試しましたが、インストール方法は、まず、2.3 用の egg を取得して、
easy_install --always-unzip TracGantt-0.3.2a-py2.3.egg
とすると、/usr/lib/python2.3/site-packages/TracGantt-0.3.2a-py2.3.egg/ にインストールされます。あとは、利用しているTracプロジェクトのtrac.iniに
... [components] ... tracgantt.* = enabled ... [ticket-custom] due_assign = text due_assign.label = 開始予定日 due_assign.value = YYYY/MM/DD dependencies = text dependencies.label = 依存タスクNo dependencies.value = due_close= text due_close.label = 終了予定日 due_close.value = YYYY/MM/DD include_gantt = checkbox include_gantt.label = ガントチャートに載せるか否か include_gantt.value = [gantt-charts] date_format = %Y/%m/%d
っていう感じで加えるだけ。日付フォーマットは後々変えると、厄介みたいなので、使う前に考えておいて、カスタマイズしてください。あとは、普通にログインして使えますが、GANTT_VIEWのパーミッションがないと表示されないので、使うユーザーにはあたえてください。