# Using LaTeX to publish a novel on Lulu

I’m going to blog about this because I can already feel myself forgetting key bits of the process.  You’re welcome to the information too, but please note, dear reader, that I’m sure there are more appropriate ways to accomplish some of what I did.

My friend Luke wrote a novel for his children, which he’s self-publishing (he published chapters to his blog as he went, if you want to see it).  It’s really good, and I wanted to see it look really good too.  So I convinced him that he should use LaTeX to typeset it.  “Sure, if you’ll help me.”

I know LaTeX in the same way that I know Julian Barnes–I’m a fan and appreciate what it can do (in the hands of experts).   I am not a LaTeX expert, but I was willing to learn it.  After having spent some time with it I’ve come to the conclusion that it’s criminal that I wasn’t formally taught this in either my English or CS courses–how often did I needlessly fight with MLA or APA styling for formal papers?

I won’t begin to try and teach you LaTeX, but will instead give some tips on what worked for us:

• On my Mac, I used TeXShop, which is part of http://www.tug.org/mactex/2011/
• We used the memoir class for the novel’s layout.  The memoir manual is useful, though daunting: memman.pdf.  I consulted it many, many times.
• In order to produce a Trade Paperback formatted page (6 x 9 inches, 152 x 228 mm) in memoir, I had to use the not-so-obvious ebook documentclass:
• \documentclass[ebook,12pt,openany]{memoir}
• Producing a simple dedication was rocket science.  Luckily I found others who had been to the moon already:
• \newenvironment{dedication}
{
\cleardoublepage
\thispagestyle{empty}
\vspace*{\stretch{1}}
\hfill\begin{minipage}[t]{0.66\textwidth}
\raggedright
}%
{
\end{minipage}
\vspace*{\stretch{3}}
\clearpage
}
...
\begin{dedication}
To my children
\end{dedication}
• I found this document [pdf] incredibly helpful for choosing a chapter style.  We ended-up using dash:
• \chapterstyle{dash}
• Quotations have to be rewritten to differentiate opening- and closing-quotes.  That means “quoted” becomes
quoted''
• For the page style, we chose to have the numbers appear in the upper-left corner of the left-hand page, and the upper-right corner of the right-hand page:
• \pagestyle{simple}
• To create a final pdf with fonts embedded–something numerous sources underscore–I followed the advice here:
• pdf2ps doc.pdf
ps2pdf13 -dPDFSETTINGS=/prepress doc.ps doc2.pdf

I’m pleased with the outcome.  And while I know there are things I’d do differently if I knew how to properly wield LaTeX, I’m pretty impressed with what it can do on its own and despite me.

UPDATE: Luke has blogged a link to the book on Lulu.com.

This entry was posted in Digital Swag. Bookmark the permalink. Both comments and trackbacks are currently closed.

1. Posted December 20, 2011 at 8:00 pm | Permalink

I have done roughly the same thing but I used XeTeX for its superior font-handling capabilities, the “daleif3″ style (modified) for chapter headings and, after several different attempts, I ended up generating a basic TMMR title page then imported the PDF into Inkscape, modified it to what I really wanted, then changed the title page to import the image at different “magnifications” (i.e. changed the svgwidth parameter based on what size output I was generating.

I chose to have the book title and page number in the footer which works well on Letter-size paper but not so much at 6X9. I need to muck about with the margins to make the 6X9 version look better.

My novel is quite long so I generated a Master File consisting of nothing but a bunch of \input{ filename} statments and have one file for each chapter. Just another way of approaching it.

My first try at a novel was pretty lame and was a fan-fiction continuation of somebody else’s work. I’m in the final stages of a nearly-complete rewrite that is my own original story throughout. Look for No Greater Love on http://phoenix.wa8tzg.org in about two-three weeks.

2. Posted December 21, 2011 at 8:32 am | Permalink

I liked your post but was still disappointed at the end.

Having worked with LaTeX extensively I cherished your insights about memoir, a class I was not yet familiar with. However, the title hints at instructions how to publish at Lulu.

I was drawn to your article by this information, but it never gets mentioned. Would you be so kind as to write up another post detailing the publishing phase of your devour?

3. Posted December 21, 2011 at 1:59 pm | Permalink

Thanks for writing this! Greg Wilson and I published The Architecture of Open Source Applications (http://www.aosabook.org/) using LaTeX on Lulu, and I found it to be a surprisingly painless process. Well… low pain, anyway.

I should have posted a blog post like this when AOSA came out, but luckily AOSA Volume 2 is coming out in February – I will blog about the typesetting and publication process then, when it’s still fresh in my mind.

Daan, that’s a good question. I don’t know if David is planning to write a post on that topic, but I can tell you it’s quite straightforward. We used pdflatex to generate a PDF file – that PDF is then uploaded directly to Lulu. It has to pass their quality control, which among other things checks to make sure all fonts are included and the page size is correct, and then it goes to print. Publishers also have to create and upload a cover in JPG or PDF form (or you can use their wizard to create a cover, but that’s very limiting).

4. Posted January 6, 2012 at 9:17 pm | Permalink

Thanks for writing this up; this is very useful, especially as I’m interested myself in using LaTeX to produce a math-related ebook. However rather than looking for PDF output I want to produce EPUB and MOBI format (for Nooks and Kindles respectively), so I need (X)HTML output instead, with stuff like equations turned into images. Unfortunately I haven’t been able to find a simple toolset and associated howto for this, so if you or anyone else knows of good sources of information I’d appreciate hearing about it. (I think tex4ht may be my best bet for the toolset, but we’ll see.)

In the meantime, if you or anyone else is interested in creating Kindle or Nook ebooks “from scratch” using XHTML check out frankhecker/dividing-howard on GitHub. I published the end result on Amazon and B&N recently, and it turned out reasonably well.