Latex, a technical document processing system based on Tex (written TEXand pronounced ``tek'') has become the mathematical standard for mathematical typesetting, printing and composition. It comes with a large number of style files, or templates, for books, articles, theses, exams, web pages and more.
To learn to use TEXyou will need either a book, or lots of sample files. There are also tutorials on the web. One such manual is An introductory Latex 2e Manual
The standard method is to get a document of the same type from someone, and change the content to suit your needs. This also works for web page development.
Latex has several programs/systems to help with the bibliographies in your papers, theses, books, etc. They are all based on BibTeX, which is a system involving a data base of your references that you set up. Since the syntax is rather arcane, there are tools to help with this.
The neatest one is BibWeb, which will go out and search the net (actually MathSciNet) for your references, and format them correctly.
The Bibweb Bibliographic Database Creator
If you have old latex files with bibliographies in them, you can extract them into a bibtex file (if they are in reasonable form)
Create Bibtex (.bib) files from your TeX documents
There are also programs to help with the editing of bibliography files.
The CTAN (Comprehensive TeX Archive Network) has everything, if you can find it.
The CTAN Catalog in a readable form.
The TUG (TeX Users Group) has lots of pointers.
Well, it is a text editor that has been expanded to do almost anything. But this section is about Emacs helping you to type your documents. The three systems mentioned below will help. For now, see the documentation.
Auc-Tex will shorten many commands, find errors for you, and keep track of your files. Its documentation is in the Emacs info system.
Ultra-Tex does a better job of preventing errors, for example, by adding { } and $ always in matching pairs. See: The Ultra-TeX Package for Emacs
It also comes with a Lightning Completion system, which types Latex commands, references, and bibliographic entries faster than you can think. Its documentation is here:
These three systems are enabled by entries in your emacs setup file.