Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.93 KB

BUILD.md

File metadata and controls

43 lines (27 loc) · 1.93 KB

Introduction

As open source books, ebooks and pdf format should be created on fly, the following sections describe those solution in detail.

The solution below is based on Pro Git; while it is little updated on format inside.

Making Pdf books

PDF format is used to read/print in nice way like real book, pandoc good at this and it is used instead to generate latex from markdown, and latex tool xelatex (is part of TexLive now) is used to convert pdf from latex.

Please check ctax and TexLive for more background for latex, which is quite complicated and elegant if you have never touched before.

Ubuntu Platform

Ubuntu Platform Oneiric (11.10) is used mainly due to pandoc.

pandoc can be installed directly from source, which version is 1.8.x. If you use Ubuntu 11.04, then it is just 1.5.x.

Though texlive 2011 can be installed separately, the default one texlive 2009 from Ubuntu repository is good enough so far.

$ sudo apt-get install ruby1.9.1
$ sudo apt-get install pandoc
$ sudo apt-get install texlive-xetex
$ sudo apt-get install texlive-latex-recommended # main packages
$ sudo apt-get install texlive-latex-extra # package titlesec

You need to install related fonts for Chinese, fortunately they exist in ubuntu source also.

$ sudo apt-get install ttf-arphic-gbsn00lp ttf-arphic-ukai # from arphic 
$ sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei # from WenQuanYi

Then it should work perfectly

$ ./mkbok

Just remind you, some extra pandoc markdown format is used inside this book:

  • code syntax highlight (doesn't work in pdf, while it should work in html/epub which needed later)
  • footnote