なんだこれは

はてなダイアリーから移転しました。

LyX2 & TeXLive2010/Mac で 日本語PDF表示までしてみた。

最新のTeXはTeXLiveだというので入れてみた。そんなに使わないのに....

あと、TeXLiveのplatexはUTFベースらしい。
それからdviがXなのでなんとかしたいがわからない。最終的にPDF表示されたのでOKとした。

mac portでいれてみた

記憶では、こんなかんじでいれたはず、だよ?

sudo port deactivete pTeX                        #pTeX いれていたら
sudo port install texlive +doc +medium           #TeXlive 2010
sudo port install LyX                            #LyX 2
sudo port install texlive-lang-cjk               #platexなど
sudo port install texlive-documentation-japanese #せっかくなので
sudo port install texlive-fontutils +doc         #よくわからない
sudo port install texlive-generic-extra +doc     #いらないかも?
sudo port install imagemagick                    #個人的には導入済みだった

MxDviがない...orz

今見たら、こんなのはいってました(texlive関連)

  • texlive-basic @19496_3+doc (active)
  • texlive-bin @2010_4+motif (active)
  • texlive-bin-extra @19536_0+doc (active)
  • texlive-common @2010_1 (active)
  • texlive-context @19477_0+doc (active)
  • texlive-documentation-base @19544_0+doc (active)
  • texlive-documentation-chinese @19531_0+doc (active)
  • texlive-documentation-english @19457_0+doc (active)
  • texlive-documentation-japanese @15878_0+doc (active)
  • texlive-fonts-recommended @19478_0+doc (active)
  • texlive-fontutils @19534_0+doc (active)
  • texlive-generic-extra @19456_0+doc (active)
  • texlive-generic-recommended @19515_0+doc (active)
  • texlive-lang-cjk @19473_1+doc (active)
  • texlive-lang-czechslovak @19005_1+doc (active)
  • texlive-lang-dutch @18673_1+doc (active)
  • texlive-lang-english @18673_1+doc (active)
  • texlive-lang-french @18673_1+doc (active)
  • texlive-lang-german @18673_1+doc (active)
  • texlive-lang-italian @19139_1+doc (active)
  • texlive-lang-polish @18835_1+doc (active)
  • texlive-lang-portuguese @18673_1+doc (active)
  • texlive-lang-spanish @18733_1+doc (active)
  • texlive-latex @19536_1+doc (active)
  • texlive-latex-recommended @19443_0+doc (active)
  • texlive-latex3 @19447_0+doc (active)
  • texlive-luatex @19484_0+doc (active)
  • texlive-math-extra @19459_0+doc (active)
  • texlive-metapost @19440_0+doc (active)
  • texlive-pictures @19492_0+doc (active)
  • texlive-xetex @19506_0+doc (active)

まて、math-extraは追加でいれたんじゃ...

あとは、sudo port search texliveすると、scienceやpublishers(学会や投稿用のsty?)がある。これで英語はokだ。

この段階で、LyXで日本語の文書をつくってしまうと、クラスファイル(Babelの日本語オプション?ともいう??)

  • メニュー→文書→設定の文書クラスにjarticelに×が表示される。
  • DVIを表示させようとすると、jarticle.styがないよっていわれる

日本語のjsaticleなどをもらってくる。

この辺から BabelのJapanese設定をもらってくる。日本のミラーを使った方がはやいだろう。

READMEを読むと解凍して適切なフォルダにおけとある。

解凍後、insをplatexにわたしておく

cd japanese
platex japanese.ins

こんなんがでる。

This is pTeXk, Version 3.1415926-p3.1.11 (utf8.euc) (TeX Live 2010/MacPorts 2010_4)
restricted \write18 enabled.
(./japanese.ins
pLaTeX2e <2006/11/10> (based on LaTeX2e <2009/09/24> patch level 0)
Babel and hyphenation patterns for english, usenglishmax, ukenglish, ba
sque, bulgarian, coptic, welsh, czech, slovak, german, ngerman, danish, esperan
to, spanish, catalan, galician, estonian, farsi, finnish, french, irish, greek,
monogreek, ancientgreek, croatian, hungarian, interlingua, ibycus, bahasa, ice
landic, italian, latin, mongolian, dutch, norsk, polish, portuguese, pinyin, ro
manian, russian, slovenian, samin, uppersorbian, serbian, swedish, turkish, ukrainian, dumylang, nohyphenation, loaded.
(/opt/local/share/texmf-texlive-dist/tex/latex/base/docstrip.tex
Utility: `docstrip' 2.5d <2005/07/29>
English documentation <1999/03/31>

**********************************************************
* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *
**********************************************************

********************************************************
* No Configuration file found, using default settings. *
********************************************************

(./japanese.ins
*** Generating files ***

Generating file(s) ./japanese.ldf ./sample.tex

Processing file japanese.dtx (code) -> japanese.ldf
(sample) -> sample.tex
File japanese.dtx ended by \endinput.
Lines processed: 244
Comments removed: 105
Comments passed: 21
Codelines passed: 109

) ) )
No pages of output.
Transcript written on japanese.log.

で、これらをここにおいてみた。とくにbabelって書いてあるしね。

sudo cp japanese.* /opt/local/share/texmf-texlive-dist/tex/generic/babel
sudo mktexlsr

一応これで、LyX→メニュー→文書→設定の文書クラスにjarticel/jsarticleなどが使えるようになる。
これで、LyX書いて、DVI→PDFしてプレビューしたら、日本語が表示できるようになった。

MxDviの(3.??)最新は不安定なのか、落ちてしまう。どうしよう。