Writing research in Overleaf

Now that we have our project directory, our next task is to set up a project in Overleaf, the software I use for writing research papers. Overleaf is a Google doc equivalent of writing and latex. If you do not write in latex, it might be worth learning how to do it as it can dramatically writing process of a research paper and help you with pesky challenges like formatting citations, arranging tables, or having perfect typesetting for a template for a specific journal. The output of a latex document is generally a PDF file, sometimes a PostScript file, but not a DOCX file – the file format for Microsoft Word.

Many universities today have university-wide subscriptions to professional plans for overleaf. If you do not have an overleaf plan through your university, you can get a free plan to get started. If you find the technology helpful, get a standard plan that will serve most of your needs. (I have no connection with overleaf nor get any payment for this recommendation.) I’m a heavy user, and I have found that it has dramatically increased my productivity after switching from standard latex (MacTex) to overleaf several years ago. Most things I am describing can also be done with standard LaTeX. However, Overleaf has made it significantly more straightforward.

This section will discuss setting up a project directory for a research paper. In a later section, I will discuss how to set up a latex document for a presentation (called Beamer in latex terms).

A green button should be on the top left corner of your overleaf window. This button should say new project. Click it.

Once you click this button, a menu will pop up, giving you several options for different project types. These include a blank project, an example project, a public project, etc., as well as a variety of templates ranging from the one for your institution or templates for things like academic journals, books, letters, etc.

Click the blank project option. Next, a popup will appear, giving you a prompt to enter a project name; let’s call this “strategy research.”

A variety of windows will now appear. The person you should notice is the main window with a latex code. It may look intimidating for those who have yet to code in latex. It is much less intimidating than writing in Microsoft Word, where you have no idea what your actions will result.

You will notice a few pieces of code.

You’ll notice two things at the top: a definition of a document class (this is an article)and a package UTF-8 for encoding certain types of text. Below, we’ll discuss how to set up a standard document for a research paper. However, also notice that commands and latex start with a “.”

The following three commands in latex you will see in the document are the title, author, date, and then brackets for the beginning and end of the document, which begins the document and any document in latex code. Between these two begin and end commands, you will see two other commands make title and section; the section title in the basic template is “introduction.”

Now let’s change the title of your article to “This is strategy research 101” and then hit the recompile button in Green on the top. You will see the PDF update your title to this strategy research 11. Right next to the recompile button, you will see two additional small buttons that look like a document. When you hover over it, it will say “logs and output files.” it is infrequent that you will need to deal with this button, which may help you troubleshoot documents that don’t compile. However, as you get better with latex, this will be less of an issue as you will know how to avoid simple errors in coding.

The next button, which looks like a rectangle with an arrow pointing to it, is a download button. Once you click it, your document in the form of a PDF is downloaded. In your chrome browser, for instance, you’ll see a file called strategy_research.pdf that’s downloaded. If you click on it, you will see the latex document produced.

Okay, now that we have seen the basic document for a blank project, let’s begin by setting up some additional directories in your latex overleaf project. Above the mean.txt file on the left-hand side of your screen, you will see a few buttons. If you hover over them, you will see what they do. The first one, which looks like a document with a little fold, is a new file button. This allows you to create a new file within the project folder and overleaf. A popup appears, giving you options to add files. You can add a new file which is the first option. It’ll say the name.tex, call this appendix.tex and then press “create.” You should now see a file called appendix.tex in your list. The next button looks like a folder. It allows you to create folders here in your overleaf project. Create two new folders, one called “tables” and the other called “figures.” These are parallel folders to the ones you created in your dropbox folder. When you have created your tables and figures in Stata or R, you will upload them here and then connect them to your overleaf document.

Finally, create a file called bibliography.bib. This file will be where you store your references and then use them to add citations to your manuscript. You should press the new file button and type bibliography.bib in the file name field. You might have noticed that you can connect external files or a bibliography from software like Mendeley and Zotero. I do not use this software because I have yet to figure out how to use them effectively in a collaborative way with my co-authors (most, if not all, of my new research, is co-authored).

Now that we have all the set-up completed let’s copy and paste a template I created for writing research papers in strategy.

Here’s a link to this template. You can open up and sublime and copy and paste it into the main.tex file on your overleaf project. Now press recompile.

As you will notice, this document has considerably more packages and options than the blank file. Below I will describe each of these, and they may come in handy as you write your papers.

As you will note, the document class is still an article, but I have added two options: a 12-point font option and a letter paper option.

Describe all the different packages here.

The document currently set up will help you write a research paper with the following features:

It will be on letter paper, with 12 size font.
You will have 1-inch margins on all sides. This is what the geometry option does. You can change it if you would like something different.

The date is set to \today. And will update every single time you compile.

The first page consists of the title, which is an asterisk with a footnote about authorship (or you can add other footnotes that may be relevant to the paper, such as sources of funding.) Furthermore, you will have authors. The norm in my world is the authors are alphabetical. Then, I will have the abstract.

You will notice that there’s a \maketitle option after you begin the document. This places the title and authors at the top of the document. Below “\maketitle,” you have the abstract (\abstract{}) with the text of the abstract in curly brackets.

After the abstract, there is a “\newpage” option, and a “\doublespacing” option that says to LaTeX: (1) start a new page and (2) change from single spacing to double spacing of lines.

Now you will see five sections introduction, a theoretical framework section, the methods and data section, a result section, and a discussion and conclusion section. You can change these to whatever is appropriate for your paper. But these are the five main sections of most academic articles.

After all the sections have been declared, you will see the “\newpage” command again.

This command separates the document’s main text, references, and tables. After using latex, I like that tables and figures go at the end of the manuscript; some fields may differ. Still, in economics-oriented working papers, this is usually the case.

The first thing I do after the new page declaration goes back to single spacing.

Then I include two new commands regarding the bibliography. The first command, “\bibliography{strategy}” tells overleaf to use the strategy.bib file in the directory as the bibliography file. The second command, “\bibliographystyle{apsr},” tells overleaf to format the bibliography in APSR style.