Creating pdf ebooks with LaTeX (With Two Free Examples: Art of War & How to Live on 24 Hours a Day)

If you are looking for the sample ebooks, scroll down a little (and don't forget to subscribe if you have not done this already!)

I started to look for ways to use LaTeX for doing ebooks very recently. My plan is to write an ebook on productivity and time management, with no deadline. I strive to make it the book I'd love to read when I started reading about time management... And this means I'll need quite a time.

I wanted to use LaTeX because it is the typesetting system I use for mathematical typing, I know it well and it works wonders. The default document classes range from book to article to report... But they weren't completely well suited for an ebook at first look.

To solve this problem, I realised that the powerful memoir class covers a lot of ground. Memoir lets you tweak a lot of options, and get nicely looking books... and with some tweaking, ebooks. To test the settings, I have compiled a few posts from this blog just as a test in a pdf ebook with 2 pages per sheet, cover pages and such and the result looks pretty good. If you think someone may be interested in a Best of Mostlymaths.net, I may consider finishing it and posting it here.

When the time to test the How to do A6 booklets in 7 easy steps (with LaTeX) came, I went for typesetting some good books with the memoir class, and decided to pick up the Project Gutenberg plain text files for The Art of War and How to Live on 24 Hours a Day. Check the results!
The settings I used for memoir are as follows (you can download the file from here and read a commented version here)
\usepackage[pdftex, colorlinks=true, linkcolor=black, urlcolor=blue {hyperref}
\usepackage[paperwidth=9cm, paperheight=12cm, hmargin={1cm, 1cm}, vmargin={1.2cm, 0.8cm}]{geometry}
\widowpenalty 3999
\clubpenalty 3999
\makeevenhead{ruled}{\footnotesize \emph{\rightmark}}{}{\footnotesize\scshape The Art of War, \thepage}
\makeoddhead{ruled}{\footnotesize \emph{\rightmark}}{}{\footnotesize\scshape The Art of War, \thepage}
\renewcommand\chapterheadstart{\vspace*{\beforechapskip}{\color{darkgray}\centering\MakeUppercase{\fontsize{0.7in}{0.7in}\selectfont\romannumeral\thechapter} \par\nobreak\vskip1\midchapskip\hrule\vskip0.5\midchapskip}\color{black}}
\renewcommand{\chapternumberline}[1]{\hspace*{-5em}\vbox{\hfil\hsize=7.5em\MakeUppercase{\mdseries\romannumeral#1}.\ \hfilneg}}
If you are not LaTeX savvy, this may look like gibberish, but then you should probably skip it, get the books from the links above and tell me if you like them :)

If you know enough LaTeX, you'll see that setting up the parameters for memoir is pretty straightforward (and more so given a sample!).

If you enjoyed this two ebooks, please spread them! Twitter, Facebook, StumbleUpon... Whatever! Or subscribe to my newsletter if you want to get some (oddly) email with good tips on time management or productivity.

Related posts:
Written by Ruben Berenguel