Spring til indhold

Video 1 | Video 2 | Video 3 | Video 4 | Video 5 | Video 6 | Video 7

This seven-part series of LaTeX tutorial videos was first published in 2013; consequently, today's editor interface has changed considerably due to the development of ShareLaTeX and the subsequent merger of ShareLaTeX and Overleaf. However, the video content is still relevant and teaches you the basics of LaTeX—skills and expertise that will apply across all platforms. You don’t need any previous background knowledge, and by the end of these LaTeX guides you will be able to create and write basic LaTeX documents and have the knowledge to start learning how to create more complicated documents. Each video is accompanied by a transcript (listed below the video)—these in-situ transcripts replace the URLs shown at the start of each tutorial.

Mathematics in LaTeX

Note: You can open the project used in the video by following this link.

Video transcript

In the previous video we looked at splitting up documents into sections and paragraphs. In this video we’re going to be looking at adding basic maths symbols and equations into our documents. Before you start writing mathematical content in LaTeX we recommend you load up the amsmath package, this will give you more options when writing more complicated mathematical documents. To do this simply use the \usepackage{...} command and enter amsmath between the brackets, like this: \usepackage{amsmath}.

To simply write maths inline with the text you are writing, enclose your mathematical content in dollar signs. ShareLaTeX will colour code content in dollar signs in green so you can easily identify your inline mathematics.

To write something in superscript, follow your number or symbol by a caret and then enter the number or symbol you want in the superscript into curly brackets.

To write something in subscript it’s the same process except we use an underscore instead of a caret.

Greek letters are very easy to add in LaTeX. Each letter of the greek alphabet has a corresponding command which is just a backslash followed by the name of the Greek letter in English. If you want to capitalise them, simply start the command with a capital letter.

Pretty much any mathematical function you can think of has a LaTeX command to typeset it. There are numerous lists of these online so I will just introduce a few of them to you now. Firstly trig functions look like this. The square root function like this. Fractions can be easily entered using the \frac command. And there are also numerous functions for writing algebraic statements like this subset command.

Often you don’t want to write mathematics inline with the text, particularly if you are writing more complex equations. Therefore to write an equation or formula on a new line you can use the begin equation structure. Here’s an example of this structure implementing a basic polynomial and an example demonstrating a summation symbol. You will notice that LaTeX has automatically numbered these equations and printed their corresponding numbers in brackets on the right hand side of the page. If you don’t want your equation to be numbered you can add an asterisk immediately after the word equation in both the begin and end commands. Here’s an example using a definite integral.

This concludes our discussion on mathematics in LaTeX. In the next video we’ll look at inserting images into our documents.

Video 1 | Video 2 | Video 3 | Video 4 | Video 5 | Video 6 | Video 7

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX