#### How to use Overleaf to Write your papers: Part I: Basic Minimalist setup

[Disclaimer: I have no affiliation with Overleaf. I am an ordinary regular user of Overleaf and I have found Overleaf useful for my teaching and research. Hence this post. I am just one of the many campus advisors for Overleaf to the University of Canterbury, New Zealand. I derive no financial or any other benefit for writing this article. Also these notes are as current as of July 2016. — Arindam Basu]

Overleaf provides a web-based freemium academic writing environment. By freemium I mean that you can use a basic full version of Overleaf for free, and for more storage and some convenient optional features you pay. You can use Overleaf to create a range of documents from blog posts, journal articles, posters, slide decks, books, essays and so on. Although the system is based on LaTeX, Overleaf provides a mature rich text editor that you can use without knowing LaTeX. You can create virtually unlimited number and sized documents.

I have used Overleaf to write blog posts (publish them using TheWinnower, or as preprints). I have also taught classes, and I have created powerpoint like presentations using the Beamer template. Overleaf is my current main mode of academic writing. Overleaf has a series of tutorials and help files on their site, but it seems to me that all of them assume that you are familiar with and you are going to use LaTeX. Overleaf can be used even if you do not know LaTeX, or do not want to use LaTeX or plain text or you are only interested in using a wysiwyg interface (wysiwyg interface = “what you see is what you get interface”) but not a lot is written about that way of working. Hence I thought I’d like to put together a tutorial or documentation to help you use the system.

In this tutorial, I assume that you do not know LaTeX in depth but have some (very basic) idea of LaTeX, and you are comfortable writing in a wysiwyg interface (wysiwyg = what you see is what you get, for example, an interface you use for writing in Word). If you do not know or not familiar with LaTeX at all, start here:

In this series of articles, I will provide some barebones essential LaTeX codes that you will need to get things done. Feel free to copy and paste the codes to your document and change these codes and parameters to adjust to your document. That way, you are good to go.

This is a basic tutorial. In a follow up to this tutorial, I will write about more advanced features of Overleaf that you can use to write with writing groups and using other services and integrating them with Overleaf, using Git for instance to get your work done. In each article I will focus on the “Rich Text Editor” feature of Overleaf. I will avoid, as far as practicable, using their “source code” editor. I will also not delve into the complexity of writing LaTeX codes in writing, but instead focus on other tools to get the same job done.

Having said that, I strongly encourage you to learn how to use LaTeX. LaTeX is not difficult to learn at all, and there are thousands of tutorials and virtually inexhaustible sources of information on the Internet about how to use LaTeX. LaTeX is free and open source and this is a great reason why you should try if you have not tried it yet. Plus, services such as Overleaf make it easy to use LaTeX. Besides Overleaf there are other nice services such as ShareLaTex and Authorea that do the same or similar things; Overleaf has tons of features that are distinct, absolutely outstanding, and really useful for anyone who needs to write a lot and publish to the wider audience.

In summary, if you combine web based tools, Overleaf’s own template systems, and rich text writing environment it offers, you can set up an efficient writing workflow (no matter what stage you may write). You will not need to know LaTeX in depth (some commands and usage will still be necessary and I will cover them here), and you will have an excellent system to organise your writing as well. So, here are the steps.

So, the first things first. In order to use Overleaf, you will need to create a username and account on Overleaf. You can get an account for yourself for free at the following page:

#### Step II: Once you signed up, sign in and create a new project

1. When you sign in, you will see a box that says “New Project”. Click on “New Project” to get started.
2. If you receive a URL in your email from someone with a document, and you are asked to click the URL to get to a document, then you already have a document to work on, so just signing in will lead you to that document.
3. To create a new document, start by creating a new project. A project in Overleaf is a folder containing a number of different files.
4. When you click “Create New Project”, you will see several standard templates that Overleaf has done for you. Select one. I usually start with a blank template and then populate with my own latex files. Also note that there are tens of journal article templates, books, theses, etc on the Overleaf site. As we would like to focus on the basics here (really barebones), start with the journal article template. When you do so, you will see a screen, that will look like as follows:

From left to right, these are the elements:

1. Leftmost, you see a panel that looks like a file manager. Next to it, nearly half of the screen is a panel that either shows the source LaTeX document or a rich text rendering. In our tutorial, we won’t worry about “Source codes”, so if your document shows “Source”, switch to “Rich text Format” by clicking on the boxlike button that says “Rich Text”
2. Right half of the screen shows the PDF rendering. Overleaf only shows you the PDF rendering.

1. If you click on “Project” button (if the Project button is not already highlighted and the panel is not showing), it will open the project panel. On the top of the project panel, the main document writing window, and the PDF panel, there are now other sets of buttons that you will use. These are from left to right: “Add Files”, “Word Count”, a left pointing arrow, source, rich text, a quote symbol with a plus sign in it, a clock symbol, Edit, Find, a large anchor sign, a small anchor sign, B, I, a small pi sign, a big pi sign, a numbered list sign, a bullet point sign, a left pointing arrow, a right pointing arrow, Manual, Auto, and then in grey letters written “up to date and saved”.

#### The File Manager Panel

Overleaf provides you an in-built file manager. In this file manager, you can store files that you will use for your paper. This can be text or image documents (remember to upload only PDF, image, or text documents). You can also create new folders where you can store your files. If your paper is likely to have a lot of images, you can create separate folders to hold your images.

You can add files from 15 different sources to Overleaf. You can import documents and files from your hard drive, or you import from over the web; you can also use FTP to transfer files to Overleaf (Overleaf itself does not provide an FTP address though). In this tutorial, I will focus on the web version. I usually add a blank file and name it as filename.tex and continue to work on that file. I have found this to be quite efficient. For example, for my paper writing, if I have several sections, say, introduction, methods, background, summary, results, etc, for every section I add a file with a name to indicate the contents. Thus I usually add files named as introduction.tex, methods.tex and so on. Later, I add the following code to the file main.tex

\include{introduction}

Then repeat this for all files that I have added to the file space that I want to include in my final output. From the file manager, you can also download entire contents of your document in the form of a zipped file to your desktop and process the files after unzipping using LaTeX interpreter you have installed. This is useful if you want to work on the latex files yourself or need to provide the files to a colleague who does not want to work in the Overleaf environment.

The other thing you can do in the file manager panel is to check the word count of your document. You can only do that for the main.tex document. So, if you have a lot of text in your main.tex document then you can check the word count this way. I usually use other editors to check the word count. You can also set any document as your main document for processing, and count the words that way.

Now that you have some idea about the file manager space within Overleaf, let us set up a workflow for writing an academic documents and see how Overleaf helps us in writing and formatting an academic document (term paper, journal article, and so on). Also, let’s move on to the middle panel, where you will do all of your writing.

#### The Centre panel

For you, the centre panel is the main working area. This is where you are going to write your paper. This panel provides you with all the tools and some constraints (good practice constraints, trust me!) that you can use to write your paper. Interestingly, many of them are similar to Medium when it comes to formatting text:

• Use two levels of headers (similar to Medium), these are shown by the big and small anchors
• Use bullet points and numbered lists (similar to Medium)
• You can bold and italicise your fonts (similar to Medium)
• You can write single and multiline codes and formulae (shown by the small pi and the large pi shapes); as an aside, if you want to bring up a code box, in Medium, you use control or command (Apple) + alt + 6

Writing in the centre panel is frictionless and the web app is very responsive. You can use this tool to write in any environment (desktop, tablets, phones). The centre panel menu items do not include buttons for inserting images, tables, and citations. For these you have to use LaTeX codes. I find it helpful to configure a workflow for my writing and plan ahead.

#### Step III: Configure a workflow

In general, academic documents such as research papers, journal articles, term papers at a university course etc have some common elements and sort of a structure to them. In general, at the least, these are:

Metadata. — you need to provide a title and indicate the authorship, and some other elements that are essentially metadata to the article. In LaTeX documents, these are placed in what is known as the “Preamble” of the document. In Overleaf, we place the preamble in the main.tex document somewhere in the beginning of the document; you will see the raw codes if you press “Source” in the middle panel after opening the main.tex.

Tables and figures. — many scholarly documents display information in the form of tables and figures. In a LaTeX document, tables and figures are referred to as special environments where they are placed. If you have many tables and figures, I recommend that you place the figures and tables in separate files labelled as figures.tex and tables.tex. That way, you can either refer to them from within the document or you can copy and paste codes of tables and figures from those documents to the specific part of the document that you are writing.

Citation Support. — all article authors depend on citations and bibliography while writing their articles and essays. Every fact they mention or post in an article or a book or a document, they need to properly attribute in terms of where they found the original source of information. Besides, authors frequently use endnotes and footnotes to add chunks of information that they cannot otherwise write in the body of the main text. As I want to keep this tutorial basic, I will not focus on endnotes and footnotes, other than briefly mention bibliography (I will devote the next article in this series on bibliography and footnote/endnote formatting).

