[Tex/LaTex] Writing a technical book, structuring first then layout later possible

book-designmswordpdfxml

I want to write a Technical Book that eventually should go to Lulu.com for publishing, so I have to stick to certain strict rules about page sizes and layout.

I'm currently looking for a way to focus on the Writing and do the layout later. Essentially, I want to do some basic formatting like "header", "paragraph", "code", "bold", "image", but don't worry about the concept of Pages just yet.

When I'm done with the Content I want to layout the content by adding page breaks, auto-generated table of content, page layout (Margins, Gutter, Page Size,…). I also want a standard format that all books are following (the first few boilerplate pages in any book), so reusable templates would come in handy.

Essentially something that's usually Microsoft Word's domain, except that Word isn't very trustworthy and loves to randomly break stuff. Also, I want a PDF output.

I've never worked with TeX before, but it's layout capabilities are legendary, I just wonder if it's the right tool for my need? Take structured content, format it, make revisions to the content without having to do tons of re-layout, output a PDF (PDF 1.3 standard, embedded fonts)?

Or am I better off with something like DocBook XML or -gulp- Microsoft Word?

Best Answer

I would consider (La)TeX to be ideally suited for exactly the purpose you mention. It is definitely flexible in the sense that you can follow a very basic approach of typesetting simple elements (you mention paragraphs and figures), and tweaking the layout at a later stage (table of contents, margins, stock-size). The latter is typically obtained via the addition of packages in your document preamble that enriches the document's content.

Perhaps, as a start of why to choose (La)TeX above other alternatives, you could read the CTAN: What are TeX, LaTeX, and friends? entry. Listed there you'll see the "reasons most often cited for using TeX, [which may be] grouped into four areas: Output Quality, Superior Engineering, Freedom, and Popularity."

Even if your eventual output is void of mathematics, the output and layout (in my opinion as well as yours) is "legendary". Perhaps, just to start you off of seeing what is possible, consider reading up on the memoir documentclass by reading the documentation. Others will definitely suggest other styles and flavours, giving credit to the flexibility across many platforms. memoir also provides sufficient functionality to mould the page sizes and layout in order to "stick to certain strict [publishing] rules". However, other options also exist by means of the geometry package. Consider reading the package documentation - it provides a rich mean of configuring your paper stock, trimming margins, text block, headers, footers, etc.

From a very basic point of view, your document would have the following structure:

\documentclass{book}% or \documentclass{memoir}
%<preamble filled with packages and other goodies>
\begin{document}
%<your future lulu.com masterpiece>
\end{document}

Like anything, you'll have to get used to the way things work in (La)TeX, just like you originally did when you fiddled with typesetting in MS Word. But there is a multitude of resources out there to help (from this Q&A to the comp.text.tex forum, to the CTAN). Also consider, as a taste test of some future possibilities, viewing the TeX Showcase.