Our group has been using ShareLaTeX, which has now merged with Overleaf, for collaboratively editing LaTeX documents. Compared to a local installation of LaTeX, ShareLaTeX (Overleaf) is not as fast and there is usually noticeable delays in generating the output file. However, its collaboration features, such as shared editing, commenting, and track changes, makes ShareLaTeX a great tool for drafting documents together with a group of people. Being an online tool, it also saves the trouble of installing the LaTeX distribution and ensures that everyone is working with the same setup.
When documents have to be edited locally, we use Texstudio as the editor and TeX Live as the distribution.
LaTeX Templates
Perhaps the best way to get started in LaTeX is to use a template.
There are no hard-and-fast rules, but here’s a short list of guidelines:
“1em” is a horizontal length and “1ex” a vertical one, so use them accordingly (they are horizontal and vertical arbitrarily, but usually you hear people talk about “1em” is the width of an “m” — usually false — and “1ex” is the height of an “x” — usually true). I usually consider 1em to be about the same size as the font size in points.
em and ex are relative lengths, so they’re better for designing around text; like you say, an indent of 2em will work whether the fontsize is 9pt or 12pt.
Things that are of fixed size (such as the page size) should be defined with fixed units, of course.
When things should be relative, it will often make more sense to define them in terms of the page design. For example, width=0.5\linewidth might make more sense than width=5cm for a figure.
Watch out for the pt unit! In TeX, 1pt is 1/72.27in, whereas the more common “PostScript point” used by most other software is 1/72in which in TeX is 1bp. If you’re dealing with other programs and need your lengths exact, use bp or use standard cm or in measurements.
Creating equal margins on all sides
Equal margins on all sides of a page can be easily created by using the geometry package.
Paragraph indentation
Put a \noindent before a paragraph to remove the indentation of that paragraph. If you want to remove indentations for all paragraphs, you can put the following in the preamble of the tex file.
Text
Numbers and Units
In general there should be a space between a number and it’s corresponding unit. This space is shorter than a typical space between words. In LaTeX, this can be implement by “number\,unit”. Sometimes it is also acceptable to use “number~unit”. The “~” creates a typical space, which is longer than the “\,”.
A better alternative is to use the siunitx package. The manual of the package can be found here
Line spacing in enumerate and itemize environment
Use the enumitem package. The manual for the package can be found here
Custom label in enumerate and itemize environment
Again, use the enumitem package. There are several options to choose from: \alph, \Alph, \arabic, \roman, and
\Roman*.
In-line list
Use the enumerate* and itemize* environments in the enumitem package. The inline option needs to be enabled in the enumitem package.
Striking through texts using a horizontal line can be achieved by using the soul package.
Math
Upright bold symbols
By default, the \mathbf command does not generate upright bold font for Greek alphabets, which are often used to denote matrices. Use the bm package for this purpose.
Center-aligned equations
Use the gather environment (included in the amsmath package) to generate a set of equations that are center aligned.
Using multiple [ ] can generate center aligned equations without equation numbers.
Use the threeparttable package. Below is an example. Source: http://tex.stackexchange.com/questions/12676/add-notes-under-the-table
Figures
Inserting Figures
The following code works both for LaTeX and pdfLaTeX for inserting figures.
Note that an extension for the figure file name is not specified. When using pdfLaTeX, save the file with extension .pdf; when using LaTeX, save the file with extension .eps.
Also it is very important that the \label command be placed immediately after the \caption command. Otherwise the \ref command would reference the last reference-able object, which is often the section label or the previous figure. Putting the \label command consistently before the \caption can be a dangerous practice that may completely disrupt your figure references.
Changing Font Size in Caption
Use the caption package.
Wrap Text Around Figures
Use the wrapfig package.
Adjusting the space around figures/floats
Direct application of the wrapfigure environment often results in excessive white space above the figures. The following trick can be used to adjust the spacing.
Note that the group includes the wrapped figure and some texts. The text must exceed the vertical span of the figure, otherwise the following paragraph will intrude into the figure.
Side-by-side Figures
Figure in tables
Bibliography
Hiding references
The \nobibliography{bibfile} command allows you to generate citations via Bibtex without creating a “References” section at the end of your document. This command is enabled by the bibentry package.