### Mathpix Snip

###### User guide

# Using Snip with Overleaf

Overleaf is the most commonly used online LaTeX editor, and Snip is very convenient to use with Overleaf since Snip is optimized to give you a LaTeX output for your math and tables.

Follow the steps below to use Snip with Overleaf. You can also watch a full video about Using Snip with Overleaf on our Youtube channel.

## The Preamble

When using Snip with Overleaf, or any other LaTeX document editor, it is important to add the following commands to the document’s Preamble. The Preamble is the first section of your LaTeX document, all the text in your

`.tex`

file before `\begin{document}`

. Here you will define which packages you want to use when compiling your document into a PDF.This is what you need to include in your document’s Preamble so that all special LaTeX features that Mathpix supports will display correctly when LaTeX copied from Snip is pasted into your Overleaf document:

```
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{multirow}
\usepackage{graphicx}
```

## Inserting math into Overleaf from Snip

1. Display the equation want to insert into your document on your screen:

2. Click the screenshot button or enter the keyboard shortcut

`ctrl+alt+m`

/`ctrl+command+m`

:3. Click and drag the crop box around your desired equation, release to Snip:

4. Check your Snip result, then click the row with your desired LaTeX format to copy to your clipboard:

5. Open your Overleaf document and put your cursor at the location in the document where you would like to insert an equation, and paste!

If you paste the

**inline math**format into your Overleaf document, it will look like this:If you paste the

**block mode math**format into your Overleaf document, it will look like this:If you paste the

**numbered block mode math**format into your Overleaf document, it will look like this:Here is a short video showing all the steps together (using block mode math in this example):

## Inserting tables into Overleaf from Snip

Inserting a table into Overleaf from Snip requires the same steps as inserting an equation, the only difference is that you want to make sure to copy the 2nd LaTeX row, because that will have the

`\begin{tabular}...\end{tabular}`

LaTeX text mode format. This format is optimal for rendering tables in LaTeX documents.