The format of bibliography in a LaTeX document is done by using BibTeX. In overleaf, you can upload a bibtex document, or you can import a bibtex formatted document from your hard drive, or you can import a bibtex document from other web based services such as CiteuLike, Mendeley, and others. You can also import bibtex documents that are exported by reference management software such as Endnote and Papers, and others. Lastly, you can directly write Bibtex formatted entries and work from there.

Remember that you will always find ‘main.tex’ file in the file manager panel for all templates. Think of it like the engine of your writing. This main.tex contains all the essential codes that will compile the paper for you and will render it in the right hand panel for you to watch. I prefer to create separate documents for each section of the paper and then include them in the main.tex. Besides, in the file manager, I create the following three files:

• A references.bib file. This will contain my references in the bibtex format (this is the only technical bit that you will need to learn here)
• A figures.tex file. This file contains codes of all my figures and images for the paper
• A tables.tex file. Similar to the one for figures, it contains all my tables codes for the paper.

In most cases, after you have set up the preamble, and included the files, you will not have to alter the contents of the main.tex file unless you want to tweak the file and the outputs. This file is also the only one where you will need to click on the “Source” in the central panel and work on the source. I suggest the following:

1. Click on the “Source” button on the main.tex file
2. Clean up the Source of the main.tex document and add the following contents so that it will only contain the following. The percentage marks are known as “comments”:
%%%%%% Preamble of the document begins here %%%%%%% mention the type of document, here we are using an article
\documentclass[a4paper]{article}
% load the packages that we shall use for building the document
\usepackage[english]{babel}\usepackage[utf8x]{inputenc}\usepackage{amsmath}\usepackage{graphicx}\usepackage[colorinlistoftodos]{todonotes}
% this package is for tables\usepackage{booktabs}
% write the title and author here% You must supply your own values
\title{A Sample Research Paper}
\author{Arin Basu}
\date{\today}
\begin{document}\maketitle
%%%%% Preamble to the document ends here %%%%%%
% next we include the different sections. % Each section is included in the document
\include{summary}\include{introduction}
% special sections for tables and figures% then go after the main text of the article% you can also copy paste from these sections and codes there
\include{tables}\include{figures}
% This part is for including references and citatins
\bibliography{references}\bibliographystyle{plain}
% The document must end with this code
\end{document}

Once you set up this structure, all you need to do is to write your paper in the central panel. You can, at this point, if you like, minimise distractions by clicking on the arrows on the left and right side of the central panel. For each section of the paper, you select that section and write in rich text in the central panel. You can occasionally check how the document is being rendered.

#### Step IV: Include tables and figures

In this step, you need to do a few things to get your figures, tables, and bibliography sorted.

#### How to add tables to your document

For putting together tables, I recommend you use Tablesgenerator.com site and select latex tables; alternatively use truben.no site.

Here are the steps:

• Visit the site and configure using LaTeX tables.
• Use the bookends theme to style your tables.
• Then copy the resulting code and
• paste to either the place in the document where you want the table to appear or paste it to the tables.tex file.

This way, you can create professional quality tables without writing a single line of code yourself. Once you have studied the process of writing LaTeX tables yourself, it will be intuitive for you to write professional quality latex tables.

Steps:

• Upload the figure (either a jpg or a png figure) to the file space
• Use the following code to add the figure either to the figures.tex file or directly in the document where you want the figures to appear.
% this is just one of the ways% ht stands for here, and top, the figure to be placed% at the site and where possible, top of the page% for more configurations, see LaTeX documentation% this code will work for most documents
\begin{figure}[ht]\includegraphics[width=\textwidth]{name_of_the_file}\end{figure}

#### How to add citations and bibliography using bibtex

As Overleaf is about writing in LaTeX, your citations and bibliography must be configured as bibtex. The simplest and perhaps the most basic way is to add bibtex formatted citations in the references.bib file and then use the

\cite{}

command to add the citations. As soon as you start typing the \cite{} command, you will see a dropdown box that will appear with the citation ID. Select the citation ID of the citation that you would like to add to your document. Depending on your bibliography style, the reference list will be automatically generated for your document.

#### Next steps …

In this tutorial, I introduced the basic concept of writing in wysiwyg using Overleaf. I barely covered the most basics of writing a document using Overleaf. In the next part, I will write about using tables, figures, and bibtex to bring in literature data and writing. I shall also cover putting together formatted tables, and adding figures to your documents in details. Later, in this series, I will cover how you can use Overleaf to work collaboratively with colleagues.