諸々の事情があり、最近Windowsを使うはめになってるのですが、TeX環境がまったくインストールされていなかったので、環境整備しています。

そこで、せっかくなので OMakeを使って継続ビルド をしたいと思います。

Windowsを良く使ってる人の参考になれば。この時期は卒論頑張ってる人が多いと思うので。

(Windowsを普段あまり使わない僕がいうのもなんですが・・・)

参考

身長が5cm伸びて、念願の170cm超えです!

用意するもの

手順

インストールする

The OMake build systemからダウンロードしてきたインストーラを使ってインストールします。

何も考えずにOKとかNextみたいなボタンをクリックすれば大丈夫です。

使ってみる

上に挙げた hayamizさんの記事の手順そのまま実行していきます。

OMakefileとOmakerootの作成

まず、コマンドプロンプトを開いて、作業ディレクトリで omake --install とします。

textile>>
C:\・・・\作業ディレクトリ>omake --install
*** omake: creating OMakeroot
*** omake: creating OMakefile
*** omake: project files OMakefile and OMakeroot have been installed
*** omake: you should edit these files before continuing
<<--
これで、OMakefileとOMakerootが作業ディレクトリに作成されます。

OMakefileの編集

ファイルの内容を消して、まるまるコピペしてください。
textile>>
LATEX = platex

LaTeXDocument(main, main)

.DEFAULT: main.dvi
<<--

これで、TeXファイルを保存するたびに、ビルドされ、DVIファイルが作成されます。

ついでにPDFも作成したいときは、
textile>>
LATEX = platex
DVIPDFM = dvipdfmx

LaTeXDocument(main, main)

.DEFAULT: main.pdf main.dvi
<<--
としてください。

OMake起動!

コマンドプロンプトで omake コマンドを実行します。
textile>>
C:\・・・\作業ディレクトリ>omake -P --verbose
*** omake: reading OMakefiles
--- Checking for latex... (found c:\usr\local\bin\latex.exe)
--- Checking for uname... (found c:\Program Files\Git\bin\uname.exe)
--- Checking LaTeX capabilities... (tetex2 mode enabled)
*** omake: finished reading OMakefiles (4.14 sec)

  • scan . scan-latex-main.tex
  • <compute 1 value dependencies>
  • scan . scan-latex-main.tex
  • Shell.echo()
    | Shell.run-latex(stdout-to-stderr platex -file-line-error '-output-comment
    =LaTeX Output (built with OMake)' -recorder main.tex)
    This is pTeXk, Version 3.141592-p3.1.4 (sjis) (Web2C 7.5.3)

 ・
 ・
 ・

<<--

起動すれば、あとはTeXファイルを編集し、保存するだけです。

これで、編集→保存→ビルド→編集→保存→ビルド→・・・というわずらわしいビルドの手間が省けます。

ちなみに・・・
textile>>
--- Checking for uname... (found c:\Program Files\Git\bin\uname.exe)
<<--
とか出ているので、もしかしたら、** uname.exe **が必要なのかもしれません。
僕の環境では、Gitをインストールしたついでに入っていたみたいです。

** これは、ついでにバージョン管理もしろってことですね! **

#まとめ

  • OMakeすばらしい!
  • Linuxと違って、Windowsはインストールがめんどくさい
  • 複数ファイルのときのビルドは、今後の課題
posted by y_tsuda y_tsuda on Thu 15 Jan 2009 at 17:28 with 1 comment
Aleksey Aleksey 02/02 07:03
The uname check is only due to a somewhat sloppy test for whether you are trying to use Cygwin version of LaTeX under Win32 OMake (that is know to tend to crash):

<pre>
LATEX_USABLE = $(CheckProg latex)
if $(and $(LATEX_USABLE), $(not $(FORCE_WIN32_LATEX)), $(equal $(OSTYPE), Win32), $(CheckProg uname))
match($(shell uname))
case CYGWIN
ConfMsgWarn($""" You seem to be trying to use Cygwin LaTeX on a Win32 machine.
This usually doesn't work, but if you really want to
use it, add the following definition to your OMakeroot.
FORCE_WIN32_LATEX = true
(latex disabled)""")
LATEX_USABLE = false
export
export
</pre>
Contents rssrss
Xperiaにインストールして1週間生き残ったアプリたち
gem serverをIE8から見るとヒドイことになる現象を解決
gem serverをIE8から見るとヒドイことに
Twitter, Account Suspended
GentooにRuby1.9をインストールした
GentooにScalaをインストールしてみた
多面ディスプレイ環境を手作りしてみた
lower-camel caseな文字列とアンダースコア区切りな文字列の相互変換をRubyで
topコマンドでのCPUコア毎の表示
Fedora11 (on VirtualBox) 速効レビュー
Tags
rubyGentooDIYFedoralinuxmemoScalatwitterunixvirtualboxweb
Comments rssrss
cvcwcbbfp cvcwcbbfp: something new and exciting [url=http://www.g1h6r6... 04/10 13:40
Aleksey Aleksey: The uname check is only due to a somewhat sloppy t... 02/02 07:03
Yu Tsuda Yu Tsuda: あぁ、そうですね、、syncすると戻ってしまいますね・・・。 ご指摘ありがとうございます!! 07/11 15:38
ursm ursm: /usr/portage 以下のファイルは更新のたび元に戻ってしまうので、/etc/portage/... 07/11 13:46
Yu Tsuda Yu Tsuda: 見た目だけでも、わざわざGentooをこういうリストに入れてるのがすごいなぁと思ったりしたのです(笑... 03/31 19:49
Leonard Chin (レオ) Leonard Chin (レオ): ただし、VirtualBoxで「Gentoo」などを選択しても、別にどのOSを入れても大丈夫だ。あく... 03/31 13:00
Yu Tsuda Yu Tsuda: この機能、結構便利なんですよねー。 またEmacsで便利な機能を見つけたらブログに書きまーす。 11/27 23:46
satoko satoko: 知らんかった!emacs派なのでうれしい。thanks! 11/27 12:08