15

I wish to turn several of my blog article series into a PDF e-book but I have never used LaTeX before for creating books.

For example, I want to take my article series, improve it and turn it into a book.

I'll probably start with this guide that I found - http://www.math.mun.ca/~edgar/thesis.html But that is just a small template. Any other tips, tricks and suggestions for doing it?

3 Answers3

13

I think that you should try using either scrbook or the memoir document class. They are designed for this kind of work. IMHO Memoir has better documentation so you'll propably find it easier to configure it the way you want it.

There is also memdesign, which used to be part of the documentation of memoir.

pmav99
  • 6,060
  • Of course (as you hinted with “IMHO”) “better documentation” is highly subjective. I find the KOMA-Sript book to be a very good documentation. – cgnieder Dec 21 '12 at 14:06
  • @cgnieder I said that I think that memoir has better documentation. I didn't claim that KOMA-Script's was bad. Also it has been a year and a half since the post. Perhaps things have changed since then. – pmav99 Dec 22 '12 at 21:45
  • @pmav99 I did get that. I tried to say that I disagree. But then I am German and until only a few months ago the English documentation to KOMA-Script was bad if existent at all, unlike the German one which has been published as a book, so ... – cgnieder Dec 22 '12 at 21:52
6

If you don't have TeX habbits yet, I'd recommend using Koma-Script's scrbook right away instead of the book class.

Also, you might want to have syntax highliting for your examples. I'd recommended using minted for that, as it is quite flexible and powerful.

raphink
  • 31,894
6

From the comments,

Andrew, I am going to copy/paste the text into Latex file, I think. And then re-format it so it actually looked good. – Peteris Krumins

It would be absolutely heretical and the greatest of programming sins for a blog that focuses on programming to cut and paste content from a CMS into a LaTeX text file!

TeX is more than just a typesetting system. It's a full-fledged programming language and Turing complete. Although it might arguably at first glance appear insane to have a Turing complete programming language for a task like typesetting it makes sense the more you explore the needs of a typesetting system.

No other software implemented in the 1970s remains absolutely and unquestionably dominant in its domain other than TeX and the collection of macros known as LaTeX, which was developed in the eighties. The typesetting algorithms developed by Knuth and the glue-and-boxes model of text layout was a piece of absolute genius. One of the most masterful examples of capturing an extremely complex problem using an extremely simple model. It's beautiful and you are now using it in a somewhat different and handicapped way to display content within a browser. This is the part of TeX that is amazingly, gloriously, magnificently brilliant.

Welcome to our community, pick up a bit of skills in TeX/LaTeX programming and use whatever language you are comfortable with to pick up the content from your database and automatically generate the LaTeX content. For a person with your computer skills it shouldn't take more than two weekends.

Here is some code for inspiration:

\documentclass{article}
\long\def\aPieceOfCode{%
  This is a Piece of code that I need to type out in a number of ways.
  First pick the contents from the CMS and store it in macro. Then call them through your typesetter macros and hey it can even display maths \formula\ without the use of JavaScript!
}
\def\formula{$a=b^2+23 $}
\def\displayMyCode#1{#1}

\begin{document}
\displayMyCode{\aPieceOfCode}
\end{document}
yannisl
  • 117,160
  • Ahh... but extracting the code out of some arbitrary markup and into your \def, now that is a tricky problem. Also, not a problem TeX is particularly good at solving---despite being turing complete. TeX is an amazing piece of work, but it has a very narrow focus. – Sharpie Apr 29 '11 at 00:58
  • @Sharpie Depends. If you have been storing html code in the CMS then it is hard, but if you have been storing it as for example wiki markup then it is easier. – yannisl Apr 29 '11 at 04:06