views:

193

answers:

8

Hello all,

I have a book project which I'd like to start sooner than later. This would follow an agile-like publishing workflow, i.e: publish early and often. It is meant to be self-publsihed by me and I'm not really looking to paper-publish it, even though we never know.

If I weren't a geek, I'd probably have already started writting in Word or any other WYSIWYG tool and just export to PDF. However, we know it is not the best solution, and emacs rules my text-editing life, so, the output format should be as simple as possible and be text-based.

I've thought about the following options:

  • Just use orgmode and export to PDF (orgmode has this feature natively)

  • Use markdown mode and export to PDF (markdown->LaTeX->PDF should not be hard to setup);

  • Use something similar to what the guys @ Pragmatic Progammers do: A XML + XSLT + LaTeX. More complex, but much more control over the style.

  • EDIT: Someone just told me that he uses a combo of Textile+Adobe In Design and the XTags plugin. Not sure how they are glued together though, gotta do some research.

Any other ideas / references ?

I want to start writting as soon as possible. In fact, I already have a draft in an org-formatted file. However, I do want to have and use the full power of LaTex later on to format it the way I want and make it look fabulous :)

Thanks in advance,

Marcelo.

+1  A: 

If you are really wanting to do online only, I would suggest you use org mode and just stay in HTML. Then you can use CSS to style it however you would like.

That being said, if you really want to output to PDF for technical stuff, I would strongly suggest using Docbook (www.docbook.org). It's made for that, it works great with Emacs.

Joshua Smith
DocBook looks interesting, neverh heard about it before. Does it use LaTeX/TeX under the cover?
Marcelo de Moraes Serpa
Thanks for the reply, btw ;)
Marcelo de Moraes Serpa
Docbook does not use latex under the hood. It uses xml-fo which you can transform into PDFs using Apache fop. There are utilities to convert docbook into latex, though.
Joshua Smith
Mica
A: 

I would write it in Latex and have an online repository that does nightly compiles to PDF of the 'publish-ready' branch, available to readers.

Paul Nathan
I like the workflow, but pure Latex is a bit too hardcore for me currently. Any suggestions on libraries that would abstract it a little bit or maybe make it easier?
Marcelo de Moraes Serpa
@Marcelo: my experience is that running around to avoid the pain just prolongs the agony... once I sucked it up and jyst learned how to work with LaTex, things got easier.
Paul Nathan
+2  A: 

Typography is hard.

TeX/LaTeX are tools that can get you the best possible results, however they require knowledge about typography to be used correctly--especially with a big document like a book. And I haven't seen any other cheap (=not for professional use) software that would do things correctly automatically. (I haven't seen any professional software, so it is possible they don't do that either)

However, assuming that you'll write your book in some machine-readable format, putting it into TeX/LaTeX should not be very hard: once I had a set of documents in a custom XML format. Proper usage of XSLT, TeXML and LaTeX gave me something I could tweak manually (and this tweaking was necessary!) and get the best possible result.

My advice: prepare content in something that is easy to parse and easy to write in. I'd dismiss XML. Markdown seems to be good choice. This will also allow you to quickly show your work. Then if you decide to make the result better, write some simple script to translate that to TeX (it is not that hard to get basic functionality) and fix things by hand. This might actually be a good exercise to learn TeX.

Don't try to get everything right from the beginning. Firstly get the content, then play with formatting.

liori
LaTeX requires very little knowledge of typography to look good-- pick a font face, and a size, a page )
Mica
@Mica: Tables. Floats. Overfull/underfull boxes. And, exclusively in LaTeX, incompatible packages. To resolve such problems you need to know what is the desired result. LaTeX is much better than TeX at making some decisions, but still it doesn't do everything.
liori
@liori I don't disagree, but not a lot of that has to do with typography :P
Mica
@Mica, I disagree. I have seen so many bad examples using LaTeX. For example, typesetting good tabular material is pretty hard, and I have seen only very few people capable of that. The way LaTeX works (as suggested in almost all the documentation) you have for example vertical rules all over the place, very little possibility to format slightly rotated headings etc.
Patrick
@Mica: Tables and over-/under-full boxes don't have much to do with typography?
Charles Stewart
Mica
+3  A: 

I have done a TON of research on this lately, since I'm planning on starting my own small press soon.

It really depends on what you want your final output to be (PDF, HTML, other?), and what the book is about.

Org mode is great, as I'm sure you know, because it expands as you do. I often write my outlines in org mode, then just fill in the body text when I'm really ready to start writing.

IF it's prose, and you just need some simple divisions (chapters and sections and not much else), org mode -> latex should do you just fine. Then you also have the possibility of org mode -> html

IF you need math in it, you can just write the math right in the org mode file.

If it's really really technical information, docbook might be nice (emacs + nxml), then dockbook 4.5 -> jade -> jadetex -> pdf.

I'd stay away from docbook 5, because it uses FOP to generate PDFs, and the typesetting is really inferior to latex.

BOTTOM LINE: If you want a PDF, use org -> latex, the path of least resistance ;) -- whatever you do, concentrate on the content of the book first, and worry about what it looks like til after.

And why not paper publish? Have you looked at lulu.com? I recently formatted a book with latex, uploaded the pdf to lulu, and had them print it. The quality is pretty good, and definitely worth a look. I have a ton of bookmarks at home about publishing in general, if you're interested.

Mica
+1  A: 

You have already answered yourself. Not mentioning that you already started writing in org-mode. Org-mode is really extremely powerful and will enable you to publish to PDF and HTML eventually with no effort.

In case of PDF you can take advantage of LaTeX and how org-mode is working with exports. You can include any LaTeX code to your org file. Also IMHO it's way better to write the book/article in org-mode since something becomes even easier than in plain .tex files take for example tables.

Regarding Publishing it's a same story with one single function you can trigger exporting to HTML/PDF and uploading to your server. And notice that you are still using just plain text file which is human readable and very clean.

Org-mode really follows the Emacs philosphy just start using it and it will grow with you.

wu
A: 

If you are writing a book, it would certainly be worth the overhead of learning tex.

Even something like,

\documentclass[a4paper,10pt]{book} 
\title{SERPA'S BOOK}
\author{SERPA}
\date{\today}
\begin{document}

\maketitle

\tableofcontents
\include{chapterA}
\include{chapterB}
\include{chapterC}
\end{document}

Then, in the same directory have files chapterA.tex, chapterB.tex, chapterC.tex that look like

\chapter{My chapter title}

Lorem ipsum dolor sit amet, consectetur adipiscing elit....

That alone will produce an extremely nice looking document. You can edit each chapter separately and then just compile the main tex file. I think if you try to learn intermediate tools that try to abstract away from tex, you'll only make it more difficult later to do what you actually want, because you will be both fighting tex and an abstraction of tex at the same time.

Best of luck on such an undertaking.

Also, no matter what you do, make sure to use some kind of version control system, such as SVN, to manage your files. It will be worth it.

stevejb
A: 

I would not start with using LaTeX these days. TeX input is unstructured and the only thing you can get out of TeX input is PDF. If you need HTML or anything else, you are screwed.

Use something structured, such as XML (DocBook is a good suggestion) or define your own XML subset as you need it. Use XSLT to transform it into something usable (HTML etc.) That way you are set for the future.

Depending on your typographical needs, you can then use TeX as a backend processor, or XSLT or whatever.

Also, have a look at ConTeXt, it can read XML directly and has great typography!

Patrick
I don't think the ad-hoc structure of Tex is a big barrier for self-published book projects. But I strongly second taking a look at Context.
Charles Stewart
It's not a barrier for self-published book projects. But the only reasonable output is PDF, you can't get any other structured output out of TeX.
Patrick
A: 

Thank you all for the comprehensive answers.

There are a myriad of tools, technologies and permutations that could be used to self-publish a book.

Some are very easy, other require some more effort into learning the technology itself.

Well, I'm a geek, but I'm also quite pragmatic. I want full-control of the design and also of the output, but I also have a life -- so, I'll just start writing, the content is independent from the visual output anyway, and without it any work on design is useless (in this context).

One thing however, I wouldn't do directly on TeX or LaTeX because I'd be limited to a PDF output.

When the time comes and I notice I have something to release, I'll look deeply into each of these options, and decide which one to use.

Thanks!

Marcelo.

FullOfCaffeine