tags:

views:

74

answers:

2

I'm writing a plain text document with numbered sections or chapters and am wondering if emacs can help with numbering and re-numbering sections. And of course would be great if it could then generate a table of contents as well.

I have had a search on google and looked through the emacs wiki but did not come up with anything other than for latex stuff and possibly muse mode, but I would like to keep this as a plain text README style document.

Thanks for any help or suggestions.

+1  A: 

How about using reStructuredText:

http://docutils.sourceforge.net/docs/user/emacs.html

scottfrazer
+2  A: 

I'm pretty sure that org-mode (which is included by default in emacs these days) also provides for such things. It enables fairly sophisticated structured documents in plain text, and can export as text, HTML, LaTeX, DocBook, and a few other formats. The documentation mentions that DocBook export in particular opens up a variety of other conversion options using existing DocBook tools.

phils
Org-mode with export to LaTeX or DocBook rocks for this sort of thing. It's like ReST, but with a totally integrated Emacs interface. Plus, it's good for a lot of other things as well.
ScoBe