Skip to content

Instantly share code, notes, and snippets.

@hyuki0000
Created December 5, 2012 03:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyuki0000/49e380c09d75b36d3f2b to your computer and use it in GitHub Desktop.
Save hyuki0000/49e380c09d75b36d3f2b to your computer and use it in GitHub Desktop.

Cygwinを使ってWindows上でReVIEWを動かしてepubを作る

前提

  • Windows 7を使っている。
  • ReVIEWを動かしてepubを作りたい。

問題

  • 素のWindowsで動かすとうまくいかない。

解決

  • Cygwinを使う。

詳細

Cygwinをインストールする。

  • http://cygwin.com/install.html
  • setup.exe
  • zipを入れるため、zipを検索してパッケージをDefaultからInstallにしてから次に進む(あとから改めてsetup.exeを動かしてもよい)。

「ReVIEWクイックスタートガイド」を読む。

Cygwin Terminalを開く。

ReVIEWをインストールする。

$ gem install review

以下のファイルを準備する(すべてUTF-8にすること)。

  • girl.re
  • CHAPS
  • girl.css
  • girl.yaml

コンパイルすると、girl.epub ができる。

$ review-epubmaker girl.yaml

たとえば、Kindle Previewerで girl.epub を見ると以下のようになる(コンパイルで警告が出ますがとりあえず追わないで無視してます)。

参照

参考

HTMLを作る場合。

$ review-compile --target html girl.re > girl.html
/* stylesheet.css */
= 数学ガール
== 『数学ガール』って何?
@<b>{『数学ガール』}は、
ミルカさん+テトラちゃん+「僕」という三人の高校生と、
中学生のユーリが、ひとあじ違う数学にチャレンジする楽しい《数学・青春・物語》です。
読み物形式でありながら、取り扱う数学的内容は本格的。
学生さんから社会人まで大人気のシリーズです。
* 書籍
* コミックス
* 翻訳
書籍は現在次の5冊が出ています。
1. 『数学ガール』 @<href>{http://www.hyuki.com/girl/euler.html}
2. 『数学ガール/フェルマーの最終定理』 @<href>{http://www.hyuki.com/girl/fermat.html}
3. 『数学ガール/ゲーデルの不完全性定理』 @<href>{http://www.hyuki.com/girl/goedel.html}
4. 『数学ガール/乱択アルゴリズム』 @<href>{http://www.hyuki.com/girl/random.html}
5. 『数学ガール/ガロア理論』 @<href>{http://www.hyuki.com/girl/galois.html}
『数学ガール』のホームページは @<href>{http://www.hyuki.com/girl/} にあります。
# girl.yaml
# $ review-epubmaker girl.yaml
# このファイルは「ReVIEWクイックスタートガイド」をもとにしています。
# https://github.com/kmuto/review/blob/master/doc/quickstart.rdoc
bookname: review-girl
booktitle: 数学ガールとは
aut: 結城浩
stylesheet: girl.css
toclevel: 3
secnolevel: 2
epubversion: 3
htmlversion: 5
titlepage: true
toc: true
mytoc: null
colophon: null
cover_linear: null
params: --stylesheet=girl.css
debug: null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment