
How to write a book in Emacs - ingve
https://www.masteringemacs.org/article/how-to-write-a-book-in-emacs
======
Procrastes
I wrote my first book in what was then Star Office, but everything since has
been in Emacs and some sort of markup. I agree with the annoying variations
Markdown. reStructuredText is, at least, predictable. I do still outline in
org mode though.

It seems like anytime I interact with a traditional publisher, just like the
editor in the article, they want MS Word. They then want to give me edits as
Word change tracking.

My compromise is to go back and change my source and regenerate. It works, but
at night, when the world is quiet and dreams are less threatened by reason, I
imagine a world where editors send me patches or pull requests.

I'll have to try the method described in the article. That might be much
better, but I'll have less chance of negotiating it than with a freelance
editor.

I don't think there's a technical solution to this problem and certainly not a
profitable one, because it's a matter of getting people who couldn't care less
about diffs and source control to use unfamiliar tools for the benefit of
someone they are paying.

I can't even get some developers to use source control.

Maybe GitBook will change minds.

------
arocks
Thank you so much for writing this. It is useful not just for Emacs users but
to anyone who prefers writing their book in a text-based markup rather than
Microsoft Word. It also explains how to collaborate with someone who uses Word
exclusively.

Unfortunately, every tool has a quirk and we eventually need to settle on a
workflow that somehow works, even though everything might be open source as
you have described in the case of Pandoc. But I believe Emacs is the best
authoring tool for books due to its versatility.

~~~
mickeyp
Pandoc's great. It has many great advantages and I would not hesitate to
recommend it, but when you commit to a workflow early (rst in my case)
rewriting or converting it mid-way through is a major hassle, one I'd rather
like to avoid.

Still, rst/Markdown/Docbook is better than MS Word for techies.

------
blue1
I also wrote a book in Emacs org mode. My plan was to do all the editing in
emacs, and then design the layout in Adobe Indesign. I struggled a lot with
several delirious XML-based solutions for this (e.g. Docbook), but finally I
found out that a fine method is to use pandoc to directly convert org mode
files to IDML (a markup format native to Indesign).

------
nadams
> Pandoc’s great — it really is. But I still had no end of trouble with it.

Now I haven't done anything really advanced with it - but from what I've done
so far it's worked great. Being able to export to PDF and epub with the right
formatting from the same document is huge leaps for me.

> First of all, there is no documentation.

Now I can't take the author seriously.

* [https://github.com/jgm/pandoc/wiki](https://github.com/jgm/pandoc/wiki)

* [http://pandoc.org/README.html](http://pandoc.org/README.html)

I'm not saying it's the most obvious tool to use - but with some digging I was
able to figure it out.

> Ultimately I had to delve into the source to figure out why some things
> worked and other things did not.

Well...yeah. Pandoc isn't this magical thing that supports converting every
possible format and niche feature back and forth without some sort of loss of
style or formatting. Even tools like OpenOffice and LibreOffice have some
formatting and style issues with the real Office tools.

------
EliRivers
For those interested in how the publishing industry operates (and it really is
quite interesting) Charlie Stross has penned a number of articles over at his
website, collected under the title "Common Misconceptions about Publishing".

[http://www.antipope.org/charlie/blog-
static/2010/04/common-m...](http://www.antipope.org/charlie/blog-
static/2010/04/common-misconceptions-about-pu-1.html)

Including _Why I [still have to] use Microsoft Word (even though I hate it)_
[http://www.antipope.org/charlie/blog-static/2013/11/cmap-
why...](http://www.antipope.org/charlie/blog-static/2013/11/cmap-why-do-you-
use-microsoft-.html)

I've got a funny feeling there might have been a few that didn't get added to
this list.

~~~
digi_owl
His closing lines at the last link could be applied to corporate IT (or
machining in general) across the board.

This, basically, because IT etc is a sunk cost. As such, beancounters insist
on running that "cost" until it has been ground into component quarks...

------
klibertp
There's a bit longer piece on a related topic here:
[http://www.therandymon.com/papers/emacs-for-
writers.pdf](http://www.therandymon.com/papers/emacs-for-writers.pdf)

Looked nice when I found it, but I'm not a writer and I can't judge how useful
it can be.

------
mcguire
" _In Emacs, there are several modifier keys you can use, each with its own
character:_ "

    
    
        ========   =========
        Modifier   Full Name
        ========   =========
        ``C-``     Control
        ``M-``     Meta ("Alt" on most keyboards)
        ``S-``     Shift
        ========   =========
    

That list is sorted incorrectly. It should be Esacape, Meta, Alt, Control, and
Shift.

~~~
mickeyp
I already made that joke later on in the book.

------
gerty
The author seems to be disappointed with aspell. I wonder if LanguageTool
would have been a more adequate choice. I use it regularly before publishing
documents.

------
copperx
AsciiDoc is an often overlooked markup format, which implements all features
of DocBook. It is a perfect fit for writing a book. Markdown and
reStructuredText were not designed with books in mind.

It's a pity that the popularity of Markdown made it hard for the author to
even consider AsciiDoc. It wasn't even in the list of contenders.

------
mcguire
" _Enabling old-style numerals (lowercase numbers) [in LaTeX] is easy enough,
right up until you want to only enable them in some parts your book._ "

I've seen people say that before, but I've never been able to get lowercase
numbers myself. And in the past I've futzed with LaTeX a lot.

I give: how do you do it?

~~~
mickeyp
You set Numbers to OldStyle in \setmainfont, for instance. This assumes your
font supports numerals.

------
ninjakeyboard
I'm writing Learning Akka for Packt Publishing using org mode w/ pandoc to
convert it for the editors to work with. Org mode supports most anything -
code, images etc.

Once the editors put it into packt format, then I'll continue editing myself.
It's working well for me.

------
RexRollman
His point about Markdown is why Commonmark now exists. The guy who created
Pandoc is one of the people who are working on it.

~~~
mcguire
...something, something,...the nice thing about having _n_ standards is now
having _n+1_ standards...something.

~~~
RexRollman
Yeah, I've seen that comic.

------
shocks
Perhaps using git would help too.

~~~
klibertp
It's explicitly stated in the article that the author uses git for version
control with a Magit Emacs plugin...

------
bitwize
Preparing a manuscript in Emacs is like preparing a graphic design in GIMP.

Suck it up and use the tool that everyone else is using -- Word.

~~~
JadeNB
> Suck it up and use the tool that everyone else is using -- Word.

A great recipe for making sure nothing ever improves!

