CDOGS Beginner's Guide to LaTex

How to impress with cool math in your abstract.

For the purpose of writing a basic scientific abstract there are two sets of symbols you need to know for LaTeX: those for text mode and those for math mode. This guide will go through the basics of each.

Text Mode: Accents

So, you want to have an accent on a letter (for example, your name is Josée not Josee), then by example,

You Want: Hi, my name is Josée.
LaTeX: Hi, my name is Jos\'{e}e.
You Want: Øystein
LaTeX: \O{}ystein

The way the command works, is that the backslash, \, tells LaTeX that a command is coming, then you have the command (put an accent, ', over the letter {e}). Here is a list of accents, and the commands that go with them.

Text Mode: Decorations (bold, italics, underline)

Do you need to put emphasis on a word or are referencing a species? You will then need to use text decorations.

If you want to bold something you use the commands \textbf{...} where your word/phrase is placed within the curly braces. By example,

You Want: Some of the greatest discoveries in science were made by accident.
LaTeX: Some of the \textbf{greatest} discoveries in science were made by accident.

If you want to italicize something you use the commands \emph{...} or \textit{...} where your word/phrase is placed within the curly braces. By example,

You Want: A main target of the longline fishery is bigeye tuna, Thunnus obesus.
LaTeX: A main target of the longline fishery is bigeye tuna, \emph{Thunnus obesus}.
alternatively,
LaTeX: A main target of the longline fishery is bigeye tuna, \textit{Thunnus obesus}.

If you want to underline something you use the commands \underline{...} where your word/phrase is placed within the curly braces. By example,

You Want: Some of the greatest discoveries in science were made by accident.
LaTeX: Some of the greatest discoveries in \underline{science} were made by accident.

Text Mode: New paragraphs

LaTeX treats tabs, spaces, and single carriage returns the same:

In LaTeX: The quick      brown
fox jumped      over the      lazy
dog.

Output: The quick brown fox jumped over the lazy dog.

If you want to start a second paragraph (in your abstract), you must have two carriage returns back-to-back:

In LaTeX: The quick brown fox jumped over the

lazy dog.

Output: The quick brown fox jumped over the

lazy dog.

Don't worry about tabs at the beginning of paragraphs and such, that will be taken care of by LaTeX later.

Text Mode: Special symbols: $, %, #, &, ...

Some symbols in LaTeX have special meanings. For example, you want to write that "80% of the variance is described by ice-melting events." It is important that you are aware that the % symbol is used to make comments in LaTeX that won't be in the final document. To solve this issue, use a backslash, \, before the symbol.

Wrong:

In LaTeX: 80% of the variance is described by ice-melting events.
Output: 80

Right:

In LaTeX: 80\% of the variance is described by ice-melting events. Output: 80% of the variance is described by ice-melting events.

To make sure you get what you expect, be sure that the following symbols are preceded by a backslash: $, %, #, &

Math Mode: Entering and exiting

By default, LaTeX is in text mode, but its real power comes when you need to typeset equations and mathematics. You enter and exit math mode by using the dollar-sign, $. For example:

You Want: The gravitational force on an object of density, ρ (kg m-3), is F = ρVg, where V is volume (m3) and g is acceleration due to gravity (N kg-1).
In LaTeX: The gravitational force on an object of density, $\rho$ (kg m$^{-3}$), is $F=\rho Vg$, where $V$ is volume (m$^3$) and $g$ is acceleration due to gravity (N kg$^{-1}$).

Note that things that are in math mode have been highlighted in green.

Math Mode: Superscripts and subscripts

These are perhaps the most used items in math mode. As you can see from the example above, LaTeX allows you to put superscripts by using carot symbol, ^. Similarly, subscripts are done using an underscore, _. For example,

You Want: In the ocean, [HCO3-] should increase due to CO2 emmisions into the atmosphere.
In LaTeX: In the ocean, [HCO$_3^-$] should increase due to CO$_2$ emmisions into the atmosphere.

One last importnat thing to note about using superscripts and subscripts is that if more than one character is to be super/subscripted, it must be bracked with curly braces, {...}.

Wrong:

In LaTeX: The shelfbreak velocity, $u_sb$, was measured at 0.1 m s$^-1$.
Output: The shelfbreak velocity, usb, was measured at 0.1 m s-1.

Right:

In LaTeX: The shelfbreak velocity, $u_{sb}$, was measured at 0.1 m s$^{-1}$.
Output: The shelfbreak velocity, usb, was measured at 0.1 m s-1.

Math Mode: Mathy Symbols

You might want to use greek letters, "exp", "sin", or other mathematical symbols in your text. Here are a bunch of tables that should help. Remember that these symbols must be entered in math mode (i.e. between the dollar signs):

Math Mode: Mathy Examples

You want: The Coriolis frequency is f=2Ωsinφ.
In LaTeX: The Coriolis frequency is $f=2\Omega\sin\phi$.

You want: The number of fish of age t is approximated as N(t) = N0exp(-Zt).
In LaTeX: The number of fish of age $t$ is approximated as $N(t) = N_o\exp(-Zt)$.